Displaying 20 results from an estimated 90000 matches similar to: "[LLVMdev] Customizing PEI::calculateFrameObjectOffsets()"
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 08
1
[LLVMdev] should PEI::calculateFrameObjectOffsets align the stack?
> That is irrelevant. The PEI code needs to know how much stack space is
> required for each call to allocate and align the stack frame properly. It
> gets this info from the ADJCALLSTACK instructions.
I see. Looking at PEI::calculateCalleeSavedRegisters shows that the
ADJCALLSTACK instructions is used to set up MaxCallFrameSize. Adding
debug prints also show that in the example code
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 07
0
[LLVMdev] should PEI::calculateFrameObjectOffsets align the stack?
On Sat, 7 Oct 2006, [UTF-8] Rafael Esp?ndola wrote:
>> 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
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
2004 Jun 08
1
[LLVMdev] Patch/Question: calculateFrameObjectOffsets
Hello,
the calculateFrameObjectOffsets methods in CodeGen/PrologEpilogEmitter.cpp
does not work for me, since it asserts if stack grows up, and when assert is
commented out, allocates spill slots in the same location as function
arguments, which is not right.
I've tried to fix that, and a patches. It merely adds
if (StackGrowsDown)
everywhere, so that the current logic should not be
2009 May 13
0
[LLVMdev] MSVC compile error with trunk
On Tue, May 12, 2009 at 11:55 PM, Chris Lattner <clattner at apple.com> wrote:
> Dan, can you add IVUsers.cpp to the appropriate cmakefile?
>
> -chris
>
>
> On May 12, 2009, at 10:54 PM, OvermindDL1 wrote:
>
>> On Tue, May 12, 2009 at 11:40 PM, Chris Lattner <clattner at apple.com>
>> wrote:
>>>
>>> On May 12, 2009, at 10:24 PM,
2004 Aug 27
2
[LLVMdev] PrologEpilogInserter question
Hello,
after some time I'm trying to build my code with the current CVS of LLVM, and
have a problem. The mentioned file, around line 184, contains:
if (FixedSlot == FixedSpillSlots+NumFixedSpillSlots) {
// Nope, just spill it anywhere convenient.
FrameIdx = FFI->CreateStackObject(RegInfo->getSpillSize(Reg)/8,
2013 Aug 01
2
[LLVMdev] can i avoid saving CSRs for functions with noreturn
hi, list,
i am making a llvm compiler for shader-like programs. as we known, shader
programs are short and have less function calls. i found that i have to
save/restore callee-saved register(CSR) in prolog and epilog. because I
can violate ABI from driver(c code) and shader, i plan to append the
attribute 'noreturn' to all shader functions.
in PrologEpilogInserter.cpp, you can find that
2015 Dec 09
2
Allowing virtual registers after register allocation
Hi all,
Virtual ISAs such as WebAssembly and NVPTX use infinite virtual register
sets instead of traditional phsyical registers. PrologEpilogInserter is run
after register allocation and asserts that all virtuals have been allocated
but doesn't otherwise depend on this if scavenging is not needed. We'd like
to use the target-independent PEI code for WebAssembly, so we're proposing
a
2012 Oct 31
0
[LLVMdev] Interprocedural Register Allocation
Hi Jakob,
I have spent last 4 weeks trying to figure out how to implement
Interprocedural Register Allocation. I must admit that I was really
overwhelmed with LLVM's codebase while trying to figure this out :)
There is so much to know! I think I have reached a point where I
have some sort of basic understanding of what needs to be done,
but I need some help from here on. So here is the
2010 Aug 27
0
[LLVMdev] What does this error mean: psuedo instructions should be removed before code emission?
On 08/27/2010 11:05, Dale Johannesen wrote:
>>>> Function only has on BB. Is this wrong that it has both
>>>> TCRETURNri64 and RET in one BB?
>>>
>>> Yes, that is wrong. The reason emitEpilogue isn't lowering the
>>> TCRETURN is that it doesn't see it, it only sees the RET. The real
>>> problem will be where that RET is
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
2012 Oct 22
0
[LLVMdev] register scavenger
I have a question about register scavenger.
I am considering using register scavenger for MIPS to free up register AT
which is currently reserved to load large immediates.
All targets which currently use register scavenger to search for a scratch
register (ARM, CellSPU, PowerPC and XCore)
override function processFunctionBeforeCalleeSavedScan and call
RegisterScavenger::setScavengingFrameIndex
2009 Oct 14
0
[LLVMdev] new warnings: possible use of uninitialized value?
I'm seeing the following warning when compiling LLVM trunk in a
Release build:
llvm/lib/CodeGen/PrologEpilogInserter.cpp: In member function ‘void
llvm::PEI::scavengeFrameVirtualRegs(llvm::MachineFunction&)’:
llvm/lib/CodeGen/PrologEpilogInserter.cpp:770: warning: ‘PrevValue’
may be used uninitialized in this function
I briefly looked at the code and it looks like PrevValue is
2004 Jun 09
2
[LLVMdev] X86 Frame info question
The X86 backend has this code:
X86TargetMachine::X86TargetMachine(const Module &M, IntrinsicLowering *IL)
: ....
FrameInfo(TargetFrameInfo::StackGrowsDown, 8/*16 for SSE*/, 4),
That is, it uses "4" as local area offset. Based on prior discussion this
should mean that the local area starts and address ESP+4. Is this really
true? On X86 stack grows down, so
2011 Aug 04
1
[LLVMdev] Customizing Passes
For a particular target I would like to replace some of the "standard"
passes with customized versions.
What would be the cleanest way to do this?
At the moment I cannot see a good way of removing an existing pass from
within the target library.
2004 Jun 09
0
[LLVMdev] X86 Frame info question
On Wed, 9 Jun 2004, Vladimir Prus wrote:
>
> The X86 backend has this code:
>
> X86TargetMachine::X86TargetMachine(const Module &M, IntrinsicLowering *IL)
> : ....
> FrameInfo(TargetFrameInfo::StackGrowsDown, 8/*16 for SSE*/, 4),
>
> That is, it uses "4" as local area offset. Based on prior discussion this
> should mean that the local
2008 Dec 29
0
[LLVMdev] Controlling the stack layout
Hi, Nicolas
> Could you point me where those hooks are in the llvm code? I didn't find
> any.
Look into PrologEpilogInserter.cpp::PEI::runOnMachineFunction(). There
are calls to hooks inside TargetRegisterInfo:
TargetRegisterInfo::processFunctionBeforeCalleeSavedScan() and
TargetRegisterInfo::processFunctionBeforeFrameFinalized().
Maybe they are not so convenient when working via JIT
2009 Mar 23
0
[LLVMdev] Shrink Wrapping - RFC and initial implementation
Hi John,
Unless anyone else has any comments. I recommend you check in the PEI
patches so we can start testing it as llcbeta. Chris, should I commit
the patch for John or can you grant him commit access (since part of
his patch has already been committed)?
Evan
On Mar 16, 2009, at 3:23 PM, John Mosby wrote:
> Here is the latest shrink wrapping patch, with fixes for issues
>