//===- DSGraph.h - Represent a collection of data structures ----*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file was developed by the LLVM research group and is distributed under
+// the University of Illinois Open Source License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
//
// This header defines the data structure graph.
//
/// function point to...
///
ScalarMapTy &getScalarMap() { return ScalarMap; }
- const ScalarMapTy &getScalarMap() const {return ScalarMap;}
+ const ScalarMapTy &getScalarMap() const { return ScalarMap; }
/// getFunctionCalls - Return the list of call sites in the original local
/// graph...
void AssertGraphOK() const;
-public:
- // removeTriviallyDeadNodes - After the graph has been constructed, this
- // method removes all unreachable nodes that are created because they got
- // merged with other nodes in the graph. This is used as the first step of
- // removeDeadNodes.
- //
+ /// mergeInGlobalsGraph - This method is useful for clients to incorporate the
+ /// globals graph into the DS, BU or TD graph for a function. This code
+ /// retains all globals, i.e., does not delete unreachable globals after they
+ /// are inlined.
+ ///
+ void mergeInGlobalsGraph();
+
+ /// removeTriviallyDeadNodes - After the graph has been constructed, this
+ /// method removes all unreachable nodes that are created because they got
+ /// merged with other nodes in the graph. This is used as the first step of
+ /// removeDeadNodes.
+ ///
void removeTriviallyDeadNodes();
};