summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/android/AndroidTidyModule.cpp
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2017-08-14 17:11:43 +0000
committerHal Finkel <hfinkel@anl.gov>2017-08-14 17:11:43 +0000
commitb03dd4be705bcd4e02384f2ea37b893ce477e512 (patch)
tree4ade1314069b2309734a135041292af7aa1ed585 /clang-tools-extra/clang-tidy/android/AndroidTidyModule.cpp
parent56650e7fc58770fbfecfad746222da47cb208f5e (diff)
downloadbcm5719-llvm-b03dd4be705bcd4e02384f2ea37b893ce477e512.tar.gz
bcm5719-llvm-b03dd4be705bcd4e02384f2ea37b893ce477e512.zip
[ValueTracking] Don't delete assumes of side-effectful instructions
ValueTracking has to strike a balance when attempting to propagate information backwards from assumes, because if the information is trivially propagated backwards, it can appear to LLVM that the assumption is known to be true, and therefore can be removed. This is sound (because an assumption has no semantic effect except for causing UB), but prevents the assume from allowing further optimizations. The isEphemeralValueOf check exists to try and prevent this issue by not removing the source of an assumption. This tries to make it a little bit more general to handle the case of side-effectful instructions, such as in %0 = call i1 @get_val() %1 = xor i1 %0, true call void @llvm.assume(i1 %1) Patch by Ariel Ben-Yehuda, thanks! Differential Revision: https://reviews.llvm.org/D36590 llvm-svn: 310859
Diffstat (limited to 'clang-tools-extra/clang-tidy/android/AndroidTidyModule.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud