summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/annotate-comments.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
commit59564079e911edd2f3ba57c566a4ddba8ade035a (patch)
tree4aa90125930aac2a96df23d7629c2d2cf3a1e40f /clang/test/Index/annotate-comments.cpp
parent895a5f5d12576d5b5af2282c4be164dd939b103b (diff)
downloadbcm5719-llvm-59564079e911edd2f3ba57c566a4ddba8ade035a.tar.gz
bcm5719-llvm-59564079e911edd2f3ba57c566a4ddba8ade035a.zip
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. llvm-svn: 161429
Diffstat (limited to 'clang/test/Index/annotate-comments.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud