[NDS32] Add relax optimization as new pass

Programming / Compilers / GCC - jasonwucj [138bc75d-0d04-0410-961f-82ee72b054a4] - 1 April 2018 10:07 EDT

gcc/
- config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
- config/nds32/constants.md (unspec_volatile_element): Add UNSPEC_VOLATILE_RELAX_GROUP.
- config/nds32/nds32-relax-opt.c: New file.
- config/nds32/nds32-predicates.c (nds32_symbol_load_store_p): New function.
- config/nds32/nds32-protos.h (nds32_symbol_load_store_p): Declare function. (make_pass_nds32_relax_opt): Declare new rtl pass function.
- config/nds32/nds32.c (nds32_register_pass): New function to register pass. (nds32_register_passes): New function to register passes.
- config/nds32/nds32.md (relax_group): New pattern.
- config/nds32/nds32.opt (mrelax-hint): New option.
- config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.

3edab22ef33 [NDS32] Add relax optimization as new pass.
gcc/ChangeLog | 20 +++
gcc/config.gcc | 2 +-
gcc/config/nds32/constants.md | 2 +
gcc/config/nds32/nds32-predicates.c | 34 ++++
gcc/config/nds32/nds32-protos.h | 5 +
gcc/config/nds32/nds32-relax-opt.c | 324 ++++++++++++++++++++++++++++++++++++
gcc/config/nds32/nds32.c | 34 ++++
gcc/config/nds32/nds32.md | 13 +-
gcc/config/nds32/nds32.opt | 4 +
gcc/config/nds32/t-nds32 | 13 ++
10 files changed, 447 insertions(+), 4 deletions(-)

Upstream: gcc.gnu.org


  • Share