Move PPCFrameLowering into PPCSubtarget from PPCTargetMachine. Use

the initializeSubtargetDependencies code to obtain an initialized
subtarget and migrate a couple of subtarget using functions to the
.cpp file to avoid circular includes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210822 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher
2014-06-12 20:54:11 +00:00
parent 4cea00282f
commit 054a74452c
6 changed files with 211 additions and 196 deletions

View File

@@ -32,14 +32,19 @@ using namespace llvm;
#define GET_SUBTARGETINFO_CTOR
#include "PPCGenSubtargetInfo.inc"
PPCSubtarget &PPCSubtarget::initializeSubtargetDependencies(StringRef CPU,
StringRef FS) {
initializeEnvironment();
resetSubtargetFeatures(CPU, FS);
return *this;
}
PPCSubtarget::PPCSubtarget(const std::string &TT, const std::string &CPU,
const std::string &FS, bool is64Bit,
CodeGenOpt::Level OptLevel)
: PPCGenSubtargetInfo(TT, CPU, FS), IsPPC64(is64Bit), TargetTriple(TT),
OptLevel(OptLevel) {
initializeEnvironment();
resetSubtargetFeatures(CPU, FS);
}
OptLevel(OptLevel),
FrameLowering(initializeSubtargetDependencies(CPU, FS)) {}
/// SetJITMode - This is called to inform the subtarget info that we are
/// producing code for the JIT.