You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problems were observed downstream when running tests using "opt -enable-new-pm=1 -O3 -S -extra-vectorizer-passes=1 -enable-loop-distribute". For a specific input the compiler sometimes just crashed, sometimes we hit an assertion, etc. Although this was very non-deterministic and it only failed occasionally.
A somewhat reduced test case included 2 functions "foo" and "bar". And some debugging indicated the following scenario:
When running loop-distribute on "foo" LoopAccessAnalysis was calculated for some loops in that functions. Those analyses were cached in the LoopAnalysisManager associated with a LoopAnalysisManagerFunctionProxy based on a Loop*.
Later when running SimpleLoopUnswitch a loop "a" was transformed, and as part of that a child loop "b" was removed/replaced. The Loop object for "b" was destroyed (still being allocated by the BumpPtrAllocator, and without removing the analyses cached on the corresponding Loop*).
Here something triggeres a reset of the BumpPtrAllocator used for allocating Loop objects (maybe throwing away loop analyses at the end of the loop pass manager).
When running loop-distribution later, for "bar", first a Loop object was created for a loop "c". And then LoopAccessAnalysis were requested. Depending on if the Loop object for "c" happened to use the same address as the stale analysis for loop "b" we sometimes ended up fetching the LoopAccessAnalysis result for "b" instead of recalculating the analysis for "c".
The text was updated successfully, but these errors were encountered:
Extended Description
Problems were observed downstream when running tests using "opt -enable-new-pm=1 -O3 -S -extra-vectorizer-passes=1 -enable-loop-distribute". For a specific input the compiler sometimes just crashed, sometimes we hit an assertion, etc. Although this was very non-deterministic and it only failed occasionally.
A somewhat reduced test case included 2 functions "foo" and "bar". And some debugging indicated the following scenario:
When running loop-distribute on "foo" LoopAccessAnalysis was calculated for some loops in that functions. Those analyses were cached in the LoopAnalysisManager associated with a LoopAnalysisManagerFunctionProxy based on a Loop*.
Later when running SimpleLoopUnswitch a loop "a" was transformed, and as part of that a child loop "b" was removed/replaced. The Loop object for "b" was destroyed (still being allocated by the BumpPtrAllocator, and without removing the analyses cached on the corresponding Loop*).
Here something triggeres a reset of the BumpPtrAllocator used for allocating Loop objects (maybe throwing away loop analyses at the end of the loop pass manager).
When running loop-distribution later, for "bar", first a Loop object was created for a loop "c". And then LoopAccessAnalysis were requested. Depending on if the Loop object for "c" happened to use the same address as the stale analysis for loop "b" we sometimes ended up fetching the LoopAccessAnalysis result for "b" instead of recalculating the analysis for "c".
The text was updated successfully, but these errors were encountered: