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
f395cd86
Commit
f395cd86
authored
Jan 14, 1996
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(stupid_find_reg): Don't try to allocate reg if live over more than
5,000 insns. From-SVN: r10974
parent
981e5cd9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
gcc/stupid.c
+10
-3
No files found.
gcc/stupid.c
View file @
f395cd86
/* Dummy data flow analysis for GNU compiler in nonoptimizing mode.
/* Dummy data flow analysis for GNU compiler in nonoptimizing mode.
Copyright (C) 1987, 1991, 1994, 1995 Free Software Foundation, Inc.
Copyright (C) 1987, 1991, 1994, 1995
, 1996
Free Software Foundation, Inc.
This file is part of GNU CC.
This file is part of GNU CC.
...
@@ -308,8 +308,8 @@ stupid_reg_compare (r1p, r2p)
...
@@ -308,8 +308,8 @@ stupid_reg_compare (r1p, r2p)
/* Find a block of SIZE words of hard registers in reg_class CLASS
/* Find a block of SIZE words of hard registers in reg_class CLASS
that can hold a value of machine-mode MODE
that can hold a value of machine-mode MODE
(but actually we test only the first of the block for holding MODE)
(but actually we test only the first of the block for holding MODE)
currently free from after insn whose suid is B
IRTH
currently free from after insn whose suid is B
ORN_INSN
through the insn whose suid is DEA
TH
,
through the insn whose suid is DEA
D_INSN
,
and return the number of the first of them.
and return the number of the first of them.
Return -1 if such a block cannot be found.
Return -1 if such a block cannot be found.
...
@@ -337,6 +337,13 @@ stupid_find_reg (call_preserved, class, mode,
...
@@ -337,6 +337,13 @@ stupid_find_reg (call_preserved, class, mode,
static
struct
{
int
from
,
to
;
}
eliminables
[]
=
ELIMINABLE_REGS
;
static
struct
{
int
from
,
to
;
}
eliminables
[]
=
ELIMINABLE_REGS
;
#endif
#endif
/* If this register's life is more than 5,000 insns, we probably
can't allocate it, so don't waste the time trying. This avoid
quadratic behavior on programs that have regularly-occurring
SAVE_EXPRs. */
if
(
dead_insn
>
born_insn
+
5000
)
return
-
1
;
COPY_HARD_REG_SET
(
used
,
COPY_HARD_REG_SET
(
used
,
call_preserved
?
call_used_reg_set
:
fixed_reg_set
);
call_preserved
?
call_used_reg_set
:
fixed_reg_set
);
...
...
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