[PATCH] D31693: [AMDGPU] Unroll more to eliminate phis and conditions

Valery Pykhtin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 7 04:16:06 PDT 2017


vpykhtin accepted this revision.
vpykhtin added a comment.
This revision is now accepted and ready to land.

LGTM.



================
Comment at: lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp:49
+                              unsigned Depth = 0) {
+  if (const Instruction *I = dyn_cast<Instruction>(Cond)) {
+    for (const Value *V : I->operand_values()) {
----------------
you can decrease nesting by using early exit here.


Repository:
  rL LLVM

https://reviews.llvm.org/D31693





More information about the llvm-commits mailing list