mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-25 17:20:48 +00:00
constify the TargetMachine being passed through the Mips subtarget
creation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218169 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -120,7 +120,7 @@ static const Mips16IntrinsicHelperType Mips16IntrinsicHelper[] = {
|
|||||||
{"truncf", "__mips16_call_stub_sf_1"},
|
{"truncf", "__mips16_call_stub_sf_1"},
|
||||||
};
|
};
|
||||||
|
|
||||||
Mips16TargetLowering::Mips16TargetLowering(MipsTargetMachine &TM,
|
Mips16TargetLowering::Mips16TargetLowering(const MipsTargetMachine &TM,
|
||||||
const MipsSubtarget &STI)
|
const MipsSubtarget &STI)
|
||||||
: MipsTargetLowering(TM, STI) {
|
: MipsTargetLowering(TM, STI) {
|
||||||
|
|
||||||
@@ -153,7 +153,7 @@ Mips16TargetLowering::Mips16TargetLowering(MipsTargetMachine &TM,
|
|||||||
}
|
}
|
||||||
|
|
||||||
const MipsTargetLowering *
|
const MipsTargetLowering *
|
||||||
llvm::createMips16TargetLowering(MipsTargetMachine &TM,
|
llvm::createMips16TargetLowering(const MipsTargetMachine &TM,
|
||||||
const MipsSubtarget &STI) {
|
const MipsSubtarget &STI) {
|
||||||
return new Mips16TargetLowering(TM, STI);
|
return new Mips16TargetLowering(TM, STI);
|
||||||
}
|
}
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
namespace llvm {
|
namespace llvm {
|
||||||
class Mips16TargetLowering : public MipsTargetLowering {
|
class Mips16TargetLowering : public MipsTargetLowering {
|
||||||
public:
|
public:
|
||||||
explicit Mips16TargetLowering(MipsTargetMachine &TM,
|
explicit Mips16TargetLowering(const MipsTargetMachine &TM,
|
||||||
const MipsSubtarget &STI);
|
const MipsSubtarget &STI);
|
||||||
|
|
||||||
bool allowsMisalignedMemoryAccesses(EVT VT, unsigned AddrSpace,
|
bool allowsMisalignedMemoryAccesses(EVT VT, unsigned AddrSpace,
|
||||||
|
@@ -209,7 +209,7 @@ const char *MipsTargetLowering::getTargetNodeName(unsigned Opcode) const {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MipsTargetLowering::MipsTargetLowering(MipsTargetMachine &TM,
|
MipsTargetLowering::MipsTargetLowering(const MipsTargetMachine &TM,
|
||||||
const MipsSubtarget &STI)
|
const MipsSubtarget &STI)
|
||||||
: TargetLowering(TM, new MipsTargetObjectFile()), Subtarget(STI) {
|
: TargetLowering(TM, new MipsTargetObjectFile()), Subtarget(STI) {
|
||||||
// Mips does not have i1 type, so use i32 for
|
// Mips does not have i1 type, so use i32 for
|
||||||
@@ -409,7 +409,7 @@ MipsTargetLowering::MipsTargetLowering(MipsTargetMachine &TM,
|
|||||||
isMicroMips = Subtarget.inMicroMipsMode();
|
isMicroMips = Subtarget.inMicroMipsMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
const MipsTargetLowering *MipsTargetLowering::create(MipsTargetMachine &TM,
|
const MipsTargetLowering *MipsTargetLowering::create(const MipsTargetMachine &TM,
|
||||||
const MipsSubtarget &STI) {
|
const MipsSubtarget &STI) {
|
||||||
if (STI.inMips16Mode())
|
if (STI.inMips16Mode())
|
||||||
return llvm::createMips16TargetLowering(TM, STI);
|
return llvm::createMips16TargetLowering(TM, STI);
|
||||||
|
@@ -214,10 +214,10 @@ namespace llvm {
|
|||||||
class MipsTargetLowering : public TargetLowering {
|
class MipsTargetLowering : public TargetLowering {
|
||||||
bool isMicroMips;
|
bool isMicroMips;
|
||||||
public:
|
public:
|
||||||
explicit MipsTargetLowering(MipsTargetMachine &TM,
|
explicit MipsTargetLowering(const MipsTargetMachine &TM,
|
||||||
const MipsSubtarget &STI);
|
const MipsSubtarget &STI);
|
||||||
|
|
||||||
static const MipsTargetLowering *create(MipsTargetMachine &TM,
|
static const MipsTargetLowering *create(const MipsTargetMachine &TM,
|
||||||
const MipsSubtarget &STI);
|
const MipsSubtarget &STI);
|
||||||
|
|
||||||
/// createFastISel - This method returns a target specific FastISel object,
|
/// createFastISel - This method returns a target specific FastISel object,
|
||||||
@@ -602,9 +602,11 @@ namespace llvm {
|
|||||||
|
|
||||||
/// Create MipsTargetLowering objects.
|
/// Create MipsTargetLowering objects.
|
||||||
const MipsTargetLowering *
|
const MipsTargetLowering *
|
||||||
createMips16TargetLowering(MipsTargetMachine &TM, const MipsSubtarget &STI);
|
createMips16TargetLowering(const MipsTargetMachine &TM,
|
||||||
|
const MipsSubtarget &STI);
|
||||||
const MipsTargetLowering *
|
const MipsTargetLowering *
|
||||||
createMipsSETargetLowering(MipsTargetMachine &TM, const MipsSubtarget &STI);
|
createMipsSETargetLowering(const MipsTargetMachine &TM,
|
||||||
|
const MipsSubtarget &STI);
|
||||||
|
|
||||||
namespace Mips {
|
namespace Mips {
|
||||||
FastISel *createFastISel(FunctionLoweringInfo &funcInfo,
|
FastISel *createFastISel(FunctionLoweringInfo &funcInfo,
|
||||||
|
@@ -35,7 +35,7 @@ static cl::opt<bool> NoDPLoadStore("mno-ldc1-sdc1", cl::init(false),
|
|||||||
"stores to their single precision "
|
"stores to their single precision "
|
||||||
"counterparts"));
|
"counterparts"));
|
||||||
|
|
||||||
MipsSETargetLowering::MipsSETargetLowering(MipsTargetMachine &TM,
|
MipsSETargetLowering::MipsSETargetLowering(const MipsTargetMachine &TM,
|
||||||
const MipsSubtarget &STI)
|
const MipsSubtarget &STI)
|
||||||
: MipsTargetLowering(TM, STI) {
|
: MipsTargetLowering(TM, STI) {
|
||||||
// Set up the register classes
|
// Set up the register classes
|
||||||
@@ -228,7 +228,7 @@ MipsSETargetLowering::MipsSETargetLowering(MipsTargetMachine &TM,
|
|||||||
}
|
}
|
||||||
|
|
||||||
const MipsTargetLowering *
|
const MipsTargetLowering *
|
||||||
llvm::createMipsSETargetLowering(MipsTargetMachine &TM,
|
llvm::createMipsSETargetLowering(const MipsTargetMachine &TM,
|
||||||
const MipsSubtarget &STI) {
|
const MipsSubtarget &STI) {
|
||||||
return new MipsSETargetLowering(TM, STI);
|
return new MipsSETargetLowering(TM, STI);
|
||||||
}
|
}
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
namespace llvm {
|
namespace llvm {
|
||||||
class MipsSETargetLowering : public MipsTargetLowering {
|
class MipsSETargetLowering : public MipsTargetLowering {
|
||||||
public:
|
public:
|
||||||
explicit MipsSETargetLowering(MipsTargetMachine &TM,
|
explicit MipsSETargetLowering(const MipsTargetMachine &TM,
|
||||||
const MipsSubtarget &STI);
|
const MipsSubtarget &STI);
|
||||||
|
|
||||||
/// \brief Enable MSA support for the given integer type and Register
|
/// \brief Enable MSA support for the given integer type and Register
|
||||||
|
@@ -104,7 +104,7 @@ static std::string computeDataLayout(const MipsSubtarget &ST) {
|
|||||||
|
|
||||||
MipsSubtarget::MipsSubtarget(const std::string &TT, const std::string &CPU,
|
MipsSubtarget::MipsSubtarget(const std::string &TT, const std::string &CPU,
|
||||||
const std::string &FS, bool little,
|
const std::string &FS, bool little,
|
||||||
MipsTargetMachine *_TM)
|
const MipsTargetMachine *_TM)
|
||||||
: MipsGenSubtargetInfo(TT, CPU, FS), MipsArchVersion(Mips32),
|
: MipsGenSubtargetInfo(TT, CPU, FS), MipsArchVersion(Mips32),
|
||||||
MipsABI(UnknownABI), IsLittle(little), IsSingleFloat(false),
|
MipsABI(UnknownABI), IsLittle(little), IsSingleFloat(false),
|
||||||
IsFPXX(false), NoABICalls(false), IsFP64bit(false), UseOddSPReg(true),
|
IsFPXX(false), NoABICalls(false), IsFP64bit(false), UseOddSPReg(true),
|
||||||
|
@@ -141,7 +141,7 @@ protected:
|
|||||||
// as from the command line
|
// as from the command line
|
||||||
enum {NoOverride, Mips16Override, NoMips16Override} OverrideMode;
|
enum {NoOverride, Mips16Override, NoMips16Override} OverrideMode;
|
||||||
|
|
||||||
MipsTargetMachine *TM;
|
const MipsTargetMachine *TM;
|
||||||
|
|
||||||
Triple TargetTriple;
|
Triple TargetTriple;
|
||||||
|
|
||||||
@@ -168,7 +168,8 @@ public:
|
|||||||
/// This constructor initializes the data members to match that
|
/// This constructor initializes the data members to match that
|
||||||
/// of the specified triple.
|
/// of the specified triple.
|
||||||
MipsSubtarget(const std::string &TT, const std::string &CPU,
|
MipsSubtarget(const std::string &TT, const std::string &CPU,
|
||||||
const std::string &FS, bool little, MipsTargetMachine *TM);
|
const std::string &FS, bool little,
|
||||||
|
const MipsTargetMachine *TM);
|
||||||
|
|
||||||
/// ParseSubtargetFeatures - Parses features string setting specified
|
/// ParseSubtargetFeatures - Parses features string setting specified
|
||||||
/// subtarget options. Definition of function is auto generated by tblgen.
|
/// subtarget options. Definition of function is auto generated by tblgen.
|
||||||
|
Reference in New Issue
Block a user