From d104c31fc0b62dca30debb8a4647aea44eb79ec9 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Thu, 12 Jun 2014 20:54:11 +0000 Subject: 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. llvm-svn: 210822 --- llvm/lib/Target/PowerPC/PPCSubtarget.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'llvm/lib/Target/PowerPC/PPCSubtarget.cpp') diff --git a/llvm/lib/Target/PowerPC/PPCSubtarget.cpp b/llvm/lib/Target/PowerPC/PPCSubtarget.cpp index 74a1392..107b989 100644 --- a/llvm/lib/Target/PowerPC/PPCSubtarget.cpp +++ b/llvm/lib/Target/PowerPC/PPCSubtarget.cpp @@ -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. -- cgit v1.1