[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:
Michael Gottesman
2013-12-30 00:17:37 +00:00
parent 9ae289de46
commit d6bf276e88
6 changed files with 471 additions and 0 deletions

View File

@@ -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.