summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-05-03 22:26:53 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-05-03 22:26:53 +0000
commita46e62424bd148012b37a0cca405877e708973c8 (patch)
tree253a92c15175108a3941b227acb5ae5a431dc1e7 /llvm/include
parentd106a98fe93766843546db32d7c31f24f11b9e1c (diff)
downloadbcm5719-llvm-a46e62424bd148012b37a0cca405877e708973c8.tar.gz
bcm5719-llvm-a46e62424bd148012b37a0cca405877e708973c8.zip
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. llvm-svn: 156114
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/Transforms/Utils/FunctionUtils.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/include/llvm/Transforms/Utils/FunctionUtils.h b/llvm/include/llvm/Transforms/Utils/FunctionUtils.h
index 8d71e43aa92..821a61e99b7 100644
--- a/llvm/include/llvm/Transforms/Utils/FunctionUtils.h
+++ b/llvm/include/llvm/Transforms/Utils/FunctionUtils.h
@@ -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.
///
OpenPOWER on IntegriCloud