[llvm] r211052 - Improve comments for r211040
Louis Gerbarg
lgg at apple.com
Mon Jun 16 13:31:50 PDT 2014
Author: louis
Date: Mon Jun 16 15:31:50 2014
New Revision: 211052
URL: http://llvm.org/viewvc/llvm-project?rev=211052&view=rev
Log:
Improve comments for r211040
Added comment to clarify why we r211040 choose to bail out of fast isel instead
of generating a more complicated relocation, and fix mislabelled register in the
comments of the asan test case.
Modified:
llvm/trunk/lib/Target/X86/X86FastISel.cpp
llvm/trunk/test/DebugInfo/X86/debug-loc-asan.ll
Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=211052&r1=211051&r2=211052&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Mon Jun 16 15:31:50 2014
@@ -2709,7 +2709,10 @@ unsigned X86FastISel::TargetMaterializeC
// Materialize addresses with LEA instructions.
if (isa<GlobalValue>(C)) {
- //LEA can only handle 32 bit immediates
+ // LEA can only handle 32 bit immediates. Currently this happens pretty
+ // rarely, so rather than deal with it just bail out of fast isel. If any
+ // architectures endis up needing to use this path a lot then fast isel
+ // could get the address with a MOV64ri and use that to load the value.
if (TM.getRelocationModel() == Reloc::Static && Subtarget->is64Bit())
return false;
Modified: llvm/trunk/test/DebugInfo/X86/debug-loc-asan.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/debug-loc-asan.ll?rev=211052&r1=211051&r2=211052&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/debug-loc-asan.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/debug-loc-asan.ll Mon Jun 16 15:31:50 2014
@@ -9,7 +9,7 @@
; }
; with "clang++ -S -emit-llvm -fsanitize=address -O0 -g test.cc"
-; First, argument variable "y" resides in %rdi:
+; First, argument variable "y" resides in %rdx:
; CHECK: DEBUG_VALUE: bar:y <- RDX
; Then its address is stored in a location on a stack:
@@ -21,7 +21,7 @@
; CHECK: .Ldebug_loc{{[0-9]+}}:
; We expect two location ranges for the variable.
-; First, it is stored in %rdi:
+; First, it is stored in %rdx:
; CHECK: .Lset{{[0-9]+}} = .Lfunc_begin0-.Lfunc_begin0
; CHECK-NEXT: .quad .Lset{{[0-9]+}}
; CHECK-NEXT: .Lset{{[0-9]+}} = [[START_LABEL]]-.Lfunc_begin0
More information about the llvm-commits
mailing list