aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Transforms/Utils/CodeExtractor.h
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-05-04 21:33:30 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-05-04 21:33:30 +0000
commit30ba82933c433611e05b07ef95da36bba8721b8b (patch)
tree4338ee025d7756bb9e336e7a415624f823dede3d /include/llvm/Transforms/Utils/CodeExtractor.h
parent7c52c97a2232756bbcc2fb4e664892bdb8b2d90c (diff)
downloadexternal_llvm-30ba82933c433611e05b07ef95da36bba8721b8b.zip
external_llvm-30ba82933c433611e05b07ef95da36bba8721b8b.tar.gz
external_llvm-30ba82933c433611e05b07ef95da36bba8721b8b.tar.bz2
Teach the code extractor how to extract a sequence of blocks from
RegionInfo's RegionNode. This mirrors the logic for automating the extraction from a Loop. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156208 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Transforms/Utils/CodeExtractor.h')
-rw-r--r--include/llvm/Transforms/Utils/CodeExtractor.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/Transforms/Utils/CodeExtractor.h b/include/llvm/Transforms/Utils/CodeExtractor.h
index dafe730..48f3d48c 100644
--- a/include/llvm/Transforms/Utils/CodeExtractor.h
+++ b/include/llvm/Transforms/Utils/CodeExtractor.h
@@ -24,6 +24,7 @@ namespace llvm {
class Function;
class Loop;
class Module;
+ class RegionNode;
class Type;
class Value;
@@ -74,6 +75,13 @@ namespace llvm {
/// block sequence of the loop.
CodeExtractor(DominatorTree &DT, Loop &L, bool AggregateArgs = false);
+ /// \brief Create a code extractor for a region node.
+ ///
+ /// Behaves just like the generic code sequence constructor, but uses the
+ /// block sequence of the region node passed in.
+ CodeExtractor(DominatorTree &DT, const RegionNode &RN,
+ bool AggregateArgs = false);
+
/// \brief Perform the extraction, returning the new function.
///
/// Returns zero when called on a CodeExtractor instance where isEligible