From: Chris Lattner Date: Tue, 29 Oct 2002 15:45:20 +0000 (+0000) Subject: MachineInstrInfo doesn't need a TargetMachine X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=047bbafb99a353ed68e60eab147f5822a09a99ea;p=oota-llvm.git MachineInstrInfo doesn't need a TargetMachine git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4372 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/SparcV9/SparcV9InstrInfo.cpp b/lib/Target/SparcV9/SparcV9InstrInfo.cpp index fbabe933166..134bdacae07 100644 --- a/lib/Target/SparcV9/SparcV9InstrInfo.cpp +++ b/lib/Target/SparcV9/SparcV9InstrInfo.cpp @@ -324,8 +324,8 @@ InitializeMaxConstantsTable() //--------------------------------------------------------------------------- /*ctor*/ -UltraSparcInstrInfo::UltraSparcInstrInfo(const TargetMachine& tgt) - : MachineInstrInfo(tgt, SparcMachineInstrDesc, +UltraSparcInstrInfo::UltraSparcInstrInfo() + : MachineInstrInfo(SparcMachineInstrDesc, /*descSize = */ NUM_TOTAL_OPCODES, /*numRealOpCodes = */ NUM_REAL_OPCODES) { diff --git a/lib/Target/SparcV9/SparcV9Internals.h b/lib/Target/SparcV9/SparcV9Internals.h index 6f283001c9b..9be6b7fe582 100644 --- a/lib/Target/SparcV9/SparcV9Internals.h +++ b/lib/Target/SparcV9/SparcV9Internals.h @@ -76,7 +76,7 @@ extern const MachineInstrDescriptor SparcMachineInstrDesc[]; //--------------------------------------------------------------------------- struct UltraSparcInstrInfo : public MachineInstrInfo { - UltraSparcInstrInfo(const TargetMachine& tgt); + UltraSparcInstrInfo(); // // All immediate constants are in position 1 except the diff --git a/lib/Target/SparcV9/SparcV9TargetMachine.cpp b/lib/Target/SparcV9/SparcV9TargetMachine.cpp index 42ffd433f02..f04fcf5285f 100644 --- a/lib/Target/SparcV9/SparcV9TargetMachine.cpp +++ b/lib/Target/SparcV9/SparcV9TargetMachine.cpp @@ -126,7 +126,6 @@ UltraSparcFrameInfo::getDynamicAreaOffset(MachineFunction& mcInfo, UltraSparc::UltraSparc() : TargetMachine("UltraSparc-Native"), - instrInfo(*this), schedInfo(*this), regInfo(*this), frameInfo(*this), diff --git a/lib/Target/TargetInstrInfo.cpp b/lib/Target/TargetInstrInfo.cpp index ca26718708e..a911116f7bc 100644 --- a/lib/Target/TargetInstrInfo.cpp +++ b/lib/Target/TargetInstrInfo.cpp @@ -15,11 +15,10 @@ //--------------------------------------------------------------------------- -MachineInstrInfo::MachineInstrInfo(const TargetMachine& tgt, - const MachineInstrDescriptor* Desc, +MachineInstrInfo::MachineInstrInfo(const MachineInstrDescriptor* Desc, unsigned DescSize, unsigned NumRealOpCodes) - : target(tgt), desc(Desc), descSize(DescSize), numRealOpCodes(NumRealOpCodes) { + : desc(Desc), descSize(DescSize), numRealOpCodes(NumRealOpCodes) { // FIXME: TargetInstrDescriptors should not be global assert(TargetInstrDescriptors == NULL && desc != NULL); TargetInstrDescriptors = desc; // initialize global variable