aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/FileCheck/FileCheck.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2020-08-30 22:51:00 -0700
committerFangrui Song <i@maskray.me>2020-08-30 22:51:00 -0700
commitf2284e3405d87143b2478f28b8045bef84953c91 (patch)
treeffa5385d754ea35033779a865dc02e426f90c952 /llvm/utils/FileCheck/FileCheck.cpp
parent389fd309da843494204fc30a899c54b3de16dd99 (diff)
downloadllvm-f2284e3405d87143b2478f28b8045bef84953c91.zip
llvm-f2284e3405d87143b2478f28b8045bef84953c91.tar.gz
llvm-f2284e3405d87143b2478f28b8045bef84953c91.tar.bz2
[Sink] Optimize/simplify sink candidate finding with nearest common dominator
For an instruction in the basic block BB, SinkingPass enumerates basic blocks dominated by BB and BB's successors. For each enumerated basic block, SinkingPass uses `AllUsesDominatedByBlock` to check whether the basic block dominates all of the instruction's users. This is inefficient. Use the nearest common dominator of all users to avoid enumerating the candidate. The nearest common dominator may be in a parent loop which is not beneficial. In that case, find the ancestors in the dominator tree. In the case that the instruction has no user, with this change we will not perform unnecessary move. This causes some amdgpu test changes. A stage-2 x86-64 clang is a byte identical with this change.
Diffstat (limited to 'llvm/utils/FileCheck/FileCheck.cpp')
0 files changed, 0 insertions, 0 deletions