Update StackProtector when coloring merges stack slots
authorHal Finkel <hfinkel@anl.gov>
Mon, 20 Jan 2014 19:49:14 +0000 (19:49 +0000)
committerHal Finkel <hfinkel@anl.gov>
Mon, 20 Jan 2014 19:49:14 +0000 (19:49 +0000)
commit07b072b24d873d61f0f5a215f89443fa7fa11fdb
tree6ca330db488182bc3116b23b90c5657d97a97734
parent825b93b2dfb101c8b5e32d6f7199e116d559f625
Update StackProtector when coloring merges stack slots

StackProtector keeps a ValueMap of alloca instructions to layout kind tags for
use by PEI and other later passes. When stack coloring replaces one alloca with
a bitcast to another one, the key replacement in this map does not work.
Instead, provide an interface to manage this updating directly. This seems like
an improvement over the old behavior, where the layout map would not get
updated at all when the stack slots were merged. In practice, however, there is
likely no observable difference because PEI only did anything special with
'large array' kinds, and if one large array is merged with another, than the
replacement should already have been a large array.

This is an attempt to unbreak the clang-x86_64-darwin11-RA builder.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199684 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/StackProtector.h
lib/CodeGen/StackColoring.cpp
lib/CodeGen/StackProtector.cpp