aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/pa
diff options
context:
space:
mode:
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>2007-06-30 14:26:18 +0000
committerJohn David Anglin <danglin@gcc.gnu.org>2007-06-30 14:26:18 +0000
commit62a539689073dac558732cb339cbcf0f7baee820 (patch)
tree6a66f0056b4fbb9fbd88fcca99dfa7a20bbc6ecd /gcc/config/pa
parent89fb70a345104a84bff4d5105f3456e7b8a5ca1e (diff)
downloadgcc-62a539689073dac558732cb339cbcf0f7baee820.zip
gcc-62a539689073dac558732cb339cbcf0f7baee820.tar.gz
gcc-62a539689073dac558732cb339cbcf0f7baee820.tar.bz2
pa.md (return): Delete pattern.
rtl-optimization/32296 * pa.md (return): Delete pattern. (return_internal): Remove "(const_int 1)" from pattern. (epilogue): Use return_internal pattern for trivial returns. * pa-protos.h (hppa_can_use_return_insn_p): Delete declaration. * pa.c (hppa_can_use_return_insn_p): Delete function. Include "df.h". From-SVN: r126150
Diffstat (limited to 'gcc/config/pa')
-rw-r--r--gcc/config/pa/pa-protos.h1
-rw-r--r--gcc/config/pa/pa.c17
-rw-r--r--gcc/config/pa/pa.md39
3 files changed, 12 insertions, 45 deletions
diff --git a/gcc/config/pa/pa-protos.h b/gcc/config/pa/pa-protos.h
index 8d60182..51b7ecb 100644
--- a/gcc/config/pa/pa-protos.h
+++ b/gcc/config/pa/pa-protos.h
@@ -144,7 +144,6 @@ extern int and_mask_p (unsigned HOST_WIDE_INT);
extern int cint_ok_for_move (HOST_WIDE_INT);
extern void hppa_expand_prologue (void);
extern void hppa_expand_epilogue (void);
-extern int hppa_can_use_return_insn_p (void);
extern int ior_mask_p (unsigned HOST_WIDE_INT);
extern void compute_zdepdi_operands (unsigned HOST_WIDE_INT,
unsigned *);
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index f22f263..2be7b4e 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -47,6 +47,7 @@ Boston, MA 02110-1301, USA. */
#include "tm_p.h"
#include "target.h"
#include "target-def.h"
+#include "df.h"
/* Return nonzero if there is a bypass for the output of
OUT_INSN and the fp store IN_INSN. */
@@ -4403,22 +4404,6 @@ return_addr_rtx (int count, rtx frameaddr)
return saved_rp;
}
-/* This is only valid once reload has completed because it depends on
- knowing exactly how much (if any) frame there is and...
-
- It's only valid if there is no frame marker to de-allocate and...
-
- It's only valid if %r2 hasn't been saved into the caller's frame
- (we're not profiling and %r2 isn't live anywhere). */
-int
-hppa_can_use_return_insn_p (void)
-{
- return (reload_completed
- && (compute_frame_size (get_frame_size (), 0) ? 0 : 1)
- && ! df_regs_ever_live_p (2)
- && ! frame_pointer_needed);
-}
-
void
emit_bcond_fp (enum rtx_code code, rtx operand0)
{
diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md
index 807e1ce..a732fa0 100644
--- a/gcc/config/pa/pa.md
+++ b/gcc/config/pa/pa.md
@@ -7343,28 +7343,10 @@
;; Unconditional and other jump instructions.
-;; This can only be used in a leaf function, so we do
-;; not need to use the PIC register when generating PIC code.
-(define_insn "return"
- [(return)
- (use (reg:SI 2))
- (const_int 0)]
- "hppa_can_use_return_insn_p ()"
- "*
-{
- if (TARGET_PA_20)
- return \"bve%* (%%r2)\";
- return \"bv%* %%r0(%%r2)\";
-}"
- [(set_attr "type" "branch")
- (set_attr "length" "4")])
-
-;; Emit a different pattern for functions which have non-trivial
-;; epilogues so as not to confuse jump and reorg.
+;; This is used for most returns.
(define_insn "return_internal"
[(return)
- (use (reg:SI 2))
- (const_int 1)]
+ (use (reg:SI 2))]
""
"*
{
@@ -7406,14 +7388,16 @@
""
"
{
- /* Try to use the trivial return first. Else use the full
- epilogue. */
- if (hppa_can_use_return_insn_p ())
- emit_jump_insn (gen_return ());
+ rtx x;
+
+ /* Try to use the trivial return first. Else use the full epilogue. */
+ if (reload_completed
+ && !frame_pointer_needed
+ && !df_regs_ever_live_p (2)
+ && (compute_frame_size (get_frame_size (), 0) ? 0 : 1))
+ x = gen_return_internal ();
else
{
- rtx x;
-
hppa_expand_epilogue ();
/* EH returns bypass the normal return stub. Thus, we must do an
@@ -7426,9 +7410,8 @@
x = gen_return_external_pic ();
else
x = gen_return_internal ();
-
- emit_jump_insn (x);
}
+ emit_jump_insn (x);
DONE;
}")