aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2021-03-23 09:55:04 -0400
committerSanjay Patel <spatel@rotateright.com>2021-03-23 10:19:37 -0400
commit1bf8f9e228546bd54ef9739aa808b71b97ea6051 (patch)
tree77d255ceb723925ac36dc0af7b75200c50348423 /flang/lib/Frontend/CompilerInvocation.cpp
parented0558a09d5283371058b6238eab663b85e1ff53 (diff)
downloadllvm-1bf8f9e228546bd54ef9739aa808b71b97ea6051.zip
llvm-1bf8f9e228546bd54ef9739aa808b71b97ea6051.tar.gz
llvm-1bf8f9e228546bd54ef9739aa808b71b97ea6051.tar.bz2
[SimplifyCFG] use profile metadata to refine merging branch conditions
2nd try (original: 27ae17a6b014) with fix/test for crash. We must make sure that TTI is available before trying to use it because it is not required (might be another bug). Original commit message: This is one step towards solving: https://llvm.org/PR49336 In that example, we disregard the recommended usage of builtin_expect, so an expensive (unpredictable) branch is folded into another branch that is guarding it. Here, we read the profile metadata to see if the 1st (predecessor) condition is likely to cause execution to bypass the 2nd (successor) condition before merging conditions by using logic ops. Differential Revision: https://reviews.llvm.org/D98898
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions