mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 23:17:16 +00:00
TableGen: Allow AddedComplexity values to be negative
This is useful for cases when stand-alone patterns are preferred to the patterns included in the instruction definitions. Instead of requiring that stand-alone patterns set a larger AddedComplexity value, which can be confusing to new developers, the allows us to reduce the complexity of the included patterns to achieve the same result. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213521 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -771,7 +771,7 @@ static unsigned getPatternSize(const TreePatternNode *P,
|
||||
|
||||
/// Compute the complexity metric for the input pattern. This roughly
|
||||
/// corresponds to the number of nodes that are covered.
|
||||
unsigned PatternToMatch::
|
||||
int PatternToMatch::
|
||||
getPatternComplexity(const CodeGenDAGPatterns &CGP) const {
|
||||
return getPatternSize(getSrcPattern(), CGP) + getAddedComplexity();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user