[llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp DAGISelEmitter.h
Evan Cheng
evan.cheng at apple.com
Wed Apr 19 13:36:21 PDT 2006
Changes in directory llvm/utils/TableGen:
DAGISelEmitter.cpp updated: 1.195 -> 1.196
DAGISelEmitter.h updated: 1.62 -> 1.63
---
Log message:
Rename AddedCost to AddedComplexity.
---
Diffs of the changes: (+15 -13)
DAGISelEmitter.cpp | 18 +++++++++---------
DAGISelEmitter.h | 10 ++++++----
2 files changed, 15 insertions(+), 13 deletions(-)
Index: llvm/utils/TableGen/DAGISelEmitter.cpp
diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.195 llvm/utils/TableGen/DAGISelEmitter.cpp:1.196
--- llvm/utils/TableGen/DAGISelEmitter.cpp:1.195 Wed Apr 19 13:07:24 2006
+++ llvm/utils/TableGen/DAGISelEmitter.cpp Wed Apr 19 15:36:09 2006
@@ -1505,7 +1505,7 @@
PatternsToMatch.
push_back(PatternToMatch(Instr->getValueAsListInit("Predicates"),
SrcPattern, DstPattern,
- Instr->getValueAsInt("AddedCost")));
+ Instr->getValueAsInt("AddedComplexity")));
}
}
@@ -1582,7 +1582,7 @@
push_back(PatternToMatch(Patterns[i]->getValueAsListInit("Predicates"),
Pattern->getOnlyTree(),
Temp.getOnlyTree(),
- Patterns[i]->getValueAsInt("AddedCost")));
+ Patterns[i]->getValueAsInt("AddedComplexity")));
}
}
@@ -1826,7 +1826,7 @@
PatternsToMatch.
push_back(PatternToMatch(PatternsToMatch[i].getPredicates(),
Variant, PatternsToMatch[i].getDstPattern(),
- PatternsToMatch[i].getAddedCost()));
+ PatternsToMatch[i].getAddedComplexity()));
}
DEBUG(std::cerr << "\n");
@@ -1936,8 +1936,8 @@
PatternToMatch *RHS) {
unsigned LHSSize = getPatternSize(LHS->getSrcPattern(), ISE);
unsigned RHSSize = getPatternSize(RHS->getSrcPattern(), ISE);
- LHSSize += LHS->getAddedCost();
- RHSSize += RHS->getAddedCost();
+ LHSSize += LHS->getAddedComplexity();
+ RHSSize += RHS->getAddedComplexity();
if (LHSSize > RHSSize) return true; // LHS -> bigger -> less cost
if (LHSSize < RHSSize) return false;
@@ -2946,9 +2946,9 @@
OS << "\n" << std::string(Indent, ' ') << "// Emits: ";
Pattern.getDstPattern()->print(OS);
OS << "\n";
- unsigned AddedCost = Pattern.getAddedCost();
+ unsigned AddedComplexity = Pattern.getAddedComplexity();
OS << std::string(Indent, ' ') << "// Pattern complexity = "
- << getPatternSize(Pattern.getSrcPattern(), *this) + AddedCost
+ << getPatternSize(Pattern.getSrcPattern(), *this) + AddedComplexity
<< " cost = "
<< getResultPatternCost(Pattern.getDstPattern(), *this) << "\n";
}
@@ -2969,9 +2969,9 @@
OS << "\n" << std::string(Indent, ' ') << "// Emits: ";
Pattern.getDstPattern()->print(OS);
OS << "\n";
- unsigned AddedCost = Pattern.getAddedCost();
+ unsigned AddedComplexity = Pattern.getAddedComplexity();
OS << std::string(Indent, ' ') << "// Pattern complexity = "
- << getPatternSize(Pattern.getSrcPattern(), *this) + AddedCost
+ << getPatternSize(Pattern.getSrcPattern(), *this) + AddedComplexity
<< " cost = "
<< getResultPatternCost(Pattern.getDstPattern(), *this) << "\n";
}
Index: llvm/utils/TableGen/DAGISelEmitter.h
diff -u llvm/utils/TableGen/DAGISelEmitter.h:1.62 llvm/utils/TableGen/DAGISelEmitter.h:1.63
--- llvm/utils/TableGen/DAGISelEmitter.h:1.62 Wed Apr 19 13:07:24 2006
+++ llvm/utils/TableGen/DAGISelEmitter.h Wed Apr 19 15:36:09 2006
@@ -395,18 +395,20 @@
/// to produce isel.
struct PatternToMatch {
PatternToMatch(ListInit *preds,
- TreePatternNode *src, TreePatternNode *dst, unsigned cost):
- Predicates(preds), SrcPattern(src), DstPattern(dst), AddedCost(cost) {};
+ TreePatternNode *src, TreePatternNode *dst,
+ unsigned complexity):
+ Predicates(preds), SrcPattern(src), DstPattern(dst),
+ AddedComplexity(complexity) {};
ListInit *Predicates; // Top level predicate conditions to match.
TreePatternNode *SrcPattern; // Source pattern to match.
TreePatternNode *DstPattern; // Resulting pattern.
- unsigned AddedCost; // Add to matching pattern complexity.
+ unsigned AddedComplexity; // Add to matching pattern complexity.
ListInit *getPredicates() const { return Predicates; }
TreePatternNode *getSrcPattern() const { return SrcPattern; }
TreePatternNode *getDstPattern() const { return DstPattern; }
- unsigned getAddedCost() const { return AddedCost; }
+ unsigned getAddedComplexity() const { return AddedComplexity; }
};
/// DAGISelEmitter - The top-level class which coordinates construction
More information about the llvm-commits
mailing list