llvm - “节点变换‘集合’需要一个操作数!” 尝试使用 tablegen 时
问题描述
我试图让 C65 LLVM 后端(https://github.com/Peppar/llvm-C65)与 LLVM 8.0.1 (如果为 LLVM 3 制作的原始版本)一起工作。经过几次修复后,一切都正确编译,但 TableGen 产生了一些错误。
错误信息都是这样的:
add_frag(dst, src1, src2): (set node:{}:$dst, (add:{} node:{}:$src1, node:{}:$src2))
Included from F:/Projects/llvm-65816/lib/Target/C65/C65.td:59:
F:/Projects/llvm-65816/lib/Target/C65\C65InstrInfo.td:1353:1: error: In add_frag: Node transform 'set' requires one operand! (got 2)
def add_frag : PatFrag<(ops node:$dst, node:$src1, node:$src2),
^
这是导致它的行(在https://github.com/Peppar/llvm-C65/blob/master/C65InstrInfo.td#L1353):
def add_frag : PatFrag<(ops node:$dst, node:$src1, node:$src2),
(set node:$dst, (add node:$src1, node:$src2))>;
TableGen 语言没有像 LLVM IR 那样有据可查,所以我正在努力找出问题所在,但我认为这是由类型引起的。
我有以下问题:
- 如何解决?
- 是什么
node
意思,为什么在这种情况下这是一个问题(如果是的话)?
解决方案
推荐阅读
- sql - 将 sequelize 与 SQL Server 连接时遇到问题
- c++ - 带有 flto 的 RHEL 8 上的 C++ 字符串段错误(但不是 RHEL 7)
- javascript - 如何在 React 中每秒增加一个状态变量
- react-native - 使用 react native Flatlist 显示来自文件名数组的图像
- python - 我正在安装用语 ctcdecode 并收到此错误
- sql-server - 修改大型数据库的策略
- typescript - 如何解决最大内存超出错误
- python - setup.cfg 元数据中的“版本”条目被忽略
- python - 通过 python 脚本运行 Heroku CLI 命令
- flutter - 类型'String'不是嵌套JSON中'index'类型'int'的子类型