Remove extraneous 64-bit argument to the PPC TargetMachine constructor

and update initialization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215280 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher
2014-08-09 04:38:56 +00:00
parent a617b53aa8
commit f3157be108
4 changed files with 13 additions and 11 deletions

View File

@ -76,8 +76,10 @@ PPCSubtarget &PPCSubtarget::initializeSubtargetDependencies(StringRef CPU,
PPCSubtarget::PPCSubtarget(const std::string &TT, const std::string &CPU, PPCSubtarget::PPCSubtarget(const std::string &TT, const std::string &CPU,
const std::string &FS, PPCTargetMachine &TM, const std::string &FS, PPCTargetMachine &TM,
bool is64Bit, CodeGenOpt::Level OptLevel) CodeGenOpt::Level OptLevel)
: PPCGenSubtargetInfo(TT, CPU, FS), IsPPC64(is64Bit), TargetTriple(TT), : PPCGenSubtargetInfo(TT, CPU, FS), TargetTriple(TT),
IsPPC64(TargetTriple.getArch() == Triple::ppc64 ||
TargetTriple.getArch() == Triple::ppc64le),
OptLevel(OptLevel), TargetABI(PPC_ABI_UNKNOWN), OptLevel(OptLevel), TargetABI(PPC_ABI_UNKNOWN),
FrameLowering(initializeSubtargetDependencies(CPU, FS)), FrameLowering(initializeSubtargetDependencies(CPU, FS)),
DL(getDataLayoutString(*this)), InstrInfo(*this), JITInfo(*this), DL(getDataLayoutString(*this)), InstrInfo(*this), JITInfo(*this),

View File

@ -66,6 +66,9 @@ class TargetMachine;
class PPCSubtarget : public PPCGenSubtargetInfo { class PPCSubtarget : public PPCGenSubtargetInfo {
protected: protected:
/// TargetTriple - What processor and OS we're targeting.
Triple TargetTriple;
/// stackAlignment - The minimum alignment known to hold of the stack frame on /// stackAlignment - The minimum alignment known to hold of the stack frame on
/// entry to the function and which must be maintained by every function. /// entry to the function and which must be maintained by every function.
unsigned StackAlignment; unsigned StackAlignment;
@ -107,9 +110,6 @@ protected:
bool IsJITCodeModel; bool IsJITCodeModel;
bool IsLittleEndian; bool IsLittleEndian;
/// TargetTriple - What processor and OS we're targeting.
Triple TargetTriple;
/// OptLevel - What default optimization level we're emitting code for. /// OptLevel - What default optimization level we're emitting code for.
CodeGenOpt::Level OptLevel; CodeGenOpt::Level OptLevel;
@ -131,7 +131,7 @@ public:
/// of the specified triple. /// of the specified triple.
/// ///
PPCSubtarget(const std::string &TT, const std::string &CPU, PPCSubtarget(const std::string &TT, const std::string &CPU,
const std::string &FS, PPCTargetMachine &TM, bool is64Bit, const std::string &FS, PPCTargetMachine &TM,
CodeGenOpt::Level OptLevel); CodeGenOpt::Level OptLevel);
/// ParseSubtargetFeatures - Parses features string setting specified /// ParseSubtargetFeatures - Parses features string setting specified

View File

@ -40,9 +40,9 @@ extern "C" void LLVMInitializePowerPCTarget() {
PPCTargetMachine::PPCTargetMachine(const Target &T, StringRef TT, StringRef CPU, PPCTargetMachine::PPCTargetMachine(const Target &T, StringRef TT, StringRef CPU,
StringRef FS, const TargetOptions &Options, StringRef FS, const TargetOptions &Options,
Reloc::Model RM, CodeModel::Model CM, Reloc::Model RM, CodeModel::Model CM,
CodeGenOpt::Level OL, bool is64Bit) CodeGenOpt::Level OL)
: LLVMTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL), : LLVMTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL),
Subtarget(TT, CPU, FS, *this, is64Bit, OL) { Subtarget(TT, CPU, FS, *this, OL) {
initAsmInfo(); initAsmInfo();
} }
@ -53,7 +53,7 @@ PPC32TargetMachine::PPC32TargetMachine(const Target &T, StringRef TT,
const TargetOptions &Options, const TargetOptions &Options,
Reloc::Model RM, CodeModel::Model CM, Reloc::Model RM, CodeModel::Model CM,
CodeGenOpt::Level OL) CodeGenOpt::Level OL)
: PPCTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL, false) { : PPCTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL) {
} }
void PPC64TargetMachine::anchor() { } void PPC64TargetMachine::anchor() { }
@ -63,7 +63,7 @@ PPC64TargetMachine::PPC64TargetMachine(const Target &T, StringRef TT,
const TargetOptions &Options, const TargetOptions &Options,
Reloc::Model RM, CodeModel::Model CM, Reloc::Model RM, CodeModel::Model CM,
CodeGenOpt::Level OL) CodeGenOpt::Level OL)
: PPCTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL, true) { : PPCTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL) {
} }

View File

@ -30,7 +30,7 @@ public:
PPCTargetMachine(const Target &T, StringRef TT, PPCTargetMachine(const Target &T, StringRef TT,
StringRef CPU, StringRef FS, const TargetOptions &Options, StringRef CPU, StringRef FS, const TargetOptions &Options,
Reloc::Model RM, CodeModel::Model CM, Reloc::Model RM, CodeModel::Model CM,
CodeGenOpt::Level OL, bool is64Bit); CodeGenOpt::Level OL);
const PPCSubtarget *getSubtargetImpl() const override { return &Subtarget; } const PPCSubtarget *getSubtargetImpl() const override { return &Subtarget; }