[PATCH] [LoopReroll] Alter the data structures used during reroll validation.
hfinkel at anl.gov
hfinkel at anl.gov
Thu Jan 29 12:43:50 PST 2015
LGTM, with some minor issues below.
REPOSITORY
rL LLVM
================
Comment at: lib/Transforms/Scalar/LoopRerollPass.cpp:739
@@ +738,3 @@
+ // so we can iterate over the contents later in perfect order.
+ for (auto &I : *L->getHeader())
+ Uses[&I].resize(IL_End);
----------------
I believe you need { } around the bodies of all range-based for loops in order to make some version of MSVC (2012?) happy.
(this applies to all of them)
================
Comment at: lib/Transforms/Scalar/LoopRerollPass.cpp:783
@@ +782,3 @@
+
+static MapVector<Instruction*, SmallBitVector>::iterator
+nextInstr(int Val, MapVector<Instruction*, SmallBitVector> &In,
----------------
Let's use a typedef for MapVector<Instruction*, SmallBitVector>
================
Comment at: lib/Transforms/Scalar/LoopRerollPass.cpp:1040
@@ -1004,2 +1039,3 @@
if (BranchInst *BI = dyn_cast<BranchInst>(Header->getTerminator())) {
- if (LoopIncUseSet.count(BI)) {
+ // FIXME: Why do we need this check?
+ if (Uses[BI].find_first() == IL_LoopIncIdx) {
----------------
:( -- Now I don't recall exactly (I should have added a comment). Was it for unconditional branches?
http://reviews.llvm.org/D7260
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list