diff options
author | Hans Wennborg <hans@hanshq.net> | 2017-09-13 23:23:09 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2017-09-13 23:23:09 +0000 |
commit | 06e2a384c26dfc400470da13abdb29612aa5ef52 (patch) | |
tree | dee68c6c19970a7f13f43a1e05d7b08a090049c8 /llvm/lib/CodeGen/MachineTraceMetrics.cpp | |
parent | d866b47989064330489c34aa1ac0716876155cfd (diff) | |
download | llvm-06e2a384c26dfc400470da13abdb29612aa5ef52.zip llvm-06e2a384c26dfc400470da13abdb29612aa5ef52.tar.gz llvm-06e2a384c26dfc400470da13abdb29612aa5ef52.tar.bz2 |
Revert r312719 "[MachineCombiner] Update instruction depths incrementally for large BBs."
This caused PR34596.
> [MachineCombiner] Update instruction depths incrementally for large BBs.
>
> Summary:
> For large basic blocks with lots of combinable instructions, the
> MachineTraceMetrics computations in MachineCombiner can dominate the compile
> time, as computing the trace information is quadratic in the number of
> instructions in a BB and it's relevant successors/predecessors.
>
> In most cases, knowing the instruction depth should be enough to make
> combination decisions. As we already iterate over all instructions in a basic
> block, the instruction depth can be computed incrementally. This reduces the
> cost of machine-combine drastically in cases where lots of instructions
> are combined. The major drawback is that AFAIK, computing the critical path
> length cannot be done incrementally. Therefore we only compute
> instruction depths incrementally, for basic blocks with more
> instructions than inc_threshold. The -machine-combiner-inc-threshold
> option can be used to set the threshold and allows for easier
> experimenting and checking if using incremental updates for all basic
> blocks has any impact on the performance.
>
> Reviewers: sanjoy, Gerolf, MatzeB, efriedma, fhahn
>
> Reviewed By: fhahn
>
> Subscribers: kiranchandramohan, javed.absar, efriedma, llvm-commits
>
> Differential Revision: https://reviews.llvm.org/D36619
llvm-svn: 313213
Diffstat (limited to 'llvm/lib/CodeGen/MachineTraceMetrics.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineTraceMetrics.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/MachineTraceMetrics.cpp b/llvm/lib/CodeGen/MachineTraceMetrics.cpp index 296f600..9155567 100644 --- a/llvm/lib/CodeGen/MachineTraceMetrics.cpp +++ b/llvm/lib/CodeGen/MachineTraceMetrics.cpp @@ -824,14 +824,6 @@ updateDepth(const MachineBasicBlock *MBB, const MachineInstr &UseMI, updateDepth(BlockInfo[MBB->getNumber()], UseMI, RegUnits); } -void MachineTraceMetrics::Ensemble:: -updateDepths(MachineBasicBlock::iterator Start, - MachineBasicBlock::iterator End, - SparseSet<LiveRegUnit> &RegUnits) { - for (; Start != End; Start++) - updateDepth(Start->getParent(), *Start, RegUnits); -} - /// Compute instruction depths for all instructions above or in MBB in its /// trace. This assumes that the trace through MBB has already been computed. void MachineTraceMetrics::Ensemble:: |