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
c23da840
Commit
c23da840
authored
Apr 22, 2008
by
Maxim Kuvyrkov
Committed by
Maxim Kuvyrkov
Apr 22, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* rtl-factoring.c (collect_patterns_seqs): Handle CC0 targets.
From-SVN: r134551
parent
0a58c87e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
11 deletions
+39
-11
gcc/ChangeLog
+4
-0
gcc/rtl-factoring.c
+35
-11
No files found.
gcc/ChangeLog
View file @
c23da840
2008-04-22 Maxim Kuvyrkov <maxim@codesourcery.com>
* rtl-factoring.c (collect_patterns_seqs): Handle CC0 targets.
2008-04-21 Adam Nemet <anemet@caviumnetworks.com>
* coverage.c: Include tree-pass.h.
...
...
gcc/rtl-factoring.c
View file @
c23da840
...
...
@@ -444,15 +444,17 @@ collect_pattern_seqs (void)
htab_iterator
hti0
,
hti1
,
hti2
;
p_hash_bucket
hash_bucket
;
p_hash_elem
e0
,
e1
;
#if
def STACK_REGS
#if
defined STACK_REGS || defined HAVE_CC0
basic_block
bb
;
bitmap_head
stack_reg_live
;
bitmap_head
dont_collect
;
/* Extra initialization step to ensure that no stack registers (if present)
are live across abnormal edges. Set a flag in STACK_REG_LIVE for an insn
if a stack register is live after the insn. */
bitmap_initialize
(
&
stack_reg_live
,
NULL
);
or cc0 code (if present) are live across abnormal edges.
Set a flag in DONT_COLLECT for an insn if a stack register is live
after the insn or the insn is cc0 setter or user. */
bitmap_initialize
(
&
dont_collect
,
NULL
);
#ifdef STACK_REGS
FOR_EACH_BB
(
bb
)
{
regset_head
live
;
...
...
@@ -476,7 +478,7 @@ collect_pattern_seqs (void)
{
if
(
REGNO_REG_SET_P
(
&
live
,
reg
))
{
bitmap_set_bit
(
&
stack_reg_live
,
INSN_UID
(
insn
));
bitmap_set_bit
(
&
dont_collect
,
INSN_UID
(
insn
));
break
;
}
}
...
...
@@ -493,6 +495,28 @@ collect_pattern_seqs (void)
}
#endif
#ifdef HAVE_CC0
/* Mark CC0 setters and users as ineligible for collection into sequences.
This is an over-conservative fix, since it is OK to include
a cc0_setter, but only if we also include the corresponding cc0_user,
and vice versa. */
FOR_EACH_BB
(
bb
)
{
rtx
insn
;
rtx
next_tail
;
next_tail
=
NEXT_INSN
(
BB_END
(
bb
));
for
(
insn
=
BB_HEAD
(
bb
);
insn
!=
next_tail
;
insn
=
NEXT_INSN
(
insn
))
{
if
(
INSN_P
(
insn
)
&&
reg_mentioned_p
(
cc0_rtx
,
PATTERN
(
insn
)))
bitmap_set_bit
(
&
dont_collect
,
INSN_UID
(
insn
));
}
}
#endif
#endif
/* defined STACK_REGS || defined HAVE_CC0 */
/* Initialize PATTERN_SEQS to empty. */
pattern_seqs
=
0
;
...
...
@@ -505,15 +529,15 @@ collect_pattern_seqs (void)
FOR_EACH_HTAB_ELEMENT
(
hash_bucket
->
seq_candidates
,
e1
,
p_hash_elem
,
hti2
)
if
(
e0
!=
e1
#if
def STACK_REGS
&&
!
bitmap_bit_p
(
&
stack_reg_live
,
INSN_UID
(
e0
->
insn
))
&&
!
bitmap_bit_p
(
&
stack_reg_live
,
INSN_UID
(
e1
->
insn
))
#if
defined STACK_REGS || defined HAVE_CC0
&&
!
bitmap_bit_p
(
&
dont_collect
,
INSN_UID
(
e0
->
insn
))
&&
!
bitmap_bit_p
(
&
dont_collect
,
INSN_UID
(
e1
->
insn
))
#endif
)
match_seqs
(
e0
,
e1
);
#if
def STACK_REGS
#if
defined STACK_REGS || defined HAVE_CC0
/* Free unused data. */
bitmap_clear
(
&
stack_reg_live
);
bitmap_clear
(
&
dont_collect
);
#endif
}
...
...
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