aboutsummaryrefslogtreecommitdiff
path: root/gcc/flow.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>2000-06-13 15:23:49 -0700
committerRichard Henderson <rth@gcc.gnu.org>2000-06-13 15:23:49 -0700
commitef3843807ecc4825706ae4277b81124ac3cd67eb (patch)
treed176792f9bc4ea013b98e715c82ca606ceee997b /gcc/flow.c
parent96cbf48b356f055114db997b653cf08cdf8a7535 (diff)
downloadgcc-ef3843807ecc4825706ae4277b81124ac3cd67eb.zip
gcc-ef3843807ecc4825706ae4277b81124ac3cd67eb.tar.gz
gcc-ef3843807ecc4825706ae4277b81124ac3cd67eb.tar.bz2
flow.c (insn_dead_p): Keep sets to PIC_OFFSET_TABLE_REGNUM alive before reload.
* flow.c (insn_dead_p): Keep sets to PIC_OFFSET_TABLE_REGNUM alive before reload. * haifa-sched.c (struct deps): Add in_post_call_group_p. (add_dependence): Handle notes between SCHED_GROUP_P insns. (remove_dependence): Always define. (set_sched_group_p): New. (sched_analyze_2): Use it. (sched_analyze_insn): Don't special-case naked uses. Look for and extend in_post_call_group_p. (sched_analyze): Clear stale SCHED_GROUP_P. Set in_post_call_group_p. (init_deps): Clear in_post_call_group_p. From-SVN: r34529
Diffstat (limited to 'gcc/flow.c')
-rw-r--r--gcc/flow.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/flow.c b/gcc/flow.c
index 2e2a79d..99cfbfc 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -3955,6 +3955,16 @@ insn_dead_p (pbi, x, call_ok, notes)
return 0;
#endif
+#ifdef PIC_OFFSET_TABLE_REGNUM
+ /* Before reload, do not allow sets of the pic register
+ to be deleted. Reload can insert references to
+ constant pool memory anywhere in the function, making
+ the PIC register live where it wasn't before. */
+ if (regno == PIC_OFFSET_TABLE_REGNUM && fixed_regs[regno]
+ && ! reload_completed)
+ return 0;
+#endif
+
/* Otherwise, the set is dead. */
return 1;
}