[LoongArch] Enable shrink wrapping when optimize the function
authorwanglei <wanglei@loongson.cn>
Wed, 1 Feb 2023 01:03:35 +0000 (09:03 +0800)
committerwanglei <wanglei@loongson.cn>
Wed, 1 Feb 2023 02:07:40 +0000 (10:07 +0800)
commit25ecfbf892ae736d92cd5c88b979b45f42f1e467
tree024a6968bd8f74828396df5b55cdd64093e250d4
parent01890942f0c0c05f7691b9e0d67ebfa5bd737af9
[LoongArch] Enable shrink wrapping when optimize the function

We set it conservatively so that it is turned on when optimization
is enabled, i.e. when the optimization level is not `O0`.

Reviewed By: xen0n

Differential Revision: https://reviews.llvm.org/D142876
llvm/lib/Target/LoongArch/LoongArchFrameLowering.cpp
llvm/lib/Target/LoongArch/LoongArchFrameLowering.h
llvm/test/CodeGen/LoongArch/double-br-fcmp.ll
llvm/test/CodeGen/LoongArch/float-br-fcmp.ll
llvm/test/CodeGen/LoongArch/shrinkwrap.ll [new file with mode: 0644]