Do not inline functions with (dynamic) alloca into
authorDale Johannesen <dalej@apple.com>
Thu, 8 Jan 2009 21:45:23 +0000 (21:45 +0000)
committerDale Johannesen <dalej@apple.com>
Thu, 8 Jan 2009 21:45:23 +0000 (21:45 +0000)
commit4362387c74d8fb07ec914b3173abf834d639ff39
tree0c7c4308429d7eea8c254da50dfa688bf5c64fc3
parent86062afbc49b549a653d38fb03702051f3917df7
Do not inline functions with (dynamic) alloca into
functions that don't already have a (dynamic) alloca.
Dynamic allocas cause inefficient codegen and we shouldn't
propagate this (behavior follows gcc).  Two existing tests
assumed such inlining would be done; they are hacked by
adding an alloca in the caller, preserving the point of
the tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61946 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Utils/InlineCost.h
lib/Transforms/Utils/InlineCost.cpp
test/Transforms/Inline/2009-01-08-NoInlineDynamicAlloca.ll [new file with mode: 0644]
test/Transforms/Inline/dynamic_alloca_test.ll
test/Transforms/PruneEH/2008-09-05-CGUpdate.ll