aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop-manip.cc
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@xry111.site>2023-09-30 18:46:28 +0800
committerXi Ruoyao <xry111@xry111.site>2023-10-23 15:30:19 +0800
commit8811630df88bccfab232f8ab7da4bb43b70fa9de (patch)
treebebe77901ef8c51316c7f5699a5411874d7d3128 /gcc/tree-vect-loop-manip.cc
parent93a46d18f52ec7bab27b38c2bb41a412856e8ceb (diff)
downloadgcc-8811630df88bccfab232f8ab7da4bb43b70fa9de.zip
gcc-8811630df88bccfab232f8ab7da4bb43b70fa9de.tar.gz
gcc-8811630df88bccfab232f8ab7da4bb43b70fa9de.tar.bz2
LoongArch: Use explicit relocs for GOT access when -mexplicit-relocs=auto and LTO during a final link with linker plugin
If we are performing LTO for a final link and linker plugin is enabled, then we are sure any GOT access may resolve to a symbol out of the link unit (otherwise the linker plugin will tell us the symbol should be resolved locally and we'll use PC-relative access instead). Produce machine instructions with explicit relocs instead of la.global for better scheduling. gcc/ChangeLog: * config/loongarch/loongarch-protos.h (loongarch_explicit_relocs_p): Declare new function. * config/loongarch/loongarch.cc (loongarch_explicit_relocs_p): Implement. (loongarch_symbol_insns): Call loongarch_explicit_relocs_p for SYMBOL_GOT_DISP, instead of using TARGET_EXPLICIT_RELOCS. (loongarch_split_symbol): Call loongarch_explicit_relocs_p for deciding if return early, instead of using TARGET_EXPLICIT_RELOCS. (loongarch_output_move): CAll loongarch_explicit_relocs_p instead of using TARGET_EXPLICIT_RELOCS. * config/loongarch/loongarch.md (*low<mode>): Remove TARGET_EXPLICIT_RELOCS from insn condition. (@ld_from_got<mode>): Likewise. * config/loongarch/predicates.md (move_operand): Call loongarch_explicit_relocs_p instead of using TARGET_EXPLICIT_RELOCS. gcc/testsuite/ChangeLog: * gcc.target/loongarch/explicit-relocs-auto-lto.c: New test.
Diffstat (limited to 'gcc/tree-vect-loop-manip.cc')
0 files changed, 0 insertions, 0 deletions