[PATCH] D11174: [BranchFolding] do not iterate the aliases of virtual registers
Benjamin Kramer
benny.kra at gmail.com
Tue Jul 21 15:29:35 PDT 2015
bkramer added a comment.
This looks good with one comment below. Also the top comment in this file could use an update so it's clear that the pass has to handle vregs too.
================
Comment at: lib/CodeGen/BranchFolding.cpp:1812-1816
@@ -1802,5 +1811,7 @@
continue;
- for (MCRegAliasIterator AI(Reg, TRI, true); AI.isValid(); ++AI)
- LocalDefsSet.erase(*AI);
+ if (TargetRegisterInfo::isPhysicalRegister(Reg)) {
+ for (MCRegAliasIterator AI(Reg, TRI, true); AI.isValid(); ++AI)
+ LocalDefsSet.erase(*AI);
+ }
}
----------------
The alias iterator has the IncludeSelf flag set, so shouldn't Reg be removed from the set even if it's a vreg?
http://reviews.llvm.org/D11174
More information about the llvm-commits
mailing list