This is an archive of the discontinued LLVM Phabricator instance.

Fix crash in LICM due to unreachable uses after LCSSA
AbandonedPublic

Authored by aemerson on Jun 19 2014, 2:42 AM.

Details

Reviewers
None
Summary

This patch fixes a crash in LICM due to an unreachable use being missed by LCSSA (pr19798).

As LCSSA needs to check uses of all loop definitions, I've had to remove the early-exit optimisation to avoid scanning uses of blocks which don't dominate loop exits (and it's associated test). This may have an impact on compile times for large loops, but I'm not sure of any alternatives here.

Review appreciated.

Diff Detail

Event Timeline

aemerson updated this revision to Diff 10618.Jun 19 2014, 2:42 AM
aemerson retitled this revision from to Fix crash in LICM due to unreachable uses after LCSSA.
aemerson updated this object.
aemerson edited the test plan for this revision. (Show Details)
aemerson added a reviewer: chandlerc.
aemerson set the repository for this revision to rL LLVM.
aemerson added a subscriber: Unknown Object (MLST).
aemerson updated this revision to Diff 10824.Jun 25 2014, 3:09 AM
aemerson set the repository for this revision to rL LLVM.
aemerson added a project: deleted.

Clean up tests a bit.

chandlerc edited edge metadata.Jun 25 2014, 4:31 PM

Generally, the strategy seems fine here. I share the concern over compile time regressions though.

Have you been able to collect any numbers to see how bad this is? The test suite, spec, or anything else with a decent diversity of loops would seem to be suitable....

No, I haven't done any compile-time benchmarking. When I get some free time I'll throw this patch at LNT and report back the results.

Cheers,
Amara

aemerson abandoned this revision.Jul 6 2017, 10:54 AM
aemerson removed subscribers: mroth, llvm-commits.
lib/Transforms/Utils/LCSSA.cpp