OSDN Git Service

[MachineOutliner] Move stack instr check logic to getOutliningCandidateInfo
authorJessica Paquette <jpaquette@apple.com>
Tue, 4 Dec 2018 00:31:55 +0000 (00:31 +0000)
committerJessica Paquette <jpaquette@apple.com>
Tue, 4 Dec 2018 00:31:55 +0000 (00:31 +0000)
commitc448b1493f2e013141162f9b753347d36d0abc3a
tree015d8128d541a1870780517bb6b4ef9e8c388003
parentfb6c2245f1c68be6c1d59fc68beb164e62d08467
[MachineOutliner] Move stack instr check logic to getOutliningCandidateInfo

This moves the stack check logic into a lambda within getOutliningCandidateInfo.

This allows us to be less conservative with stack checks. Whether or not a
stack instruction is safe to outline is dependent on the frame variant and call
variant of the outlined function; only in cases where we modify the stack can
these be unsafe.

So, if we move that logic later, when we're looking at an individual candidate,
we can make better decisions here.

This gives some code size savings as a result.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348220 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64InstrInfo.cpp
test/CodeGen/AArch64/machine-outliner-unsafe-stack-call.mir [new file with mode: 0644]