mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Disable the inlining of non-direct recursions (where A->B->A).
Swift SVN r17101
This commit is contained in:
@@ -108,6 +108,7 @@ namespace swift {
|
||||
class CallGraphAnalysis : public SILAnalysis {
|
||||
SILModule *M;
|
||||
std::vector<SILFunction *> BottomUpFunctionOrder;
|
||||
llvm::DenseSet<SILFunction*> RecursiveCallers;
|
||||
|
||||
public:
|
||||
virtual ~CallGraphAnalysis() {}
|
||||
@@ -121,6 +122,9 @@ namespace swift {
|
||||
/// \brief return a bottom-up function order.
|
||||
const std::vector<SILFunction*> &bottomUpCallGraphOrder();
|
||||
|
||||
/// \brief return a set of recursive caller functions.
|
||||
const llvm::DenseSet<SILFunction*> &recursiveCallers();
|
||||
|
||||
virtual void invalidate(InvalidationKind K) {
|
||||
if (K >= InvalidationKind::CallGraph)
|
||||
BottomUpFunctionOrder.clear();
|
||||
|
||||
Reference in New Issue
Block a user