aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2021-03-23 18:22:30 +0300
committerRoman Lebedev <lebedev.ri@gmail.com>2021-03-23 18:30:26 +0300
commitb5822026dd727e23a6ed6270f9844e0021141607 (patch)
treeeeac03d5731f503ca15f49071c6b05cfde12e899 /flang/lib/Frontend/CompilerInvocation.cpp
parenta866f72eb2b52b46799e5c64b1b25df4f6fa91e7 (diff)
downloadllvm-b5822026dd727e23a6ed6270f9844e0021141607.zip
llvm-b5822026dd727e23a6ed6270f9844e0021141607.tar.gz
llvm-b5822026dd727e23a6ed6270f9844e0021141607.tar.bz2
[SimplifyCFG] 'Fold branch to common dest': don't overestimate the cost
`FoldBranchToCommonDest()` has a certain budget (`-bonus-inst-threshold=`) for bonus instruction duplication. And currently it calculates the cost as-if it will actually duplicate into each predecessor. But ignoring the budget, it won't always duplicate into each predecessor, there are some correctness and profitability checks. So when calculating the cost, we should first check into which blocks will we *actually* duplicate, and only then use that block count to do budgeting.
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions