[PATCH] D14148: [GlobalOpt] Demote globals to locals more aggressively
Mehdi AMINI via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 12 09:38:30 PST 2015
joker.eph requested changes to this revision.
joker.eph added a reviewer: joker.eph.
joker.eph added a comment.
This revision now requires changes to proceed.
Looks good, but the changes we discussed on IRC!
================
Comment at: lib/Transforms/IPO/GlobalOpt.cpp:1776
@@ +1775,3 @@
+ }
+ }
+ continue;
----------------
To sum up our IRC conversation, we can unconditionally add Load and Stored to the arrays, and check for the size later: we only care if a load is covered by a store at least as large.
================
Comment at: lib/Transforms/IPO/GlobalOpt.cpp:1810
@@ -1730,2 +1809,3 @@
+
/// ProcessInternalGlobal - Analyze the specified global variable and optimize
/// it if possible. If we make a change, return true.
----------------
Nitpick: current guideline is not to repeat the function name in the doxygen.
================
Comment at: lib/Transforms/IPO/GlobalOpt.cpp:1819
@@ -1768,3 +1818,3 @@
if (!GS.IsLoaded) {
- DEBUG(dbgs() << "GLOBAL NEVER LOADED: " << *GV);
+ DEBUG(dbgs() << "GLOBAL NEVER LOADED: " << *GV << "\n");
----------------
Commit this separately now.
Repository:
rL LLVM
http://reviews.llvm.org/D14148
More information about the llvm-commits
mailing list