diff options
author | Dan Gohman <gohman@apple.com> | 2010-04-19 19:05:59 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-04-19 19:05:59 +0000 |
commit | 55e59c186303ff02c0be7429da3b1b36c347f164 (patch) | |
tree | 737df0ab77e166eff886743c8e3ded1279054d86 /lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h | |
parent | 46007b3712290c09d895f4bd245ac852f412556c (diff) | |
download | external_llvm-55e59c186303ff02c0be7429da3b1b36c347f164.zip external_llvm-55e59c186303ff02c0be7429da3b1b36c347f164.tar.gz external_llvm-55e59c186303ff02c0be7429da3b1b36c347f164.tar.bz2 |
Code that needs a TargetMachine should have access to one directly, rather
than just getting one through a TargetLowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101802 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h index e3668e5..a899f01 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h @@ -257,6 +257,7 @@ public: // TLI - This is information that describes the available target features we // need for lowering. This indicates when operations are unavailable, // implemented with a libcall, etc. + const TargetMachine &TM; const TargetLowering &TLI; SelectionDAG &DAG; const TargetData *TD; @@ -303,10 +304,10 @@ public: LLVMContext *Context; - SelectionDAGBuilder(SelectionDAG &dag, const TargetLowering &tli, - FunctionLoweringInfo &funcinfo, + SelectionDAGBuilder(SelectionDAG &dag, FunctionLoweringInfo &funcinfo, CodeGenOpt::Level ol) - : SDNodeOrder(0), TLI(tli), DAG(dag), FuncInfo(funcinfo), OptLevel(ol), + : SDNodeOrder(0), TM(dag.getTarget()), TLI(dag.getTargetLoweringInfo()), + DAG(dag), FuncInfo(funcinfo), OptLevel(ol), HasTailCall(false), Context(dag.getContext()) { } |