Cache TargetLowering on SelectionDAGISel and update previous

calls to getTargetLowering() with the cached variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219284 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher
2014-10-08 07:32:17 +00:00
parent b07b0970b1
commit b7cd35b171
8 changed files with 57 additions and 78 deletions

View File

@@ -52,6 +52,7 @@ public:
GCFunctionInfo *GFI;
CodeGenOpt::Level OptLevel;
const TargetInstrInfo *TII;
const TargetLowering *TLI;
static char ID;
@@ -59,9 +60,7 @@ public:
CodeGenOpt::Level OL = CodeGenOpt::Default);
virtual ~SelectionDAGISel();
const TargetLowering *getTargetLowering() const {
return TM.getSubtargetImpl()->getTargetLowering();
}
const TargetLowering *getTargetLowering() const { return TLI; }
void getAnalysisUsage(AnalysisUsage &AU) const override;