[docs] Update llvm.loop metadata documentation.
Loop metadata nodes do not adhere to the documented property: (a) LoopIDs are not unique: Any pass that duplicates IR will do it including its metadata (e.g. LoopVersioning) such that multiple loops are linked with the same LoopID. There is even a test case (Transforms/LoopUnroll/unroll-pragmas-disabled.ll) for multiple loops with the same LoopID. (b) LoopIDs are not persistent: Adding or removing an item from a LoopID can only be done by creating a new MDNode and assigning it to the loop's branch(es). Passes such as LoopUnroll (llvm.loop.unroll.disable) and LoopVectorize (llvm.loop.isvectorized) use this to mark loops to not be transformed multiple times or to avoid that a LoopVersioned original loop is transformed. Update the documentation according to how llvm.loop is used in practice. Differential Revision: https://reviews.llvm.org/D55290
Loading
Please register or sign in to comment