Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] problem with visitBranchInst()"
2012 Nov 29
2
[LLVMdev] [cfe-dev] UB in TypeLoc casting
Moving to LLVM dev to discuss the possibility of extending the cast
infrastructure to handle this.
On Tue, Nov 20, 2012 at 5:51 PM, John McCall <rjmccall at apple.com> wrote:
> On Nov 18, 2012, at 5:05 PM, David Blaikie <dblaikie at gmail.com> wrote:
>> TypeLoc casting looks bogus.
>>
>> TypeLoc derived types return true from classof when the dynamic type
>>
2004 Aug 27
1
[LLVMdev] Help getting condition of branch instructions in pass
Hi, this is a bit of a newbie question:
I am trying to discover, given a block with a conditional and its
successors, which condition (T/F) each successor applies to.
There's almost identical code in CFGPrinter.cpp, but where it gets
called in GraphWriter.h, the child_iterator type is a pretty hairy
thing, so I still don't quite understand how to get one from a
BasicBlock in my own
2011 Jan 03
1
[LLVMdev] Erasing dead blocks
Dear LLVM developers,
I have a question regarding the IPSCCP class and the handling of dead blocks:
The file lib/Transforms/Scalar/SCCP.cpp of llvm 2.8 from contains some
code to deal with a dead block which could not be folded (line
1909ff). This happens when a user of this dead block is a branch or
switch with an undef condition. The action taken than is to replace
this terminator with an
2019 Oct 23
2
Inserting instructions when encountered a specific label
Hello,
I’m trying to insert an instruction if a specific label name/string is encountered and would appreciate some guidance on where I should start. Basically when parsing going through this .ll file:
; Function Attrs: noinline nounwind optnone uwtable
define i32 @main(i32, i8**) #0 {
%3 = alloca i32, align 4
%4 = alloca i32, align 4
%5 = alloca i8**, align 8
%6 = alloca i32, align
2012 Feb 08
2
[LLVMdev] BackedgeTakenCount calculation for fortran loops and DragonEgg gfortran-4.6
Hello, I'm finding problems with BackEdgeTaken count calculation in
even simple fortran loops with gfortran-4.6 + DragonEgg 3.0.
Even for simple double loops like this one:
program test2
integer i,j,k
dimension k(100,100)
do j=1,100
do i=1,100
k(i,j) = i
enddo
enddo
write(*,*) k(1,30)
end
make the ScalarEvolution
2012 Feb 08
2
[LLVMdev] BackedgeTakenCount calculation for fortran loops and DragonEgg gfortran-4.6
Attached
2012/2/8 Marcello Maggioni <hayarms at gmail.com>:
> Mmm, sorry, the patch I posted crashes if ExitBr is null (which it may
> be ...) , this one should be ok (and passess all the ScalarEvolution
> tests in LLVM):
>
> diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp
> index daf7742..b10fab2 100644
> ---
2012 Feb 08
2
[LLVMdev] BackedgeTakenCount calculation for fortran loops and DragonEgg gfortran-4.6
Well, it wasn't intended as a "real" patch to be included , but more
as a "proof of concept" for a solution. Do you think it is a valid
solution and I'm correct in my assumption? If so then I'll clean up
the patch and attach a testcase for inclusion.
Thanks!
Marcello
2012/2/9 Nick Lewycky <nlewycky at google.com>:
> Your patch should include a testcase,
2012 Feb 09
2
[LLVMdev] BackedgeTakenCount calculation for fortran loops and DragonEgg gfortran-4.6
This is the .ll for that graph (attached). I think I understand what
you are saying.
This particular testcase returns CNC not because the exit block
doesn't have a unique predecessor, but because the unique predecessor
(the inner loop block) has a successor that is inside the loop (in
this case itself, because it's the inner loop block).
That doesn't change, anyway, the assuption that
2012 Feb 08
0
[LLVMdev] BackedgeTakenCount calculation for fortran loops and DragonEgg gfortran-4.6
Mmm, sorry, the patch I posted crashes if ExitBr is null (which it may
be ...) , this one should be ok (and passess all the ScalarEvolution
tests in LLVM):
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp
index daf7742..b10fab2 100644
--- a/lib/Analysis/ScalarEvolution.cpp
+++ b/lib/Analysis/ScalarEvolution.cpp
@@ -4293,9 +4293,15 @@
2012 Feb 08
0
[LLVMdev] BackedgeTakenCount calculation for fortran loops and DragonEgg gfortran-4.6
Your patch should include a testcase, see test/Analysis/ScalarEvolution for
examples. "BranchInst* " should be "BranchInst *". You should have spaces
after the // in your comments. One of the comment lines isn't indented
properly.
Nick
On 8 February 2012 12:05, Marcello Maggioni <hayarms at gmail.com> wrote:
> Attached
>
> 2012/2/8 Marcello Maggioni
2004 Dec 07
1
[LLVMdev] Question adding dummy basic blocks
Hi,
I got a problem when I am trying to add a dummy basic block.
Let say there are two blocks, A and B.
A----->B
I am trying to generate new BB called C which is located between A and B, but not break the edge of AB. The graph is like the following
A---->B
\ /
\ /
C
There is new BB 'C' with edges AC and CB.
It is kind of like what breakcriticaledge pass does.
2012 Feb 08
0
[LLVMdev] BackedgeTakenCount calculation for fortran loops and DragonEgg gfortran-4.6
On 8 February 2012 15:50, Marcello Maggioni <hayarms at gmail.com> wrote:
> Well, it wasn't intended as a "real" patch to be included , but more
> as a "proof of concept" for a solution. Do you think it is a valid
> solution and I'm correct in my assumption? If so then I'll clean up
> the patch and attach a testcase for inclusion.
>
I'm
2012 Feb 09
0
[LLVMdev] BackedgeTakenCount calculation for fortran loops and DragonEgg gfortran-4.6
This is instead a very simple (handmade) test case that triggers the
problem (attached)
Also a more conforming patch has been attached
2012/2/9 Marcello Maggioni <hayarms at gmail.com>:
> This is the .ll for that graph (attached). I think I understand what
> you are saying.
> This particular testcase returns CNC not because the exit block
> doesn't have a unique predecessor,
2012 Feb 09
1
[LLVMdev] BackedgeTakenCount calculation for fortran loops and DragonEgg gfortran-4.6
FInally I had the time to complete everything up. Now I included the
test case in the patch and the testcase runs with the LLVM tests
system.
2012/2/9 Marcello Maggioni <hayarms at gmail.com>:
> This is instead a very simple (handmade) test case that triggers the
> problem (attached)
> Also a more conforming patch has been attached
>
> 2012/2/9 Marcello Maggioni <hayarms
2018 Aug 30
4
crash problem when using IndirectBrInst to replace BranchInst
Hello all,
I have written a pass, which replaces condition branchinst using
indirectBr to obfuscate program.
The origin IR is as the following:
br i1 %1, label %2, label %3
And the transformed IR is as the follwoing:
%4 = select i1 %1, i8* blockaddress(@func, %2), i8* blockaddress(@func,
%3)
indirectbr i8* %4, [label %2, label %3]
The pass's core function is as the
2004 Jun 08
2
[LLVMdev] BranchInst problem
While adding support for branch instructions in my backend, I run into a
trouble. The code to handle branches looks like:
void visitBranchInst(BranchInst& BI)
{
BB->addSuccessor (MBBMap[BI.getSuccessor(0)]);
if (BI.isConditional())
BB->addSuccessor (MBBMap[BI.getSuccessor(1)]);
...........
BuildMI(BB,
2012 May 21
2
[LLVMdev] VMKit build broken
Hi,
I just thought of trying vmkit and checked out the source
from the svn repo a few minutes back. The build is failing with the
following error.
llvm[4]: Compiling CGCleanup.cpp for Release+Asserts build
CGCleanup.cpp:507:36: error: no member named 'getCaseSuccessor' in
'llvm::SwitchInst'; did you mean 'getSuccessor'?
2010 Jun 04
5
[LLVMdev] Inserting a function call into bitcode
Hi All,
I am trying to write code for simple instrumentation. What I want to do is
to insert a call to an external function for result of each conditional
branch instruction. This external function simply print true or false based
on the result of condition. The modified code is then written into new file.
However when I try to link that file with another bitcode file (containing
external
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
//
2009 Apr 14
3
[LLVMdev] InstVisitor Example
On Apr 14, 2009, at 1:49 PM, Luke Dalessandro wrote:
>
> On Apr 14, 2009, at 12:48 PM, Brice Lin wrote:
>
>> I just read the LLVM Programmer's Manual, which mentions (but
>> specifically does not include any details of) the InstVisitor
>> template. Could someone please provide an example of how to use this
>> template to find (as an example) all CallSites for