This is an archive of the discontinued LLVM Phabricator instance.

[SCEVAffinator] Fix handling of pwaff complexity limit.
ClosedPublic

Authored by efriedma on May 4 2018, 11:53 AM.

Details

Summary

nullptr is not a valid affine expression, and none of the callers check for null, so we eventually hit an isl error and crash.

Instead, invalidate the scop and return a constant zero.

Diff Detail

Repository
rL LLVM

Event Timeline

efriedma created this revision.May 4 2018, 11:53 AM
xbolva00 added inline comments.
lib/Support/SCEVAffinator.cpp
385 ↗(On Diff #145245)

Move common code to separate function? :)

This generally looks good, but I agree we should move the code to a separate function.

efriedma updated this revision to Diff 146041.May 9 2018, 5:51 PM

Refactored to use helper function.

grosser accepted this revision.May 9 2018, 10:03 PM

LGTM.

This revision is now accepted and ready to land.May 9 2018, 10:03 PM
Meinersbur accepted this revision.May 10 2018, 7:26 AM
Meinersbur added inline comments.
test/ScopInfo/pwaff-complexity-bailout.ll
1 ↗(On Diff #146041)

This interleaves stdout and stderr in an unpredictable manner.

-polly-process-unprofitable is already added by %loadPolly

This revision was automatically updated to reflect the committed changes.