[PATCH] D47654: [MachineOutliner] NFC - Move intermediate data structures to MachineOutliner.h

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 1 14:25:18 PDT 2018


paquette created this revision.
paquette added a reviewer: efriedma.
Herald added a reviewer: javed.absar.

This is setting up to fix bug 37573 cleanly. Although this is NFC, it involves introducing a header file for some outliner data structures. If possible, I'd like a bit of input on how I've set up the header file etc. Other than that, the changes are

- Renaming things to fit the new header file
- Removing the vector of `std::pairs` that was used to communicate candidate information between the target and the outliner.

This moves data structures that are technically both used in some way by the target and the general-purpose outlining algorithm into MachineOutliner.h. In particular, the `Candidate` class is of importance.

Before, the outliner passed the locations of `Candidates` to the target, which would then make some decisions about the prospective outlined function. This change allows us to just pass `Candidates` along to the target. This will allow the target to discard `Candidates` that would be considered unsafe before cost calculation. Thus, we will be able to remove the unsafe candidates described in the bug without resorting to torching the entire prospective function.

Also, as a side-effect, it makes the outliner a bit cleaner.

https://bugs.llvm.org/show_bug.cgi?id=37573


https://reviews.llvm.org/D47654

Files:
  include/llvm/CodeGen/MachineOutliner.h
  include/llvm/CodeGen/TargetInstrInfo.h
  lib/CodeGen/MachineOutliner.cpp
  lib/Target/AArch64/AArch64InstrInfo.cpp
  lib/Target/AArch64/AArch64InstrInfo.h
  lib/Target/X86/X86InstrInfo.cpp
  lib/Target/X86/X86InstrInfo.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47654.149545.patch
Type: text/x-patch
Size: 57206 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180601/a43dd84d/attachment.bin>


More information about the llvm-commits mailing list