8000 《深入理解LLVM:代码生成》勘误表 | Inside Compiler · Issue #76 · inside-compiler/inside-compiler.github.io · GitHub
[go: up one dir, main page]

Skip to content
8000

《深入理解LLVM:代码生成》勘误表 | Inside Compiler #76

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
fiking opened this issue Oct 9, 2024 · 6 comments
Open

《深入理解LLVM:代码生成》勘误表 | Inside Compiler #76

fiking opened this issue Oct 9, 2024 · 6 comments

Comments

@fiking
Copy link
Collaborator
fiking commented Oct 9, 2024

https://inside-compiler.github.io/2049/10/06/llvm-cg-errata/#more

勘误表 部分图文不一致说明由于印刷原因,书中部分图文不完全一致。书中文字介绍图中蓝色线由于印刷统一印刷为红色线,例如在第97页第二段提到:DAG中chain关系用蓝色虚线,实际印刷为红色虚线,glue关系用蓝色实线,实际印刷为红色实线。故图7-7中红色虚线表示chain关系,在本书其它地方类似。

@sunshaoce
Copy link

第2章 第17页,代码清单2-9,2-10中的 y4 = φ(if:y3, else:y2); 是否写错了?应为 y4 = φ(if:y2, else:y3);

@chenghanpeng
Copy link
Collaborator

@sunshaoce
第2章 第17页,代码清单2-9,2-10中的 y4 = φ(if:y3, else:y2); 是否写错了?应为 y4 = φ(if:y2, else:y3);

是的,写反了。多谢

@IanIsMyUsername
Copy link

23页 图2-11 b那个交换是不是写错了,应该是 t=x1; x1=y1; y1=t,书上写的是 t=x1; x1=y1; y1=x1
26页 图2-13 b temp=y 是否是 temp=y1

@chenghanpeng
Copy link
Collaborator

@IanIsMyUsername
23页 图2-11 b那个交换是不是写错了,应该是 t=x1; x1=y1; y1=t,书上写的是 t=x1; x1=y1; y1=x1
26页 图2-13 b temp=y 是否是 temp=y1

谢谢,下一版次修正过来。

@IanIsMyUsername
Copy link

26页 图2-13 a return y1

@IanIsMyUsername
Copy link

如果能在IR基础这章,图旁边配着一个简单的代码,就好了,还是有点理解起来困难。
看sreedhar半天不理解,然后又会忘掉前面看的创建phi函数和析构的原理。
感觉213的简单函数表达应该是类似:
y = 1
while n < 5 {
y += 1
y =2
n += 1
}
return y 这种

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
0