[PATCH] D12269: Add a pass to lift aggregate into allocas so SROA can get rid of them.
hfinkel@anl.gov via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 18 08:03:15 PDT 2015
hfinkel added a comment.
Chandler, please do comment on the approach. We should get this settled.
================
Comment at: lib/Transforms/Scalar/AggregateLifter.cpp:13
@@ +12,3 @@
+/// subsequent passes, notably SROA, to optimize properly.
+///
+//===----------------------------------------------------------------------===//
----------------
You should provide some small examples here of what this actually means.
================
Comment at: lib/Transforms/Scalar/AggregateLifter.cpp:117
@@ +116,3 @@
+void FunctionLifter::runOnLoad(LoadInst *LI) {
+ if (!LI->isSimple()) {
+ return;
----------------
Don't need { } if there is only one conditional statement. Same comment applies to several places below.
================
Comment at: lib/Transforms/Scalar/AggregateLifter.cpp:133
@@ +132,3 @@
+
+ IRBuilder<> Builder(LI);
+ Builder.CreateMemCpy(A, LI->getPointerOperand(), Size, Align);
----------------
Looks like we're dropping 'volatile' and any associated metadata here when we convert these loads.
http://reviews.llvm.org/D12269
More information about the llvm-commits
mailing list