[ARM][MachineOutliner] Add stack fixup feature
authorYvan Roux <yvan.roux@linaro.org>
Tue, 19 Jan 2021 09:07:56 +0000 (10:07 +0100)
committerYvan Roux <yvan.roux@linaro.org>
Tue, 19 Jan 2021 09:59:09 +0000 (10:59 +0100)
commit244ad228f34363b508cd1096c99d8f1bbe999d85
tree46ced337735ecdd220ac9f67f562db6de37d1932
parent9a7672ac4980bca8829814e1e49e1c201a5bf9b6
[ARM][MachineOutliner] Add stack fixup feature

This patch handles cases where we have to save/restore the link register
into the stack and and load/store instruction which use the stack are
part of the outlined region. It checks that there will be no overflow
introduced by the new offset and fixup these instructions accordingly.

Differential Revision: https://reviews.llvm.org/D92934
llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
llvm/lib/Target/ARM/ARMBaseInstrInfo.h
llvm/test/CodeGen/ARM/machine-outliner-default.mir
llvm/test/CodeGen/ARM/machine-outliner-no-lr-save.mir
llvm/test/CodeGen/ARM/machine-outliner-stack-fixup-arm.mir [new file with mode: 0644]
llvm/test/CodeGen/ARM/machine-outliner-stack-fixup-thumb.mir [new file with mode: 0644]
llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/arm_generated_funcs.ll
llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/arm_generated_funcs.ll.generated.expected
llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/arm_generated_funcs.ll.nogenerated.expected