[llvm] r277027 - Fix DbgValue handling in SelectionDAG.
Adrian Prantl via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 28 13:08:54 PDT 2016
Could you please also add a testcase for this? To get more stable output you could use llc's -stop-after=<pass> option and the check the MIR output.
-- adrian
> On Jul 28, 2016, at 12:48 PM, Nirav Dave via llvm-commits <llvm-commits at lists.llvm.org> wrote:
>
> Author: niravd
> Date: Thu Jul 28 14:48:39 2016
> New Revision: 277027
>
> URL: http://llvm.org/viewvc/llvm-project?rev=277027&view=rev
> Log:
> Fix DbgValue handling in SelectionDAG.
>
> [DAG] Relocate TransferDbgValues in ReplaceAllUsesWith(SDValue, SDValue)
> to before we modify the CSE maps.
>
> Modified:
> llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
>
> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=277027&r1=277026&r2=277027&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Thu Jul 28 14:48:39 2016
> @@ -6255,6 +6255,9 @@ void SelectionDAG::ReplaceAllUsesWith(SD
> "Cannot replace with this method!");
> assert(From != To.getNode() && "Cannot replace uses of with self");
>
> + // Preserve Debug Values
> + TransferDbgValues(FromN, To);
> +
> // Iterate over all the existing uses of From. New uses will be added
> // to the beginning of the use list, which we avoid visiting.
> // This specifically avoids visiting uses of From that arise while the
> @@ -6285,8 +6288,6 @@ void SelectionDAG::ReplaceAllUsesWith(SD
> AddModifiedNodeToCSEMaps(User);
> }
>
> - // Preserve Debug Values
> - TransferDbgValues(FromN, To);
>
> // If we just RAUW'd the root, take note.
> if (FromN == getRoot())
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list