From ec7533b620b702d8b67ef599641700633713e85f Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Sat, 15 Mar 2008 00:19:36 +0000 Subject: [PATCH] Remove isImplicitDef TargetInstrDesc flag. llvm-svn: 48381 --- llvm/include/llvm/Target/TargetInstrDesc.h | 8 -------- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp | 7 +++---- llvm/lib/Target/Target.td | 1 - llvm/utils/TableGen/CodeGenInstruction.cpp | 1 - llvm/utils/TableGen/CodeGenInstruction.h | 1 - llvm/utils/TableGen/InstrInfoEmitter.cpp | 1 - 6 files changed, 3 insertions(+), 16 deletions(-) diff --git a/llvm/include/llvm/Target/TargetInstrDesc.h b/llvm/include/llvm/Target/TargetInstrDesc.h index 16142c656aae..5d31a00dd337 100644 --- a/llvm/include/llvm/Target/TargetInstrDesc.h +++ b/llvm/include/llvm/Target/TargetInstrDesc.h @@ -81,7 +81,6 @@ namespace TID { HasOptionalDef, Return, Call, - ImplicitDef, Barrier, Terminator, Branch, @@ -219,13 +218,6 @@ public: return Flags & (1 << TID::Call); } - /// isImplicitDef - Return true if this is an "IMPLICIT_DEF" instruction, - /// which defines a register to an unspecified value. These basically - /// correspond to x = undef. - bool isImplicitDef() const { - return Flags & (1 << TID::ImplicitDef); - } - /// isBarrier - Returns true if the specified instruction stops control flow /// from executing the instruction immediately following it. Examples include /// unconditional branches and return instructions. diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp index d7c5544c366f..3dde8195a44d 100644 --- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -641,8 +641,7 @@ bool LiveIntervals::isReMaterializable(const LiveInterval &li, return false; isLoad = false; - const TargetInstrDesc &TID = MI->getDesc(); - if (TID.isImplicitDef()) + if (MI->getOpcode() == TargetInstrInfo::IMPLICIT_DEF) return true; int FrameIdx = 0; @@ -655,6 +654,7 @@ bool LiveIntervals::isReMaterializable(const LiveInterval &li, return true; if (tii_->isTriviallyReMaterializable(MI)) { + const TargetInstrDesc &TID = MI->getDesc(); isLoad = TID.isSimpleLoad(); unsigned ImpUse = getReMatImplicitUse(li, MI); @@ -741,9 +741,8 @@ bool LiveIntervals::tryFoldMemoryOperand(MachineInstr* &MI, unsigned InstrIdx, SmallVector &Ops, bool isSS, int Slot, unsigned Reg) { - const TargetInstrDesc &TID = MI->getDesc(); // If it is an implicit def instruction, just delete it. - if (TID.isImplicitDef()) { + if (MI->getOpcode() == TargetInstrInfo::IMPLICIT_DEF) { RemoveMachineInstrFromMaps(MI); vrm.RemoveMachineInstrFromMaps(MI); MI->eraseFromParent(); diff --git a/llvm/lib/Target/Target.td b/llvm/lib/Target/Target.td index d7f1e38c118c..9d49bd2185d0 100644 --- a/llvm/lib/Target/Target.td +++ b/llvm/lib/Target/Target.td @@ -193,7 +193,6 @@ class Instruction { bit isSimpleLoad = 0; // Is this just a load instruction? bit mayLoad = 0; // Is it possible for this inst to read memory? bit mayStore = 0; // Is it possible for this inst to write memory? - bit isImplicitDef = 0; // Is this instruction an implicit def instruction? bit isTwoAddress = 0; // Is this a two address instruction? bit isConvertibleToThreeAddress = 0; // Can this 2-addr instruction promote? bit isCommutable = 0; // Is this 3 operand instruction commutable? diff --git a/llvm/utils/TableGen/CodeGenInstruction.cpp b/llvm/utils/TableGen/CodeGenInstruction.cpp index 8b7064790774..53daf9d94463 100644 --- a/llvm/utils/TableGen/CodeGenInstruction.cpp +++ b/llvm/utils/TableGen/CodeGenInstruction.cpp @@ -86,7 +86,6 @@ CodeGenInstruction::CodeGenInstruction(Record *R, const std::string &AsmStr) isSimpleLoad = R->getValueAsBit("isSimpleLoad"); mayLoad = R->getValueAsBit("mayLoad"); mayStore = R->getValueAsBit("mayStore"); - isImplicitDef= R->getValueAsBit("isImplicitDef"); bool isTwoAddress = R->getValueAsBit("isTwoAddress"); isPredicable = R->getValueAsBit("isPredicable"); isConvertibleToThreeAddress = R->getValueAsBit("isConvertibleToThreeAddress"); diff --git a/llvm/utils/TableGen/CodeGenInstruction.h b/llvm/utils/TableGen/CodeGenInstruction.h index ad076a2074ed..9bfd4323f914 100644 --- a/llvm/utils/TableGen/CodeGenInstruction.h +++ b/llvm/utils/TableGen/CodeGenInstruction.h @@ -91,7 +91,6 @@ namespace llvm { bool isCall; bool isSimpleLoad; bool mayLoad, mayStore; - bool isImplicitDef; bool isPredicable; bool isConvertibleToThreeAddress; bool isCommutable; diff --git a/llvm/utils/TableGen/InstrInfoEmitter.cpp b/llvm/utils/TableGen/InstrInfoEmitter.cpp index 2ac76349d700..d765152d23ae 100644 --- a/llvm/utils/TableGen/InstrInfoEmitter.cpp +++ b/llvm/utils/TableGen/InstrInfoEmitter.cpp @@ -346,7 +346,6 @@ void InstrInfoEmitter::emitRecord(const CodeGenInstruction &Inst, unsigned Num, if (Inst.isSimpleLoad) OS << "|(1<