[PATCH] D16157: [OperandBundles] Copy DebugLoc with calls/invokes
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 13 14:55:05 PST 2016
Test case(s)?
On Wed, Jan 13, 2016 at 2:42 PM, Joseph Tremoulet via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> JosephTremoulet created this revision.
> JosephTremoulet added a reviewer: sanjoy.
> JosephTremoulet added a subscriber: llvm-commits.
>
> The overloads of CallInst::Create and InvokeInst::Create that are used to
> adjust operand bundles purport to create a new instruction "identical in
> every way except [for] the operand bundles", so copy the DebugLoc along
> with everything else.
>
>
> http://reviews.llvm.org/D16157
>
> Files:
> lib/IR/Instructions.cpp
> lib/Transforms/Utils/InlineFunction.cpp
>
> Index: lib/Transforms/Utils/InlineFunction.cpp
> ===================================================================
> --- lib/Transforms/Utils/InlineFunction.cpp
> +++ lib/Transforms/Utils/InlineFunction.cpp
> @@ -1449,7 +1449,6 @@
> NewInst = CallInst::Create(cast<CallInst>(I), OpBundles, I);
> else
> NewInst = InvokeInst::Create(cast<InvokeInst>(I), OpBundles, I);
> - NewInst->setDebugLoc(I->getDebugLoc());
> NewInst->takeName(I);
> I->replaceAllUsesWith(NewInst);
> I->eraseFromParent();
> Index: lib/IR/Instructions.cpp
> ===================================================================
> --- lib/IR/Instructions.cpp
> +++ lib/IR/Instructions.cpp
> @@ -309,6 +309,7 @@
> NewCI->setCallingConv(CI->getCallingConv());
> NewCI->SubclassOptionalData = CI->SubclassOptionalData;
> NewCI->setAttributes(CI->getAttributes());
> + NewCI->setDebugLoc(CI->getDebugLoc());
> return NewCI;
> }
>
> @@ -596,6 +597,7 @@
> NewII->setCallingConv(II->getCallingConv());
> NewII->SubclassOptionalData = II->SubclassOptionalData;
> NewII->setAttributes(II->getAttributes());
> + NewII->setDebugLoc(II->getDebugLoc());
> return NewII;
> }
>
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160113/814468dc/attachment.html>
More information about the llvm-commits
mailing list