[PATCH] D53876: Preserve loop metadata when splitting exit blocks

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 1 02:31:33 PDT 2018


dmgreen added a subscriber: Meinersbur.
dmgreen added inline comments.


================
Comment at: lib/Transforms/Utils/LoopUtils.cpp:39
 #include "llvm/Transforms/Utils/BasicBlockUtils.h"
+#include "llvm/IR/InstrTypes.h"
 
----------------
These should be in order. I think running clang-format on the patch will do that for you.


================
Comment at: test/Transforms/LoopSimplify/preserve-llvm-loop-metadata2.ll:6
+; CHECK-NOT: br i1 {{.*}}, label {{.*}}, label %for.cond.loopexit, !llvm.loop [[LOOPMD]]
+; CHECK: br label %for.cond1, !llvm.loop {{.*}}
+
----------------
Is it worth-while to make sure the LOOPMD is the correct of the two metadata nodes (still "llvm.loop.unroll_and_jam.count")? And that the inner loops still has nounroll?


================
Comment at: test/Transforms/LoopSimplify/preserve-llvm-loop-metadata2.ll:63
+!6 = !{!"omnipotent char", !7, i64 0}
+!7 = !{!"Simple C/C++ TBAA"}
+!8 = distinct !{!8, !9}
----------------
You can probably remove the tbaa info too, to make things simpler.


Repository:
  rL LLVM

https://reviews.llvm.org/D53876





More information about the llvm-commits mailing list