From 384ceb8446bebe4425e65d1035256eee3b4cfa6d Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Thu, 6 Jun 2013 00:11:39 +0000 Subject: Don't cache the TargetLoweringInfo object inside of the FunctionLowering object. The TargetLoweringInfo object is owned by the TargetMachine. In the future, the TargetMachine object may change, which may also change the TargetLoweringInfo object. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183356 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/FunctionLoweringInfo.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/llvm/CodeGen/FunctionLoweringInfo.h b/include/llvm/CodeGen/FunctionLoweringInfo.h index ea6cb27..206fef7 100644 --- a/include/llvm/CodeGen/FunctionLoweringInfo.h +++ b/include/llvm/CodeGen/FunctionLoweringInfo.h @@ -49,8 +49,9 @@ class Value; /// function that is used when lowering a region of the function. /// class FunctionLoweringInfo { + const TargetMachine &TM; + const TargetLowering *TLI; public: - const TargetLowering &TLI; const Function *Fn; MachineFunction *MF; MachineRegisterInfo *RegInfo; @@ -115,7 +116,7 @@ public: /// there's no other convenient place for it to live right now. std::vector > PHINodesToUpdate; - explicit FunctionLoweringInfo(const TargetLowering &TLI); + explicit FunctionLoweringInfo(const TargetMachine &TM); /// set - Initialize this FunctionLoweringInfo with the given Function /// and its associated MachineFunction. -- cgit v1.1