Displaying 20 results from an estimated 7000 matches similar to: "[LLVMdev] Stack alignment in leaf functions"
2005 Mar 22
2
[LLVMdev] Stack alignment problem
Hi,
I have a problem getting a properly aligned stack for my LLVM backend. I've
asked about this previously, but unfortunately only now could try the
suggested solution.
For reference, here's the original message from me:
http://mail.cs.uiuc.edu/pipermail/llvmdev/2004-July/001388.html
And here's reply from Chris:
http://mail.cs.uiuc.edu/pipermail/llvmdev/2004-July/001390.html
The
2004 Jul 01
1
[LLVMdev] Stack alignment problem
Hello,
it seems the Prolog/Epilog insertion does not correctly align stack for me.
Consider the PEI::calculateFrameObjectOffsets method. It only aligns the
stack if
FFI->hasCalls()
is true. The only place where
MachineFrameInfo::setHasCalls
is invoked is
PEI::saveCallerSavedRegisters
and the value 'true' is only passed when there are instructions with opcodes
equal
2005 Mar 22
0
[LLVMdev] Stack alignment problem
On Tue, 22 Mar 2005, Vladimir Prus wrote:
> The PrologEpilogInserter.cpp file aligns the stack only if
> MachineFrameInfo::hasCalls returns true, which happens only if the function
> has "call frame setup instruction" which my backend does not generate.
> Chris suggested adding explicit MachineFrameInfo::setHasCalls call, which I've
> tried, but it does not help. The
2011 Jul 08
2
[LLVMdev] Best location in code generation for insertion of instrumentation to measure stack depth?
I investigated the MachineFunctionPass (that is runOnMachineFunction, I
believe). In my experimentation it didn't seem that the MachineFrameInfo was
populated (it consistently said that the stack depth was 0, for example). I
might have been doing something wrong?
On Fri, Jul 8, 2011 at 5:21 PM, John Criswell <criswell at illinois.edu> wrote:
> On 7/8/11 4:09 PM, Andrew Ruef wrote:
2010 May 13
1
[LLVMdev] Attention: About to Break SystemZ and possibly other Back Ends
Hi,
Attached is a patch I'm testing. It changes how "MachineFrameInfo::HasCalls" is calculated. Basically, the way it's calculated now is in PEI. And it only looks for frame adjustments (or inline ASM) to determine if the function has a call or not. This way is much more accurate and occurs much sooner. But it breaks this test:
2011 Jul 08
0
[LLVMdev] Best location in code generation for insertion of instrumentation to measure stack depth?
On 7/8/11 4:49 PM, Andrew Ruef wrote:
> I investigated the MachineFunctionPass (that is runOnMachineFunction,
> I believe).
A MachineFunctionPass is a class that you inherit from to write a
transform that operates on MachineInstrs (i.e., native code instructions
generated from the LLVM IR instructions). The runOnMachineFunction()
method is its entry point (i.e., the code generator
2005 Mar 23
2
[LLVMdev] Stack alignment problem
On Tuesday 22 March 2005 20:34, Chris Lattner wrote:
> Can you explain the problem in more detail? Specifically the LLVM code
> gneerator assumes that there is some alignment that the stack is required
> to have as part of its ABI. For example, in X86 target machine, the stack
> is 8-byte aligned on entry to function calls.
>
> What this means is that the frame info can assume
2005 Mar 25
0
[LLVMdev] Stack alignment problem
yOn Wed, 23 Mar 2005, Vladimir Prus wrote:
>> How is your target different here? Can you give an example of why this
>> causes a problem?
>
> Here's the code which computes the hasCalls flag:
>
> bool HasCalls = false;
>
> for (MachineFunction::iterator BB = Fn.begin(), E = Fn.end(); BB != E; ++BB)
> for (MachineBasicBlock::iterator I = BB->begin(); I
2011 Feb 14
1
[LLVMdev] broken alignment in stack(caused by bug in SelectionDAGBuilder) causes invalid schedules with r125471 and newer
The following problems happens with architectures, where stack alignment is smaller than the biggest preferred alignment for any data type
SP pointer may point anywhere with alignment of stack alignment (4 in our case)
SelectionDAGBuilder however calls CreateStackObject with preferred alignment is given data type(8 in our problemaric case. The ABI alignment for this data type is only 4)
This
2008 Apr 16
2
[LLVMdev] Problems in removing a cloned instruction.
Hi all,
I am trying to write a pass where i am creating a clone of a
function (the only difference being, the new function returns void ,
instead of any value).
I am creating a new Function Type with a void return type (rest being
the same as original function), and using this i am creating a new
function body. Then, i clone the body of the old function into new
function, but when ever i
2008 Apr 16
0
[LLVMdev] Problems in removing a cloned instruction.
Hi,
I'm gonna try to give some feedback, but I have only been working with LLVM
for a few days, so don't take what I'm saying without verifying :-)
> BasicBlock *ProgSlicer::CloneBasicBlock(const BasicBlock *BB,
> DenseMap<const Value*, Value*> &ValueMap,
> const char *NameSuffix, Function *F) {
>
> BasicBlock
2010 Apr 12
1
[LLVMdev] Question. about Machinefunction pass, funtion Prolog/Epilog code, stack frame
I am new to the LLVM, and need some help with this points.
1. how can we add special code for the Prolog/Epilog for some
certain functions, this should be done with machinefunction pass, rt?
2. Basically, I want to get the function stack frame, that is the size and
the initial position.
I found
int64_t llvm::MachineFrameInfo::getObjectSize ( int *ObjectIdx* )
const[inline]
This method is
2006 Oct 06
0
[LLVMdev] should PEI::calculateFrameObjectOffsets align the stack?
On Fri, 6 Oct 2006, [UTF-8] Rafael Esp?ndola wrote:
> In ARM the stack should be 8 bytes aligned during function calls. A
> function that has at least one function call then has a stack size of
> 8 bytes. PEI::calculateFrameObjectOffsets corretly computes this
> correctly.
>
> The problem is that the alignment is computed before adding space for
> the call frame size. This is
2006 Oct 06
2
[LLVMdev] should PEI::calculateFrameObjectOffsets align the stack?
In ARM the stack should be 8 bytes aligned during function calls. A
function that has at least one function call then has a stack size of
8 bytes. PEI::calculateFrameObjectOffsets corretly computes this
correctly.
The problem is that the alignment is computed before adding space for
the call frame size. This is done in emitProlog. Currently the ARM
backend has a bug in that it doesn't align
2006 Oct 07
2
[LLVMdev] should PEI::calculateFrameObjectOffsets align the stack?
> This sounds like the ADJCALLSTACK DOWN/UP 'instructions' around the call
> aren't set right, or you have declared a SP offset. It doesn't look like
> the ARM backend does this, so this is probably the problem.
The ARM backend currently doesn't use a frame pointer. It uses the
same technique of the PPC backend to avoid add/subs around calls. In
the PPC backend we
2011 Jul 08
0
[LLVMdev] Best location in code generation for insertion of instrumentation to measure stack depth?
On 7/8/11 4:09 PM, Andrew Ruef wrote:
> Hi list,
>
> I am trying to implement the technique outlined in the following
> paper: http://www.cs.umd.edu/~mwh/papers/martin10ownership.html
> <http://www.cs.umd.edu/%7Emwh/papers/martin10ownership.html> in LLVM.
> My approach so far involves the use of an IR level transform (via
> runOnFunction) to identify memory loads and
2009 Mar 30
1
[LLVMdev] Determining the base offset of the stack for a function.
I am running into an issue where if I have multiple functions compiled
in the same compilation unit the stack offset is not starting at zero.
For example:
func1(...)
{
...
}
func2(...)
{
...
}
Say the first function uses 64 bytes of the stack and an assumed offset
of 0 and the second function uses 32 bytes of the stack but an assumed
offset of 64. I've found out how to get the
2008 Jul 25
1
[LLVMdev] llvm svn trunk rev54012 does not compile
Hello All,
I just svn update
% svn info .
Path: .
URL: http://llvm.org/svn/llvm-project/llvm/trunk
Repository Root: http://llvm.org/svn/llvm-project
Repository UUID: 91177308-0d34-0410-b5e6-96231b3b80d8
Revision: 54012
Node Kind: directory
Schedule: normal
Last Changed Author: wangmp
Last Changed Rev: 54007
Last Changed Date: 2008-07-25 03:30:26 +0200 (Fri, 25 Jul 2008)
make[3]: Entering
2008 Jun 30
2
[LLVMdev] Recently failing vector tests
Hi Dale, yes it's just stack alignment. Unfortunately
your patch doesn't make any difference.
Thanks for thinking about this,
Duncan.
On Friday 27 June 2008 19:51:00 Dale Johannesen wrote:
> On Jun 27, 2008, at 3:11 AMPDT, Duncan Sands wrote:
> > FAIL: test/CodeGen/X86/vec_shuffle-10.ll
> > Failed with exit(1) at line 3
> > while running: llvm-as <
2008 Jun 27
0
[LLVMdev] Recently failing vector tests
On Jun 27, 2008, at 3:11 AMPDT, Duncan Sands wrote:
> FAIL: test/CodeGen/X86/vec_shuffle-10.ll
> Failed with exit(1) at line 3
> while running: llvm-as < test/CodeGen/X86/vec_shuffle-10.ll | llc -
> march=x86 -mattr=+sse2 | not grep {sub.*esp}
> subl $16, %esp
> subl $16, %esp
> child process exited abnormally
Is the code actually loading and storing