From 05925fe1fe443cb33bff6e7116ebca7e2dbe5b33 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 29 Mar 2010 01:40:38 +0000 Subject: print the complexity of the pattern being matched in the comment in the generated table. llvm-svn: 99794 --- llvm/utils/TableGen/CodeGenDAGPatterns.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/utils/TableGen/CodeGenDAGPatterns.h') diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.h b/llvm/utils/TableGen/CodeGenDAGPatterns.h index 0960647300f..548051300dc 100644 --- a/llvm/utils/TableGen/CodeGenDAGPatterns.h +++ b/llvm/utils/TableGen/CodeGenDAGPatterns.h @@ -598,6 +598,10 @@ public: unsigned getAddedComplexity() const { return AddedComplexity; } std::string getPredicateCheck() const; + + /// Compute the complexity metric for the input pattern. This roughly + /// corresponds to the number of nodes that are covered. + unsigned getPatternComplexity(const CodeGenDAGPatterns &CGP) const; }; // Deterministic comparison of Record*. -- cgit v1.2.3