We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
我的理解是这样的,但是我不清楚“并记录向该地址存取的标量”的意思,而且其实按照助教提供的思路好像load指令不能直接删除,还是需要load指令,因为原先的指令序列中load指令的dst会在后续指令中用到。想问一下上面的理解是否正确。
The text was updated successfully, but these errors were encountered:
1、mem2reg要做的是消除所有的标量对应的alloca指令,以及相关的store、load指令。数组和其他访存仍需要使用alloca、store、load指令。如何判断,我提供了函数is_mem_variable() 2、“并记录向该地址存取的标量”的意思是,将向该地址进行load,store的操作,全部替换成对该temp进行操作。需要维护一下地址和新temp的映射关系。
is_mem_variable()
地址
Sorry, something went wrong.
No branches or pull requests
mem2reg要做的是消除所有的alloca、store、load指令,这是通过首先找到所有alloca指令,记录对应的操作数,并生成一个新的操作数(int寄存器形式),然后遍历所有块,找到一个alloca、store、load指令就替换成move指令。
我的理解是这样的,但是我不清楚“并记录向该地址存取的标量”的意思,而且其实按照助教提供的思路好像load指令不能直接删除,还是需要load指令,因为原先的指令序列中load指令的dst会在后续指令中用到。想问一下上面的理解是否正确。
The text was updated successfully, but these errors were encountered: