[llvm-commits] [llvm] r52532 - in /llvm/trunk: lib/Transforms/IPO/DeadArgumentElimination.cpp test/Transforms/DeadArgElim/multdeadretval.ll

Matthijs Kooijman matthijs at stdin.nl
Mon Jun 23 09:04:57 PDT 2008


Hi Evan,

> This breaks llvm-gcc bootstrapping. Looks like it miscompiles gcc driver:
I've spent the day debugging this (never imagined how much fun a bootstrap
build was :-p) and I think I nailed it down.

The problem here was that DAE was removing a return value that wasn't really
dead. The return value of for_each_path was used as the return value of
find_a_file, and thus marked MaybeAlive. However, for_each_path was also used
in some other places, in which the return value was not used, causing it to be
marked as Dead (overwriting the previous MaybeAlive marking).

In this particular case, this resulted in the path lookup function failing, so
cc1 can't be found.

I've solved this by completely removing the distinction between Dead and
MaybeLive. Everything is MaybeLive until proven Live and anything not Live in
the end is removed.

I've attached the diff, perhaps you could check if it works for you? Here, it
managed to compile past the point where it was failing into stage3. It's not
finished yet, but my work day is over, but I expect it to compile the last of
stage3 just fine.

Gr.

Matthijs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: deadarg.diff
Type: text/x-diff
Size: 46153 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20080623/41b8c3b7/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20080623/41b8c3b7/attachment.sig>


More information about the llvm-commits mailing list