From 30ba82933c433611e05b07ef95da36bba8721b8b Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Fri, 4 May 2012 21:33:30 +0000 Subject: 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 --- include/llvm/Transforms/Utils/CodeExtractor.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/llvm/Transforms/Utils/CodeExtractor.h') 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 -- cgit v1.1