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
21e4c9a8
Commit
21e4c9a8
authored
Mar 01, 2001
by
Bernd Schmidt
Committed by
Bernd Schmidt
Mar 01, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid exponential runtime
From-SVN: r40145
parent
c2a3a482
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
17 deletions
+33
-17
gcc/ChangeLog
+7
-0
gcc/haifa-sched.c
+22
-17
gcc/sched-int.h
+4
-0
No files found.
gcc/ChangeLog
View file @
21e4c9a8
2001-03-01 Bernd Schmidt <bernds@redhat.com>
* sched-int.h (struct haifa_insn_data): Add new member priority_known.
(INSN_PRIORITY_KNOWN): New accessor macro.
* haifa-sched.c (priority): Use it instead of testing priority against
zero.
2001-02-28 DJ Delorie <dj@redhat.com>
2001-02-28 DJ Delorie <dj@redhat.com>
* config/m68k/m68k.h (MOVE_BY_PIECES_P): Avoid pushing bytes,
* config/m68k/m68k.h (MOVE_BY_PIECES_P): Avoid pushing bytes,
...
...
gcc/haifa-sched.c
View file @
21e4c9a8
...
@@ -719,38 +719,43 @@ static int
...
@@ -719,38 +719,43 @@ static int
priority
(
insn
)
priority
(
insn
)
rtx
insn
;
rtx
insn
;
{
{
int
this_priority
;
rtx
link
;
rtx
link
;
if
(
!
INSN_P
(
insn
))
if
(
!
INSN_P
(
insn
))
return
0
;
return
0
;
if
(
(
this_priority
=
INSN_PRIORITY
(
insn
))
==
0
)
if
(
!
INSN_PRIORITY_KNOWN
(
insn
)
)
{
{
int
this_priority
=
0
;
if
(
INSN_DEPEND
(
insn
)
==
0
)
if
(
INSN_DEPEND
(
insn
)
==
0
)
this_priority
=
insn_cost
(
insn
,
0
,
0
);
this_priority
=
insn_cost
(
insn
,
0
,
0
);
else
else
for
(
link
=
INSN_DEPEND
(
insn
);
link
;
link
=
XEXP
(
link
,
1
))
{
{
for
(
link
=
INSN_DEPEND
(
insn
);
link
;
link
=
XEXP
(
link
,
1
))
rtx
next
;
{
int
next_priority
;
rtx
next
;
int
next_priority
;
if
(
RTX_INTEGRATED_P
(
link
))
if
(
RTX_INTEGRATED_P
(
link
))
continue
;
continue
;
next
=
XEXP
(
link
,
0
);
next
=
XEXP
(
link
,
0
);
/* Critical path is meaningful in block boundaries only. */
/* Critical path is meaningful in block boundaries only. */
if
(
!
(
*
current_sched_info
->
contributes_to_priority
)
(
next
,
insn
))
if
(
!
(
*
current_sched_info
->
contributes_to_priority
)
(
next
,
insn
))
continue
;
continue
;
next_priority
=
insn_cost
(
insn
,
link
,
next
)
+
priority
(
next
);
next_priority
=
insn_cost
(
insn
,
link
,
next
)
+
priority
(
next
);
if
(
next_priority
>
this_priority
)
if
(
next_priority
>
this_priority
)
this_priority
=
next_priority
;
this_priority
=
next_priority
;
}
}
}
INSN_PRIORITY
(
insn
)
=
this_priority
;
INSN_PRIORITY
(
insn
)
=
this_priority
;
INSN_PRIORITY_KNOWN
(
insn
)
=
1
;
}
}
return
this_priority
;
return
INSN_PRIORITY
(
insn
);
}
}
/* Macros and functions for keeping the priority queue sorted, and
/* Macros and functions for keeping the priority queue sorted, and
...
...
gcc/sched-int.h
View file @
21e4c9a8
...
@@ -198,6 +198,9 @@ struct haifa_insn_data
...
@@ -198,6 +198,9 @@ struct haifa_insn_data
moved load insn and this one. */
moved load insn and this one. */
unsigned
int
fed_by_spec_load
:
1
;
unsigned
int
fed_by_spec_load
:
1
;
unsigned
int
is_load_insn
:
1
;
unsigned
int
is_load_insn
:
1
;
/* Nonzero if priority has been computed already. */
unsigned
int
priority_known
:
1
;
};
};
extern
struct
haifa_insn_data
*
h_i_d
;
extern
struct
haifa_insn_data
*
h_i_d
;
...
@@ -209,6 +212,7 @@ extern struct haifa_insn_data *h_i_d;
...
@@ -209,6 +212,7 @@ extern struct haifa_insn_data *h_i_d;
#define CANT_MOVE(insn) (h_i_d[INSN_UID (insn)].cant_move)
#define CANT_MOVE(insn) (h_i_d[INSN_UID (insn)].cant_move)
#define INSN_DEP_COUNT(INSN) (h_i_d[INSN_UID (INSN)].dep_count)
#define INSN_DEP_COUNT(INSN) (h_i_d[INSN_UID (INSN)].dep_count)
#define INSN_PRIORITY(INSN) (h_i_d[INSN_UID (INSN)].priority)
#define INSN_PRIORITY(INSN) (h_i_d[INSN_UID (INSN)].priority)
#define INSN_PRIORITY_KNOWN(INSN) (h_i_d[INSN_UID (INSN)].priority_known)
#define INSN_COST(INSN) (h_i_d[INSN_UID (INSN)].cost)
#define INSN_COST(INSN) (h_i_d[INSN_UID (INSN)].cost)
#define INSN_UNIT(INSN) (h_i_d[INSN_UID (INSN)].units)
#define INSN_UNIT(INSN) (h_i_d[INSN_UID (INSN)].units)
#define INSN_REG_WEIGHT(INSN) (h_i_d[INSN_UID (INSN)].reg_weight)
#define INSN_REG_WEIGHT(INSN) (h_i_d[INSN_UID (INSN)].reg_weight)
...
...
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