mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[sil-sroa] Very initial simple initial commit of SILSROA. Currently only lowers
copy_addr, destroy_addr into their constituant parts without performing any chopping to unblock Nadav. The plan is to use type lowering to chop these up and then rewrite afterwards. But for now I want to unblock Nadav. Swift SVN r11728
This commit is contained in:
@@ -43,6 +43,7 @@ enum class PassKind {
|
||||
SILSpecialization,
|
||||
SimplifyCFG,
|
||||
PerformanceInlining,
|
||||
SROA,
|
||||
};
|
||||
|
||||
static llvm::cl::opt<std::string>
|
||||
@@ -104,6 +105,10 @@ Passes(llvm::cl::desc("Passes:"),
|
||||
"inline",
|
||||
"Inline functions which are determined to be"
|
||||
" less than a pre-set cost."),
|
||||
clEnumValN(PassKind::SROA,
|
||||
"sroa",
|
||||
"Perform SIL scalar replacement of "
|
||||
"aggregates"),
|
||||
clEnumValEnd));
|
||||
|
||||
static llvm::cl::opt<bool>
|
||||
@@ -220,6 +225,9 @@ int main(int argc, char **argv) {
|
||||
case PassKind::PerformanceInlining:
|
||||
performSILPerformanceInlining(CI.getSILModule());
|
||||
break;
|
||||
case PassKind::SROA:
|
||||
performSILSROA(CI.getSILModule());
|
||||
break;
|
||||
}
|
||||
|
||||
// Verify the module after every pass.
|
||||
|
||||
Reference in New Issue
Block a user