[PATCH] Optimize InstCombine stack memory consumption

Reid Kleckner rnk at google.com
Tue Jul 1 13:59:08 PDT 2014


lgtm

================
Comment at: lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp:63
@@ +62,3 @@
+    const bool IsOffset = ValuePair.second;
+    for (auto &Use : ValuePair.first->uses()) {
+      Instruction *I = cast<Instruction>(Use.getUser());
----------------
Why rename 'U' to 'Use'?  'Use' already a type, so this is a bit confusing.  If anything, this loop should iterate over users, not uses.

http://reviews.llvm.org/D4355






More information about the llvm-commits mailing list