FailedChanges

Summary

  1. Ignore !associated metadata with null argument. Fixes PR32577 (comment 10). Such metadata may legitimately appear in LTO.
  2. Relax Dwarf filecheck test for 32-bit hosts
  3. 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
  4. Add basic test case for -instnamer
  5. [InstNamer] Use range-for
  6. [InstNamer] Don't check type of arguments (they're never void)
  7. Delete trailing whitespace
Revision 302485 by eugenis:
Ignore !associated metadata with null argument.

Fixes PR32577 (comment 10).
Such metadata may legitimately appear in LTO.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp (diff)llvm-revision.src/llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
The file was modified/llvm/trunk/test/CodeGen/X86/elf-associated.ll (diff)llvm-revision.src/llvm/trunk/test/CodeGen/X86/elf-associated.ll
Revision 302484 by rnk:
Relax Dwarf filecheck test for 32-bit hosts
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/CodeGen/X86/2010-01-18-DbgValue.ll (diff)llvm-revision.src/llvm/trunk/test/CodeGen/X86/2010-01-18-DbgValue.ll
Revision 302483 by rnk:
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
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp (diff)llvm-revision.src/llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp (diff)llvm-revision.src/llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (diff)llvm-revision.src/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (diff)llvm-revision.src/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
The file was modified/llvm/trunk/test/CodeGen/X86/2010-01-18-DbgValue.ll (diff)llvm-revision.src/llvm/trunk/test/CodeGen/X86/2010-01-18-DbgValue.ll
The file was removed/llvm/trunk/test/CodeGen/X86/2012-11-30-handlemove-dbg.llllvm-revision.src/llvm/trunk/test/CodeGen/X86/2012-11-30-handlemove-dbg.ll
The file was modified/llvm/trunk/test/CodeGen/X86/dbg-baseptr.ll (diff)llvm-revision.src/llvm/trunk/test/CodeGen/X86/dbg-baseptr.ll
The file was added/llvm/trunk/test/DebugInfo/X86/dbg-declare-inalloca.llllvm-revision.src/llvm/trunk/test/DebugInfo/X86/dbg-declare-inalloca.ll
Revision 302482 by sanjoy:
Add basic test case for -instnamer
Change TypePath in RepositoryPath in Workspace
The file was added/llvm/trunk/test/Transforms/InstNamerllvm-revision.src/llvm/trunk/test/Transforms/InstNamer
The file was added/llvm/trunk/test/Transforms/InstNamer/basic.llllvm-revision.src/llvm/trunk/test/Transforms/InstNamer/basic.ll
Revision 302481 by sanjoy:
[InstNamer] Use range-for
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/Utils/InstructionNamer.cpp (diff)llvm-revision.src/llvm/trunk/lib/Transforms/Utils/InstructionNamer.cpp
Revision 302480 by sanjoy:
[InstNamer] Don't check type of arguments (they're never void)
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/Utils/InstructionNamer.cpp (diff)llvm-revision.src/llvm/trunk/lib/Transforms/Utils/InstructionNamer.cpp
Revision 302479 by sanjoy:
Delete trailing whitespace
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/Utils/InstructionNamer.cpp (diff)llvm-revision.src/llvm/trunk/lib/Transforms/Utils/InstructionNamer.cpp