diff options
author | nemet <nemet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-05-28 07:42:52 +0000 |
---|---|---|
committer | nemet <nemet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-05-28 07:42:52 +0000 |
commit | 01c8e4c99172c7e03bbb48b54e6dccd99fe489d9 (patch) | |
tree | b6849b0da1547659fc7e169123e25b958cc36e69 /gcc/target-def.h | |
parent | 4c13df3500f6e9d7b6e11914ba735f4a08d2d97b (diff) | |
download | gcc-01c8e4c99172c7e03bbb48b54e6dccd99fe489d9.tar.gz |
PR middle-end/33699
* target.h (struct gcc_target): Fix indentation. Add
const_anchor.
* target-def.h (TARGET_CONST_ANCHOR): New macro.
(TARGET_INITIALIZER): Use it.
* cse.c (CHEAPER): Move it up to the other macros.
(insert): Rename this ...
(insert_with_costs): ... to this. Add cost parameters. Update
function comment.
(insert): New function. Call insert_with_costs.
(compute_const_anchors, insert_const_anchor, insert_const_anchors,
find_reg_offset_for_const, try_const_anchors): New functions.
(cse_insn): Call try_const_anchors. Adjust cost of src_related
when using a const-anchor. Call insert_const_anchors.
* config/mips/mips.c (mips_set_mips16_mode): Set
targetm.const_anchor.
* doc/tm.texi (Misc): Document TARGET_CONST_ANCHOR.
testsuite/
* gcc.target/mips/const-anchor-1.c: New test.
* gcc.target/mips/const-anchor-2.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147944 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/target-def.h')
-rw-r--r-- | gcc/target-def.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/target-def.h b/gcc/target-def.h index 2de89a001d3..8aeebeb80f1 100644 --- a/gcc/target-def.h +++ b/gcc/target-def.h @@ -423,6 +423,7 @@ /* In cse.c. */ #define TARGET_ADDRESS_COST default_address_cost +#define TARGET_CONST_ANCHOR 0 /* In builtins.c. */ #define TARGET_INIT_BUILTINS hook_void_void @@ -922,6 +923,7 @@ TARGET_STACK_PROTECT_FAIL, \ TARGET_INVALID_WITHIN_DOLOOP, \ TARGET_VALID_DLLIMPORT_ATTRIBUTE_P, \ + TARGET_CONST_ANCHOR, \ TARGET_CALLS, \ TARGET_INVALID_CONVERSION, \ TARGET_INVALID_UNARY_OP, \ |