[PATCH 01/28] Have the selection dag grab TargetLowering off of the subtarget inside init rather than have it passed in as an argument.
Aaron Watry
awatry at gmail.com
Wed Oct 8 06:52:27 PDT 2014
Please ignore this partial series of 28 patches... I hit git
send-email using the wrong starting commit ID.
--Aaron
On Wed, Oct 8, 2014 at 8:50 AM, Aaron Watry <awatry at gmail.com> wrote:
> From: Eric Christopher <echristo at gmail.com>
>
> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219270 91177308-0d34-0410-b5e6-96231b3b80d8
> ---
> include/llvm/CodeGen/SelectionDAG.h | 2 +-
> lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 4 ++--
> lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 3 +--
> 3 files changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/include/llvm/CodeGen/SelectionDAG.h b/include/llvm/CodeGen/SelectionDAG.h
> index 8be27d0..f737be5 100644
> --- a/include/llvm/CodeGen/SelectionDAG.h
> +++ b/include/llvm/CodeGen/SelectionDAG.h
> @@ -268,7 +268,7 @@ public:
> /// init - Prepare this SelectionDAG to process code in the given
> /// MachineFunction.
> ///
> - void init(MachineFunction &mf, const TargetLowering *TLI);
> + void init(MachineFunction &mf);
>
> /// clear - Clear state and free memory necessary to make this
> /// SelectionDAG ready to process a new block.
> diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
> index 25532ec..5c89665 100644
> --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
> +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
> @@ -915,9 +915,9 @@ SelectionDAG::SelectionDAG(const TargetMachine &tm, CodeGenOpt::Level OL)
> DbgInfo = new SDDbgInfo();
> }
>
> -void SelectionDAG::init(MachineFunction &mf, const TargetLowering *tli) {
> +void SelectionDAG::init(MachineFunction &mf) {
> MF = &mf;
> - TLI = tli;
> + TLI = getSubtarget().getTargetLowering();
> TSI = getSubtarget().getSelectionDAGInfo();
> Context = &mf.getFunction()->getContext();
> }
> diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
> index 31f4b06..860a85e 100644
> --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
> +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
> @@ -413,7 +413,6 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) {
> const Function &Fn = *mf.getFunction();
> const TargetInstrInfo &TII = *TM.getSubtargetImpl()->getInstrInfo();
> const TargetRegisterInfo &TRI = *TM.getSubtargetImpl()->getRegisterInfo();
> - const TargetLowering *TLI = TM.getSubtargetImpl()->getTargetLowering();
>
> MF = &mf;
> RegInfo = &MF->getRegInfo();
> @@ -433,7 +432,7 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) {
>
> SplitCriticalSideEffectEdges(const_cast<Function&>(Fn), this);
>
> - CurDAG->init(*MF, TLI);
> + CurDAG->init(*MF);
> FuncInfo->set(Fn, *MF, CurDAG);
>
> if (UseMBPI && OptLevel != CodeGenOpt::None)
> --
> 2.1.0
>
More information about the llvm-commits
mailing list