[LLVMdev] Qs on building LLVM passes

Owen Anderson resistor at mac.com
Sat Jan 17 23:27:07 PST 2009


On Jan 17, 2009, at 10:27 PM, Keun Soo Yim wrote:
> 1.       How to move a virtual register data to another new virtual  
> register?
> It seems like that there is no LLVM instruction similar to mov  
> machine instruction.
> Arithmetic or logical operators could be used for integer variables
> but what about pointer variables?

Why do you need to copy a value?  Virtual registers are immutable (SSA  
form), so you don't need to worry about the value getting overwritten.

> 2.       What is typically IR-level pass execution order? Especially  
> when we separately execute
> the front-end, IR optimizer, and back-end, this information seems to  
> be needed.

Take a look at tools/opt/opt.cpp.  You can see what the "-std-compile- 
opts" sequence does in there.  You can also look at tools/llvm-ld/ 
Optimize.cpp for a standard set of link-time optimizations.

--Owen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090117/a99c1a0f/attachment.html>


More information about the llvm-dev mailing list