mirror of git://gcc.gnu.org/git/gcc.git
gcse.c (hash_scan_insn): New argument IN_LIBCALL_BLOCK.
* gcse.c (hash_scan_insn): New argument IN_LIBCALL_BLOCK. Changed
caller.
From-SVN: r20967
This commit is contained in:
parent
fcc60894b8
commit
ed79bb3d42
|
|
@ -1,3 +1,8 @@
|
||||||
|
Mon Jul 6 22:47:55 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
|
||||||
|
|
||||||
|
* gcse.c (hash_scan_insn): New argument IN_LIBCALL_BLOCK. Changed
|
||||||
|
caller.
|
||||||
|
|
||||||
Mon Jul 6 22:21:56 1998 Kamil Iskra <iskra@student.uci.agh.edu.pl>
|
Mon Jul 6 22:21:56 1998 Kamil Iskra <iskra@student.uci.agh.edu.pl>
|
||||||
|
|
||||||
* m68k.c (output_scc_di): Use cmpw #0 instead of tstl when
|
* m68k.c (output_scc_di): Use cmpw #0 instead of tstl when
|
||||||
|
|
|
||||||
21
gcc/gcse.c
21
gcc/gcse.c
|
|
@ -550,7 +550,7 @@ static void record_one_set PROTO ((int, rtx));
|
||||||
static void record_set_info PROTO ((rtx, rtx));
|
static void record_set_info PROTO ((rtx, rtx));
|
||||||
static void compute_sets PROTO ((rtx));
|
static void compute_sets PROTO ((rtx));
|
||||||
|
|
||||||
static void hash_scan_insn PROTO ((rtx, int));
|
static void hash_scan_insn PROTO ((rtx, int, int));
|
||||||
static void hash_scan_set PROTO ((rtx, rtx, int));
|
static void hash_scan_set PROTO ((rtx, rtx, int));
|
||||||
static void hash_scan_clobber PROTO ((rtx, rtx));
|
static void hash_scan_clobber PROTO ((rtx, rtx));
|
||||||
static void hash_scan_call PROTO ((rtx, rtx));
|
static void hash_scan_call PROTO ((rtx, rtx));
|
||||||
|
|
@ -1849,10 +1849,12 @@ hash_scan_call (x, insn)
|
||||||
are also in the PARALLEL. Later.
|
are also in the PARALLEL. Later.
|
||||||
|
|
||||||
If SET_P is non-zero, this is for the assignment hash table,
|
If SET_P is non-zero, this is for the assignment hash table,
|
||||||
otherwise it is for the expression hash table. */
|
otherwise it is for the expression hash table.
|
||||||
|
If IN_LIBCALL_BLOCK nonzero, we are in a libcall block, and should
|
||||||
|
not record any expressions. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
hash_scan_insn (insn, set_p)
|
hash_scan_insn (insn, set_p, in_libcall_block)
|
||||||
rtx insn;
|
rtx insn;
|
||||||
int set_p;
|
int set_p;
|
||||||
{
|
{
|
||||||
|
|
@ -1861,7 +1863,7 @@ hash_scan_insn (insn, set_p)
|
||||||
/* Pick out the sets of INSN and for other forms of instructions record
|
/* Pick out the sets of INSN and for other forms of instructions record
|
||||||
what's been modified. */
|
what's been modified. */
|
||||||
|
|
||||||
if (GET_CODE (pat) == SET)
|
if (GET_CODE (pat) == SET && ! in_libcall_block)
|
||||||
hash_scan_set (pat, insn, set_p);
|
hash_scan_set (pat, insn, set_p);
|
||||||
else if (GET_CODE (pat) == PARALLEL)
|
else if (GET_CODE (pat) == PARALLEL)
|
||||||
{
|
{
|
||||||
|
|
@ -2037,6 +2039,7 @@ compute_hash_table (f, set_p)
|
||||||
{
|
{
|
||||||
rtx insn;
|
rtx insn;
|
||||||
int regno;
|
int regno;
|
||||||
|
int in_libcall_block;
|
||||||
|
|
||||||
/* First pass over the instructions records information used to
|
/* First pass over the instructions records information used to
|
||||||
determine when registers and memory are first and last set.
|
determine when registers and memory are first and last set.
|
||||||
|
|
@ -2080,12 +2083,18 @@ compute_hash_table (f, set_p)
|
||||||
|
|
||||||
/* The next pass builds the hash table. */
|
/* The next pass builds the hash table. */
|
||||||
|
|
||||||
for (insn = basic_block_head[bb];
|
for (insn = basic_block_head[bb], in_libcall_block = 0;
|
||||||
insn && insn != NEXT_INSN (basic_block_end[bb]);
|
insn && insn != NEXT_INSN (basic_block_end[bb]);
|
||||||
insn = NEXT_INSN (insn))
|
insn = NEXT_INSN (insn))
|
||||||
{
|
{
|
||||||
if (GET_RTX_CLASS (GET_CODE (insn)) == 'i')
|
if (GET_RTX_CLASS (GET_CODE (insn)) == 'i')
|
||||||
hash_scan_insn (insn, set_p);
|
{
|
||||||
|
if (find_reg_note (insn, REG_LIBCALL, NULL_RTX))
|
||||||
|
in_libcall_block = 1;
|
||||||
|
else if (find_reg_note (insn, REG_RETVAL, NULL_RTX))
|
||||||
|
in_libcall_block = 0;
|
||||||
|
hash_scan_insn (insn, set_p, in_libcall_block);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue