diff options
author | Adam Nemet <anemet@caviumnetworks.com> | 2009-05-28 07:42:52 +0000 |
---|---|---|
committer | Adam Nemet <nemet@gcc.gnu.org> | 2009-05-28 07:42:52 +0000 |
commit | 2c5bfdf70b616ace5c3f5322299ccc9729e08384 (patch) | |
tree | b6849b0da1547659fc7e169123e25b958cc36e69 /gcc/config/mips | |
parent | 51fb7760dd6fcad1570ef1462459136cefb9c8f0 (diff) | |
download | gcc-2c5bfdf70b616ace5c3f5322299ccc9729e08384.zip gcc-2c5bfdf70b616ace5c3f5322299ccc9729e08384.tar.gz gcc-2c5bfdf70b616ace5c3f5322299ccc9729e08384.tar.bz2 |
re PR middle-end/33699 (missing optimization on const addr area store)
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.
From-SVN: r147944
Diffstat (limited to 'gcc/config/mips')
-rw-r--r-- | gcc/config/mips/mips.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index ed10c39..50a47e9 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -13928,6 +13928,8 @@ mips_set_mips16_mode (int mips16_p) targetm.min_anchor_offset = 0; targetm.max_anchor_offset = 127; + targetm.const_anchor = 0; + if (flag_pic && !TARGET_OLDABI) sorry ("MIPS16 PIC for ABIs other than o32 and o64"); @@ -13955,6 +13957,8 @@ mips_set_mips16_mode (int mips16_p) targetm.min_anchor_offset = -32768; targetm.max_anchor_offset = 32767; + + targetm.const_anchor = 0x8000; } /* (Re)initialize MIPS target internals for new ISA. */ |