Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] stackrestore"
2012 Feb 01
3
[LLVMdev] Issues with the llvm.stackrestore intrinsic
Hi,
I have two problems regarding the llvm.stackrestore intrinsic. I'm
running on 3.0, but a quick test on trunk also showed the same behavior.
First problem:
---------------
I have code like:
tmp1 = call llvm.stacksave()
tmp2 = alloca
[do some stuff with tmp2]
call llvm.stackrestore(tmp1)
[some other stuff]
tmp3 = call llvm.stacksave()
tmp4 = alloca
[do some stuff
2012 Feb 03
0
[LLVMdev] Issues with the llvm.stackrestore intrinsic - now LoopRotation handling of alloca
Hi,
I've tracked the first problem (mentioned in my previous email, quoted
below) down further, ending up in the handling of alloca in
LoopRotation.cpp (from trunk):
// If the instruction's operands are invariant and it doesn't read
or write
// memory, then it is safe to hoist. Doing this doesn't change the
order of
// execution in the preheader, but does
2020 Jun 25
2
[RFC] Replacing inalloca with llvm.call.setup and preallocated
Bringing this back up for discussion on handling exceptions.
According to the inalloca design <https://llvm.org/docs/InAlloca.html>,
there should be a stackrestore after an invoke in both the non-exceptional
and exceptional case (that doesn't seem to be happening in some cases as
we've seen, but that's beside the point).
Does it make sense to model a preallocated call as
2020 Apr 16
2
[RFC] Replacing inalloca with llvm.call.setup and preallocated
On Sat, Mar 28, 2020 at 2:20 PM Eli Friedman <efriedma at quicinc.com> wrote:
> This would specifically be for cases where we try to rewrite the
> signature? I would assume we should forbid rewriting the signature of a
> call with an operand bundle. And once some optimization drops the bundle
> and preallocated marking, to allow such rewriting, the signature doesn’t
> need
2020 Jan 28
2
[RFC] Replacing inalloca with llvm.call.setup and preallocated
On Mon, Jan 27, 2020 at 4:31 PM Eli Friedman <efriedma at quicinc.com> wrote:
> I assume by “drop support”, you mean reject it in the bitcode reader/IR
> parser? We can’t reasonably support a complex feature like inalloca if
> nobody is testing it. If we can’t reasonably upgrade it, and we don’t think
> there are any users other than clang targeting 32-bit Windows, probably
2012 Feb 03
1
[LLVMdev] Issues with the llvm.stackrestore intrinsic - now LoopRotation handling of alloca
2012/2/3 Patrik Hägglund <patrik.h.hagglund at ericsson.com>:
> Hi,
>
> I've tracked the first problem (mentioned in my previous email, quoted
> below) down further, ending up in the handling of alloca in
> LoopRotation.cpp (from trunk):
>
> // If the instruction's operands are invariant and it doesn't read
> or write
> // memory, then it is
2020 Mar 28
2
[RFC] Replacing inalloca with llvm.call.setup and preallocated
Sorry for the delay. Arthur Eubanks has started working on the design here:
https://reviews.llvm.org/D74651
I felt I should follow up here about that.
On Mon, Jan 27, 2020 at 6:47 PM Eli Friedman <efriedma at quicinc.com> wrote:
> It doesn’t seem like multiple call sites should be a problem if they’re
> sufficiently similar? If the argument layout for each callsite is the
> same,
2015 Apr 05
2
[LLVMdev] alloca not in first bb behaving differently
Thanks all.
David why do you say it is particularly bad IR (other than not having gone
through SROA). Is it the multiple blocks for early returns? That is how I'm
supporting early returns in the middle of a basic block. I couldn't find
any other way.
On Sun, Apr 5, 2015 at 6:24 AM, David Jones <djones at xtreme-eda.com> wrote:
> Data point:
>
> I use (rarely) alloca in
2013 Jul 25
4
[LLVMdev] Proposing a new 'alloca' parameter attribute to implement the Microsoft C++ ABI
Hi LLVM folks,
To properly implement pass-by-value in the Microsoft C++ ABI, we need to be
able
to take the address of an outgoing call argument slot. This is
http://llvm.org/PR5064 .
Problem
-------
On Windows, C structs are pushed right onto the stack in line with the other
arguments. In LLVM, we use byval to model this, and it works for C structs.
However, C++ records are also passed this
2015 Nov 17
3
asan for allocas on powerpc64
Hi!
Sorry for delay, just returned from vacation.
On 12/11/15 23:44, Kostya Serebryany via llvm-dev wrote:
> +Maxim and Yuri, as I think this is their code.
>
> On Thu, Nov 12, 2015 at 3:02 AM, Jay Foad <jay.foad at gmail.com
> <mailto:jay.foad at gmail.com>> wrote:
>
> (Resending with the correct mailing list address.)
>
> Hi,
>
> Currently
2015 Nov 23
2
asan for allocas on powerpc64
Jay, do you have a PowerPC64 target? If so, could you please check
attached patch on PPC box? This is a draft patch, but it would be nice
to make sure that we are moving to right direction here.
Thanks,
-Maxim
On 18/11/15 00:12, Jay Foad wrote:
>>> Currently test/asan/TestCases/alloca_vla_interact.cc is XFAILed for
>>> powerpc64. I've had a look at why it
2015 Nov 12
4
Fwd: asan for allocas on powerpc64
(Resending with the correct mailing list address.)
Hi,
Currently test/asan/TestCases/alloca_vla_interact.cc is XFAILed for
powerpc64. I've had a look at why it doesn't work. I think the only
problem is in the call to __asan_allocas_unpoison that is inserted at
the end of the "for" loop (just before a stackrestore instruction).
The call function is created something like this
2015 Nov 23
2
asan for allocas on powerpc64
In LowerGET_DYNAMIC_AREA_OFFSET() you're
calling MFI->getMaxCallFrameSize(), but it looks like that doesn't return
useful information until after the
PrologEpilogInserter's PEI::calculateCallsInformation() has run.
So maybe the lowering has to be done as part of frame index elimination?
(I'm not too familiar with this code.)
Jay.
On 23 November 2015 at 13:07, Jay Foad
2013 Jul 30
0
[LLVMdev] Proposing a new 'alloca' parameter attribute to implement the Microsoft C++ ABI
How do you handle this during codegen? One problem is avoid stack
changes (like spills). Another is coordinating things that are using
allocas and those that are not but end up in the stack. Consider
void foo(int arg1, int arg2, int arg3, ....CXXTypeWithCopyConstructor
argn, int argp1...)
You will need an alloca for argn, but the ABI also requires it to be
next to the plain integers that
2013 Oct 22
1
[LLVMdev] Starting implementation of 'inalloca' parameter attribute for MS C++ ABI pass-by-value
I wanted to mention that I'm planning to start writing and sending out
patches for this.
Naming the attribute 'alloca' was really confusing, so I'd like to change
it to 'inalloca', which follows the preposition pattern of inreg and byval.
After discussion, we decided it was silly to add stackbase uses to alloca
instructions. They should stay simple.
Instead, we'll
2009 Jun 18
0
[LLVMdev] Explicitly Freeing Allocas
Nyx wrote:
> Hello,
>
> I would just like to ask if it's possible to explicitly free allocas. This
> is because I need to call functions that take structs of different sizes as
> input, (possibly inside of loops) and I would rather avoid a stack overflow.
You can't explicitly free a specific alloca, but you can use the llvm.stacksave
and llvm.stackrestore intrinsics to
2009 Aug 21
2
[LLVMdev] How to force MemoryDependenceAnalysis to run on original module
Chris Lattner schrieb:
> On Aug 21, 2009, at 3:04 AM, Marc Brünink wrote:
>>> This isn't really possible. The issue is that MemDep doesn't just
>>> "analyze your function". It is designed to be as lazy as possible,
>>> which means that it only does analysis when a query is performed. This
>>> means that if you have
2015 May 11
2
[LLVMdev] Interaction of stacksave/restore and stack spills
Hi everyone,
I'm curious about the constraints that come with the usage of
llvm.stacksave/llvm.stackrestore. Specifically I was wondering what the
contract of their usage was with respect to SSA variables defined after
llvm.stacksave. It seems to me that they could get spilled to a stack slot,
which I'm concerned stackrestore might mess up. Is this a valid concern?
Thanks,
Keno
2009 Oct 27
2
[LLVMdev] LICM
Hi all,
I just noticed that LICM does not hoist/sink the following store out of
the loop:
int array[20];
int i;
for (i = 0; i<100; i++) {
array [0] = 0;
}
The getElementPtr instruction is hoisted out of the loop; the store is
not. Did I miss something obvious? Bitcode file attached.
Generated using LLVM 2.5 and
llvm-gcc -c -emit-llvm
2018 May 11
0
best way to represent function call with new stack in LLVM IR?
On 2018-05-11 02:28, Andrew Kelley via llvm-dev wrote:
> In the Zig frontend, we know at compile-time the entire call graph.
> This means we know stack size for all functions and therefore the
> upper bound stack usage.
>
> [snip]
> 1. Is there a way to accomplish this with existing LLVM API?
You should use the @llvm.stacksave and @llvm.stackrestore intrinsic.
It is only legal