[llvm] r235977 - [DebugInfo] Add debug locations to constant SD nodes
Kuba Brecka
kuba.brecka at gmail.com
Tue Jul 14 04:29:37 PDT 2015
Hi Sergey,
I’m seeing a regression in LLVM trunk (which is not in 3.6.0): https://llvm.org/bugs/show_bug.cgi?id=24117 <https://llvm.org/bugs/show_bug.cgi?id=24117>, and I’ve tracked it down to this commit. Do you think you could take a look at it?
Thanks,
Kuba
> ------------------------------------------------------------------------
> r235977 | sdmitrouk | 2015-04-28 13:56:37 +0200 (Tue, 28 Apr 2015) | 20 lines
>
> [DebugInfo] Add debug locations to constant SD nodes
>
> This adds debug location to constant nodes of Selection DAG and updates
> all places that create constants to pass debug locations
> (see PR13269).
>
> Can't guarantee that all locations are correct, but in a lot of cases choice
> is obvious, so most of them should be. At least all tests pass.
>
> Tests for these changes do not cover everything, instead just check it for
> SDNodes, ARM and AArch64 where it's easy to get incorrect locations on
> constants.
>
> This is not complete fix as FastISel contains workaround for wrong debug
> locations, which drops locations from instructions on processing constants,
> but there isn't currently a way to use debug locations from constants there
> as llvm::Constant doesn't cache it (yet). Although this is a bit different
> issue, not directly related to these changes.
>
> Differential Revision: http://reviews.llvm.org/D9084 <http://reviews.llvm.org/D9084>
> ------------------------------------------------------------------------
> Modified: llvm/trunk/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp?rev=235977&r1=235976&r2=235977&view=diff <http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp?rev=235977&r1=235976&r2=235977&view=diff>
> ==============================================================================
> --- llvm/trunk/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp (original)
> +++ llvm/trunk/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp Tue Apr 28 06:56:37 2015
> @@ -131,7 +131,7 @@ class SystemZDAGToDAGISel : public Selec
>
> // Used by SystemZOperands.td to create integer constants.
> inline SDValue getImm(const SDNode *Node, uint64_t Imm) const {
> - return CurDAG->getTargetConstant(Imm, Node->getValueType(0));
> + return CurDAG->getTargetConstant(Imm, SDLoc(Node), Node->getValueType(0));
> }
>
> const SystemZTargetMachine &getTargetMachine() const {
> @@ -596,7 +596,7 @@ void SystemZDAGToDAGISel::getAddressOper
> }
>
> // Lower the displacement to a TargetConstant.
> - Disp = CurDAG->getTargetConstant(AM.Disp, VT);
> + Disp = CurDAG->getTargetConstant(AM.Disp, SDLoc(Base), VT);
> } ...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150714/79fe8a20/attachment.html>
More information about the llvm-commits
mailing list