[MachineOutliner] NFC - Move intermediate data structures to MachineOutliner.h
This is setting up to fix bug 37573 cleanly. 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 llvm-svn: 333952
Showing
- llvm/include/llvm/CodeGen/MachineOutliner.h 194 additions, 0 deletionsllvm/include/llvm/CodeGen/MachineOutliner.h
- llvm/include/llvm/CodeGen/TargetInstrInfo.h 8 additions, 50 deletionsllvm/include/llvm/CodeGen/TargetInstrInfo.h
- llvm/lib/CodeGen/MachineOutliner.cpp 48 additions, 191 deletionsllvm/lib/CodeGen/MachineOutliner.cpp
- llvm/lib/Target/AArch64/AArch64InstrInfo.cpp 47 additions, 48 deletionsllvm/lib/Target/AArch64/AArch64InstrInfo.cpp
- llvm/lib/Target/AArch64/AArch64InstrInfo.h 6 additions, 8 deletionsllvm/lib/Target/AArch64/AArch64InstrInfo.h
- llvm/lib/Target/X86/X86InstrInfo.cpp 22 additions, 24 deletionsllvm/lib/Target/X86/X86InstrInfo.cpp
- llvm/lib/Target/X86/X86InstrInfo.h 6 additions, 8 deletionsllvm/lib/Target/X86/X86InstrInfo.h
Loading
Please register or sign in to comment