llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
27.57k stars 11.33k forks source link

[Clang][RISCV]fasynchronous-unwind-tables option enlarge code size #82959

Open Yunzezhu94 opened 5 months ago

Yunzezhu94 commented 5 months ago

According to patch https://reviews.llvm.org/D145164, option fasynchronous-unwind-tables is enabled by default on RISCV and Linux. However, there are situations code size matters that when has -Oz or -Os, and fasynchronous-unwind-tables is still enabled by default, which will generate eh_frame section and enlarge code size. In my opinion disabling fasynchronous-unwind-tables by default on these optimization levels fits idea of reducing code size better.

quic-garvgupt commented 5 months ago

FYI - https://github.com/llvm/llvm-project/pull/81727 disabled the generation of asynchronous unwind tables for RISCV baremetal toolchain objects.

llvmbot commented 5 months ago

@llvm/issue-subscribers-backend-risc-v

Author: None (Yunzezhu94)

According to patch https://reviews.llvm.org/D145164, option fasynchronous-unwind-tables is enabled by default on RISCV and Linux. However, there are situations code size matters that when has -Oz or -Os, and fasynchronous-unwind-tables is still enabled by default, which will generate eh_frame section and enlarge code size. In my opinion disabling fasynchronous-unwind-tables by default on these optimization levels fits idea of reducing code size better.
llvmbot commented 5 months ago

@llvm/issue-subscribers-clang-driver

Author: None (Yunzezhu94)

According to patch https://reviews.llvm.org/D145164, option fasynchronous-unwind-tables is enabled by default on RISCV and Linux. However, there are situations code size matters that when has -Oz or -Os, and fasynchronous-unwind-tables is still enabled by default, which will generate eh_frame section and enlarge code size. In my opinion disabling fasynchronous-unwind-tables by default on these optimization levels fits idea of reducing code size better.