Displaying 20 results from an estimated 40000 matches similar to: "[LLVMdev] making trampolines more portable"
2009 Jun 14
1
[LLVMdev] making trampolines more portable
I'm not sure whether there are any other cases where using LLVM requires
knowledge of the target architecture, but needing it for trampolines is
worrying me. I'm putting together things where the program that's
generating the LLVM intermediate code doesn't have any way to know what
the target architecture will be.
Right now I'm using alloca to get a block that is expected
2009 Jun 24
1
[LLVMdev] making trampolines more portable
Duncan Sands wrote:
> is it important for you to have portable bitcode (i.e. the trampoline
> size as some kind of symbolic constant, maybe via a global or an
> intrinsic) that works on all targets or would it be enough to have the
> LLVM info for the target expose the trampoline size, so when generating
> IR for a target X you would query the method for target X and if it
2009 Jun 24
0
[LLVMdev] making trampolines more portable
Eli Friedman wrote:
> I didn't say we wouldn't accept a patch. It's just that up until now
> nobody has particularly cared because trampolines aren't used very
> much.
Fair enough. If I get to the point where I understand how to implement it
cleanly, I'll submit a patch.
Best regards,
Eric
2011 Aug 17
2
[LLVMdev] [PATCH] Go on dragonegg
Attached patches change how dragonegg lowers trampolines (for
compatibility with Go).
--
Sanjoy Das
http://playingwithpointers.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-the-trampolines-for-Go.patch
Type: text/x-diff
Size: 5108 bytes
Desc: not available
URL:
2011 Aug 29
3
[LLVMdev] [PATCH] Split init.trampoline into init.trampoline & adjust.trampoline
Hi!
Attached patches split init.trampoline into adjust.trampoline and
init.trampoline, like in gcc.
As mentioned in the previous mail, I've not made a documentation
patch, since I'm not sure about what the documented semantics of
llvm.adjust.trampoline should be.
Thanks!
--
Sanjoy Das
http://playingwithpointers.com
-------------- next part --------------
A non-text attachment was
2020 Mar 03
4
[RFC] Cheaper indirect calls via trampolines
Taking the address of a function inhibits optimisations for that function.
Essentially any ABI changes are unavailable if we can't adjust the call
site to match. The case of interest here is when a given function is called
directly and indirectly, and we don't want the latter to impose a cost on
the former.
One approach to avoid the ABI constraint cost is to extract/outline the
body of an
2011 Aug 23
2
[LLVMdev] [RFC] Splitting init.trampoline into init.trampoline and adjust.trampoline
Hi!
Attached set of patches splits llvm.init.trampoline into an "init"
phase and an "adjust" phase, as discussed on the "Go on dragonegg"
thread.
Thanks!
--
Sanjoy Das
http://playingwithpointers.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Split-intrinsics-and-DAG-nodes.patch
Type: text/x-diff
Size: 8808 bytes
Desc:
2019 May 09
3
Can I use the JIT interface to create trampolines? (For functions and global values)
Dear LLVM-Mailing list (again),
I still have another beginners question in my mind - thank you for your patience.
Again I was playing around, but this time with llvm::Function. In an older question I learned, that I can replace a llvm::Function directly with an address.
llvm::Function *function = mainModue->getFunction("puts");
function->replaceAllUsesWith(
2011 Aug 18
0
[LLVMdev] [PATCH] Go on dragonegg
Hi Sanjoy,
> Attached patches change how dragonegg lowers trampolines (for
> compatibility with Go).
I think the right approach is to add an llvm.adjust.trampoline intrinsic
to LLVM (and change llvm.init.trampoline to not return a result). Then the
dragonegg trampoline code will become trivial, and the Go problem will just
Go away :) In fact this was how I first did it: two intrinsics,
2011 Jan 04
0
[LLVMdev] Is PIC code defeating the branch predictor?
On 04 Jan 2011, at 08:30, Jakob Stoklund Olesen wrote:
> I noticed that we generate code like this for i386 PIC:
>
> calll L0$pb
> L0$pb:
> popl %eax
> movl %eax, -24(%ebp) ## 4-byte Spill
>
> I worry that this defeats the return address prediction for returns
> in the function because calls and returns no longer are matched.
According to benchmarks by
2011 Aug 31
0
[LLVMdev] [PATCH] Split init.trampoline into init.trampoline & adjust.trampoline
Hi Sanjoy, the first and last patches look good (except that you didn't add any
tests for the auto-upgrade functionality). Comments on the other two below.
> Attached patches split init.trampoline into adjust.trampoline and
> init.trampoline, like in gcc.
>
> As mentioned in the previous mail, I've not made a documentation
> patch, since I'm not sure about what the
2018 Sep 22
3
Quick question: How to BuildMI mov64mi32 arbitrary MMB address to memory
Dear Mr. Northover,
Thank you for the quick reply. You are correct about the address-mode
operands :) . I guess an important detail left out was that the basic block
(call it A) that wants to calculate the address of the target stationary
trampoline basic block (call it B) will be moved around in memory during
run-time. Our earlier solution, before the feature was implemented to move
around (A)
2011 Aug 25
0
[LLVMdev] [RFC] Splitting init.trampoline into init.trampoline and adjust.trampoline
Hi Sanjoy,
> Attached set of patches splits llvm.init.trampoline into an "init"
> phase and an "adjust" phase, as discussed on the "Go on dragonegg"
> thread.
thanks for doing this. The patches look good, though the decomposition into
individual patches is not that great (since things won't always work, in fact
not even compile I think, with not all
2008 Nov 01
0
[LLVMdev] nested function's static link gets clobbered
Hi,
> I'm parallelizing loops to be called by pthread. The thread body that I pass
> to pthread_create looks like
>
> define i8* @loop1({ i32*, i32* }* nest %parent_frame, i8* %arg)
> parent_frame is pointer to shared variables in original function
>
> 0x00007f0de11c41f0: mov (%r10),%rax
> 0x00007f0de11c41f3: cmpl $0x63,(%rax)
> 0x00007f0de11c41f6:
2020 Mar 27
2
Passing inormation from pass to lowering
Hi Sam,
I think an intrinsic would be ideal, but I couldn't figure out how to replace calls with an arbitrary number of arguments with a call to an intrinsic. In particular, I would like to call a trampoline instead of the original function. The trampoline performs certain actions and then jumps to the original callee. Would I have to call the intrinsic with the original arguments and then
2008 Oct 31
3
[LLVMdev] nested function's static link gets clobbered
Fellow developers,
I'm parallelizing loops to be called by pthread. The thread body that I pass
to pthread_create looks like
define i8* @loop1({ i32*, i32* }* nest %parent_frame, i8* %arg)
parent_frame is pointer to shared variables in original function
0x00007f0de11c41f0: mov (%r10),%rax
0x00007f0de11c41f3: cmpl $0x63,(%rax)
0x00007f0de11c41f6: jg 0x7f0de11c420c
2015 Mar 19
4
[LLVMdev] How will OrcJIT guarantee thread-safety when a function is asked to be re generated?
Hi Hayden,
Dave's answer covers this pretty well. Neither Orc nor MCJIT currently
reason about replacing function bodies. They may let you add duplicate
definitions, but how they'll behave if you do that isn't specified in their
contracts. They definitely won't replace old definitions unless you provide
a custom memory manager that's rigged to lay new definitions down on top
2011 Aug 18
1
[LLVMdev] [PATCH] Go on dragonegg
Hi!
> I think the right approach is to add an llvm.adjust.trampoline intrinsic
> to LLVM (and change llvm.init.trampoline to not return a result). Then the
Won't that break previous code that relies on the current
llvm.init.trampoline? I can start work on this if that is not a problem.
--
Sanjoy Das
http://playingwithpointers.com
2011 Sep 03
2
[LLVMdev] [PATCH] Split init.trampoline into init.trampoline & adjust.trampoline
Hi!
Thank you for the detailed review. I've attached a new set of patches.
--
Sanjoy Das
http://playingwithpointers.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-New-trampoline-intrinsics-for-LLVM.patch
Type: text/x-diff
Size: 16783 bytes
Desc: not available
URL:
2020 Jun 25
5
process '/usr/bin/rsync' started with executable stack
On Thu, Jun 25, 2020 at 01:04:29PM +0300, Dan Carpenter wrote:
> On Wed, Jun 24, 2020 at 12:39:24PM -0700, Kees Cook wrote:
> > On Wed, Jun 24, 2020 at 07:51:48PM +0300, Dan Carpenter wrote:
> > > In Debian testing the initrd triggers the warning.
> > >
> > > [ 34.529809] process '/usr/bin/fstype' started with executable stack
> >
> >