This is an archive of the discontinued LLVM Phabricator instance.

[SCEV] Use depth limit for trunc analysis
ClosedPublic

Authored by tejohnson on Mar 5 2019, 12:52 PM.

Details

Summary

This fixes an extremely long compile time caused by recursive analysis
of truncs, which were not previously subject to any depth limits unlike
some of the other ops. I decided to use the same control used for
sext/zext, since the routines analyzing these are sometimes mutually
recursive with the trunc analysis.

Diff Detail

Repository
rL LLVM

Event Timeline

tejohnson created this revision.Mar 5 2019, 12:52 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 5 2019, 12:52 PM
sanjoy accepted this revision.Mar 11 2019, 9:32 PM

lgtm!

lib/Analysis/ScalarEvolution.cpp
205 ↗(On Diff #189389)

Let's rename this now, maybe to MaxCastDepth?

This revision is now accepted and ready to land.Mar 11 2019, 9:32 PM
tejohnson marked an inline comment as done.Mar 12 2019, 11:00 AM

Implement suggestion

This revision was automatically updated to reflect the committed changes.