reland e5581df60a35 [SimplifyCFG] accumulate bonus insts cost
authorYaxun (Sam) Liu <yaxun.liu@amd.com>
Sat, 17 Sep 2022 21:57:35 +0000 (17:57 -0400)
committerYaxun (Sam) Liu <yaxun.liu@amd.com>
Mon, 24 Oct 2022 19:43:53 +0000 (15:43 -0400)
commitbd7949bcd86633bd4203b2ba6f891aea00fce4d1
tree4137ed5f8c409d4afd02d3621a76e2ceae95b17a
parent3637dc601c4923721a69426187aa69dd6a71a053
reland e5581df60a35 [SimplifyCFG] accumulate bonus insts cost

Fixed compile time increase due to always constructing LocalCostTracker.
Now only construct LocalCostTracker when needed.
llvm/include/llvm/Transforms/Utils/Local.h
llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp
llvm/lib/Transforms/Utils/LoopSimplify.cpp
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
llvm/test/Transforms/LoopUnroll/peel-loop-inner.ll
llvm/test/Transforms/PhaseOrdering/X86/vector-reductions-logical.ll
llvm/test/Transforms/SimplifyCFG/branch-fold-multiple.ll
llvm/test/Transforms/SimplifyCFG/branch-fold-threshold.ll
llvm/test/Transforms/SimplifyCFG/fold-branch-to-common-dest-two-preds-cost.ll