aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPaul Koning <pkoning@gcc.gnu.org>2018-10-03 14:31:52 -0400
committerPaul Koning <pkoning@gcc.gnu.org>2018-10-03 14:31:52 -0400
commit0a7eb8dfc5dcc74f2084d12e4fe57a07c5817b13 (patch)
treeebaf35f1a064e0506d7694adc51a0ae1ce570bdd /gcc
parentf707a0378804335b425fe541488a39aa642ca550 (diff)
downloadgcc-0a7eb8dfc5dcc74f2084d12e4fe57a07c5817b13.zip
gcc-0a7eb8dfc5dcc74f2084d12e4fe57a07c5817b13.tar.gz
gcc-0a7eb8dfc5dcc74f2084d12e4fe57a07c5817b13.tar.bz2
Enable LRA register allocator for PDP11.
* config/pdp11/constraints.md (Q): Use define_memory_constraints. (R): Likewise. (D): Likewise. * config/pdp11/pdp11.c (pdp11_lra_p): New function. * config/pdp11/pdp11.opt (-mlra): New option. * doc/invoke.texi (PDP-11 Options): Document -mlra. From-SVN: r264819
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/pdp11/constraints.md6
-rw-r--r--gcc/config/pdp11/pdp11.c8
-rw-r--r--gcc/config/pdp11/pdp11.opt4
-rw-r--r--gcc/doc/invoke.texi7
4 files changed, 20 insertions, 5 deletions
diff --git a/gcc/config/pdp11/constraints.md b/gcc/config/pdp11/constraints.md
index 10bf120..33882ed 100644
--- a/gcc/config/pdp11/constraints.md
+++ b/gcc/config/pdp11/constraints.md
@@ -70,19 +70,19 @@
(and (match_code "const_double")
(match_test "op == CONST0_RTX (GET_MODE (op))")))
-(define_constraint "Q"
+(define_memory_constraint "Q"
"Memory reference that requires an additional word after the opcode"
(and (match_code "mem")
(match_test "memory_address_p (GET_MODE (op), XEXP (op, 0))
&& !simple_memory_operand (op, GET_MODE (op))")))
-(define_constraint "R"
+(define_memory_constraint "R"
"Memory reference that is encoded within the opcode"
(and (match_code "mem")
(match_test "memory_address_p (GET_MODE (op), XEXP (op, 0))
&& simple_memory_operand (op, GET_MODE (op))")))
-(define_constraint "D"
+(define_memory_constraint "D"
"Memory reference that is encoded within the opcode, and not push or pop"
(and (match_code "mem")
(match_test "memory_address_p (GET_MODE (op), XEXP (op, 0))
diff --git a/gcc/config/pdp11/pdp11.c b/gcc/config/pdp11/pdp11.c
index 62c653f..f80a878 100644
--- a/gcc/config/pdp11/pdp11.c
+++ b/gcc/config/pdp11/pdp11.c
@@ -230,7 +230,7 @@ static bool pdp11_scalar_mode_supported_p (scalar_mode);
#define TARGET_PREFERRED_OUTPUT_RELOAD_CLASS pdp11_preferred_output_reload_class
#undef TARGET_LRA_P
-#define TARGET_LRA_P hook_bool_void_false
+#define TARGET_LRA_P pdp11_lra_p
#undef TARGET_LEGITIMATE_ADDRESS_P
#define TARGET_LEGITIMATE_ADDRESS_P pdp11_legitimate_address_p
@@ -991,6 +991,12 @@ pdp11_assemble_integer (rtx x, unsigned int size, int aligned_p)
}
+static bool
+pdp11_lra_p (void)
+{
+ return TARGET_LRA;
+}
+
/* Register to register moves are cheap if both are general
registers. */
static int
diff --git a/gcc/config/pdp11/pdp11.opt b/gcc/config/pdp11/pdp11.opt
index 26a91a0..033d1d7 100644
--- a/gcc/config/pdp11/pdp11.opt
+++ b/gcc/config/pdp11/pdp11.opt
@@ -73,3 +73,7 @@ Target has split I&D.
munix-asm
Target RejectNegative Report Mask(UNIX_ASM) Negative(mdec-asm)
Use UNIX assembler syntax.
+
+mlra
+Target Report Mask(LRA)
+Use LRA register allocator
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 5c95f67..5179d70 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -1007,7 +1007,7 @@ Objective-C and Objective-C++ Dialects}.
@gccoptlist{-mfpu -msoft-float -mac0 -mno-ac0 -m40 -m45 -m10 @gol
-mint32 -mno-int16 -mint16 -mno-int32 @gol
-mfloat32 -mno-float64 -mfloat64 -mno-float32 @gol
--msplit -munix-asm -mdec-asm -mgnu-asm}
+-msplit -munix-asm -mdec-asm -mgnu-asm -mlra}
@emph{picoChip Options}
@gccoptlist{-mae=@var{ae_type} -mvliw-lookahead=@var{N} @gol
@@ -22721,6 +22721,11 @@ Use DEC assembler syntax.
@item -mgnu-asm
@opindex mgnu-asm
Use GNU assembler syntax. This is the default.
+
+@item -mlra
+@opindex mlra
+Use the new LRA register allocator. By default, the old ``reload''
+allocator is used.
@end table
@node picoChip Options