[PATCH] SROA: Defer migrating the debug info for new allocas until after all partitions are created.

Chandler Carruth chandlerc at gmail.com
Mon Dec 22 16:20:41 PST 2014


REPOSITORY
  rL LLVM

================
Comment at: lib/Transforms/Scalar/SROA.cpp:3607
@@ -3613,2 +3606,3 @@
   bool Changed = false;
+  Pieces.clear();
 
----------------
Rather than a member, how about a local here...

================
Comment at: lib/Transforms/Scalar/SROA.cpp:3611
@@ -3616,3 +3610,3 @@
   for (auto &P : AS.partitions()) {
     Changed |= rewritePartition(AI, AS, P);
     ++NumPartitions;
----------------
And change rewritePartition so that if it makes changes it returns the changed alloca. We can compare against &AI to handle the case that we got back the same alloca that went in, and we'll never get back the same alloca when we end up with more than one.

http://reviews.llvm.org/D6766

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list