Go to file
Chris Lattner fb212de06d Fix PR8735, a really terrible problem in the inliner's "alloca merging"
optimization.

Consider:
static void foo() {
  A = alloca
  ...
}

static void bar() {
  B = alloca
  ...
  call foo();
}

void main() {
  bar()
}

The inliner proceeds bottom up, but lets pretend it decides not to inline foo
into bar.  When it gets to main, it inlines bar into main(), and says "hey, I
just inlined an alloca "B" into main, lets remember that.  Then it keeps going
and finds that it now contains a call to foo.  It decides to inline foo into
main, and says "hey, foo has an alloca A, and I have an alloca B from another
inlined call site, lets reuse it".  The problem with this of course, is that 
the lifetime of A and B are nested, not disjoint.

Unfortunately I can't create a reasonable testcase for this: the one in the
PR is both huge and extremely sensitive, because you minor tweaks end up
causing foo to get inlined into bar too early.  We already have tests for the
basic alloca merging optimization and this does not break them.

llvm-svn: 120995
2010-12-06 07:52:42 +00:00
clang __block variables require us to evaluate the RHS of an assignment before 2010-12-06 06:10:02 +00:00
compiler-rt license change 2010-11-16 22:13:33 +00:00
debuginfo-tests Zap white spaces, test commit email. 2010-11-10 18:11:11 +00:00
libcxx oops, forgot std:: 2010-12-04 19:56:43 +00:00
lldb Use full command to avoid "expr" alias. 2010-12-06 02:47:48 +00:00
llvm Fix PR8735, a really terrible problem in the inliner's "alloca merging" 2010-12-06 07:52:42 +00:00