Displaying 20 results from an estimated 629 matches for "machinebasicblock".
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) to the new...
2007 Jun 22
4
[LLVMdev] df_ext_iterator in LiveIntervalAnalysis
...e if there
is any problem in doing this? In my version of LLVM, I just
had to make two changes in LiveIntervalAnalysis:
//===---------------------------------------
First: when numbering the instructions:
// <-- new code
//===---------------------------------------
unsigned miIndex = 0;
MachineBasicBlock *entry = mf_->begin();
std::set<MachineBasicBlock*> visited;
for (df_ext_iterator<MachineBasicBlock*> dfi = df_ext_begin(entry,
visited),
endi = df_ext_end(entry, visited); dfi != endi;
++dfi) {
MachineBasicBlock *mbb = *dfi;
for (MachineB...
2010 Oct 15
1
[LLVMdev] how to get MachineBasicBlock of a BasicBlock
Also note: there may be multiple MachineBasicBlock's for a single
BasicBlock.
- David M
On Fri, Oct 15, 2010 at 4:59 AM, Jeff Kunkel <jdkunk3 at gmail.com> wrote:
> I don't think you can.
>
> The BasicBlock is a member of MachineBasicBlock. It is not inherited,
> so it cannot be cast. The number of the MachineBasicBloc...
2010 Oct 15
2
[LLVMdev] how to get MachineBasicBlock of a BasicBlock
Hello, we can get BasicBlock from MachineBasicBlock through MachineBasicBlock::getBasicBlock() function, but how can I get MachineBasicBlock of a BasicBlock?
Thank you!
2010 Oct 15
0
[LLVMdev] how to get MachineBasicBlock of a BasicBlock
I don't think you can.
The BasicBlock is a member of MachineBasicBlock. It is not inherited,
so it cannot be cast. The number of the MachineBasicBlock is not the
same as any BasicBlock values. So
MachineFunction::getMachineBasicBlock( BasicBlock::{get the number} )
cannot work. I do not see much in the basic block which can identify
it.
So you can search for it.
typ...
2006 Jul 05
0
[LLVMdev] Critical edges
...f the old source block. How do I do this?
error almost for sure: I cannot create a new BasicBlock and
add it to the function, because it is a MachineFunctionPass. But it
seems to work in the way that I am doing: I get the basic block of
the origin of the critical edge, and use it to create the new
MachineBasicBlock. I know this seems wrong, but how to get around this?
But, before running my pass, I am using LLVM function pass to break
critical edges; thus, I only have to deal with critical edges inserted
during the instruction selection phase, and both, origin and destiny of
these critical edges contain the s...
2007 Jun 22
0
[LLVMdev] df_ext_iterator in LiveIntervalAnalysis
...;s better :)
good numbers + code = patch committed to cvs :)
Thanks, nice idea btw!
-Chris
> //===---------------------------------------
> First: when numbering the instructions:
> // <-- new code
> //===---------------------------------------
> unsigned miIndex = 0;
> MachineBasicBlock *entry = mf_->begin();
> std::set<MachineBasicBlock*> visited;
> for (df_ext_iterator<MachineBasicBlock*> dfi = df_ext_begin(entry,
> visited),
> endi = df_ext_end(entry, visited); dfi != endi;
> ++dfi) {
> MachineBasicBlock *mbb = *d...
2007 Jun 22
0
[LLVMdev] df_ext_iterator in LiveIntervalAnalysis
...is? In my version of LLVM, I just
> had to make two changes in LiveIntervalAnalysis:
>
> //===---------------------------------------
> First: when numbering the instructions:
> // <-- new code
> //===---------------------------------------
> unsigned miIndex = 0;
> MachineBasicBlock *entry = mf_->begin();
> std::set<MachineBasicBlock*> visited;
> for (df_ext_iterator<MachineBasicBlock*> dfi = df_ext_begin(entry,
> visited),
> endi = df_ext_end(entry, visited); dfi != endi;
> ++dfi) {
> MachineBasicBlock *mbb...
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
2010 Sep 02
2
[LLVMdev] [LLVMDev] [Modeling] About the structure of my allocator
On Sep 2, 2010, at 2:44 PMPDT, Jeff Kunkel wrote:
> I need to track which MachineBasicBlocks branch into other
> MachineBasicBlocks. How do I do it?
Look at the Predecessor/Successor lists, which are target-independent
> I see a MachineOperand can hold a MachineBasicBlock*. Does this mean
> the instruction may branch to the MachineBasicBlock, or can it be
> something l...
2012 Oct 30
2
[LLVMdev] [PATCH][Review request] MachineBasicBlock::iterator bug fix
The attached patch fixes bugs related to MachineBasicBlock::iterator. I
don't have any test cases that reproduce on an X86 machine the problems
that this patch fixes (these bugs were found when make check was run on a
mips board).
Please review.
The first part just ensures that iterator I is not instr_end() before it
invokes isInsideBundle().
The sec...
2010 Oct 20
1
[LLVMdev] MachineBasicBlock insertion and use/def list update
Hi all,
I am still stumped on the same bug. Did anyone try to insert
MachineBasicBlock into a MachineFunction?
Any advice will be appreciated. Thanks a lot in advance.
~Bin
----------------------------------------------------------------------------------------------------------------------------
Thanks a lot Jeff. I changed the setNumber function call to
MBB->setNumber(mf->a...
2011 Nov 30
2
[LLVMdev] Problem using a label to a MachineBasicBlock
Hi all,
I think that I came somewhat closer to a solution for splitting a
MachineBasicBlock for a PSEUDO_CALL_R instruction and having a label to the new MBB:
For following piece of code:
---
typedef int callme_t(int a, int b);
callme_t* c01;
int foo(int a, int b)
{
return c01(a,b); // MachineBasicBlock will be split at call instruction
}
---
I have initially following correspondence...
2009 Dec 04
4
[LLVMdev] hi, Hi, (Preccessors' Number) < MachineBasicBlock's Number < (Successors's Number), Is it really?
Hi, EveryOne:
I am travelling CFG with MachineFunction. So I want to sure it.
(Preccessors' Number) < MachineBasicBlock's Number < (Successors's Number), Is it really?
best regards.
___________________________________________________________
好玩贺卡等你发,邮箱贺卡全新上线!
http://card.mail.cn.yahoo.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm....
2010 Oct 20
1
[LLVMdev] MachineBasicBlock insertion
Hi all,
I am really stumped on a problem for long. I could not figure out why.
That is why i am here. OK, here is the problem:
I tried to insert a MachineBasicBlock into a function. Here is the code
snippet:
// insert a machine basic block with the error_label into MF and before I
// Pred is the predecessor of the block to be inserted
// the new basic block is inserted right before I
void X86CFIOptPass::insertBasicBlockBefore(MachineFunction &MF,...
2013 Feb 18
1
[LLVMdev] splitting a branch within a pseudo
Some stuff did not get pasted in properly.
static MachineBasicBlock* ExpandCondMov(MachineInstr *MI,
MachineBasicBlock *BB,
DebugLoc dl,
const MipsSubtarget *Subtarget,
const TargetInstrInfo *TII,
bool...
2017 Nov 11
2
Update control flow graph when splitting a machine basic block?
Thank you for your reply!
> Every MachineBasicBlock has a list of successors; you can access it with
> the successors() accessor. That's what you should be using for any CFG
> analysis.
I am aware of these methods of class MachineBasicBlock, which allows one to access a MachineBasicBlock's successors and predecessors in the CFG.
Bu...
2012 Mar 22
1
[LLVMdev] Problem using a label to a MachineBasicBlock
Can you please post the code to split a MachineBasicBlock?
I am trying to split a MachineBasicBlock at a specific instruction in the
MBB, let us say, into MBB1 and MBB2. This instruction should go into MBB2.
Also MBB1 should have an unconditional branch to MBB2 as the terminator.
(quite similar to splitBasicBlock in BasicBlock.cpp)
Meanwhile, I am tryin...
2013 Dec 11
0
[LLVMdev] Question about assertion code in 'BuildMI' function with MachineBasicBlock
Hi all,
While I using BuildMI with MachineBasicBlock as parameter, I made a
mistake. The mistake was that the MachineBasicBlock of instruction,
which is for insertion, is different with given MachineBasicBlock as
parameter. I have thought if there is assertion code to check whether
MachineBasicBlocks are same between instruction's MachineBasi...
2004 Feb 13
0
[LLVMdev] ilistification of MachineBasicBlock
Hi all,
Two days ago MachineBasicBlock got ilistified. What does this mean and
how does it affect you? Read on.
MachineBasicBlock used to have a std::vector<MachineInstr*> to represent
the instructions it constisted of. This representation has the following
problems:
1) O(n) insertions/removals to/from anywhere but the en...