Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] About trapvalues"
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.
But the CFG itself may no longer be valid if a
2008 Nov 20
1
[LLVMdev] Problem in CodeExtractor::severSplitPHINodes()
Hi Devang,
Thanks for your reply.
But if you look at the comment of BasicBlock::splitBasicBlock(), it says
that "...an unconditional branch is added to the new BB, and the rest of the
instructions in the BB are moved to the newBB, including the old
terminator."
So, the terminator of the newBB is exactly the same as the terminator of the
oldBB. IF the oldBB has multiple successors,
2013 Aug 12
2
[LLVMdev] TerminatorInst and changing successor
Hi,
Is changing the successors for each basic blocks means by default that the
Terminator Instruction will be changed or this is another problem should be
solved?
If case 2 please tell me how to change it according to the new successors?
Thanks
--
* Rasha Salah Omar
Msc Student at E-JUST
Demonestrator at Faculty of Computers and Informatics
Benha University*
* e-mail:
2017 Nov 10
2
Update control flow graph when splitting a machine basic block?
Hi, there!
There are situations where a machine basic block has to be split into two machine basic blocks, e.g., to place a constant pool entry or to fix a conditional branch so that its target is within its range (https://reviews.llvm.org/D38918).
However, it doesn't appear to be straightforward how the control flow graph should be updated when a machine basic block is split,
2013 Aug 12
0
[LLVMdev] TerminatorInst and changing successor
Hi Rasha,
> Is changing the successors for each basic blocks means by default that the
> Terminator Instruction will be changed or this is another problem should be
> solved?
I think the only way you *can* change a basic block's successors is by
changing its terminator instruction, so "by default" is the closest
answer. Though you should make sure your basic block only has
2017 Nov 11
2
Update control flow graph when splitting a machine basic block?
> The right way to update the CFG very much depends on how you're
> transforming it.
I would like to export the CFG for control flow checking.
Theoretically, it should be possible for a compiler to know every target of every control flow instruction, except for computed targets that are not known at compile-time.
When a machine basic block is split between two branches, as shown below:
2012 Jun 08
0
[LLVMdev] Strong vs. default phi elimination and single-reg classes
On Jun 7, 2012, at 7:31 PM, Hal Finkel wrote:
> 112B BB#1: derived from LLVM BB %for.body, ADDRESS TAKEN
> Predecessors according to CFG: BB#0 BB#1
> %vreg12<def> = PHI %vreg13, <BB#1>, %vreg11, <BB#0>;CTRRC8:%vreg12,%vreg13,%vreg11
> %vreg13<def> = COPY %vreg12<kill>; CTRRC8:%vreg13,%vreg12
> %vreg13<def> = BDNZ8 %vreg13,
2010 Sep 02
4
[LLVMdev] [LLVMDev] [Question] about TerminatorInst
Under what circumstances will a TerminatorInst will have multiple
successors?
The three methods:
virtual BasicBlock *getSuccessorV(unsigned idx) const = 0;
virtual unsigned getNumSuccessorsV() const = 0;
virtual void setSuccessorV(unsigned idx, BasicBlock *B) = 0;
are defined for the TerminatorInst class, but I cannot see why a terminator
is allowed to go to different targets.
Thanks,
2018 Nov 03
2
[RFC] Implementing asm-goto support in Clang/LLVM
I've been out of the loop for awhile. Is there an email thread about the
"removing terminators as a thing" concept?
On Wed, Oct 31, 2018, 10:13 PM Chris Lattner via llvm-dev <
llvm-dev at lists.llvm.org wrote:
> FWIW, I’m generally supporting of this direction, and would love to see
> asm goto support.
>
> Could you compare and contrast asmbr to a couple other
2018 May 17
0
RFC: Removing TerminatorInst, simplifying calls
+1, sounds like a great idea
And if you're volunteering to do the work, even better! :)
Philip
p.s. Any reason we can't preserve a TerminatorInst type with an isa
function which just returns true for all our terminators but without
having terminators actually inherit from it? If so, we preserve the bit
of a "type safety" for a variable which is expected to always point to
2013 Jul 31
1
[LLVMdev] Problem to remove successors
Hi All,
I need to remove successors from every basic block to insert new ones
I tried this code, but it doesn't work
void RemoveSuccessor(TerminatorInst *TI, unsigned SuccNum) {
assert(SuccNum < TI->getNumSuccessors() &&
"Trying to remove a nonexistant successor!");
// If our old successor block contains any PHI nodes, remove the entry
in the
//
2018 Nov 04
2
[RFC] Implementing asm-goto support in Clang/LLVM
(and FWIW, I'm currently trying to finish the patch that makes this a
reality... mostly hard because it has to unwind a loooot of complexity
we've built up due to not having this)
On Sat, Nov 3, 2018 at 5:47 PM Jeremy Lakeman via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> http://lists.llvm.org/pipermail/llvm-dev/2018-May/123407.html
>
> TLDR; CallInst & InvokeInst
2018 May 24
2
LLVM Pass To Remove Dead Code In A Basic Block
Hi Dean,
Thanks for your reply.
That's exactly what I am doing, but I was looking for a default
optimization or pass implementation if there was.
I used BasicBlock::splitBasicBlock() but it puts "br" end of original basic
block. I tried to delete the br instruction by using eraseFromParent() but
it didn't work.
I had to rewrite my own splitBasicBlock() by modifying the
2012 Feb 10
1
[LLVMdev] Question about /llvm/trunk/lib/CodeGen/MachineScheduler.cpp
...this is moving from llvm-commits to llvm-dev.
On Feb 10, 2012, at 12:14 PM, Sergei Larin <slarin at codeaurora.org> wrote:
> 1) Can a BB presented to the MI scheduler be _not_ terminated (end on a non
> terminator MI) under any circumstances? Below you are speaking about "Empty
> blocks, or blocks with only a single instruction that not a terminator..." -
> What
2018 May 19
0
RFC: Removing TerminatorInst, simplifying calls
> On May 17, 2018, at 2:03 AM, Chandler Carruth via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> Going to keep this RFC short and to the point:
>
> TerminatorInst doesn't pull its weight in the type system. There is essentially a single relevant API -- iterating successors. There is no other interesting aspect shared -- the interface itself just dispatches to
2018 May 19
1
RFC: Removing TerminatorInst, simplifying calls
On Fri, May 18, 2018 at 10:26 PM Chris Lattner via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
>
>
> > On May 17, 2018, at 2:03 AM, Chandler Carruth via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
> >
> > Going to keep this RFC short and to the point:
> >
> > TerminatorInst doesn't pull its weight in the type system. There is
>
2018 May 17
15
RFC: Removing TerminatorInst, simplifying calls
Going to keep this RFC short and to the point:
TerminatorInst doesn't pull its weight in the type system. There is
essentially a single relevant API -- iterating successors. There is no
other interesting aspect shared -- the interface itself just dispatches to
specific instructions to be implemented.
On the flip side, CallInst and InvokeInst have *massive* amounts of code
shared and struggle
2009 Nov 16
1
[LLVMdev] CFG using LLVM
I used successors to find the basic blocks that can be visited and those
that cannot be reached.
My pass just prints out those blocks which can be reached. The problem is
that I want to include
this in my compiler code rather than as a separate .cpp file which will
perform the pass when I use 'opt'.
I have seen that there is something called a PassManager class. Will this
help me any way ?
2012 Jun 08
2
[LLVMdev] Strong vs. default phi elimination and single-reg classes
Hello again,
I am trying to implement an optimization pass for PowerPC such that
simple loops use the special "counter register" (CTR) to track the
induction variable. This is helpful because, in addition to reducing
register pressure, there is a combined decrement-compare-and-branch
instruction BZND (there are also other related instructions).
I started this process by converting the
2008 Oct 15
0
[LLVMdev] Forcing basic blocks to end with no more than one branch instruction?
On Oct 15, 2008, at 11:38 AMPDT, Daniel M Gessel wrote:
> I'm analyzing the basic blocks of MachineInstructions that LLVM
> generates for my TargetMachine to try to reconstruct high-level flow
> control.
>
> I misunderstood the isTerminator property of an instruction to mean
> that it had to be at the end of a basic block, but now I've seen
> blocks that end with a