search for: framesetupopcode

Displaying 10 results from an estimated 10 matches for "framesetupopcode".

2005 Mar 23
2
[LLVMdev] Stack alignment problem
...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) { ......... HasCalls = true; ........ So, stack is aligned only if there is instruction with FrameSetupOpcode or FrameDestroyOpcode. In X86, it's defined as def ADJCALLSTACKDOWN : I<0, Pseudo, (ops)...
2013 Sep 25
2
[LLVMdev] Register scavenger and SP/FP adjustments
...strInfo &TII = *Fn.getTarget().getInstrInfo(); const TargetRegisterInfo &TRI = *TM.getRegisterInfo(); const TargetFrameLowering *TFI = TM.getFrameLowering(); bool StackGrowsDown = TFI->getStackGrowthDirection() == TargetFrameLowering::StackGrowsDown; int FrameSetupOpcode = TII.getCallFrameSetupOpcode(); int FrameDestroyOpcode = TII.getCallFrameDestroyOpcode(); if (RS && !FrameIndexVirtualScavenging) RS->enterBasicBlock(BB); for (MachineBasicBlock::iterator I = BB->begin(); I != BB->end(); ) { if (I->getOpcode() == FrameSetupOp...
2005 Mar 25
0
[LLVMdev] Stack alignment 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) { > ......... > HasCalls = true; > ........ > > So, stack is aligned only if there is instruction with FrameSetupOpcode or > FrameDestroyOpcode. In X86, it's defined as > > def ADJC...
2013 Sep 26
0
[LLVMdev] Register scavenger and SP/FP adjustments
CallFrameSetupOpcode is a pseudo opcode like X86::ADJCALLSTACKDOWN64. That means when the code is expected to be called before the pseudo instructions are eliminated. I don't know why it's not the case for you. A quick look at PEI code indicates the pseudo's should not have been removed at the time when rep...
2013 Sep 26
2
[LLVMdev] Register scavenger and SP/FP adjustments
...= something different %R3<def> = tLDRspi %SP, 0, pred:14, pred:%noreg; mem:LD4[FixedStack-1] %R1<def> = tLDRspi %SP, 0, pred:14, pred:%noreg; mem:LD4[FixedStack-1] <- restore from *(NewSP+0) !! -Krzysztof On 9/26/2013 1:24 PM, Evan Cheng wrote: > CallFrameSetupOpcode is a pseudo opcode like X86::ADJCALLSTACKDOWN64. > That means when the code is expected to be called before the pseudo > instructions are eliminated. I don't know why it's not the case for you. > A quick look at PEI code indicates the pseudo's should not have been > removed...
2013 Sep 26
0
[LLVMdev] Register scavenger and SP/FP adjustments
...ef> = tLDRspi %SP, 0, pred:14, pred:%noreg; mem:LD4[FixedStack-1] > %R1<def> = tLDRspi %SP, 0, pred:14, pred:%noreg; mem:LD4[FixedStack-1] <- restore from *(NewSP+0) !! > > > -Krzysztof > > > > On 9/26/2013 1:24 PM, Evan Cheng wrote: >> CallFrameSetupOpcode is a pseudo opcode like X86::ADJCALLSTACKDOWN64. >> That means when the code is expected to be called before the pseudo >> instructions are eliminated. I don't know why it's not the case for you. >> A quick look at PEI code indicates the pseudo's should not have been &...
2007 Sep 06
1
[LLVMdev] Prolog/Epilog Insertion Question
I've been looking through the code for pologue/epilogoue generation and noticed this oddity: void PEI::replaceFrameIndices(MachineFunction &Fn) { [...] for (MachineBasicBlock::iterator I = BB->begin(); I != BB->end(); ) { [...] if (I->getOpcode() == FrameSetupOpcode || I->getOpcode() == FrameDestroyOpcode) { [...] } else { [...] for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) if (MI->getOperand(i).isFrameIndex()) { // If this instruction has a FrameIndex operand, we need to use...
2013 Sep 26
1
[LLVMdev] Register scavenger and SP/FP adjustments
...t;> mem:LD4[FixedStack-1] >> %R1<def> = tLDRspi %SP, 0, pred:14, pred:%noreg; >> mem:LD4[FixedStack-1] <- restore from *(NewSP+0) !! >> >> >> -Krzysztof >> >> >> >> On 9/26/2013 1:24 PM, Evan Cheng wrote: >>> CallFrameSetupOpcode is a pseudo opcode like X86::ADJCALLSTACKDOWN64. >>> That means when the code is expected to be called before the pseudo >>> instructions are eliminated. I don't know why it's not the case for you. >>> A quick look at PEI code indicates the pseudo's should not...
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
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