This repository has been archived by the owner on Dec 11, 2024. It is now read-only.
-
while判断指令对应的编号错误: |
Beta Was this translation helpful? Give feedback.
Answered by
Yorkking
May 21, 2022
Replies: 2 comments 1 reply
-
好像不只出现在while中,有些涉及到跳转的部分也会出现这个问题 |
Beta Was this translation helpful? Give feedback.
0 replies
-
LLVM IR 要求虚拟寄存器的编号必须递增命名,并且匿名基本块也会占用一个编号。你可以检查一下你这条 ir 之前是否存在创建过匿名基本块的情况:比如一个基本块已经有终止指令了(br, ret 之类),后面的指令如果没有安排在一个显式声明的基本块中,就好自动创建一个匿名基本块,也占用一个编号。 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
junshen1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
LLVM IR 要求虚拟寄存器的编号必须递增命名,并且匿名基本块也会占用一个编号。你可以检查一下你这条 ir 之前是否存在创建过匿名基本块的情况:比如一个基本块已经有终止指令了(br, ret 之类),后面的指令如果没有安排在一个显式声明的基本块中,就好自动创建一个匿名基本块,也占用一个编号。