search for: ismachinebasicblock

Displaying 15 results from an estimated 15 matches for "ismachinebasicblock".

2008 Jan 03
2
[LLVMdev] Tailcall optimization in jit stopped working
...evan can comment on this? regards arnold Index: lib/Target/X86/X86CodeEmitter.cpp =================================================================== --- lib/Target/X86/X86CodeEmitter.cpp (revision 45541) +++ lib/Target/X86/X86CodeEmitter.cpp (working copy) @@ -601,7 +601,8 @@ if (MO.isMachineBasicBlock()) { emitPCRelativeBlockAddress(MO.getMBB()); } else if (MO.isGlobalAddress()) { - bool NeedStub = !IsStatic || + bool NeedStub = Opcode == X86::TAILJMPd || Opcode == X86::TAILJMPr || + Opcode == X86::TAILJMPm || !IsStatic || (Is6...
2007 Aug 10
2
[LLVMdev] MBB Critical edges
...if (!tii->isTerminatorInstr(mii->getOpcode())) { break; } // Scan the operands of this branch, replacing any // uses of dst with crit_mbb. for (unsigned i = 0, e = mii->getNumOperands(); i != e; ++i) { if (mii->getOperand(i).isMachineBasicBlock() && mii->getOperand(i).getMachineBasicBlock() == & dst) { found_branch = true; mii->getOperand(i).setMachineBasicBlock(crit_mbb); } } } Thanks a lot, Fernando
2008 Jan 27
0
[LLVMdev] BreakCriticalMachineEdge.h
Fernando, The code there should be more or less functional, though it's not currently used by anything. Eventually it should probably be moved to a method on MachineBasicBlock. The API breakage you're seeing is because some methods moved around. Feel free to fix it. :-) --Owen On Jan 26, 2008, at 6:31 PM, Fernando Magno Quintao Pereira wrote: > > Hi LLVMers, > >
2007 Aug 17
0
[LLVMdev] MBB Critical edges
...orInstr(mii->getOpcode())) { > break; > } > // Scan the operands of this branch, replacing any > // uses of dst with crit_mbb. > for (unsigned i = 0, e = mii->getNumOperands(); i != e; ++i) { > if (mii->getOperand(i).isMachineBasicBlock() && > mii->getOperand(i).getMachineBasicBlock() == & dst) { > found_branch = true; > mii->getOperand(i).setMachineBasicBlock(crit_mbb); > } > } > } > > Thanks a lot, > > Fernand...
2008 Jan 27
2
[LLVMdev] BreakCriticalMachineEdge.h
Hi LLVMers, what is the status of breaking critical edges in machine functions? I just compiled the top of the LLVM tree, and I found llvm/CodeGen/BreakCriticalMachineEdge.h. But this file seems not to be up-to-date with the other classes in the top of the tree. For instance, it calls isTerminatorInstr on llvm::TargetInstrInfo, but this method is no longer there. If I want to break
2007 Aug 19
1
[LLVMdev] MBB Critical edges
...umpTable = true; continue; } // Scan the operands of this branch, replacing any uses of dst with // crit_mbb. for (unsigned i = 0, e = mii->getNumOperands(); i != e; ++i) { MachineOperand & mo = mii->getOperand(i); if (mo.isMachineBasicBlock() && mo.getMachineBasicBlock() == & dst) { found_branch = true; mo.setMachineBasicBlock(crit_mbb); } } } // Change jumps to go to the new basic block: if(isJumpTable) { mf....
2008 Sep 30
2
[LLVMdev] Inserting MachineBasicBlock(s) before a MachineBasicBlock
I want to be able to do two things with LLVM (both just before code emission): 1. Insert a MachineBasicBlock just before a MachineBasicBlock. There is a function called AddPredecessor(). However, the comment says that it does not update the actual CFG. I want to redirect all CFG edges that are incoming to this MachineBasicBlock to the new one I create, and add just one outgoing edge (no branch)
2006 Jul 09
2
[LLVMdev] Critical edges
...tii->isTerminatorInstr(mii->getOpcode())) { break; } // Scan the operands of this machine instruction, replacing any // use of dst with crit_mbb. for (unsigned i = 0, e = mii->getNumOperands(); i != e; ++i) { if (mii->getOperand(i).isMachineBasicBlock() && mii->getOperand(i).getMachineBasicBlock() == & dst) { mii->getOperand(i).setMachineBasicBlock(crit_mbb); } } } }
2007 Aug 17
2
[LLVMdev] MBB Critical edges
...e())) { >> break; >> } >> // Scan the operands of this branch, replacing any >> // uses of dst with crit_mbb. >> for (unsigned i = 0, e = mii->getNumOperands(); i != e; ++i) { >> if (mii->getOperand(i).isMachineBasicBlock() && >> mii->getOperand(i).getMachineBasicBlock() == & dst) { >> found_branch = true; >> mii->getOperand(i).setMachineBasicBlock(crit_mbb); >> } >> } >> } >> >>...
2006 Jul 09
0
[LLVMdev] Critical edges
...r(mii->getOpcode())) { > break; > } > // Scan the operands of this machine instruction, replacing any > // use of dst with crit_mbb. > for (unsigned i = 0, e = mii->getNumOperands(); i != e; ++i) { > if (mii->getOperand(i).isMachineBasicBlock() && > mii->getOperand(i).getMachineBasicBlock() == & dst) { > mii->getOperand(i).setMachineBasicBlock(crit_mbb); > } > } > } > > } > _______________________________________________ > LLVM Developers...
2007 Aug 18
0
[LLVMdev] MBB Critical edges
...>>> } >>> // Scan the operands of this branch, replacing any >>> // uses of dst with crit_mbb. >>> for (unsigned i = 0, e = mii->getNumOperands(); i != e; + >>> +i) { >>> if (mii->getOperand(i).isMachineBasicBlock() && >>> mii->getOperand(i).getMachineBasicBlock() == & >>> dst) { >>> found_branch = true; >>> mii->getOperand(i).setMachineBasicBlock(crit_mbb); >>> } >>>...
2006 Jul 05
0
[LLVMdev] Critical edges
> If you don't want critical edges in the machine code CFG, you're going to > have to write a machine code CFG critical edge splitting pass: LLVM > doesn't currently have one. > > -Chris Hey guys, I've coded a pass to break the critical edges of the machine control flow graph. The program works fine, but I am sure it is not the right way of implementing it.
2006 Jul 04
2
[LLVMdev] Critical edges
On Tue, 4 Jul 2006, Fernando Magno Quintao Pereira wrote: > However, it does not remove all the critical edges. I am getting a very > weird dataflow graph (even without the Break Critical edges pass). The > dataflow generated by MachineFunction::dump() for the program below is > given here: > http://compilers.cs.ucla.edu/fernando/projects/soc/images/loop_no_crit2.pdf ... > The
2008 Apr 16
0
[LLVMdev] Being able to know the jitted code-size before emitting
...tant(X86InstrInfo::sizeOfImm(Desc)); > + break; > + } > + } > + CurOp = NumOps; > + break; > + case X86II::RawFrm: > + ++FinalSize; > + > + if (CurOp != NumOps) { > + const MachineOperand &MO = MI.getOperand(CurOp++); > + if (MO.isMachineBasicBlock()) { > + FinalSize += sizePCRelativeBlockAddress(); > + } else if (MO.isGlobalAddress()) { > + FinalSize += sizeGlobalAddress(false); > + } else if (MO.isExternalSymbol()) { > + FinalSize += sizeExternalSymbolAddress(false); > + } else if (MO.is...
2008 Apr 15
4
[LLVMdev] Being able to know the jitted code-size before emitting
OK, here's a new patch that adds the infrastructure and the implementation for X86, ARM and PPC of GetInstSize and GetFunctionSize. Both functions are virtual functions defined in TargetInstrInfo.h. For X86, I moved some commodity functions from X86CodeEmitter to X86InstrInfo. What do you think? Nicolas Evan Cheng wrote: > > I think both of these belong to TargetInstrInfo. And