aboutsummaryrefslogtreecommitdiff
path: root/tools/llvm-objdump/llvm-objdump.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2012-08-07 17:30:46 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2012-08-07 17:30:46 +0000
commit702bcce747cd3fd89049b16d37c9c88952b5af81 (patch)
treed1d8133d0c32f722e356250ec8e8f555ba61de92 /tools/llvm-objdump/llvm-objdump.cpp
parent8da94ad6e0947690201c543da556ec0396ad9912 (diff)
The dominance computation already has logic for computing if an edge dominates
a use or a BB, but it is inline in the handling of the invoke instruction. This patch refactors it so that it can be used in other cases. For example, in define i32 @f(i32 %x) { bb0: %cmp = icmp eq i32 %x, 0 br i1 %cmp, label %bb2, label %bb1 bb1: br label %bb2 bb2: %cond = phi i32 [ %x, %bb0 ], [ 0, %bb1 ] %foo = add i32 %cond, %x ret i32 %foo } GVN should be able to replace %x with 0 in any use that is dominated by the true edge out of bb0. In the above example the only such use is the one in the phi. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161429 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-objdump/llvm-objdump.cpp')
0 files changed, 0 insertions, 0 deletions