Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] how to get MachineBasicBlock of a BasicBlock"
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.
typedef struct findBlock {
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 MachineBasicBlock is not the
> same as any BasicBlock values.
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)
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
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
2006 Jul 09
2
[LLVMdev] Critical edges
Dear guys,
I am having problem to split edges correctly. Mostly because the new
basic blocks are creating infinite loops. Could someone help me fixing the
code below? It is creating assembly like this one below. Block LBB1_9 was
inserted to break the critical edge between blocks LBB1_3 and LBB1_8. But
it changes the semantics of the original program, because, before, LBB1_8
was falling
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.
2020 Mar 13
2
How to simply split MachineBasicBlock ?
Hi
I am developing some machine function pass.
I want to split MachineBasicBlcok when I find some specific machine
instruction.
But I don't insert or delete any machine instruction.
I just "simply" , "purely" split the MachineBasicBlcok.
(So, I stole the idea from ARM64BranchRelaxation::splitBlockBeforeInstr.)
This is my code :
// I would pass call instruction to
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
2007 Aug 19
1
[LLVMdev] MBB Critical edges
Hi,
This pass is similar to the one in BreakCriticalEdges.cpp, but it works
for MachineFunction's, instead of Functions. The existence of critical
edges complicates many optimizations. When doing register allocation, you
don't necessarily have to remove critical edges (you can use conventional
SSA-form, for instance. See "Translating Out of Static Single Assignment
Form. SAS
2011 Jan 20
4
[LLVMdev] [LLVMDev] Live Intervals and Finding the next usage
I have a live interval, and I would like to find out what SlotIndex the next
use the register will occur? Is there any way to map a live interval back
into instructions or SlotIndexes or blocks used by?
- Thanks
Jeff Kunkel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110120/fd429dbd/attachment.html>
2017 Jun 28
2
About the concept of "materialization"
OK. About the error it’s a long story, so it’s probably better to pin some source code here. Below is a piece of code related to my problem, clipped from lib/Transforms/Utils/ValueMapper.cpp. I was wondering what “materialized” means here.
Value *Mapper::mapBlockAddress(const BlockAddress &BA) {
Function *F = cast<Function>(mapValue(BA.getFunction()));
// F may not have
2015 Aug 01
3
[LLVMdev] SelectionDAG viewers, filter-view-dags question
The diff is not only the && and || but also the leading !:
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 58f029fbe9fc..7ee06fc153b2 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -659,7 +659,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() {
2010 Sep 28
2
[LLVMdev] [LLVMDev] Profiling information
How do I find the profiling or run time information for machine basic
blocks from a machine function? There are quite a few optimization
that may be preformed with this information, when it exists.
Thanks,
Jeff Kunkel
2002 Nov 08
1
[LLVMdev] Basicblock and MachineBasicBlock
Dear LLVM,
I was wondering what's the difference between BasicBlock and
MachineBasicBlock in LLVM. If I want to solve a data flow equation
problem, which one should I use?
Thanks,
Jerry
2010 Oct 09
3
[LLVMdev] [LLVMDev] Does LLVM have a random number generator?
Hello, does LLVM already have a Random Number Generator built into
it's library somewhere?
I know code generation is suppose to be deterministic, but when
producing a random number can be deterministic if the random number
generator is also deterministic.
- Thanks
- Jeff Kunkel
2010 Oct 05
3
[LLVMdev] [LLVMDev] Phi elimination: Who does what
Aye, between all current register allocators the
'AU.addRequiredID(PHIEliminationID);' will cause phi's to be
eliminated to copies, but this misses the point of my question.
What I am asking, is how does stack know that the value of the
variable which the resulting value of the phi is currently allocated
at. For instance take the instruction:
Machine Basic Block (mbb) 12
reg16666 =
2010 Sep 03
4
[LLVMdev] [LLVMDev] [Question] How do I get the number of machine registers.
How do I get the total number of machine registers? I have currently
a MachineFunction and some derivatives.
How are the machine registers ordered internally? Can I index them off of a
zero based array or do I have to create a map to have them be zero based?
Thanks,
Jeff Kunkel
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2010 Sep 02
5
[LLVMdev] [LLVMDev] [Modeling] About the structure of my allocator
I need to model my registers for my allocator. I need to identify the
super-register and the sub-register conflicts. Something like:
For each set of registers R in the set of aligned registers defined by the
input request virtual register alpha. Now each register block r in R can
have zero, one, or more registers defined in the block started at the
aligned size and ending at the aligned size plus
2009 Sep 09
2
[LLVMdev] [PATCH] & Question: Preserving ProfileInfo for backend.
Thanks for such a rapid response!
> Don't know about Passes in the backend, but this could be a problem of
> an FunctionPassManager trying to use a ModulePass.
I manually applied the patch you provided for llc (I'm using the 2.5
release of LLVM not ToT) and it fixed my compilation error. When your
patch replaced the FunctionPassManager used by llc with a PassManager
the error went