aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2cfi.c
diff options
context:
space:
mode:
authorYangyu Chen <chenyangyu@isrc.iscas.ac.cn>2024-10-08 11:08:44 -0600
committerJeff Law <jlaw@ventanamicro.com>2024-10-08 11:08:44 -0600
commit517d344e416c762a942a3633b6ec73a1d018016e (patch)
tree776c910b313d235e15dbd2fa1bc1dfd2b2fec07d /gcc/dwarf2cfi.c
parent5f0a381801b754dbbd52695bbdbe48967211659c (diff)
downloadgcc-master.zip
gcc-master.tar.gz
gcc-master.tar.bz2
RISC-V: Implement TARGET_CAN_INLINE_PHEADtrunkmaster
Currently, we lack support for TARGET_CAN_INLINE_P on the RISC-V ISA. As a result, certain functions cannot be optimized with inlining when specific options, such as __attribute__((target("arch=+v"))) . This can lead to potential performance issues when building retargetable binaries for RISC-V. To address this, I have implemented the riscv_can_inline_p function. This addition enables inlining when the callee either has no special options or when the some options match, and also ensuring that the callee's ISA is a subset of the caller's. I also check some other options when there is no always_inline set. gcc/ChangeLog: * common/config/riscv/riscv-common.cc (cl_opt_var_ref_t): Add cl_opt_var_ref_t pointer to member of cl_target_option. (struct riscv_ext_flag_table_t): Add new cl_opt_var_ref_t field. (RISCV_EXT_FLAG_ENTRY): New macro to simplify the definition of riscv_ext_flag_table. (riscv_ext_is_subset): New function to check if the callee's ISA is a subset of the caller's. (riscv_x_target_flags_isa_mask): New function to get the mask of ISA extension in x_target_flags of gcc_options. * config/riscv/riscv-subset.h (riscv_ext_is_subset): Declare riscv_ext_is_subset function. (riscv_x_target_flags_isa_mask): Declare riscv_x_target_flags_isa_mask function. * config/riscv/riscv.cc (riscv_can_inline_p): New function. (TARGET_CAN_INLINE_P): Implement TARGET_CAN_INLINE_P.
Diffstat (limited to 'gcc/dwarf2cfi.c')
0 files changed, 0 insertions, 0 deletions