mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Factor the logic for testing whether a basic block is viable for code
extraction into a public interface. Also clean it up and apply it more consistently such that we check for landing pads *anywhere* in the extracted code, not just in single-block extraction. This will be used to guide decisions in passes that are planning to eventually perform a round of code extraction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156114 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -23,6 +23,14 @@ namespace llvm {
|
||||
class Function;
|
||||
class Loop;
|
||||
|
||||
/// \brief Test whether a basic block is a viable candidate for extraction.
|
||||
///
|
||||
/// This tests whether a particular basic block is viable for extraction into
|
||||
/// a separate function. It can be used to prune code extraction eagerly
|
||||
/// rather than waiting for one of the Extract* methods below to reject
|
||||
/// a request.
|
||||
bool isBlockViableForExtraction(const BasicBlock &BB);
|
||||
|
||||
/// ExtractCodeRegion - Rip out a sequence of basic blocks into a new
|
||||
/// function.
|
||||
///
|
||||
|
Reference in New Issue
Block a user