aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/adaint.c
diff options
context:
space:
mode:
authorLulu Cheng <chenglulu@loongson.cn>2022-11-17 17:08:36 +0800
committerLulu Cheng <chenglulu@loongson.cn>2022-11-28 10:38:02 +0800
commitbe591d00ed6cf8ac13850d5490749651acf10139 (patch)
tree19a0c705f4224595bb40e7b0712fab1d965d9dda /gcc/ada/adaint.c
parenta1ecc5600464f6a62faab246d522b6328badda90 (diff)
downloadgcc-be591d00ed6cf8ac13850d5490749651acf10139.zip
gcc-be591d00ed6cf8ac13850d5490749651acf10139.tar.gz
gcc-be591d00ed6cf8ac13850d5490749651acf10139.tar.bz2
LoongArch: Optimize immediate load.
The immediate number is split in the Split pass, not in the expand pass. Because loop2_invariant pass will extract the instructions that do not change in the loop out of the loop, some instructions will not meet the extraction conditions if the machine performs immediate decomposition while expand pass, so the immediate decomposition will be transferred to the split process. gcc/ChangeLog: * config/loongarch/loongarch.cc (enum loongarch_load_imm_method): Remove the member METHOD_INSV that is not currently used. (struct loongarch_integer_op): Define a new member curr_value, that records the value of the number stored in the destination register immediately after the current instruction has run. (loongarch_build_integer): Assign a value to the curr_value member variable. (loongarch_move_integer): Adds information for the immediate load instruction. * config/loongarch/loongarch.md (*movdi_32bit): Redefine as define_insn_and_split. (*movdi_64bit): Likewise. (*movsi_internal): Likewise. (*movhi_internal): Likewise. * config/loongarch/predicates.md: Return true as long as it is CONST_INT, ensure that the immediate number is not optimized by decomposition during expand optimization loop. gcc/testsuite/ChangeLog: * gcc.target/loongarch/imm-load.c: New test. * gcc.target/loongarch/imm-load1.c: New test.
Diffstat (limited to 'gcc/ada/adaint.c')
0 files changed, 0 insertions, 0 deletions