search for: copyconstanttoregist

Displaying 8 results from an estimated 8 matches for "copyconstanttoregist".

Did you mean: copyconstanttoregister
2004 Jun 07
2
[LLVMdev] X86: copyConstantToRegister
Hello, looking at X86 codegen, I see this: void ISel::copyConstantToRegister(MachineBasicBlock *MBB, MachineBasicBlock::iterator IP, Constant *C, unsigned R) { if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) { ..... case Instruction::Add: emitSimpleBinaryOperation(MBB, IP, CE-&...
2004 Jun 07
0
[LLVMdev] X86: copyConstantToRegister
On Mon, 7 Jun 2004, Vladimir Prus wrote: > > Hello, > looking at X86 codegen, I see this: > > void ISel::copyConstantToRegister(MachineBasicBlock *MBB, > MachineBasicBlock::iterator IP, > Constant *C, unsigned R) { > if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) { > ..... > case Instruction::Add: > emitSimpl...
2004 Jun 08
1
[LLVMdev] X86: copyConstantToRegister
Chris Lattner wrote: > > I'm not sure I understand this logic. If we have "1 + 2" as constant > > expression, then why emit the code to perform addition? It should be > > possible to just fold the expression and copy immediate "3" into a > > register. > > > > I must be missing something, but what? > > LLVM constant expressions are
2004 Jun 18
1
[LLVMdev] Getelementptr woes
...mitting shift instructions is in the > emitShiftOperation which takes two Value* operands to shift and a virtual > register (the last operand) to set to the result of the shift. > > Because of this pattern, emitShiftOperation is used by the constant > expression support routines (see copyConstantToRegister) to codegen shift > constant expressions as well as shift instructions themselves. But I'd still have to write copyConstantToRegister for my backend, which is code duplication. What I'm trying to avoid is making by backend a blatant copy-paste. > I don't think this is TOO co...
2004 Jun 17
0
[LLVMdev] Getelementptr woes
...ly all of the code for emitting shift instructions is in the emitShiftOperation which takes two Value* operands to shift and a virtual register (the last operand) to set to the result of the shift. Because of this pattern, emitShiftOperation is used by the constant expression support routines (see copyConstantToRegister) to codegen shift constant expressions as well as shift instructions themselves. I don't think this is TOO completely horrible to support constant expressions in general, though it can (and will be in the future) certainly be improved. > The second pass would convert getelementptr into c...
2004 Jun 17
2
[LLVMdev] Getelementptr woes
Hello, I'm having problems with the following LLVM instruction %tmp.0.i = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([11 x sbyte]* %.str_1, long 0, ...... The first argument in function call, sbyte* getelementptr ([11 x sbyte]* %.str_1..... appears to be ConstantExpression*, and my backend does not support ConstantExpression yet. I probable can implement
2004 Dec 06
2
[LLVMdev] FP Constants spilling to memory in x86 code generation
...using the JIT memory manager and putting it in with the function stubs? If not, I have to add tracking to the allocations here so they can be freed when the function is deleted. This is not so easy since there is no reference to the function which we are generating machine code for inside the copyConstantToRegister function. Any ideas? m. PS. Regarding my earlier post about function stubs -- The stub generation is working fine for the x86 target, it was Visual Studio generating the stubs I was seing because I have Fix&Continue turned on :-P
2004 Dec 08
0
[LLVMdev] FP Constants spilling to memory in x86 code generation
...9;d like to make a memory manager for it, feel free. > If not, I have to add tracking to the allocations here so they can be > freed when the function is deleted. This is not so easy since there is > no reference to the function which we are generating machine code for > inside the copyConstantToRegister function. Any ideas? I think that adding something like the JITMemoryManager for the constant pools would make sense. I'm not sure that reusing the JITMemoryManager is a great idea, though it could be done. In particular, some architectures have cache problems when data and code live to...