summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-05-08 23:20:27 +0000
committerReid Kleckner <rnk@google.com>2017-05-08 23:20:27 +0000
commit45efcf0c9608e12f1536c855d5e9df94bb4fedb2 (patch)
tree599de83cf481a13f4da691a1b8949af7faaf4148 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parent9c52c7656c001aa47fdce4ab1866f69d76930a57 (diff)
downloadbcm5719-llvm-45efcf0c9608e12f1536c855d5e9df94bb4fedb2.tar.gz
bcm5719-llvm-45efcf0c9608e12f1536c855d5e9df94bb4fedb2.zip
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
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud