When a loop has multiple backedges, loop simplification attempts to
separate them out into nested loops. This results in incorrect control
flow in the presence of some functions like a GPU barrier. This change
skips the transformation when such "convergent" function calls are
present in the loop body.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Transforms/Utils/LoopSimplify.cpp | ||
---|---|---|
244 | I thought we had a hasConvergentOp on loops that would avoid scanning through all the blocks again |
llvm/lib/Transforms/Utils/LoopSimplify.cpp | ||
---|---|---|
244 | That is available when LoopAccessAnalysis is used. But LoopSimplify does not already use it, and it seems a bit expensive for just this one use. |
I thought we had a hasConvergentOp on loops that would avoid scanning through all the blocks again