Displaying 12 results from an estimated 12 matches for "isterminatorinstr".
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 critical edges of machine basic blocks, does LLVM
2.2 give me something to work with?
best,
Fernando
2007 Aug 10
2
[LLVMdev] MBB Critical edges
...to dst to point
/// to the new machine basic block "crit_mbb" instead:
MachineBasicBlock::iterator mii = src.end();
bool found_branch = false;
while (mii != src.begin()) {
mii--;
// if there are no more branches, finish the loop
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() &&...
2008 Jan 27
0
[LLVMdev] BreakCriticalMachineEdge.h
...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 critical edges of machine basic blocks, does
> LLVM
> 2.2 give me something to work with?
>
> best,
>
> Fernando
> _______________________________________________
> LLVM D...
2007 Aug 17
0
[LLVMdev] MBB Critical edges
.../ to the new machine basic block "crit_mbb" instead:
> MachineBasicBlock::iterator mii = src.end();
> bool found_branch = false;
> while (mii != src.begin()) {
> mii--;
> // if there are no more branches, finish the loop
> 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).isMachi...
2006 Jul 09
2
[LLVMdev] Critical edges
..._mbb, dst);
/// modify every branch in src that points to dst to point to the new
/// machine basic block instead:
MachineBasicBlock::iterator mii = src.end();
while (mii != src.begin()) {
mii--;
// if there is not more branches, finish the loop
if (!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() &am...
2007 Aug 17
2
[LLVMdev] MBB Critical edges
...ic block "crit_mbb" instead:
>> MachineBasicBlock::iterator mii = src.end();
>> bool found_branch = false;
>> while (mii != src.begin()) {
>> mii--;
>> // if there are no more branches, finish the loop
>> 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-&...
2007 Aug 19
1
[LLVMdev] MBB Critical edges
...o dst to point to the new
/// machine basic block instead:
MachineBasicBlock::iterator mii = src.end();
bool found_branch = false;
bool isJumpTable = false;
while (mii != src.begin()) {
mii--;
// if there are no more branches, finish the loop
if (!tii->isTerminatorInstr(mii->getOpcode())) {
break;
} else if (tii->isIndirectJump(mii->getOpcode())) {
isJumpTable = true;
continue;
}
// Scan the operands of this branch, replacing any uses of dst with
// crit_mbb.
for (unsigned i = 0,...
2006 Jul 09
0
[LLVMdev] Critical edges
...ify every branch in src that points to dst to point to the new
> /// machine basic block instead:
> MachineBasicBlock::iterator mii = src.end();
> while (mii != src.begin()) {
> mii--;
> // if there is not more branches, finish the loop
> if (!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).i...
2007 Aug 18
0
[LLVMdev] MBB Critical edges
...quot; instead:
>>> MachineBasicBlock::iterator mii = src.end();
>>> bool found_branch = false;
>>> while (mii != src.begin()) {
>>> mii--;
>>> // if there are no more branches, finish the loop
>>> 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; +
>>> +...
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.
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 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