[llvm-commits] [llvm] r43194 - /llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
Evan Cheng
evan.cheng at apple.com
Fri Oct 19 16:50:59 PDT 2007
Author: evancheng
Date: Fri Oct 19 18:50:58 2007
New Revision: 43194
URL: http://llvm.org/viewvc/llvm-project?rev=43194&view=rev
Log:
Resolve unfold tables ambiguity.
Modified:
llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp?rev=43194&r1=43193&r2=43194&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp Fri Oct 19 18:50:58 2007
@@ -324,9 +324,10 @@
unsigned FoldedLoad = OpTbl0[i][2];
// Index 0, folded load or store.
unsigned AuxInfo = 0 | (FoldedLoad << 4) | ((FoldedLoad^1) << 5);
- if (!MemOp2RegOpTable.insert(std::make_pair((unsigned*)MemOp,
+ if (RegOp != X86::FsMOVAPDrr && RegOp != X86::FsMOVAPSrr)
+ if (!MemOp2RegOpTable.insert(std::make_pair((unsigned*)MemOp,
std::make_pair(RegOp, AuxInfo))))
- AmbEntries.push_back(MemOp);
+ AmbEntries.push_back(MemOp);
}
static const unsigned OpTbl1[][2] = {
@@ -449,9 +450,10 @@
if (!RegOp2MemOpTable1.insert(std::make_pair((unsigned*)RegOp, MemOp)))
assert(false && "Duplicated entries?");
unsigned AuxInfo = 1 | (1 << 4); // Index 1, folded load
- if (!MemOp2RegOpTable.insert(std::make_pair((unsigned*)MemOp,
+ if (RegOp != X86::FsMOVAPDrr && RegOp != X86::FsMOVAPSrr)
+ if (!MemOp2RegOpTable.insert(std::make_pair((unsigned*)MemOp,
std::make_pair(RegOp, AuxInfo))))
- AmbEntries.push_back(MemOp);
+ AmbEntries.push_back(MemOp);
}
static const unsigned OpTbl2[][2] = {
@@ -648,8 +650,7 @@
}
// Remove ambiguous entries.
- for (unsigned i = 0, e = AmbEntries.size(); i != e; ++i)
- MemOp2RegOpTable.erase((unsigned*)AmbEntries[i]);
+ assert(AmbEntries.empty() && "Duplicated entries in unfolding maps?");
}
// getX86RegNum - This function maps LLVM register identifiers to their X86
More information about the llvm-commits
mailing list