diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-07-13 19:25:18 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-07-13 19:25:18 +0000 | 
| commit | ca089b24d48ef6fa8da2d0bb8c25bb802c4a95c0 (patch) | |
| tree | 3a28a772df9b17aef34f49e3c727965ad28c0c93 /include/llvm/Analysis/LazyCallGraph.h | |
| parent | 9df3605dea17e84f8183581f6103bd0c79e2a606 (diff) | |
Notes
Diffstat (limited to 'include/llvm/Analysis/LazyCallGraph.h')
| -rw-r--r-- | include/llvm/Analysis/LazyCallGraph.h | 18 | 
1 files changed, 12 insertions, 6 deletions
diff --git a/include/llvm/Analysis/LazyCallGraph.h b/include/llvm/Analysis/LazyCallGraph.h index ad7f5c80549fc..3a052761ad7d8 100644 --- a/include/llvm/Analysis/LazyCallGraph.h +++ b/include/llvm/Analysis/LazyCallGraph.h @@ -652,17 +652,23 @@ public:      /// Make an existing internal ref edge into a call edge.      ///      /// This may form a larger cycle and thus collapse SCCs into TargetN's SCC. -    /// If that happens, the deleted SCC pointers are returned. These SCCs are -    /// not in a valid state any longer but the pointers will remain valid -    /// until destruction of the parent graph instance for the purpose of -    /// clearing cached information. +    /// If that happens, the optional callback \p MergedCB will be invoked (if +    /// provided) on the SCCs being merged away prior to actually performing +    /// the merge. Note that this will never include the target SCC as that +    /// will be the SCC functions are merged into to resolve the cycle. Once +    /// this function returns, these merged SCCs are not in a valid state but +    /// the pointers will remain valid until destruction of the parent graph +    /// instance for the purpose of clearing cached information. This function +    /// also returns 'true' if a cycle was formed and some SCCs merged away as +    /// a convenience.      ///      /// After this operation, both SourceN's SCC and TargetN's SCC may move      /// position within this RefSCC's postorder list. Any SCCs merged are      /// merged into the TargetN's SCC in order to preserve reachability analyses      /// which took place on that SCC. -    SmallVector<SCC *, 1> switchInternalEdgeToCall(Node &SourceN, -                                                   Node &TargetN); +    bool switchInternalEdgeToCall( +        Node &SourceN, Node &TargetN, +        function_ref<void(ArrayRef<SCC *> MergedSCCs)> MergeCB = {});      /// Make an existing internal call edge between separate SCCs into a ref      /// edge.  | 
