-
- Downloads
LoongArch: Implement option save/restore
LTO option streaming and target attributes both require per-function target configuration, which is achieved via option save/restore. We implement TARGET_OPTION_{SAVE,RESTORE} to switch the la_target context in addition to other automatically maintained option states (via the "Save" option property in the .opt files). Tested on loongarch64-linux-gnu without regression. PR target/113233 gcc/ChangeLog: * config/loongarch/genopts/loongarch.opt.in: Mark options with the "Save" property. * config/loongarch/loongarch.opt: Same. * config/loongarch/loongarch-opts.cc: Refresh -mcmodel= state according to la_target. * config/loongarch/loongarch.cc: Implement TARGET_OPTION_{SAVE, RESTORE} for the la_target structure; Rename option conditions to have the same "la_" prefix. * config/loongarch/loongarch.h: Same.
Showing
- gcc/config/loongarch/genopts/loongarch.opt.in 19 additions, 19 deletionsgcc/config/loongarch/genopts/loongarch.opt.in
- gcc/config/loongarch/loongarch-opts.cc 7 additions, 0 deletionsgcc/config/loongarch/loongarch-opts.cc
- gcc/config/loongarch/loongarch.cc 65 additions, 15 deletionsgcc/config/loongarch/loongarch.cc
- gcc/config/loongarch/loongarch.h 1 addition, 1 deletiongcc/config/loongarch/loongarch.h
- gcc/config/loongarch/loongarch.opt 19 additions, 19 deletionsgcc/config/loongarch/loongarch.opt
Loading
Please register or sign in to comment