diff options
author | Chuang-Yu Cheng <cycheng@multicorewareinc.com> | 2016-05-10 09:45:44 +0000 |
---|---|---|
committer | Chuang-Yu Cheng <cycheng@multicorewareinc.com> | 2016-05-10 09:45:44 +0000 |
commit | 175741d5a781ec008498588a14bef200d36bd404 (patch) | |
tree | 5bd8649ca6290e03416f0367e90b7f7f7e09b134 /clang/lib/CodeGen/CodeGenFunction.h | |
parent | 333ef381b87c65476fb37cbb458f80c8f4d80d9c (diff) | |
download | bcm5719-llvm-175741d5a781ec008498588a14bef200d36bd404.tar.gz bcm5719-llvm-175741d5a781ec008498588a14bef200d36bd404.zip |
Update Debug Intrinsics in RewriteUsesOfClonedInstructions in LoopRotation
Loop rotation clones instruction from the old header into the preheader. If
there were uses of values produced by these instructions that were outside
the loop, we have to insert PHI nodes to merge the two values. If the values
are used by DbgIntrinsics they will be used as a MetadataAsValue of a
ValueAsMetadata of the original values, and iterating all of the uses of the
original value will not update the DbgIntrinsics. The new code checks if the
values are used by DbgIntrinsics and if so, updates them using essentially
the same logic as the original code.
The attached testcase demonstrates the issue. Without the fix, the
DbgIntrinic outside the loop uses values computed inside the loop, even
though these values do not dominate the DbgIntrinsic.
Author: Thomas Jablin (tjablin)
Reviewers: dblaikie aprantl kbarton hfinkel cycheng
http://reviews.llvm.org/D19564
llvm-svn: 269034
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
0 files changed, 0 insertions, 0 deletions