search for: kochtchi

Displaying 16 results from an estimated 16 matches for "kochtchi".

2009 Jul 08
2
[LLVMdev] Selection of multiple instructions
...that at the selection level? If yes, could you give a simple example or some hint how it would be done? I only find examples where exactly one instruction is emitted (and/or returned). Do you think it's the right approach or is there a better place? I'd really appreciate your help. Artjom Kochtchi -- View this message in context: http://www.nabble.com/Selection-of-multiple-instructions-tp24395706p24395706.html Sent from the LLVM - Dev mailing list archive at Nabble.com.
2009 Aug 03
0
[LLVMdev] code-altering Passes for llc
Does the error function *have* to be auto-generated in your pass? Perhaps the original code should use invokes, and your pass insert the error check with a jne to the "unwind" block. On Mon, Aug 3, 2009 at 5:18 AM, Artjom Kochtchi<artjom.kochtchi at googlemail.com> wrote: > > > Dan Gohman-2 wrote: >> >> You don't need a ModulePass to modify a CFG. A MachineFunctionPass >> is fine for this. >> > Well, okay. But I need to insert some BasicBlock that contains the error > handling...
2009 Aug 03
2
[LLVMdev] code-altering Passes for llc
Dan Gohman-2 wrote: > > You don't need a ModulePass to modify a CFG. A MachineFunctionPass > is fine for this. > Well, okay. But I need to insert some BasicBlock that contains the error handling (that the runtime check jumpts to on failure). Just putting another MachineBasicBlock at the beginning of some arbitrary MachineFunction doesn't seem to be the right way to go, does
2009 Jul 08
0
[LLVMdev] Selection of multiple instructions
On Jul 8, 2009, at 10:16 AM, Artjom Kochtchi wrote: > > Hi, > > I'm currently trying to modify LLVM to include runtime checks into X86 > binaries. I've looked into some of the possibilities during the phases > happening in LLVM and have the impression that inserting runtime > checks > during selection would...
2009 Jul 03
0
[LLVMdev] Inserting nodes into SelectionDAG (X86)
Thanks to your help I've actually made some progress... Especially the SelectionDAGNodes.h was a good hint. But there are still some things that I can't figure out: // 'mov eax, 41' Chain = DAG.getCopyToReg(Chain, DAG.getRegister(X86::EAX, MVT::i32), DAG.getConstant(41, MVT::i32), InFlag); InFlag = Chain.getValue(1); // 'inc eax' SDValue eaxVal =
2009 Jul 01
3
[LLVMdev] Inserting nodes into SelectionDAG (X86)
On Jul 1, 2009, at 2:22 PMPDT, Dan Gohman wrote: >> Ops.push_back(DAG.getConstant(1, MVT::i32)); >> Chain = DAG.getNode(ISD::ADD, DAG.getVTList(MVT::Other, MVT::i32), >> &Ops[0], Ops.size()); >> >> Isn't that the way how it is supposed to work? > > ADD does not use a chain, so there's no chain operand, or > MVT::Other result for it in an ADD
2009 Jul 01
0
[LLVMdev] Inserting nodes into SelectionDAG (X86)
On Jun 29, 2009, at 9:00 AM, Artjom Kochtchi wrote: > > Sorry to ask again, but I still can't get it right. > > The following code compiles and runs, but produces no instructions: > Ops.push_back(DAG.getRegister(X86::EAX, MVT::i32)); > Ops.push_back(DAG.getConstant(1, MVT::i32)); > DAG.getNode(ISD::ADD, DAG.getVT...
2009 Aug 02
0
[LLVMdev] code-altering Passes for llc
On Aug 2, 2009, at 7:09 AM, Artjom Kochtchi wrote: > > Greetinigs, > > I am extending llc to include runtime checks for calls (in X86). So > a call > 'call target' is altered to look like this: > > [some check] > jne error_function > call target > > I've done this by implementing a Machin...
2009 Aug 06
0
[LLVMdev] code-altering Passes for llc
On Aug 6, 2009, at 5:45 AM, Artjom Kochtchi wrote: > So I was searching for a possibility to include an additional > (Machine)BasicBlock (or rather a MachineFunction?) somewhere in the > program > that contains the program termination and that I can jump to on check > failure. Can't I do that during a Pass in llc? If y...
2009 Jun 29
2
[LLVMdev] Inserting nodes into SelectionDAG (X86)
Sorry to ask again, but I still can't get it right. The following code compiles and runs, but produces no instructions: Ops.push_back(DAG.getRegister(X86::EAX, MVT::i32)); Ops.push_back(DAG.getConstant(1, MVT::i32)); DAG.getNode(ISD::ADD, DAG.getVTList(MVT::i32), &Ops[0], Ops.size()); I reckon that has something to do with the fact that I am not using the Chain object. But as soon
2009 Aug 06
2
[LLVMdev] code-altering Passes for llc
Kenneth Uildriks wrote: > > Does the error function *have* to be auto-generated in your pass? > Perhaps the original code should use invokes, and your pass insert the > error check with a jne to the "unwind" block. > If I understand correctly, unwind is some kind of exception handling in LLVM IR? I'm not sure if this is the right thing. First, I include runtime
2009 Aug 02
2
[LLVMdev] code-altering Passes for llc
Greetinigs, I am extending llc to include runtime checks for calls (in X86). So a call 'call target' is altered to look like this: [some check] jne error_function call target I've done this by implementing a MachineFunctionPass that is instantiated and added to the PassManager in X86TargetMachine::addPreRegAlloc. In order to create the jne-instruction I need some BasicBlock
2009 Jun 25
2
[LLVMdev] Inserting nodes into SelectionDAG (X86)
...D? I can't find it... 4) Do I get the parameter passing right? Fooling around with other expressions suggests that I get it wrong. 5) What exactly is the meaning of further result types? If I get the new Chain object back, are the other results inside? Could you help me out? Sincerely, Artjom Kochtchi -- View this message in context: http://www.nabble.com/Inserting-nodes-into-SelectionDAG-%28X86%29-tp24211066p24211066.html Sent from the LLVM - Dev mailing list archive at Nabble.com.
2009 Sep 06
0
[LLVMdev] How to differentiate between external and internal calls in llc?
I have a MachineFunctionPass plugged into llc during LLVMTargetMachine::addPreRegAlloc. In this Pass I need to extend calls (i. e. CALL32m, CALL32r) iff they call function within the program. CALL32m has, I think, ten different possibilities for the four operands giving the target address. At the moment I have excluded calls that give the displacement as GlobalAddress or JumpTableIndex
2009 Sep 24
0
[LLVMdev] Split MachineBasicBlocks
Hi all, as soon as I try to split MachineBasicBlocks the resulting programs suffer from segmentation faults. I have reproduced the error using a simple MachineFunctionPass in the X86 backend that splits MachineBasicBlocks before CALL32m instructions (and inserts a fallthrough-jmp). The MachineFunctionPass is plugged into X86TargetMachine::addPreRegAlloc. The split-method is basically stolen from
2009 Jun 26
2
[LLVMdev] Inserting nodes into SelectionDAG (X86)
Thank you for your help. I think I managed to create the instruction I wanted: // mov eax, 41 Chain = DAG.getCopyToReg(Chain, DAG.getRegister(X86::EAX, MVT::i32), DAG.getConstant(41, MVT::i32), InFlag); InFlag = Chain.getValue(1); I don't understand though what InFlag is for. As I read the code, it even remains uninitialized when first passed to some node creation method.