[MachineOutliner] Test for X86FI->getUsesRedZone() as well as Attribute::NoRedZone
authorJessica Paquette <jpaquette@apple.com>
Tue, 3 Apr 2018 23:32:41 +0000 (23:32 +0000)
committerJessica Paquette <jpaquette@apple.com>
Tue, 3 Apr 2018 23:32:41 +0000 (23:32 +0000)
commit5fa2a63785d6e07029887317df6a8d7ff144bbbd
treeba41349741e77179d96c9c51c6e8218ae4d0c0d7
parentb92b10f3ec4897c07655aab0999817ba503ebf71
[MachineOutliner] Test for X86FI->getUsesRedZone() as well as Attribute::NoRedZone

This commit is similar to r329120, but uses the existing getUsesRedZone() function
in X86MachineFunctionInfo. This teaches the outliner to look at whether or not a
function *truly* uses a redzone instead of just the noredzone attribute on a
function.

Thus, after this commit, it's possible to outline from x86 without using
-mno-red-zone and still get outlining results.

This also adds a new test for the new redzone behaviour.

llvm-svn: 329134
llvm/lib/Target/X86/X86InstrInfo.cpp
llvm/test/CodeGen/X86/machine-outliner-noredzone.ll [new file with mode: 0644]