Skip to content

Commit 11c62f3

Browse files
use defvar
Signed-off-by: Mikhail R. Gadelha <[email protected]>
1 parent 58133f8 commit 11c62f3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/lib/Target/RISCV/RISCVSchedSpacemitX60.td

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
// M2 -> Values[4], M4 -> Values[5], M8 -> Values[6]
2323
// Shorter lists are allowed, e.g., widening instructions don't work on M8
2424
class GetLMULValue<list<int> Values, string LMUL> {
25-
int Index = !cond(
25+
defvar Index = !cond(
2626
!eq(LMUL, "MF8"): 0,
2727
!eq(LMUL, "MF4"): 1,
2828
!eq(LMUL, "MF2"): 2,
@@ -47,11 +47,11 @@ class GetLMULValue<list<int> Values, string LMUL> {
4747
// This is useful for modeling scheduling parameters that scale with LMUL.
4848
class ConstValueUntilLMULThenDoubleBase<string startLMUL, int BaseValue, int Value, string currentLMUL> {
4949
assert !le(BaseValue, Value), "BaseValue must be le to Value";
50-
int startPos = GetLMULValue<[0, 1, 2, 3, 4, 5, 6], startLMUL>.c;
51-
int currentPos = GetLMULValue<[0, 1, 2, 3, 4, 5, 6], currentLMUL>.c;
50+
defvar startPos = GetLMULValue<[0, 1, 2, 3, 4, 5, 6], startLMUL>.c;
51+
defvar currentPos = GetLMULValue<[0, 1, 2, 3, 4, 5, 6], currentLMUL>.c;
5252

5353
// Calculate the difference in positions
54-
int posDiff = !sub(currentPos, startPos);
54+
defvar posDiff = !sub(currentPos, startPos);
5555

5656
// Calculate Value * (2^posDiff) using shift left
5757
int c = !cond(

0 commit comments

Comments
 (0)