I am writing an LLVM pass which modifies the LLVM bitcode. For one variable, I want it to use a register, say R15 on x86. How can I instruct LLVM to use this register when generating machine code? Can this be instructed at the bitcode level?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can use inline assembler to model this requirement. There is no way to "tie" specific variable to register.