Add an MCSubtargetInfo variable to the TargetMachine.

This enables us to remove calls to the subtarget from the TargetMachine
and with a small hack for backends that require global subtarget
information for module level code generation, e.g. mips abi flags, as
mentioned in a fixme in the code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232776 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher
2015-03-19 22:36:37 +00:00
parent d802a47f96
commit 0d6199b3af
3 changed files with 14 additions and 3 deletions

View File

@@ -32,6 +32,7 @@ class MCCodeGenInfo;
class MCContext;
class MCInstrInfo;
class MCRegisterInfo;
class MCSubtargetInfo;
class MCSymbol;
class Target;
class DataLayout;
@@ -90,6 +91,7 @@ protected: // Can only create subclasses.
const MCAsmInfo *AsmInfo;
const MCRegisterInfo *MRI;
const MCInstrInfo *MII;
const MCSubtargetInfo *STI;
unsigned RequireStructuredCFG : 1;
@@ -140,6 +142,7 @@ public:
const MCAsmInfo *getMCAsmInfo() const { return AsmInfo; }
const MCRegisterInfo *getMCRegisterInfo() const { return MRI; }
const MCInstrInfo *getMCInstrInfo() const { return MII; }
const MCSubtargetInfo *getMCSubtargetInfo() const { return STI; }
/// getIntrinsicInfo - If intrinsic information is available, return it. If
/// not, return null.