Page MenuHomePhabricator

[Polly][Acc] Fix for PR33208

Authored by philip.pfaffe on Feb 28 2018, 7:39 AM.



During codegen, Polly attempts to clear all loops from ScalarEvolution and LoopInfo, and it does so one block at a time. This causes undefined behaviour, since this way a loop header might be removed from a loop before the entire loop is erased, causing ScalarEvolution to run into an error.

Instead, just delete the entire loop atomically.

Diff Detail

Event Timeline

philip.pfaffe created this revision.Feb 28 2018, 7:39 AM

Cool. Any chance you could add a test case?


This is a fix for existing currently failing testcases, I think that should cover it.

grosser accepted this revision.Feb 28 2018, 7:52 AM

OK. Maybe mention this in the commit message?

This revision is now accepted and ready to land.Feb 28 2018, 7:52 AM

It was in the PR, but I'll mention it in the commit.

My bad, I uploaded the reverse diff ...

Meinersbur accepted this revision.Mar 1 2018, 2:49 AM
philip.pfaffe closed this revision.Mar 3 2018, 7:41 AM

Commited in rPLO326643, reverted in rPLO326656.

While this fix closed a couple of test failures, it just shifted a few others, which look like they have the same root cause.