[llvm] r260825 - [AggressiveAntiDepBreaker] Skip some unnecessary BitVector copies.
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 13 08:39:40 PST 2016
Author: d0k
Date: Sat Feb 13 10:39:39 2016
New Revision: 260825
URL: http://llvm.org/viewvc/llvm-project?rev=260825&view=rev
Log:
[AggressiveAntiDepBreaker] Skip some unnecessary BitVector copies.
Modified:
llvm/trunk/lib/CodeGen/AggressiveAntiDepBreaker.cpp
Modified: llvm/trunk/lib/CodeGen/AggressiveAntiDepBreaker.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AggressiveAntiDepBreaker.cpp?rev=260825&r1=260824&r2=260825&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AggressiveAntiDepBreaker.cpp (original)
+++ llvm/trunk/lib/CodeGen/AggressiveAntiDepBreaker.cpp Sat Feb 13 10:39:39 2016
@@ -563,13 +563,16 @@ bool AggressiveAntiDepBreaker::FindSuita
if (RegRefs.count(Reg) > 0) {
DEBUG(dbgs() << "\t\t" << TRI->getName(Reg) << ":");
- BitVector BV = GetRenameRegisters(Reg);
- RenameRegisterMap.insert(std::pair<unsigned, BitVector>(Reg, BV));
-
- DEBUG(dbgs() << " ::");
- DEBUG(for (int r = BV.find_first(); r != -1; r = BV.find_next(r))
- dbgs() << " " << TRI->getName(r));
- DEBUG(dbgs() << "\n");
+ BitVector &BV = RenameRegisterMap[Reg];
+ assert(BV.empty());
+ BV = GetRenameRegisters(Reg);
+
+ DEBUG({
+ dbgs() << " ::";
+ for (int r = BV.find_first(); r != -1; r = BV.find_next(r))
+ dbgs() << " " << TRI->getName(r);
+ dbgs() << "\n";
+ });
}
}
@@ -650,8 +653,7 @@ bool AggressiveAntiDepBreaker::FindSuita
DEBUG(dbgs() << " " << TRI->getName(NewReg));
// Check if Reg can be renamed to NewReg.
- BitVector BV = RenameRegisterMap[Reg];
- if (!BV.test(NewReg)) {
+ if (!RenameRegisterMap[Reg].test(NewReg)) {
DEBUG(dbgs() << "(no rename)");
goto next_super_reg;
}
More information about the llvm-commits
mailing list