OSDN Git Service

[MachineOutliner][NFC] Remember when you map something illegal across MBBs
authorJessica Paquette <jpaquette@apple.com>
Thu, 1 Nov 2018 23:09:06 +0000 (23:09 +0000)
committerJessica Paquette <jpaquette@apple.com>
Thu, 1 Nov 2018 23:09:06 +0000 (23:09 +0000)
commit41e2e9fdff88b753bc54e0e71b04955a76cca031
tree61a75f47cdbb4fed55cfad0c5bbca949e8639821
parenta921b710dfab9ff273e1cac4825c2af37c50c2b4
[MachineOutliner][NFC] Remember when you map something illegal across MBBs

Instruction mapping in the outliner uses "illegal numbers" to signify that
something can't ever be part of an outlining candidate. This means that the
number is unique and can't be part of any repeated substring.

Because each of these is unique, we can use a single unique number to represent
a range of things we can't outline.

The outliner tries to leverage this using a flag which is set in an MBB when
the previous instruction we tried to map was "illegal". This patch improves
that logic to work across MBBs. As a bonus, this also simplifies the mapping
logic somewhat.

This also updates the machine-outliner-remarks test, which was impacted by the
order of Candidates on an OutlinedFunction changing. This order isn't
guaranteed, so I added a FIXME to fix that in a follow-up. The order of
Candidates on an OutlinedFunction isn't important, so this still is NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345906 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MachineOutliner.cpp
test/CodeGen/AArch64/machine-outliner-remarks.ll