Seung Jae Lee
2006-Dec-20 06:20 UTC
[LLVMdev] Instructions having variable names as operands
Dear Mr. Lattner: Thank you for kind information. I am still a little confused, though. In your example, %X = add int %Y, %Z is generated to add EAX, EBX I think EAX and EBX are the register names of X86. But, I should emit variable names instead of register names. For my example in the source code, int k; k = i + j; should be emit like this: reg k add i,j;k (If register names are still used, this can be shown like this: reg EAX add EAX,EBX;EAX Isn't it? ) Would you mind telling me w.r.t this? Thank you very much. Seung Jae Lee
Chris Lattner
2006-Dec-20 06:31 UTC
[LLVMdev] Instructions having variable names as operands
On Wed, 20 Dec 2006, Seung Jae Lee wrote:> Dear Mr. Lattner: > Thank you for kind information. > I am still a little confused, though. > > In your example, > %X = add int %Y, %Z > is generated to > add EAX, EBX > > I think EAX and EBX are the register names of X86. > But, I should emit variable names instead of register names. > > For my example in the source code, > int k; > k = i + j; > should be emit like this: > reg k > add i,j;k > (If register names are still used, this can be shown like this: > reg EAX > add EAX,EBX;EAX > Isn't it? > ) > Would you mind telling me w.r.t this? > Thank you very much.How does your "instruction set" handle code like: int foo() { int X = 1; // X1 if (somecond) { int X = 2; // X2 return X; } return X; } Surely you don't have full source language scoping rules. If you want this, you need to look at debug info. -Chris -- http://nondot.org/sabre/ http://llvm.org/
Possibly Parallel Threads
- [LLVMdev] Instructions having variable names as operands
- [LLVMdev] Is this bug in LLVM?
- [LLVMdev] Instructions having variable names as operands
- [LLVMdev] Is there someone tried LLVM 2.1 on Visual Studio 2005?
- [LLVMdev] Instruction sets requiring more than 3 operands