1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
llvm-mirror/test
Reid Kleckner d320dddb9e Use the frame index side table for byval and inalloca arguments
Summary:
For inalloca functions, this is a very common code pattern:

  %argpack = type <{ i32, i32, i32 }>
  define void @f(%argpack* inalloca %args) {
  entry:
    %a = getelementptr inbounds %argpack, %argpack* %args, i32 0, i32 0
    %b = getelementptr inbounds %argpack, %argpack* %args, i32 0, i32 1
    %c = getelementptr inbounds %argpack, %argpack* %args, i32 0, i32 2
    tail call void @llvm.dbg.declare(metadata i32* %a, ... "a")
    tail call void @llvm.dbg.declare(metadata i32* %c, ... "b")
    tail call void @llvm.dbg.declare(metadata i32* %b, ... "c")

Even though these GEPs can be simplified to a constant offset from EBP
or RSP, we don't do that at -O0, and each GEP is computed into a
register. Registers used to compute argument addresses are typically
spilled and clobbered very quickly after the initial computation, so
live debug variable tracking loses information very quickly if we use
DBG_VALUE instructions.

This change moves processing of dbg.declare between argument lowering
and basic block isel, so that we can ask if an argument has a frame
index or not. If the argument lives in a register as is the case for
byval arguments on some targets, then we don't put it in the side table
and during ISel we emit DBG_VALUE instructions.

Reviewers: aprantl

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D32980

llvm-svn: 302483
2017-05-08 23:20:27 +00:00
..
Analysis [X86][AVX1] Improve 256-bit vector costs for integer unary intrinsics. 2017-05-07 20:58:55 +00:00
Assembler Support arbitrary address space pointers in masked gather/scatter intrinsics. 2017-05-03 12:28:54 +00:00
Bindings
Bitcode AMDGPU: Add AMDGPU_HS calling convention 2017-05-02 15:41:10 +00:00
BugPoint
CodeGen Use the frame index side table for byval and inalloca arguments 2017-05-08 23:20:27 +00:00
DebugInfo Use the frame index side table for byval and inalloca arguments 2017-05-08 23:20:27 +00:00
Examples
ExecutionEngine
Feature Replace hardcoded intrinsic list with speculatable attribute. 2017-05-03 02:26:10 +00:00
FileCheck
Instrumentation [asan] Fix dead stripping of globals on Linux. 2017-04-27 20:27:27 +00:00
Integer
JitListener
LibDriver
Linker Remap metadata attached to global variables. 2017-05-04 23:29:39 +00:00
LTO LTO: Mark undefined module asm symbols as used. 2017-04-26 17:53:39 +00:00
MC [ARM] Clear the constant pool cache on explicit .ltorg directives 2017-05-08 10:26:24 +00:00
Object
ObjectYAML [WebAssembly] Add ObjectYAML support for wasm name section 2017-05-05 18:12:34 +00:00
Other [PM] Add ProfileSummaryAnalysis as a required pass in the new pipeline. 2017-05-04 16:58:45 +00:00
SymbolRewriter
TableGen [globalisel][tablegen] Fix the test after silencing the unused variable warning in r301755. 2017-04-29 19:46:27 +00:00
ThinLTO/X86 Remove line and file from DINamespace. 2017-04-28 22:25:46 +00:00
tools Quick fix to D32609, it seems .o files are not transferred in all cases. 2017-05-08 02:47:25 +00:00
Transforms Add basic test case for -instnamer 2017-05-08 23:18:46 +00:00
Unit [Lit] Fix to prevent creation of "%SystemDrive%" directory on Windows. 2017-05-08 08:55:38 +00:00
Verifier Make it illegal for two Functions to point to the same DISubprogram 2017-05-08 21:17:08 +00:00
YAMLParser
.clang-format
CMakeLists.txt Add a dependency from llvm/test to llvm-cvtres. 2017-04-21 20:45:11 +00:00
lit.cfg
lit.site.cfg.in
TestRunner.sh