mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-25 20:01:29 +08:00
cse.c (cse_main): Converts ifdefs on PIC_OFFSET_TABLE_REGNUM to conditionals.
* cse.c (cse_main): Converts ifdefs on PIC_OFFSET_TABLE_REGNUM to conditionals. * defaults.h (PIC_OFFSET_TABLE_REGNUM): Default to INVALID_REGNUM. * emit-rtl.c (init_emit_once): Convert ifdefs to conditionals. * flow.c (mark_regs_live_at_end): Likewise. (calculate_global_regs_live): Likewise. * gcse.c (compute_hash_table): Likewise. (compute_kill_rd): Likewise. * resource.c (mark_target_live_regs): Likewise. * rtl.h (INVALID_REGNUM): New macro. From-SVN: r39643
This commit is contained in:
parent
b1675dbd66
commit
848e0190fb
@ -1,3 +1,16 @@
|
||||
Tue Feb 13 21:09:11 CET 2001 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* cse.c (cse_main): Converts ifdefs on PIC_OFFSET_TABLE_REGNUM to
|
||||
conditionals.
|
||||
* defaults.h (PIC_OFFSET_TABLE_REGNUM): Default to INVALID_REGNUM.
|
||||
* emit-rtl.c (init_emit_once): Convert ifdefs to conditionals.
|
||||
* flow.c (mark_regs_live_at_end): Likewise.
|
||||
(calculate_global_regs_live): Likewise.
|
||||
* gcse.c (compute_hash_table): Likewise.
|
||||
(compute_kill_rd): Likewise.
|
||||
* resource.c (mark_target_live_regs): Likewise.
|
||||
* rtl.h (INVALID_REGNUM): New macro.
|
||||
|
||||
Tue Feb 13 20:59:22 CET 2001 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* i386.md (fixsfsi2, fixdfdi2): Fix previous patch.
|
||||
|
@ -7119,7 +7119,7 @@ cse_main (f, nregs, after_loop, file)
|
||||
#if ARG_POINTER_REGNUM != FRAME_POINTER_REGNUM
|
||||
&& ! (i == ARG_POINTER_REGNUM && fixed_regs[i])
|
||||
#endif
|
||||
#if defined (PIC_OFFSET_TABLE_REGNUM) && !defined (PIC_OFFSET_TABLE_REG_CALL_CLOBBERED)
|
||||
#if !defined (PIC_OFFSET_TABLE_REG_CALL_CLOBBERED)
|
||||
&& ! (i == PIC_OFFSET_TABLE_REGNUM && flag_pic)
|
||||
#endif
|
||||
)
|
||||
|
@ -296,6 +296,10 @@ do { \
|
||||
#define BUILD_VA_LIST_TYPE(X) ((X) = ptr_type_node)
|
||||
#endif
|
||||
|
||||
#ifndef PIC_OFFSET_TABLE_REGNUM
|
||||
#define PIC_OFFSET_TABLE_REGNUM INVALID_REGNUM
|
||||
#endif
|
||||
|
||||
/* By default, the preprocessor should be invoked the same way in C++
|
||||
as in C. */
|
||||
#ifndef CPLUSPLUS_CPP_SPEC
|
||||
|
@ -4197,9 +4197,8 @@ init_emit_once (line_numbers)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef PIC_OFFSET_TABLE_REGNUM
|
||||
pic_offset_table_rtx = gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM);
|
||||
#endif
|
||||
if (PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM)
|
||||
pic_offset_table_rtx = gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM);
|
||||
|
||||
ggc_add_rtx_root (&pic_offset_table_rtx, 1);
|
||||
ggc_add_rtx_root (&struct_value_rtx, 1);
|
||||
|
10
gcc/flow.c
10
gcc/flow.c
@ -3345,14 +3345,13 @@ mark_regs_live_at_end (set)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef PIC_OFFSET_TABLE_REGNUM
|
||||
#ifndef PIC_OFFSET_TABLE_REG_CALL_CLOBBERED
|
||||
/* Many architectures have a GP register even without flag_pic.
|
||||
Assume the pic register is not in use, or will be handled by
|
||||
other means, if it is not fixed. */
|
||||
if (fixed_regs[PIC_OFFSET_TABLE_REGNUM])
|
||||
if (PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM
|
||||
&& fixed_regs[PIC_OFFSET_TABLE_REGNUM])
|
||||
SET_REGNO_REG_SET (set, PIC_OFFSET_TABLE_REGNUM);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Mark all global registers, and all registers used by the epilogue
|
||||
@ -3484,12 +3483,11 @@ calculate_global_regs_live (blocks_in, blocks_out, flags)
|
||||
SET_REGNO_REG_SET (new_live_at_end, ARG_POINTER_REGNUM);
|
||||
#endif
|
||||
|
||||
#ifdef PIC_OFFSET_TABLE_REGNUM
|
||||
/* Any constant, or pseudo with constant equivalences, may
|
||||
require reloading from memory using the pic register. */
|
||||
if (fixed_regs[PIC_OFFSET_TABLE_REGNUM])
|
||||
if (PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM
|
||||
&& fixed_regs[PIC_OFFSET_TABLE_REGNUM])
|
||||
SET_REGNO_REG_SET (new_live_at_end, PIC_OFFSET_TABLE_REGNUM);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Regs used in phi nodes are not included in
|
||||
|
@ -2208,7 +2208,7 @@ compute_hash_table (set_p)
|
||||
#if ARG_POINTER_REGNUM != FRAME_POINTER_REGNUM
|
||||
&& ! (regno == ARG_POINTER_REGNUM && fixed_regs[regno])
|
||||
#endif
|
||||
#if defined (PIC_OFFSET_TABLE_REGNUM) && !defined (PIC_OFFSET_TABLE_REG_CALL_CLOBBERED)
|
||||
#if !defined (PIC_OFFSET_TABLE_REG_CALL_CLOBBERED)
|
||||
&& ! (regno == PIC_OFFSET_TABLE_REGNUM && flag_pic)
|
||||
#endif
|
||||
|
||||
@ -2641,7 +2641,7 @@ compute_kill_rd ()
|
||||
&& ! (regno == ARG_POINTER_REGNUM
|
||||
&& fixed_regs[regno])
|
||||
#endif
|
||||
#if defined (PIC_OFFSET_TABLE_REGNUM) && !defined (PIC_OFFSET_TABLE_REG_CALL_CLOBBERED)
|
||||
#if !defined (PIC_OFFSET_TABLE_REG_CALL_CLOBBERED)
|
||||
&& ! (regno == PIC_OFFSET_TABLE_REGNUM && flag_pic)
|
||||
#endif
|
||||
&& regno != FRAME_POINTER_REGNUM)
|
||||
|
@ -1029,7 +1029,7 @@ mark_target_live_regs (insns, target, res)
|
||||
#if ARG_POINTER_REGNUM != FRAME_POINTER_REGNUM
|
||||
&& ! (i == ARG_POINTER_REGNUM && fixed_regs[i])
|
||||
#endif
|
||||
#if defined (PIC_OFFSET_TABLE_REGNUM) && !defined (PIC_OFFSET_TABLE_REG_CALL_CLOBBERED)
|
||||
#if !defined (PIC_OFFSET_TABLE_REG_CALL_CLOBBERED)
|
||||
&& ! (i == PIC_OFFSET_TABLE_REGNUM && flag_pic)
|
||||
#endif
|
||||
)
|
||||
|
@ -1606,6 +1606,9 @@ extern rtx gen_rtx_MEM PARAMS ((enum machine_mode, rtx));
|
||||
|
||||
#define LAST_VIRTUAL_REGISTER ((FIRST_VIRTUAL_REGISTER) + 4)
|
||||
|
||||
/* REGNUM never really appearing in the INSN stream. */
|
||||
#define INVALID_REGNUM (~(unsigned int)0)
|
||||
|
||||
extern rtx find_next_ref PARAMS ((rtx, rtx));
|
||||
extern rtx *find_single_use PARAMS ((rtx, rtx, rtx *));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user