From adb4c69d5ca854774f1ca1fef03ca8df541dc974 Mon Sep 17 00:00:00 2001 From: Sergey Dmitrouk Date: Tue, 28 Apr 2015 11:56:37 +0000 Subject: [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 llvm-svn: 235977 --- llvm/lib/Target/PowerPC/PPCInstrHTM.td | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Target/PowerPC/PPCInstrHTM.td') diff --git a/llvm/lib/Target/PowerPC/PPCInstrHTM.td b/llvm/lib/Target/PowerPC/PPCInstrHTM.td index 20e6a628632..6c4e2129087 100644 --- a/llvm/lib/Target/PowerPC/PPCInstrHTM.td +++ b/llvm/lib/Target/PowerPC/PPCInstrHTM.td @@ -17,7 +17,7 @@ def HasHTM : Predicate<"PPCSubTarget->hasHTM()">; def HTM_get_imm : SDNodeXFormgetZExtValue()); + return getI32Imm (N->getZExtValue(), SDLoc(N)); }]>; let hasSideEffects = 1, usesCustomInserter = 1 in { -- cgit v1.2.3