Commit Message

Hi!
The recent change of cfun->local_decls representation from linked list
to vector caused -fcompare-debug regressions. The problem is that
expansion cares about the order of vars in cfun->local_decls (which
determines in which order the vars will be expanded in some cases)
and that some vars are only preserved when -g and not when -g0
(this isn't related to VTA btw, the failures are even with
-m32 -O2 -fcompare-debug -fno-var-tracking). As the removal
of vars from cfun->local_decls is done using VEC_unordered_remove,
the relative order of vars gets out of sync in between -g and -g0 builds
which leads into -fcompare-debug failures.
Fixed by not doing unordered removals, instead moving the vector a single
element at a time after first spot that needs element removal.
We walk the whole vector anyways, this just adds writing of it.
Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
2010-07-12 Jakub Jelinek <jakub@redhat.com>
PR debug/44901
* vec.h (VEC_block_remove): Fix comment.
* tree-ssa-live.c (remove_unused_locals): Don't use
VEC_unordered_remove on local_decls, instead replace a single
vector element in each iteration if at least one element had
to be removed and VEC_truncate at the end.
* omp-low.c (expand_omp_taskreg): Likewise.
Jakub