[llvm-commits] [llvm] r115997 - /llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
Chris Lattner
sabre at nondot.org
Thu Oct 7 15:26:19 PDT 2010
Author: lattner
Date: Thu Oct 7 17:26:19 2010
New Revision: 115997
URL: http://llvm.org/viewvc/llvm-project?rev=115997&view=rev
Log:
simplify code: don't build up vector only to assert it is empty.
Modified:
llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.cpp?rev=115997&r1=115996&r2=115997&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Thu Oct 7 17:26:19 2010
@@ -55,7 +55,6 @@
X86InstrInfo::X86InstrInfo(X86TargetMachine &tm)
: TargetInstrInfoImpl(X86Insts, array_lengthof(X86Insts)),
TM(tm), RI(tm, *this) {
- SmallVector<unsigned,16> AmbEntries;
static const unsigned OpTbl2Addr[][2] = {
{ X86::ADC32ri, X86::ADC32mi },
{ X86::ADC32ri8, X86::ADC32mi8 },
@@ -225,7 +224,7 @@
if (!MemOp2RegOpTable.insert(std::make_pair((unsigned*)MemOp,
std::make_pair(RegOp,
AuxInfo))).second)
- AmbEntries.push_back(MemOp);
+ assert(false && "Duplicated entries in unfolding maps?");
}
// If the third value is 1, then it's folding either a load or a store.
@@ -324,7 +323,7 @@
if (RegOp != X86::FsMOVAPDrr && RegOp != X86::FsMOVAPSrr)
if (!MemOp2RegOpTable.insert(std::make_pair((unsigned*)MemOp,
std::make_pair(RegOp, AuxInfo))).second)
- AmbEntries.push_back(MemOp);
+ assert(false && "Duplicated entries in unfolding maps?");
}
static const unsigned OpTbl1[][3] = {
@@ -449,7 +448,7 @@
if (RegOp != X86::FsMOVAPDrr && RegOp != X86::FsMOVAPSrr)
if (!MemOp2RegOpTable.insert(std::make_pair((unsigned*)MemOp,
std::make_pair(RegOp, AuxInfo))).second)
- AmbEntries.push_back(MemOp);
+ assert(false && "Duplicated entries in unfolding maps?");
}
static const unsigned OpTbl2[][3] = {
@@ -661,11 +660,8 @@
unsigned AuxInfo = 2 | (1 << 4);
if (!MemOp2RegOpTable.insert(std::make_pair((unsigned*)MemOp,
std::make_pair(RegOp, AuxInfo))).second)
- AmbEntries.push_back(MemOp);
+ assert(false && "Duplicated entries in unfolding maps?");
}
-
- // Remove ambiguous entries.
- assert(AmbEntries.empty() && "Duplicated entries in unfolding maps?");
}
bool
More information about the llvm-commits
mailing list