[llvm-bugs] [Bug 41958] New: TableGen foreach does not support non-literal ranges
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue May 21 05:32:26 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=41958
Bug ID: 41958
Summary: TableGen foreach does not support non-literal ranges
Product: tools
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: TableGen
Assignee: unassignedbugs at nondot.org
Reporter: Matthew.Arsenault at amd.com
CC: llvm-bugs at lists.llvm.org
I want to avoid repeating the same constant in multiple places, but TableGen
does not support nontrivial foreach bounds:
class RegisterLimitsImpl {
int MaxSGPR = 105;
int MaxVGPR = 255;
}
def RegisterLimits : RegisterLimitsImpl;
foreach Index = 0-RegisterLimits.MaxVGPR in {
}
$ llvm-tblgen foreach-variable-range.td
foreach-variable-range.td:9:19: error: expected integer value as end of range
foreach Index = 0-RegisterLimits.MaxVGPR in {
^
foreach-variable-range.td:9:19: error: expected declaration in for
foreach Index = 0-RegisterLimits.MaxVGPR in {
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190521/86987689/attachment.html>
More information about the llvm-bugs
mailing list