[PATCH] [LoopUnroll] Improve debug locations for instructions created during loop unrolling.==== Commit 1 ====[LoopUnroll] Use IRBuilder to create branch instructions.
Alexey Samsonov
vonosmas at gmail.com
Wed Jun 10 13:45:31 PDT 2015
Hi dblaikie, sanjoy,
Use IRBuilder::Create(Cond)?Br instead of constructing instructions
manually with BranchInst::Create(). It's consistent with other
uses of IRBuilder in this pass, and has an additional important
benefit:
Using IRBuilder will ensure that new branch instruction will get
the same debug location as original terminator instruction it will
eventually replace.
For now I'm not adding a testcase, as currently original terminator
instruction also lack debug location due to missing debug location
propagation in BasicBlock::splitBasicBlock. That is, the testcase
will accompany the fix for the latter I'm going to mail soon.
==== Commit 2 ====
Set proper debug location for branch added in BasicBlock::splitBasicBlock().
This improves debug locations in passes that do a lot of basic block
transformations. Important case is LoopUnroll pass, the test for correct
debug locations accompanies this change.
http://reviews.llvm.org/D10367
Files:
lib/IR/BasicBlock.cpp
lib/Transforms/Utils/LoopUnrollRuntime.cpp
test/Transforms/LoopUnroll/runtime-loop1.ll
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10367.27464.patch
Type: text/x-patch
Size: 7422 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150610/6f3e9a5b/attachment.bin>
More information about the llvm-commits
mailing list