This function checks that:
- It is safe to expand a SCEV;
- It is OK to materialize it at the specified location.
For example, attempt to expand a loop's AddRec to the same loop's preheader should fail.
Paths
| Differential D39236
[SCEV][NFC] Introduce isSafeToExpandAt function to SCEVExpander ClosedPublic Authored by mkazantsev on Oct 24 2017, 5:15 AM.
Details Summary This function checks that:
For example, attempt to expand a loop's AddRec to the same loop's preheader should fail.
Diff Detail Event TimelineComment Actions relatively minor code comments.
This revision now requires changes to proceed.Nov 7 2017, 4:03 PM
mkazantsev edited edge metadata. mkazantsev marked 2 inline comments as done. Comment ActionsFixed comments. This revision is now accepted and ready to land.Nov 14 2017, 8:31 PM Closed by commit rL318377: [SCEV][NFC] Introduce isSafeToExpandAt function to SCEVExpander (authored by mkazantsev). · Explain WhyNov 15 2017, 9:13 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 120057 include/llvm/Analysis/ScalarEvolutionExpander.h
lib/Analysis/ScalarEvolutionExpander.cpp
unittests/Analysis/ScalarEvolutionTest.cpp
|
Adjust this comment to reflect the requirement to check dominance.
i.e. "are safe to speculate anywhere their operands are defined"