search for: fnstart

Displaying 20 results from an estimated 45 matches for "fnstart".

2016 Dec 08
2
visitShiftByConstant of DAGCombiner
...e enabled under a shift context. But I think maybe we could expand it to as more case as possible. The original issuse of it: For code as below: unsigned array[4]; unsigned foo(unsigned long x) { return array[(x>>2)&3ul]; sequence before this canonicalisation (ARM): foo: .fnstart @ BB#0: @ %entry lsrs r0, r0, #2 movs r1, #3 ands r1, r0 lsls r0, r1, #2 ldr r1, .LCPI0_0 ldr r0, [r1, r0] bx lr .p2align 2 sequence after this canonicalisation: foo: .fnstart @ BB#0: @ %entry movs r1, #12 ands r1, r0 ldr r0, .LCPI0_0...
2012 Sep 24
0
[LLVMdev] [llvm-commits] Fwd: Re: [PATCH] Fix for bug in JIT exception table allocation
...ActualSize); > > > > - BufferEnd = BufferBegin+ActualSize; > > > > - EmittedFunctions[F.getFunction()].ExceptionTable = BufferBegin; > > > > - uint8_t *EhStart; > > > > - uint8_t *FrameRegister = DE->EmitDwarfTable(F, *this, FnStart, FnEnd, > > > > - EhStart); > > > > + while (true) { > > > > + BufferBegin = CurBufferPtr = > > > > MemMgr->startExceptionTable(F.getFunction(), > > > > + > > > > Actual...
2008 Jun 16
0
[LLVMdev] PowerPC instruction cache invalidation
On Mon, 16 Jun 2008, Gary Benson wrote: > When you genetate code on PowerPC you need to explicitly invalidate > the instruction cache to force the processor to reread it. In LLVM > there is code to do this for function stubs on Macintosh, but not > for other platforms and not for JITted code generally. Applied, thanks!
2008 Jun 17
1
[LLVMdev] PowerPC instruction cache invalidation
...__) - sys_icache_invalidate(Addr, len); -#endif -} - /// getFunctionStub - This returns a pointer to a function stub, creating /// one on demand as needed. void *JITResolver::getFunctionStub(Function *F) { @@ -756,7 +742,7 @@ } // Invalidate the icache if necessary. - synchronizeICache(FnStart, FnEnd-FnStart); + TheJIT->getJITInfo().InvalidateInstructionCache(FnStart, FnEnd-FnStart); // Add it to the JIT symbol table if the host wants it. AddFunctionToSymbolTable(F.getFunction()->getNameStart(),
2016 Dec 15
0
visitShiftByConstant of DAGCombiner
On 8 December 2016 at 02:34, Jojo Ma <jojo.ma at linaro.org> wrote: > It would be profitable as well if we could enable the canonicalisation on > it. > sequence before this canonicalisation (ARM): > test: > .fnstart > @ BB#0: @ %entry > movw r1, #65534 > and r1, r0, r1 > ubfx r0, r0, #1, #15 > add r0, r0, r1, lsr #1 > bx lr > > sequence after this canonicalisation: > test: > .fnstart > @ BB#0: @ %entry > ubfx r0...
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 Jun 16
6
[LLVMdev] PowerPC instruction cache invalidation
Hi all, When you genetate code on PowerPC you need to explicitly invalidate the instruction cache to force the processor to reread it. In LLVM there is code to do this for function stubs on Macintosh, but not for other platforms and not for JITted code generally. The attached patch adds support for GNU platforms, but I can't figure out a nice way to call it for all generated code. Can
2008 Apr 01
2
[LLVMdev] Being able to know the jitted code-size before emitting
...> + >> + } >> + >> + >> TheJIT->updateGlobalMapping(F.getFunction(), CurBufferPtr); >> >> MBBLocations.clear(); >> @@ -579,12 +614,18 @@ >> DOUT << "Disassembled code:\n" >> << sys::disassembleBuffer(FnStart, FnEnd-FnStart, >> (uintptr_t)FnStart); >> #endif >> + >> if (ExceptionHandling) { >> uintptr_t ActualSize; >> + if (SizedMemoryCode) { >> + SizeEmitter sz(LabelLocations); >> + DE->EmitDwarfTable(F, sz, FnStart, FnEnd); >&g...
2008 Mar 31
0
[LLVMdev] Being able to know the jitted code-size before emitting
...unction()->getAlignment(), 8U)); > + > + } > + > + > TheJIT->updateGlobalMapping(F.getFunction(), CurBufferPtr); > > MBBLocations.clear(); > @@ -579,12 +614,18 @@ > DOUT << "Disassembled code:\n" > << sys::disassembleBuffer(FnStart, FnEnd-FnStart, > (uintptr_t)FnStart); > #endif > + > if (ExceptionHandling) { > uintptr_t ActualSize; > + if (SizedMemoryCode) { > + SizeEmitter sz(LabelLocations); > + DE->EmitDwarfTable(F, sz, FnStart, FnEnd); > + ActualSize = sz.getCurrent...
2008 Apr 01
0
[LLVMdev] Being able to know the jitted code-size before emitting
...;> + >>> + >>> TheJIT->updateGlobalMapping(F.getFunction(), CurBufferPtr); >>> >>> MBBLocations.clear(); >>> @@ -579,12 +614,18 @@ >>> DOUT << "Disassembled code:\n" >>> << sys::disassembleBuffer(FnStart, FnEnd-FnStart, >>> (uintptr_t)FnStart); >>> #endif >>> + >>> if (ExceptionHandling) { >>> uintptr_t ActualSize; >>> + if (SizedMemoryCode) { >>> + SizeEmitter sz(LabelLocations); >>> + DE->EmitDwarfTable(F,...
2008 Apr 04
3
[LLVMdev] Being able to know the jitted code-size before emitting
...gt;>>> TheJIT->updateGlobalMapping(F.getFunction(), CurBufferPtr); >>>> >>>> MBBLocations.clear(); >>>> @@ -579,12 +614,18 @@ >>>> DOUT << "Disassembled code:\n" >>>> << sys::disassembleBuffer(FnStart, FnEnd-FnStart, >>>> (uintptr_t)FnStart); >>>> #endif >>>> + >>>> if (ExceptionHandling) { >>>> uintptr_t ActualSize; >>>> + if (SizedMemoryCode) { >>>> + SizeEmitter sz(LabelLocations); >>>>...
2008 Apr 05
2
[LLVMdev] Being able to know the jitted code-size before emitting
...balMapping(F.getFunction(), CurBufferPtr); >>>>>> >>>>>> MBBLocations.clear(); >>>>>> @@ -579,12 +614,18 @@ >>>>>> DOUT << "Disassembled code:\n" >>>>>> << sys::disassembleBuffer(FnStart, FnEnd-FnStart, >>>>>> (uintptr_t)FnStart); >>>>>> #endif >>>>>> + >>>>>> if (ExceptionHandling) { >>>>>> uintptr_t ActualSize; >>>>>> + if (SizedMemoryCode) { >>>>>> +...
2008 Apr 05
0
[LLVMdev] Being able to know the jitted code-size before emitting
...nction(), CurBufferPtr); >>>>>>> >>>>>>> MBBLocations.clear(); >>>>>>> @@ -579,12 +614,18 @@ >>>>>>> DOUT << "Disassembled code:\n" >>>>>>> << sys::disassembleBuffer(FnStart, FnEnd-FnStart, >>>>>>> (uintptr_t)FnStart); >>>>>>> #endif >>>>>>> + >>>>>>> if (ExceptionHandling) { >>>>>>> uintptr_t ActualSize; >>>>>>> + if (SizedMemoryCode) { &gt...
2008 Apr 04
0
[LLVMdev] Being able to know the jitted code-size before emitting
...TheJIT->updateGlobalMapping(F.getFunction(), CurBufferPtr); >>>>> >>>>> MBBLocations.clear(); >>>>> @@ -579,12 +614,18 @@ >>>>> DOUT << "Disassembled code:\n" >>>>> << sys::disassembleBuffer(FnStart, FnEnd-FnStart, >>>>> (uintptr_t)FnStart); >>>>> #endif >>>>> + >>>>> if (ExceptionHandling) { >>>>> uintptr_t ActualSize; >>>>> + if (SizedMemoryCode) { >>>>> + SizeEmitter sz(LabelLo...
2008 Apr 07
2
[LLVMdev] Being able to know the jitted code-size before emitting
...tr); >>>>>>>> >>>>>>>> MBBLocations.clear(); >>>>>>>> @@ -579,12 +614,18 @@ >>>>>>>> DOUT << "Disassembled code:\n" >>>>>>>> << sys::disassembleBuffer(FnStart, FnEnd-FnStart, >>>>>>>> (uintptr_t)FnStart); >>>>>>>> #endif >>>>>>>> + >>>>>>>> if (ExceptionHandling) { >>>>>>>> uintptr_t ActualSize; >>>>>>>> + if...
2014 Feb 20
3
[LLVMdev] [LLVM] Forward temp label references on ARM in LDR with .ltorg in inline assembly are broken in trunk
...------------ ~/clang -target armv7-none-eabi -O0 -c -emit-llvm lolwut.c -o lolwut.bc ~/llc -O0 lolwut.bc -o lolwut.s ---- lolwut.s ---------------------------- .file "lolwut.bc" .text .globl lolwut .align 2 .type lolwut,%function lolwut: @ @lolwut .fnstart @ BB#0: @ %entry @APP ldr r1, .Ltmp0 .align 2 .Ltmp0: .long ".L11" ".L11": @NO_APP bx lr .Ltmp1: .size lolwut, .Ltmp1-lolwut ------------------------------------------ Somehow, the forward referenced label at 1: in the original assembly...
2008 Apr 07
0
[LLVMdev] Being able to know the jitted code-size before emitting
...gt;>>>>> >>>>>>>>> MBBLocations.clear(); >>>>>>>>> @@ -579,12 +614,18 @@ >>>>>>>>> DOUT << "Disassembled code:\n" >>>>>>>>> << sys::disassembleBuffer(FnStart, FnEnd-FnStart, >>>>>>>>> (uintptr_t)FnStart); >>>>>>>>> #endif >>>>>>>>> + >>>>>>>>> if (ExceptionHandling) { >>>>>>>>> uintptr_t ActualSize; >>>>>&...
2015 Dec 30
2
Substitute instruction with a jump to a library code
...bute 21, 1 @ Tag_ABI_FP_exceptions .eabi_attribute 23, 3 @ Tag_ABI_FP_number_model .eabi_attribute 24, 1 @ Tag_ABI_align_needed .eabi_attribute 25, 1 @ Tag_ABI_align_preserved .file "simple-fadd.ll" .globl fadd .align 2 .type fadd,%function fadd: @ @fadd .fnstart .Leh_func_begin0: @ BB#0: push {lr} bl __addsf3 pop {lr} mov pc, lr .Ltmp0: .size fadd, .Ltmp0-fadd .Leh_func_end0: .fnend .ident "Ubuntu clang version 3.6.0-2ubuntu1~trusty1 (tags/RELEASE_360/final) (based on LLVM 3.6.0)" One can clearly see a bl __addsf3 instruction. However for some...
2008 Apr 17
1
[LLVMdev] Being able to know the jitted code-size before emitting
Thx again Evan for the review. Here's a new patch for the JIT in itself. The major changes are: 1) A JITMemoryManager now has a flag saying "I require to know the size of what you want to emit" 2) DwarfJITEmitter is augmented with GetSize* functions 3) JITEmitter::startFunction checks if the JITMemoryManager requires to know the size. If so, it computes it and gives it through the
2012 Aug 21
2
[LLVMdev] [PATCH] Fix for bug in JIT exception table allocation (no test yet)
...ceptionTable(F.getFunction(), - ActualSize); - BufferEnd = BufferBegin+ActualSize; - EmittedFunctions[F.getFunction()].ExceptionTable = BufferBegin; - uint8_t *EhStart; - uint8_t *FrameRegister = DE->EmitDwarfTable(F, *this, FnStart, FnEnd, - EhStart); + while (true) { + BufferBegin = CurBufferPtr = MemMgr->startExceptionTable(F.getFunction(), + ActualSize); + BufferEnd = BufferBegin+ActualSize; + Em...