diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2009-09-23 16:30:39 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2009-09-23 16:30:39 +0000 |
commit | 7168dc4708775024f33cfa33b1e86566591af8ac (patch) | |
tree | d0c187b9acb8a4211684ef9d7a593bea88498f4f /gcc/var-tracking.c | |
parent | dda2da581957d0c0614197a7f0021c95c707f005 (diff) | |
download | gcc-7168dc4708775024f33cfa33b1e86566591af8ac.tar.gz |
re PR debug/41353 (VTA missed-debug issues)
PR debug/41353
* var-tracking.c (add_with_sets): Sort MO_VAL_LOC last among uses.
From-SVN: r152088
Diffstat (limited to 'gcc/var-tracking.c')
-rw-r--r-- | gcc/var-tracking.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c index 0e665b91bed..bdd3bdee34e 100644 --- a/gcc/var-tracking.c +++ b/gcc/var-tracking.c @@ -4977,8 +4977,8 @@ add_with_sets (rtx insn, struct cselib_set *sets, int n_sets) note_uses (&PATTERN (insn), add_uses_1, &cui); n2 = VTI (bb)->n_mos - 1; - /* Order the MO_USEs to be before MO_USE_NO_VARs, - MO_VAL_LOC and MO_VAL_USE. */ + /* Order the MO_USEs to be before MO_USE_NO_VARs and MO_VAL_USE, and + MO_VAL_LOC last. */ while (n1 < n2) { while (n1 < n2 && VTI (bb)->mos[n1].type == MO_USE) @@ -4995,6 +4995,24 @@ add_with_sets (rtx insn, struct cselib_set *sets, int n_sets) } } + n2 = VTI (bb)->n_mos - 1; + + while (n1 < n2) + { + while (n1 < n2 && VTI (bb)->mos[n1].type != MO_VAL_LOC) + n1++; + while (n1 < n2 && VTI (bb)->mos[n2].type == MO_VAL_LOC) + n2--; + if (n1 < n2) + { + micro_operation sw; + + sw = VTI (bb)->mos[n1]; + VTI (bb)->mos[n1] = VTI (bb)->mos[n2]; + VTI (bb)->mos[n2] = sw; + } + } + if (CALL_P (insn)) { micro_operation *mo = VTI (bb)->mos + VTI (bb)->n_mos++; |