Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
1bd3f750
Commit
1bd3f750
authored
Jan 17, 2013
by
Marek Polacek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix PR55833.
From-SVN: r195280
parent
7b045477
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
11 deletions
+63
-11
gcc/ChangeLog
+12
-0
gcc/cfgloopmanip.c
+13
-5
gcc/loop-unswitch.c
+5
-6
gcc/testsuite/ChangeLog
+5
-0
gcc/testsuite/gcc.dg/pr55833.c
+28
-0
No files found.
gcc/ChangeLog
View file @
1bd3f750
2013-01-17 Richard Biener <rguenther@suse.de>
Marek Polacek <polacek@redhat.com>
PR rtl-optimization/55833
* loop-unswitch.c (unswitch_loops): Move loop verification...
(unswitch_single_loop): ...here. Call mark_irreducible_loops.
* cfgloopmanip.c (fix_loop_placement): Add IRRED_INVALIDATED parameter.
Set it to true when we're removing a loop from hierarchy tree in
an irreducible region.
(fix_bb_placements): Adjust caller.
(fix_loop_placements): Likewise.
2013-01-17 Georg-Johann Lay <avr@gjlay.de>
* config/avr/builtins.def (DEF_BUILTIN): Factor out
...
...
gcc/cfgloopmanip.c
View file @
1bd3f750
...
...
@@ -111,10 +111,13 @@ fix_bb_placement (basic_block bb)
/* Fix placement of LOOP inside loop tree, i.e. find the innermost superloop
of LOOP to that leads at least one exit edge of LOOP, and set it
as the immediate superloop of LOOP. Return true if the immediate superloop
of LOOP changed. */
of LOOP changed.
IRRED_INVALIDATED is set to true if a change in the loop structures might
invalidate the information about irreducible regions. */
static
bool
fix_loop_placement
(
struct
loop
*
loop
)
fix_loop_placement
(
struct
loop
*
loop
,
bool
*
irred_invalidated
)
{
unsigned
i
;
edge
e
;
...
...
@@ -139,7 +142,12 @@ fix_loop_placement (struct loop *loop)
/* The exit edges of LOOP no longer exits its original immediate
superloops; remove them from the appropriate exit lists. */
FOR_EACH_VEC_ELT
(
exits
,
i
,
e
)
rescan_loop_exit
(
e
,
false
,
false
);
{
/* We may need to recompute irreducible loops. */
if
(
e
->
flags
&
EDGE_IRREDUCIBLE_LOOP
)
*
irred_invalidated
=
true
;
rescan_loop_exit
(
e
,
false
,
false
);
}
ret
=
true
;
}
...
...
@@ -212,7 +220,7 @@ fix_bb_placements (basic_block from,
if
(
from
->
loop_father
->
header
==
from
)
{
/* Subloop header, maybe move the loop upward. */
if
(
!
fix_loop_placement
(
from
->
loop_father
))
if
(
!
fix_loop_placement
(
from
->
loop_father
,
irred_invalidated
))
continue
;
target_loop
=
loop_outer
(
from
->
loop_father
);
}
...
...
@@ -965,7 +973,7 @@ fix_loop_placements (struct loop *loop, bool *irred_invalidated)
while
(
loop_outer
(
loop
))
{
outer
=
loop_outer
(
loop
);
if
(
!
fix_loop_placement
(
loop
))
if
(
!
fix_loop_placement
(
loop
,
irred_invalidated
))
break
;
/* Changing the placement of a loop in the loop tree may alter the
...
...
gcc/loop-unswitch.c
View file @
1bd3f750
...
...
@@ -144,12 +144,7 @@ unswitch_loops (void)
/* Go through inner loops (only original ones). */
FOR_EACH_LOOP
(
li
,
loop
,
LI_ONLY_INNERMOST
)
{
unswitch_single_loop
(
loop
,
NULL_RTX
,
0
);
#ifdef ENABLE_CHECKING
verify_loop_structure
();
#endif
}
unswitch_single_loop
(
loop
,
NULL_RTX
,
0
);
iv_analysis_done
();
}
...
...
@@ -369,6 +364,10 @@ unswitch_single_loop (struct loop *loop, rtx cond_checked, int num)
nloop
=
unswitch_loop
(
loop
,
bbs
[
i
],
copy_rtx_if_shared
(
cond
),
cinsn
);
gcc_assert
(
nloop
);
#ifdef ENABLE_CHECKING
verify_loop_structure
();
#endif
/* Invoke itself on modified loops. */
unswitch_single_loop
(
nloop
,
rconds
,
num
+
1
);
unswitch_single_loop
(
loop
,
conds
,
num
+
1
);
...
...
gcc/testsuite/ChangeLog
View file @
1bd3f750
2013-01-17 Marek Polacek <polacek@redhat.com>
PR rtl-optimization/55833
* gcc.dg/pr55833.c: New test.
2013-01-17 Jan Hubicka <jh@suse.cz>
PR tree-optimization/55273
...
...
gcc/testsuite/gcc.dg/pr55833.c
0 → 100644
View file @
1bd3f750
/* PR rtl-optimization/55833 */
/* { dg-do compile } */
/* { dg-options "-O3" } */
int
a
,
b
,
c
;
void
foo
()
{
unsigned
d
,
l
,
*
p
,
k
=
1
;
if
(
bar
())
{
label:
if
((
a
=
a
<=
0
))
{
if
(
c
)
d
=
b
;
if
(
b
||
d
?
l
:
k
?
:
0
)
a
=
d
=
0
;
goto
label
;
}
}
while
(
*
p
++
)
goto
label
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment