search for: hascal

Displaying 17 results from an estimated 17 matches for "hascal".

Did you mean: pascal
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: test/CodeGen/SystemZ/2009-07-10-BadI...
2008 Apr 16
2
[LLVMdev] Problems in removing a cloned instruction.
...asicBlock *BB, DenseMap<const Value*, Value*> &ValueMap, const char *NameSuffix, Function *F) { BasicBlock *NewBB = new BasicBlock("", F); if (BB->hasName()) NewBB->setName(BB->getName()+NameSuffix); bool hasCalls = false, hasDynamicAllocas = false, hasStaticAllocas = false, isTerminal =false; // Loop over all instructions, and copy them over. for (BasicBlock::const_iterator II = BB->begin(), IE = BB->end(); II != IE; ++II) { const Instruction *N...
2005 Mar 23
2
[LLVMdev] Stack alignment problem
...; This is why frame info works the way it does: it assumes that there is no > reason to keep the outgoing stack pointer aligned unless there is a call. > > 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 != BB->end(); ) if (I->getOpcode() == FrameSetupOpcode || I->getOpcode() == FrameDestroyOpcode) {...
2008 Apr 16
0
[LLVMdev] Problems in removing a cloned instruction.
...DenseMap<const Value*, Value*> &ValueMap, > const char *NameSuffix, Function *F) { > > BasicBlock *NewBB = new BasicBlock("", F); > if (BB->hasName()) NewBB->setName(BB->getName()+NameSuffix); > > bool hasCalls = false, hasDynamicAllocas = false, > hasStaticAllocas = false, isTerminal =false; > > // Loop over all instructions, and copy them over. > for (BasicBlock::const_iterator II = BB->begin(), IE = BB->end(); > II != IE; ++II) > { &g...
2005 Mar 22
2
[LLVMdev] Stack alignment problem
.... 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 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 PrologEpilogInsert.cpp file always explicitly ca...
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 to either RegInfo->getCallFrameSetupOpcode() or RegInfo->getCallFrameDestroyOp...
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 != BB->end(); ) > if (I->getOpcode() == FrameSetupOpcode || > I->getOpcode()...
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 PrologEpilogInsert.cpp file always &...
2006 May 16
1
[LLVMdev] Stack alignment in leaf functions
...y target, the stack should be aligned even for leaf functions. In particular, hardware interrupt can arrive at any time, and stack should be 8-byte aligned at the time of interrupt, otherwise things will break. I can address this issue by using two tricks together: 1. Calling MachineFrameInfo::setHasCalls in my backend 2. Using the attached patch, so that value of setHasCalls is not reset to false later. Comments? BTW, I've checked other uses of MachineFrameInfo::hasCalls. For example, PPCRegisterInfo uses it to check if if callee save registers can be stored in something called "red z...
2008 Jun 30
2
[LLVMdev] Recently failing vector tests
...============================================== > --- CodeGen/PrologEpilogInserter.cpp (revision 52829) > +++ CodeGen/PrologEpilogInserter.cpp (working copy) > @@ -464,7 +464,8 @@ > // works. > if (!RegInfo->targetHandlesStackFrameRounding() && > (FFI->hasCalls() || FFI->hasVarSizedObjects() || > - RegInfo->needsStackRealignment(Fn))) { > + (RegInfo->needsStackRealignment(Fn) && > + Offset > std::abs(TFI.getOffsetOfLocalArea())))) { > // If we have reserved argument space for call sites in the &...
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
2008 Jun 27
0
[LLVMdev] Recently failing vector tests
...rter.cpp =================================================================== --- CodeGen/PrologEpilogInserter.cpp (revision 52829) +++ CodeGen/PrologEpilogInserter.cpp (working copy) @@ -464,7 +464,8 @@ // works. if (!RegInfo->targetHandlesStackFrameRounding() && (FFI->hasCalls() || FFI->hasVarSizedObjects() || - RegInfo->needsStackRealignment(Fn))) { + (RegInfo->needsStackRealignment(Fn) && + Offset > std::abs(TFI.getOffsetOfLocalArea())))) { // If we have reserved argument space for call sites in the function // imm...
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?
...ackend 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 have: ---------------------------------------------------------------------- if (MFI->hasCalls()) { NumBytes += MFI->getMaxCallFrameSize(); } if ((NumBytes == 0) || (NumBytes <= 224 && !HasFP && !MFI->hasCalls() && MaxAlign <= TargetAlign)) { MFI->setStackSize(0); return; } unsigned Align = std::max(TargetAlign, MaxAlign); unsign...
2008 Jun 27
2
[LLVMdev] Recently failing vector tests
Running on x86-64 linux: FAIL: test/CodeGen/X86/vec_ins_extract.ll Failed with exit(1) at line 1 while running: llvm-as < test/CodeGen/X86/vec_ins_extract.ll | opt -scalarrepl -instcombine | llc -march=x86 -mcpu=yonah | not grep sub.*esp subl $16, %esp subl $16, %esp subl $16, %esp subl $16, %esp child process exited abnormally FAIL:
2008 Jun 30
0
[LLVMdev] Recently failing vector tests
...========================= >> --- CodeGen/PrologEpilogInserter.cpp (revision 52829) >> +++ CodeGen/PrologEpilogInserter.cpp (working copy) >> @@ -464,7 +464,8 @@ >> // works. >> if (!RegInfo->targetHandlesStackFrameRounding() && >> (FFI->hasCalls() || FFI->hasVarSizedObjects() || >> - RegInfo->needsStackRealignment(Fn))) { >> + (RegInfo->needsStackRealignment(Fn) && >> + Offset > std::abs(TFI.getOffsetOfLocalArea())))) { >> // If we have reserved argument space for call s...
2008 Jun 30
1
[LLVMdev] Recently failing vector tests
...>> --- CodeGen/PrologEpilogInserter.cpp (revision 52829) > >> +++ CodeGen/PrologEpilogInserter.cpp (working copy) > >> @@ -464,7 +464,8 @@ > >> // works. > >> if (!RegInfo->targetHandlesStackFrameRounding() && > >> (FFI->hasCalls() || FFI->hasVarSizedObjects() || > >> - RegInfo->needsStackRealignment(Fn))) { > >> + (RegInfo->needsStackRealignment(Fn) && > >> + Offset > std::abs(TFI.getOffsetOfLocalArea())))) { > >> // If we have reserved argum...