[PATCH] Add a pass to transform aggregate loads and stores into scalar loads and stores.

Amaury SECHET deadalnix+llvmreview at gmail.com
Tue Mar 3 19:56:22 PST 2015


================
Comment at: lib/Transforms/Scalar/AggregateMemAccessRemoval.cpp:102
@@ +101,3 @@
+      InstrsToErase.push_back(LI);
+      runOnLoad(NewLI, InstrsToErase);
+    }
----------------
reames wrote:
> This should be handled via an outer worklist not recursion, but please fix this as a separate change.
> 
> Actually, sorry, you're not testing this at all.  *Delete* this line and then let's revisit in another change.
What is wrong with using recursion here ?

================
Comment at: lib/Transforms/Scalar/AggregateMemAccessRemoval.cpp:118
@@ +117,3 @@
+  if (StructType* ST = dyn_cast<StructType>(T)) {
+    if (ST->isOpaque())
+      return;
----------------
reames wrote:
> Add a test for this case please.
I'm not sure if this is possible at all. This is more a sanity check than anything else. You can't store/load opaque structs to begin with.

http://reviews.llvm.org/D7780

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






More information about the llvm-commits mailing list