forked from OSchip/llvm-project
f7c0980c10
Summary: Avoids tons of prologue boilerplate when arguments are passed in memory and left in memory. This can happen in a debug build or in a release build when an argument alloca is escaped. This will dramatically affect the code size of x86 debug builds, because X86 fast isel doesn't handle arguments passed in memory at all. It only handles the x86_64 case of up to 6 basic register parameters. This is implemented by analyzing the entry block before ISel to identify copy elision candidates. A copy elision candidate is an argument that is used to fully initialize an alloca before any other possibly escaping uses of that alloca. If an argument is a copy elision candidate, we set a flag on the InputArg. If the the target generates loads from a fixed stack object that matches the size and alignment requirements of the alloca, the SelectionDAG builder will delete the stack object created for the alloca and replace it with the fixed stack object. The load is left behind to satisfy any remaining uses of the argument value. The store is now dead and is therefore elided. The fixed stack object is also marked as mutable, as it may now be modified by the user, and it would be invalid to rematerialize the initial load from it. Supersedes D28388 Fixes PR26328 Reviewers: chandlerc, MatzeB, qcolombet, inglorion, hans Subscribers: igorb, llvm-commits Differential Revision: https://reviews.llvm.org/D29668 llvm-svn: 296683 |
||
---|---|---|
.. | ||
AArch64 | ||
ARM | ||
COFF | ||
Generic | ||
Inputs | ||
Lanai | ||
MIR | ||
Mips | ||
PDB | ||
PowerPC | ||
Sparc | ||
SystemZ | ||
WebAssembly | ||
X86 | ||
arm-relocs.test | ||
debuglineinfo-macho.test | ||
debuglineinfo.test | ||
debugmacinfo.test | ||
dwarfdump-64-bit-dwarf.test | ||
dwarfdump-accel.test | ||
dwarfdump-debug-frame-simple.test | ||
dwarfdump-debug-loc-simple.test | ||
dwarfdump-dump-flags.test | ||
dwarfdump-dump-gdbindex.test | ||
dwarfdump-dwp.test | ||
dwarfdump-header.test | ||
dwarfdump-implicit-const.test | ||
dwarfdump-invalid.test | ||
dwarfdump-line-dwo.test | ||
dwarfdump-macho-relocs.test | ||
dwarfdump-macho-universal.test | ||
dwarfdump-objc.test | ||
dwarfdump-pubnames.test | ||
dwarfdump-ranges.test | ||
dwarfdump-type-units.test | ||
dwarfdump-zlib.test | ||
dwo.ll | ||
llvm-symbolizer-split-dwarf-empty.test | ||
llvm-symbolizer-zlib.test | ||
llvm-symbolizer.test | ||
macro_link.ll | ||
member-pointers.o | ||
missing-abstract-variable.o | ||
skeletoncu.ll | ||
strip-DIGlobalVariable.ll | ||
strip-loop-metadata.ll |