Added UltraSparcInstrInfo class to specialize class MachineInstrInfo.

Relevant changes elsewhere:
Added MachineInstrInfo class and moved instruction-related members there.
Added several fields to MachineInstrDescriptor (and renamed it from
MachineInstrInfo.  Latency fields are to support scheduling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Vikram S. Adve 2001-07-28 04:19:10 +00:00
parent 9b0b1ec1ec
commit 3c3b713d55

View File

@ -11,27 +11,23 @@
#include "llvm/CodeGen/Sparc.h"
//************************ Exported Constants ******************************/
// Set external object describing the machine instructions
//
const MachineInstrInfo* TargetMachineInstrInfo = SparcMachineInstrInfo;
//************************ Class Implementations **************************/
//---------------------------------------------------------------------------
// class UltraSparcMachine
//
// Purpose:
// Machine description.
// Primary interface to machine description for the UltraSPARC.
// Primarily just initializes machine-dependent parameters in
// class TargetMachine, and creates machine-dependent subclasses
// for classes such as MachineInstrInfo.
//
//---------------------------------------------------------------------------
UltraSparc::UltraSparc()
: TargetMachine()
: TargetMachine(new UltraSparcInstrInfo)
{
optSizeForSubWordData = 4;
intSize = 4;
@ -42,8 +38,12 @@ UltraSparc::UltraSparc()
pointerSize = 8;
minMemOpWordSize = 8;
maxAtomicMemOpWordSize = 8;
machineInstrInfo = SparcMachineInstrInfo;
zeroRegNum = 0; // %g0 always gives 0 on Sparc
}
UltraSparc::~UltraSparc()
{
delete (UltraSparcInstrInfo*) machineInstrInfo;
}
//**************************************************************************/