aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2023-12-06 14:17:18 +0100
committerGitHub <noreply@github.com>2023-12-06 14:17:18 +0100
commitd77067d08a3f56dc2d0e6c95bd2852c943df743a (patch)
treec9ef91f21e714c436342cb147e671058878b51c5 /flang/lib/Frontend/CompilerInvocation.cpp
parenta1b9736e9b588bdb510b49e373006b06f57e61c7 (diff)
downloadllvm-d77067d08a3f56dc2d0e6c95bd2852c943df743a.zip
llvm-d77067d08a3f56dc2d0e6c95bd2852c943df743a.tar.gz
llvm-d77067d08a3f56dc2d0e6c95bd2852c943df743a.tar.bz2
[ValueTracking] Add dominating condition support in computeKnownBits() (#73662)
This adds support for using dominating conditions in computeKnownBits() when called from InstCombine. The implementation uses a DomConditionCache, which stores which branches may provide information that is relevant for a given value. DomConditionCache is similar to AssumptionCache, but does not try to do any kind of automatic tracking. Relevant branches have to be explicitly registered and invalidated values explicitly removed. The necessary tracking is done inside InstCombine. The reason why this doesn't just do exactly the same thing as AssumptionCache is that a lot more transforms touch branches and branch conditions than assumptions. AssumptionCache is an immutable analysis and mostly gets away with this because only a handful of places have to register additional assumptions (mostly as a result of cloning). This is very much not the case for branches. This change regresses compile-time by about ~0.2%. It also improves stage2-O0-g builds by about ~0.2%, which indicates that this change results in additional optimizations inside clang itself. Fixes https://github.com/llvm/llvm-project/issues/74242.
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions