OSDN Git Service

[LoopUnroll][DebugInfo] Don't add metadata to unrolled remainder loop
authorSam Parker <sam.parker@arm.com>
Mon, 4 Sep 2017 08:12:16 +0000 (08:12 +0000)
committerSam Parker <sam.parker@arm.com>
Mon, 4 Sep 2017 08:12:16 +0000 (08:12 +0000)
commit040fcc3883a5da8f0b81c138e55bbce4bef4dd79
tree42713822f61b0bfb7b3a130d7c3cba2ce01d2e67
parenta3a4b988392262140b4c8acfe77dcb59c88fd0a5
[LoopUnroll][DebugInfo] Don't add metadata to unrolled remainder loop

Debug information can be, and was, corrupted when the runtime
remainder loop was fully unrolled. This is because a !null node can
be created instead of a unique one describing the loop. In this case,
the original node gets incorrectly updated with the NewLoopID
metadata.

In the case when the remainder loop is going to be quickly fully
unrolled, there isn't the need to add loop metadata for it anyway.

Differential Revision: https://reviews.llvm.org/D37338

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312471 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/LoopUnrollRuntime.cpp
test/DebugInfo/unrolled-loop-remainder.ll [new file with mode: 0644]
test/Transforms/LoopUnroll/runtime-unroll-remainder.ll