diff options
author | Claudiu Zissulescu <claziss@synopsys.com> | 2017-07-17 13:04:37 +0200 |
---|---|---|
committer | Claudiu Zissulescu <claziss@gcc.gnu.org> | 2017-07-17 13:04:37 +0200 |
commit | b6c354ebc736de36d39b2b81e7dd2e3932b28404 (patch) | |
tree | fff7e1a5f8954a5422284ff2bd280e617fb9fcfc /gcc/tree-loop-distribution.c | |
parent | 1825c61e15cf34364792180ca017c998cab3fe34 (diff) | |
download | gcc-b6c354ebc736de36d39b2b81e7dd2e3932b28404.zip gcc-b6c354ebc736de36d39b2b81e7dd2e3932b28404.tar.gz gcc-b6c354ebc736de36d39b2b81e7dd2e3932b28404.tar.bz2 |
[ARC] Consolidate PIC implementation.
This patch refactors a number of functions and compiler hooks into using a
single function which checks if a rtx is suited for pic or not. Removed
functions are arc_legitimate_pc_offset_p and arc_legitimate_pic_operand_p
beeing replaced by calls to arc_legitimate_pic_addr_p. Thus we have an
unitary way of checking a rtx beeing pic.
gcc/
2017-07-17 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc-protos.h (arc_legitimate_pc_offset_p): Remove
proto.
(arc_legitimate_pic_operand_p): Likewise.
* config/arc/arc.c (arc_legitimate_pic_operand_p): Remove
function.
(arc_needs_pcl_p): Likewise.
(arc_legitimate_pc_offset_p): Likewise.
(arc_legitimate_pic_addr_p): Remove LABEL_REF case, as this
function is also used in constrains.md.
(arc_legitimate_constant_p): Use arc_legitimate_pic_addr_p to
validate pic constants. Handle CONST_INT, CONST_DOUBLE, MINUS and
PLUS. Only return true/false in known cases, otherwise assert.
(arc_legitimate_address_p): Remove arc_legitimate_pic_addr_p as it
is already called in arc_legitimate_constant_p.
* config/arc/arc.h (CONSTANT_ADDRESS_P): Consider also LABEL for
pic addresses.
(LEGITIMATE_PIC_OPERAND_P): Use
arc_raw_symbolic_reference_mentioned_p function.
* config/arc/constraints.md (Cpc): Use arc_legitimate_pic_addr_p
function.
(Cal): Likewise.
(C32): Likewise.
gcc/testsuite
2017-07-17 Claudiu Zissulescu <claziss@synopsys.com>
* gcc.target/arc/pr9000674901.c: New file.
* gcc.target/arc/pic-1.c: Likewise.
* gcc.target/arc/pr9001191897.c: Likewise.
From-SVN: r250267
Diffstat (limited to 'gcc/tree-loop-distribution.c')
0 files changed, 0 insertions, 0 deletions