llvm-6502/test
Pete Cooper 185a992dcf Check for dynamic alloca's when selecting lifetime intrinsics.
TL;DR: Indexing maps with [] creates missing entries.

The long version:

When selecting lifetime intrinsics, we index the *static* alloca map with the AllocaInst we find for that lifetime.  Trouble is, we don't first check to see if this is a dynamic alloca.

On the attached example, this causes a dynamic alloca to create an entry in the static map, and returns 0 (the default) as the frame index for that lifetime.  0 was used for the frame index of the stack protector, which given that it now has a lifetime, is coloured, and merged with other stack slots.

PEI would later trigger an assert because it expects the stack protector to not be dead.

This fix ensures that we only get frame indices for static allocas, ie, those in the map.  Dynamic ones are effectively dropped, which is suboptimal, but at least isn't completely broken.

rdar://problem/18672951

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220099 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-17 22:59:33 +00:00
..
Analysis [DSE] Remove no-data-layout-only type-based overlap checking 2014-10-17 11:56:00 +00:00
Assembler Delete -std-compile-opts. 2014-10-16 20:00:02 +00:00
Bindings Disable ccache for go tests. 2014-10-17 18:32:36 +00:00
Bitcode Revert "Revert "DI: Fold constant arguments into a single MDString"" 2014-10-03 20:01:09 +00:00
BugPoint Revert "Revert "DI: Fold constant arguments into a single MDString"" 2014-10-03 20:01:09 +00:00
CodeGen Check for dynamic alloca's when selecting lifetime intrinsics. 2014-10-17 22:59:33 +00:00
DebugInfo [dwarfdump] Prettyprint DW_AT_APPLE_property_attribute bitfield values. 2014-10-10 15:51:10 +00:00
ExecutionEngine
Feature Delete -std-compile-opts. 2014-10-16 20:00:02 +00:00
FileCheck
Instrumentation [asan-asm-instrumentation] Fixed memory references which includes %rsp as a base or an index register. 2014-10-13 09:37:47 +00:00
Integer
JitListener Revert "Revert "DI: Fold constant arguments into a single MDString"" 2014-10-03 20:01:09 +00:00
Linker [dwarfdump] Print the name for referenced specification of abstract_origin DIEs. 2014-10-06 03:36:31 +00:00
LTO
MC [mips] Add support for COP1's Branch-On-Cond-Likely instructions 2014-10-17 14:08:28 +00:00
Object Suppress llvm-ar's MRI tests for now on win32, since line_iterator is incompatible to CRLF. 2014-10-11 22:21:27 +00:00
Other
TableGen
tools [llvm-symbolizer] Introduce the -dsym-hint option. 2014-10-17 00:50:19 +00:00
Transforms Revert "TRE: make TRE a bit more aggressive" 2014-10-17 21:25:48 +00:00
Unit
Verifier [Stackmaps] Enable invoking the patchpoint intrinsic. 2014-10-17 17:39:00 +00:00
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg Initial version of Go bindings. 2014-10-16 22:48:02 +00:00
lit.site.cfg.in Initial version of Go bindings. 2014-10-16 22:48:02 +00:00
Makefile Initial version of Go bindings. 2014-10-16 22:48:02 +00:00
Makefile.tests
TestRunner.sh