[PATCH] D41466: [Unroll][DebugInfo] Propagate loop body's debug info to epilog preheader
Evgeny Stupachenko via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 21 12:54:15 PST 2017
evstupac added inline comments.
================
Comment at: lib/Transforms/Utils/LoopUnrollRuntime.cpp:651-652
DT, LI, PreserveLCSSA);
+ auto *TI = NewExit->getTerminator();
+ TI->setDebugLoc(Header->getTerminator()->getDebugLoc());
// Split NewExit to insert epilog remainder loop.
----------------
Am I right that this will set more DebugLoc for epilog case than for prolog? If so, why?
If "TI" is supposed to be used only once I wouldn't create it at all:
NewExit->getTerminator()->setDebugLoc(
Header->getTerminator()->getDebugLoc());
If not - reuse it in the line 654 and give wider name (like NewExitTerminator).
EpilogPreHeader = SplitBlock(NewExit, NewExitTerminator, DT, LI);
================
Comment at: test/Transforms/LoopUnroll/runtime-epilog-debuginfo.ll:2
+; RUN: opt -loop-unroll -unroll-runtime -unroll-runtime-epilog -S %s | FileCheck %s
+
+; CHECK: for.body.i:
----------------
Please add a comment on what test is checking.
Repository:
rL LLVM
https://reviews.llvm.org/D41466
More information about the llvm-commits
mailing list