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
We used a loop-marker intrinsic because the LoopID used to
be dropped by optimization passes (this seems no longer true).
#50660 is an example of a miscompilation where a loop of length 1
got optimized by simplifycfg to the point where the loop-marker
is now attached to the wrong back-edge.
This PR drops the loop-marker and uses the LoopID metadata node
directly.
Copy file name to clipboardExpand all lines: doc/src/devdocs/llvm-passes.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -58,9 +58,9 @@ This pass removes the non-integral address spaces from the module's datalayout s
58
58
59
59
* Filename: `llvm-simdloop.cpp`
60
60
* Class Name: `LowerSIMDLoopPass`
61
-
* Opt Name: `module(LowerSIMDLoop)`
61
+
* Opt Name: `loop(LowerSIMDLoop)`
62
62
63
-
This pass acts as the main driver of the `@simd` annotation. Codegen inserts a call to a marker intrinsic (`julia.simdloop`), which this pass uses to identify loops that were originally marked with `@simd`. Then, this pass looks for a chain of floating point operations that form a reduce and adds the `contract` and `reassoc` fast math flags to allow reassociation (and thus vectorization). This pass does not preserve either loop information nor inference correctness, so it may violate Julia semantics in surprising ways. If the loop was annotated with `ivdep` as well, then the pass marks the loop as having no loop-carried dependencies (the resulting behavior is undefined if the user annotation was incorrect or gets applied to the wrong loop).
63
+
This pass acts as the main driver of the `@simd` annotation. Codegen inserts a `!llvm.loopid` marker at the back branch of a loop, which this pass uses to identify loops that were originally marked with `@simd`. Then, this pass looks for a chain of floating point operations that form a reduce and adds the `contract` and `reassoc` fast math flags to allow reassociation (and thus vectorization). This pass does not preserve either loop information nor inference correctness, so it may violate Julia semantics in surprising ways. If the loop was annotated with `ivdep` as well, then the pass marks the loop as having no loop-carried dependencies (the resulting behavior is undefined if the user annotation was incorrect or gets applied to the wrong loop).
0 commit comments