diff options
author | Mikhail Glushenkov <foldr@codedgers.com> | 2008-05-06 18:14:24 +0000 |
---|---|---|
committer | Mikhail Glushenkov <foldr@codedgers.com> | 2008-05-06 18:14:24 +0000 |
commit | bb8b58dcf3e1994beb458e777b306fa3805ee50f (patch) | |
tree | ce39b38a87d9e75b283bee66bc1df981082eab94 /tools/llvmc2/CompilationGraph.h | |
parent | d83038c9605c84e92b6052500405ac3903f0d6f1 (diff) |
Add weights to graph edges. Choose between edges based on their weight.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50757 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvmc2/CompilationGraph.h')
-rw-r--r-- | tools/llvmc2/CompilationGraph.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/llvmc2/CompilationGraph.h b/tools/llvmc2/CompilationGraph.h index 4692e5155d..3dc8bc0623 100644 --- a/tools/llvmc2/CompilationGraph.h +++ b/tools/llvmc2/CompilationGraph.h @@ -35,8 +35,7 @@ namespace llvmc { virtual ~Edge() {}; const std::string& ToolName() const { return ToolName_; } - virtual bool isEnabled() const = 0; - virtual bool isDefault() const = 0; + virtual unsigned Weight() const = 0; private: std::string ToolName_; }; @@ -45,8 +44,7 @@ namespace llvmc { class SimpleEdge : public Edge { public: SimpleEdge(const std::string& T) : Edge(T) {} - bool isEnabled() const { return false;} - bool isDefault() const { return true;} + unsigned Weight() const { return 1; } }; // A node of the compilation graph. |