diff options
author | Eric Christopher <echristo@gmail.com> | 2014-07-10 17:26:51 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2014-07-10 17:26:51 +0000 |
commit | 22405e4bbf91473aabcb9c8e54b79548871b8d61 (patch) | |
tree | 1bcfa48591da612902512b8e43c7699ba10afc9c /llvm/lib/Target/Mips/MipsFastISel.cpp | |
parent | 581badce4be5243cd9af31277a99e80f9f0180e6 (diff) | |
download | bcm5719-llvm-22405e4bbf91473aabcb9c8e54b79548871b8d61.tar.gz bcm5719-llvm-22405e4bbf91473aabcb9c8e54b79548871b8d61.zip |
Make it possible for the Subtarget to change between function
passes in the mips back end. This, unfortunately, required a
bit of churn in the various predicates to use a pointer rather
than a reference.
llvm-svn: 212744
Diffstat (limited to 'llvm/lib/Target/Mips/MipsFastISel.cpp')
-rw-r--r-- | llvm/lib/Target/Mips/MipsFastISel.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Target/Mips/MipsFastISel.cpp b/llvm/lib/Target/Mips/MipsFastISel.cpp index 375d9b20554..617801ba8c6 100644 --- a/llvm/lib/Target/Mips/MipsFastISel.cpp +++ b/llvm/lib/Target/Mips/MipsFastISel.cpp @@ -41,7 +41,7 @@ class MipsFastISel final : public FastISel { const TargetMachine &TM; const TargetInstrInfo &TII; const TargetLowering &TLI; - const MipsSubtarget &Subtarget; + const MipsSubtarget *Subtarget; MipsFunctionInfo *MFI; // Convenience variables to avoid some queries. @@ -56,11 +56,11 @@ public: M(const_cast<Module &>(*funcInfo.Fn->getParent())), TM(funcInfo.MF->getTarget()), TII(*TM.getInstrInfo()), TLI(*TM.getTargetLowering()), - Subtarget(TM.getSubtarget<MipsSubtarget>()) { + Subtarget(&TM.getSubtarget<MipsSubtarget>()) { MFI = funcInfo.MF->getInfo<MipsFunctionInfo>(); Context = &funcInfo.Fn->getContext(); - TargetSupported = ((Subtarget.getRelocationModel() == Reloc::PIC_) && - (Subtarget.hasMips32r2() && (Subtarget.isABI_O32()))); + TargetSupported = ((Subtarget->getRelocationModel() == Reloc::PIC_) && + (Subtarget->hasMips32r2() && (Subtarget->isABI_O32()))); } bool TargetSelectInstruction(const Instruction *I) override; |