This is an archive of the discontinued LLVM Phabricator instance.

[EarlyCSE] Teach EarlyCSE to work with non-instruction values
AbandonedPublic

Authored by mkazantsev on Apr 28 2017, 3:57 AM.

Details

Summary

Conditional branching, intrinsics experimental_guard and assume may state that their arguments are true/false.
These values are not always instructions. For example, it can be method parameters. This patch allows to store known values (true or false, in particular) for such values.

Diff Detail

Event Timeline

mkazantsev updated this revision to Diff 97394.May 1 2017, 11:04 PM

Rebase due to underlying patch changes.

mkazantsev updated this revision to Diff 97545.May 2 2017, 10:39 PM

Fix a typo in comment.

dberlin edited edge metadata.May 5 2017, 9:09 AM

Sorry, thought Phillip looked at this one, looking now

dberlin added inline comments.May 5 2017, 9:15 AM
lib/Transforms/Scalar/EarlyCSE.cpp
101

This is not correct.
Example: ConstantExpr

157

FWIW: It's possible for a constantexpr to be equivalent to an expression.
This is not likely to happen that often, but.

mkazantsev planned changes to this revision.May 9 2017, 11:14 PM

Thanks for pointing that out, I need to check the applicability of this more accurately.

mkazantsev abandoned this revision.Jun 13 2017, 1:46 AM

Abandoning it so far, maybe will return to it in future.