Displaying 17 results from an estimated 17 matches for "startmachinebasicblock".
2010 Jun 24
1
[LLVMdev] Why the same MachineBasicBlock converted to binary code twice?
While debugging something, I found this strange-looking situation in JIT
on 32-bit platform.
For the particular BasicBlock function StartMachineBasicBlock is called
twice with the same MachineBasicBlock object.
This generates two memory addresses for binary code for this BasicBlock.
Why such situation can happen? Which memory address would be the "real"
address of this BasicBlock?
Yuri
2009 Mar 16
0
[LLVMdev] MachO and ELF Writers/MachineCodeEmittersarehard-codedinto LLVMTargetMachine
...eceives (during construction) a reference to a
MachineCodeEmitter (e.g. MachOCodeEmitter, which in turn stores a
reference to a MachOWritter).
The runOnMachineFunction for the X86CodeEmitter does:
- call MachOCodeEmitter::startFunction
- for each basicblock in function:
- call MachOCodeEmitter::StartMachineBasicBlock
- for each instruction in basicblock:
- emit instruction, using MachineCodeEmitter::emit* functions
- call MachOCodeEmitter::finishFunction
[This runOnMachineFunction could definitely be generalized, i.e.
implemented in a base class ('EmitterMachineFunctionPass' or a better
name)...
2009 Mar 16
2
[LLVMdev] MachO and ELF Writers/MachineCodeEmittersarehard-codedinto LLVMTargetMachine
>> Sorry, I disagree actually the MachineCodeEmitter or the
>> 'MachineCodeWritter' does not do any file handling at all. Do look at the
>> code for the MachineCodeWritter and you will see it only writes to memory
>> and if it reaches the end of the allotted memory I believe higher ordered
>> logic reallocates a larget buffer and starts again from scratch.
2009 Mar 16
2
[LLVMdev] MachO and ELFWriters/MachineCodeEmittersarehard-codedinto LLVMTargetMachine
...eference to a
> MachineCodeEmitter (e.g. MachOCodeEmitter, which in turn stores a
> reference to a MachOWritter).
>
> The runOnMachineFunction for the X86CodeEmitter does:
> - call MachOCodeEmitter::startFunction
> - for each basicblock in function:
> - call MachOCodeEmitter::StartMachineBasicBlock
> - for each instruction in basicblock:
> - emit instruction, using MachineCodeEmitter::emit* functions
> - call MachOCodeEmitter::finishFunction
>
> [This runOnMachineFunction could definitely be generalized, i.e.
> implemented in a base class ('EmitterMachineFunction...
2008 Mar 30
3
[LLVMdev] Being able to know the jitted code-size before emitting
Hi everyone,
vmkit requires to know the size of a jitted method before emitting the
method. This allows to allocate the correct size for the method. The
attached patch creates this functionality when the flag SizedMemoryCode
is on.
In order to implement this functionality, i had to virtualize some
MachineCodeEmitter functions.
Is it OK to commit the patch?
Thanks,
Nicolas
--------------
2008 Apr 01
2
[LLVMdev] Being able to know the jitted code-size before emitting
...int Value) {
>> + CurBufferPtr += 4;
>> + }
>> + virtual void emitInt64(uint64_t Value) {
>> + CurBufferPtr += 8;
>> + }
>> + virtual void emitAt(uintptr_t *Addr, uintptr_t Value) {
>> + }
>> +
>> +
>> +
>> + virtual void StartMachineBasicBlock(MachineBasicBlock *MBB) {}
>> + virtual intptr_t getConstantPoolEntryAddress(unsigned
>> ConstantNum) const;
>> +
>> + virtual intptr_t getJumpTableEntryAddress(unsigned Index) const;
>> +
>> + virtual intptr_t getMachineBasicBlockAddress(MachineBasicBlock...
2008 Mar 31
0
[LLVMdev] Being able to know the jitted code-size before emitting
...4;
> + }
> + virtual void emitInt32(int Value) {
> + CurBufferPtr += 4;
> + }
> + virtual void emitInt64(uint64_t Value) {
> + CurBufferPtr += 8;
> + }
> + virtual void emitAt(uintptr_t *Addr, uintptr_t Value) {
> + }
> +
> +
> +
> + virtual void StartMachineBasicBlock(MachineBasicBlock *MBB) {}
> + virtual intptr_t getConstantPoolEntryAddress(unsigned
> ConstantNum) const;
> +
> + virtual intptr_t getJumpTableEntryAddress(unsigned Index) const;
> +
> + virtual intptr_t getMachineBasicBlockAddress(MachineBasicBlock
> *MBB) const {
>...
2008 Apr 01
0
[LLVMdev] Being able to know the jitted code-size before emitting
...+= 4;
>>> + }
>>> + virtual void emitInt64(uint64_t Value) {
>>> + CurBufferPtr += 8;
>>> + }
>>> + virtual void emitAt(uintptr_t *Addr, uintptr_t Value) {
>>> + }
>>> +
>>> +
>>> +
>>> + virtual void StartMachineBasicBlock(MachineBasicBlock *MBB) {}
>>> + virtual intptr_t getConstantPoolEntryAddress(unsigned
>>> ConstantNum) const;
>>> +
>>> + virtual intptr_t getJumpTableEntryAddress(unsigned Index) const;
>>> +
>>> + virtual intptr_t getMachineBasicBlockAddre...
2008 Apr 04
3
[LLVMdev] Being able to know the jitted code-size before emitting
...> + virtual void emitInt64(uint64_t Value) {
>>>> + CurBufferPtr += 8;
>>>> + }
>>>> + virtual void emitAt(uintptr_t *Addr, uintptr_t Value) {
>>>> + }
>>>> +
>>>> +
>>>> +
>>>> + virtual void StartMachineBasicBlock(MachineBasicBlock *MBB) {}
>>>> + virtual intptr_t getConstantPoolEntryAddress(unsigned
>>>> ConstantNum) const;
>>>> +
>>>> + virtual intptr_t getJumpTableEntryAddress(unsigned Index) const;
>>>> +
>>>> + virtual intptr_t g...
2008 Apr 05
2
[LLVMdev] Being able to know the jitted code-size before emitting
...;>> + CurBufferPtr += 8;
>>>>>> + }
>>>>>> + virtual void emitAt(uintptr_t *Addr, uintptr_t Value) {
>>>>>> + }
>>>>>> +
>>>>>> +
>>>>>> +
>>>>>> + virtual void StartMachineBasicBlock(MachineBasicBlock *MBB) {}
>>>>>> + virtual intptr_t getConstantPoolEntryAddress(unsigned
>>>>>> ConstantNum) const;
>>>>>> +
>>>>>> + virtual intptr_t getJumpTableEntryAddress(unsigned Index)
>>>>>> const...
2008 Apr 05
0
[LLVMdev] Being able to know the jitted code-size before emitting
...+= 8;
>>>>>>> + }
>>>>>>> + virtual void emitAt(uintptr_t *Addr, uintptr_t Value) {
>>>>>>> + }
>>>>>>> +
>>>>>>> +
>>>>>>> +
>>>>>>> + virtual void StartMachineBasicBlock(MachineBasicBlock *MBB)
>>>>>>> {}
>>>>>>> + virtual intptr_t getConstantPoolEntryAddress(unsigned
>>>>>>> ConstantNum) const;
>>>>>>> +
>>>>>>> + virtual intptr_t getJumpTableEntryAddress(u...
2008 Apr 04
0
[LLVMdev] Being able to know the jitted code-size before emitting
...int64_t Value) {
>>>>> + CurBufferPtr += 8;
>>>>> + }
>>>>> + virtual void emitAt(uintptr_t *Addr, uintptr_t Value) {
>>>>> + }
>>>>> +
>>>>> +
>>>>> +
>>>>> + virtual void StartMachineBasicBlock(MachineBasicBlock *MBB) {}
>>>>> + virtual intptr_t getConstantPoolEntryAddress(unsigned
>>>>> ConstantNum) const;
>>>>> +
>>>>> + virtual intptr_t getJumpTableEntryAddress(unsigned Index)
>>>>> const;
>>>>&g...
2008 Apr 07
2
[LLVMdev] Being able to know the jitted code-size before emitting
...t;>> + }
>>>>>>>> + virtual void emitAt(uintptr_t *Addr, uintptr_t Value) {
>>>>>>>> + }
>>>>>>>> +
>>>>>>>> +
>>>>>>>> +
>>>>>>>> + virtual void StartMachineBasicBlock(MachineBasicBlock *MBB)
>>>>>>>> {}
>>>>>>>> + virtual intptr_t getConstantPoolEntryAddress(unsigned
>>>>>>>> ConstantNum) const;
>>>>>>>> +
>>>>>>>> + virtual intptr_t getJum...
2008 Apr 07
0
[LLVMdev] Being able to know the jitted code-size before emitting
...>>>>>>> + virtual void emitAt(uintptr_t *Addr, uintptr_t Value) {
>>>>>>>>> + }
>>>>>>>>> +
>>>>>>>>> +
>>>>>>>>> +
>>>>>>>>> + virtual void StartMachineBasicBlock(MachineBasicBlock *MBB)
>>>>>>>>> {}
>>>>>>>>> + virtual intptr_t getConstantPoolEntryAddress(unsigned
>>>>>>>>> ConstantNum) const;
>>>>>>>>> +
>>>>>>>>> + virtu...
2007 Dec 11
0
[LLVMdev] Exception handling in JIT
...(this is the
> buffer overflow
> /// condition).
> unsigned char *CurBufferPtr;
> +
> public:
> virtual ~MachineCodeEmitter() {}
>
> @@ -158,6 +161,9 @@
> /// start of the block is, and can implement
> getMachineBasicBlockAddress.
> virtual void StartMachineBasicBlock(MachineBasicBlock *MBB) = 0;
>
> + virtual void EmitLabel(uint64_t LabelID) = 0;
> +
> +
> /// getCurrentPCValue - This returns the address that the next
> emitted byte
> /// will be output to.
> ///
> @@ -193,6 +199,10 @@
> /// emitted.
> ///
>...
2007 Dec 12
3
[LLVMdev] Exception handling in JIT
...;> /// condition).
>> unsigned char *CurBufferPtr;
>> +
>> public:
>> virtual ~MachineCodeEmitter() {}
>>
>> @@ -158,6 +161,9 @@
>> /// start of the block is, and can implement
>> getMachineBasicBlockAddress.
>> virtual void StartMachineBasicBlock(MachineBasicBlock *MBB) = 0;
>>
>> + virtual void EmitLabel(uint64_t LabelID) = 0;
>> +
>> +
>> /// getCurrentPCValue - This returns the address that the next
>> emitted byte
>> /// will be output to.
>> ///
>> @@ -193,6 +199,10 @@
&...
2007 Dec 10
2
[LLVMdev] Exception handling in JIT
Hi everyone,
Here's a patch that enables exception handling when jitting. I've
copy/pasted _many_code from lib/Codegen/DwarfWriter.cpp, so we may need
to factorize it, but the functionality is there and I'm very happy with
it :)
lli should now be able to execute the output from llvm-gcc when using
exceptions (the UnwindInst instruction is not involved in this patch).
Just add the