similar to: How to simply split MachineBasicBlock ?

Displaying 20 results from an estimated 200 matches similar to: "How to simply split MachineBasicBlock ?"

2020 Mar 13
2
Why MachineBasicBlcok doesn't have transferPredecessors() ?
Hi I want to ask a question. (Maybe it is a trivial question.) I found that there is transferSuccessors() in MachineBasicBlcok So that when manipulating MachineBasicBlock, we can use transferSuccessors to update the CFG easily. Why there is not transferPredecessors in MachineBasicBlcok ? Thank you -------------- next part -------------- An HTML attachment was scrubbed... URL:
2020 Mar 13
3
Why MachineBasicBlcok doesn't have transferPredecessors() ?
for example I want to insert a new machine bb “before” a specific machine bb. or split a mbb and keep the later one as the original one. (to keep the label/Blackadder's correct t) (or keep other property of mbb) so I need to transfer the original mbb's predecessor to the new mbb. Nicolai Hähnle <nhaehnle at gmail.com> 於 2020年3月13日 週五 23:57 寫道: > On Fri, Mar 13, 2020 at
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 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
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: BB1
2013 May 13
1
[LLVMdev] Problem with MachineFunctionPass and JMP
Hi ! I'm trying to modify the code in a machine function pass… I added a new basicblock and I want to add a jump to an another BB from my new BB. Here is my code : bool Obfuscation::runOnMachineFunction(MachineFunction &MF) { MachineBasicBlock *newEntry = MF.CreateMachineBasicBlock(); MF.insert(MF.begin(), newEntry); std::vector<MachineBasicBlock*> origBB;
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
0
[LLVMdev] Critical edges
The problem is that you are inserting block 9 in the wrong spot. mf.getLastBlock() returns the block with the greatest number which may have nothing to do with the ordering. Why not use the end iterator (mf.end) to insert? -Tanya On Sat, 8 Jul 2006, Fernando Magno Quintao Pereira wrote: > > Dear guys, > > I am having problem to split edges correctly. Mostly because the new
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
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)
2018 Apr 04
0
Emitting asm variable directive into MachineBasicBlock
Hello everyone, I am writing a MachineFunctionPass and need to insert int32 data values into my asm file. I achieved that by adding a GlobalVariable to the MachineFunction's Module which gets me something like: test:           .long   0                       @ 0x0           .size   test, 4 at the Module's end. I need to access the data with PC relative instructions like
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
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 end of a basic block (removals are very comomn in peephole
2005 Feb 23
1
[LLVMdev] Sparc MachineBasicBlock info
Is there a way to access the current MachineBasicBlock info from within CodeGenIntrinsic in SparcV9BurgISel.cpp? The arguments are: Intrinsic::ID iid, CallInst &callInstr, TargetMachine &target, and std::vector<MachineInstr*>& mvec, none of which seem to offer access to the current MachineBasicBlock. Brent
2009 Dec 10
2
[LLVMdev] How to check for "SPARC code generation" in MachineBasicBlock.cpp?
Hi, I'm almost finished to get a complete and seemingly working build of LLVM-GCC (trunk) for SPARC (32-bit only, for now). The only remaining problem is the code generation for one single file (namely cp-demangle.c) where some labels are not put into the assembler/object file due to some (until now) unknown inconsistencies with 'isOnlyReachableByFallthrough' and (most likely) the
2009 Dec 10
0
[LLVMdev] How to check for "SPARC code generation" in MachineBasicBlock.cpp?
On Dec 10, 2009, at 12:00 AM, Juergen Zimmermann - Sun Microsystems - Walldorf Germany wrote: > Hi, > I'm almost finished to get a complete and seemingly working build of > LLVM-GCC (trunk) for SPARC (32-bit only, for now). > > The only remaining problem is the code generation for one single > file (namely cp-demangle.c) where some labels are not put into > the
2010 Jun 24
1
[LLVMdev] Why the same MachineBasicBlock converted to binary code twice?
While debugging something, I found this strange-looking situation in JIT on 32-bit platform. For the particular BasicBlock function StartMachineBasicBlock is called twice with the same MachineBasicBlock object. This generates two memory addresses for binary code for this BasicBlock. Why such situation can happen? Which memory address would be the "real" address of this BasicBlock?
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. typedef struct findBlock {
2010 Nov 10
0
[LLVMdev] Liveness analysis on MachineBasicBlock
Hi all, I am trying to compute the liveness information for each MachineInstr in each MachineBasicBlock. I am not sure if it is correct. Here is how I compute the info. For each MachineBasicBlock MBB compute the LiveOuts of MBB by unioning all the LiveIns of its successors for each MachineInstr MI = MBB->rbegin() to MBB->rend() compute the LiveOuts of each MI by