Displaying 20 results from an estimated 600 matches similar to: "[LLVMdev] algorithm for GVN"
2015 Mar 09
2
[LLVMdev] GVN PRE algorithms in LLVM
Hello everyone
I am Rakshit Singla, a third year undergrad at IIT Hyderabad, India. I
finished a basic compilers course last semester and am currently doing a
compiler optimizations course. I have been exploring LLVM for the past few
months (wrote a front-end for the Classroom Object Oriented Language and
have been studying pieces of code.) I would like to work with LLVM and
contribute to the
2015 Mar 10
2
[LLVMdev] GVN PRE algorithms in LLVM
The GVN algorithm used in LLVM currently (I'm rewriting it) is the basic
hash based RPO algorithm.
The new one i'm writing is based on http://dl.acm.org/citation.cfm?id=512536
(see https://github.com/dberlin/llvm-gvn-rewrite)
LLVM has different algorithms for both scalar PRE and load PRE.
They are basically variants of standard PRE algorithms transformed into
SSA, but with some
2013 Nov 03
2
[LLVMdev] Appropriate DS for implementing worklist
Thank you David for prompt reply.
I tried with SmallVector. I inserted elements with push_back().
But when I retrieve elements using pop_back_val the elements are returned
in reverse order of insertion (I mean like LIFO order).
I need this to be FIFO order. How to achieve that?
Regards,
Rekha
On Sun, Nov 3, 2013 at 8:31 PM, David Blaikie <dblaikie at gmail.com> wrote:
> If you
2013 Nov 03
3
[LLVMdev] Appropriate DS for implementing worklist
Hi,
I am writing an analysis which requires creating worklist of basic blocks.
The worklist should be in FIFO order. I checked SmallVector (and similar
others) and found out this is working in LIFO order when I use the
functions push_back and pop_back_val to insert and delete elements in the
worklist.
Can someone suggest an appropriate DS to implement my worklist. Note: I am
not concerned about
2014 Jun 26
2
[LLVMdev] To test an LLVM pass
Hi,
I wrote a pass in LLVM and would like to test it on the programs in LLVM
test-suite. To be specific, I would like to get the stats upon running my
pass on these programs.
What are the commands to run my pass on the test suite?
--
Rekha
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2014 Jul 23
3
[LLVMdev] On semantics of add instruction - nsw,nuw flags
On Wed, Jul 23, 2014 at 4:06 PM, Rekha R <rekharamapai at nitc.ac.in> wrote:
> Ok. Got it.
>
> If *add nsw* overflows, this results in undefined value.
> But then *add* on same arguments results in well-defined value.
>
> Hence treating first one as redundant based on the second is acceptable.
> But vice versa is not.
>
If they are in different code paths, sure.
2014 Jul 23
2
[LLVMdev] On semantics of add instruction - nsw,nuw flags
IMHO;
On undefined behaviour we can do whatever we want. If the "add nsw"
overflows this would lead to undefined behaviour.
Therefore we can assume that "add", with the same arguments will not
overflow.
On Wed, Jul 23, 2014 at 3:32 PM, Tim Northover <t.p.northover at gmail.com>
wrote:
> On 23 July 2014 06:25, Rekha R <rekharamapai at nitc.ac.in> wrote:
>
2013 Nov 03
0
[LLVMdev] Appropriate DS for implementing worklist
On Sun, Nov 3, 2013 at 7:38 AM, Rekha R <rekharamapai at nitc.ac.in> wrote:
> Thank you David for prompt reply.
>
> I tried with SmallVector. I inserted elements with push_back().
> But when I retrieve elements using pop_back_val the elements are returned
> in reverse order of insertion (I mean like LIFO order).
> I need this to be FIFO order. How to achieve that?
>
2013 Oct 03
3
[LLVMdev] A way to write new pass by keeping source and build directories separate
Hi,
I was trying to write a sample optimization pass in LLVM, by following
instructions in LLVM doc for Writing a New Pass. But then ran into
*make*issues. The issue is with having separate
*source *and *build* directories. The LLVM doc for 'Getting Started'
suggests keeping the two separate, but the 'Writing a new pass' doc assumes
they are merged. Hence the *make *issue.
I did
2014 Oct 27
2
[LLVMdev] on type annotations of LLVM IR
Hi,
Thank you David.
My question was from a machine independent code analyzer/optimizer
perspective where types are of less importance. Hence I felt difficult to
understand the IR with the types.
Rekha
On Mon, Oct 27, 2014 at 6:44 PM, David Chisnall <David.Chisnall at cl.cam.ac.uk
> wrote:
> On 27 Oct 2014, at 12:46, Rekha R <rekharamapai at nitc.ac.in> wrote:
>
> > Why
2014 Oct 27
2
[LLVMdev] on type annotations of LLVM IR
Hi,
I am curious to know the design decision on why operands of LLVM IR
instructions are type annotated.
Why wasn't the C style of explicit declaration of variables (or values in
LLVM context) followed by their uses model not adopted here?
or may be even annotate the value (result of the Instruction) with type
rather than annotating each operands on the Instruction?
Just felt that by
2014 Jul 23
2
[LLVMdev] On semantics of add instruction - nsw,nuw flags
Hi,
I am trying to understand the semantics of Instructions in llvm.
Are the following instructions semantically same?
* %add2 = add nsw i32 %add, %add1 %add3 = add i32 %add, %add1*
Based on my understanding from the Language Reference Manual, I think they
are different.
But then why is the *gvn* pass detecting *%add3* as redundant and deleting
it?
Your views are appreciated.
Rekha
2013 Oct 08
2
[LLVMdev] C constructs to generate some of LLVM IR instructions?
Hi,
I was studying the LLVM IR instruction set by analyzing how constructs in
C language is getting converted to IR form.
I found difficulty in finding C constructs which could generate Invoke,
Resume, Unreachable, ExtractValue, InsertValue instructions. Can someone
help me find some simple C code that generates these instructions in LLVM
IR?
--
Regards,
Rekha
-------------- next part
2013 Nov 03
0
[LLVMdev] Appropriate DS for implementing worklist
If you don't care about efficiency you can push (or at least insert) at the
front of a(small or otherwise) vector.
On Nov 3, 2013 3:32 AM, "Rekha R" <rekharamapai at nitc.ac.in> wrote:
> Hi,
>
> I am writing an analysis which requires creating worklist of basic blocks.
> The worklist should be in FIFO order. I checked SmallVector (and similar
> others) and found
2013 Nov 04
2
[LLVMdev] compile error when using overloaded = operator of DenseMap
Hi,
I am trying to implement Available Expressions data flow analysis. I
created the following class (I am giving here code snippet.):
namespace {
typedef DenseMap<Expression, uint32_t> DMTy; //Expression is a class I
defined.
struct DataFlowValue {
DMTy ExprMap;
llvm::BitVector* DFV;
// Functions operating on the data //
bool operator==(const DataFlowValue V) const;
2013 Oct 04
0
[LLVMdev] A way to write new pass by keeping source and build directories separate
On Oct 3, 2013 11:47 PM, "Rekha R" <rekharamapai at nitc.ac.in> wrote:
>
> Hi,
>
> I was trying to write a sample optimization pass in LLVM, by following
instructions in LLVM doc for Writing a New Pass. But then ran into make
issues. The issue is with having separate source and build directories. The
LLVM doc for 'Getting Started' suggests keeping the two
2013 Nov 04
0
[LLVMdev] compile error when using overloaded = operator of DenseMap
On Mon, Nov 4, 2013 at 10:35 AM, Rekha R <rekharamapai at nitc.ac.in> wrote:
> Hi,
>
> I am trying to implement Available Expressions data flow analysis. I created
> the following class (I am giving here code snippet.):
>
> namespace {
> typedef DenseMap<Expression, uint32_t> DMTy; //Expression is a class I
> defined.
> struct DataFlowValue {
>
2013 Sep 21
1
[LLVMdev] request for help on getting started
Hi,
I intend to write an optimization using LLVM. But before doing that I felt
like understanding the tools. I wrote a hello world program to be compiled
and executed. But then one of the tutorials suggested using Clang, an other
said dragonegg, a third suggested using llvm-gcc. I am confused as to which
one to use. Can some one help me in
1. What are the differences between these three?
2. Which
2016 May 04
2
GVN pass: does global value numbering remove duplicate computations in loops?
----- Original Message -----
> From: "Daniel Berlin via llvm-dev" <llvm-dev at lists.llvm.org>
> To: "Amos Robinson" <amos.robinson at gmail.com>
> Cc: "llvm-dev" <llvm-dev at lists.llvm.org>
> Sent: Tuesday, May 3, 2016 7:39:54 PM
> Subject: Re: [llvm-dev] GVN pass: does global value numbering remove
> duplicate computations in
2016 May 04
2
GVN pass: does global value numbering remove duplicate computations in loops?
> The GVN on the newgvn branch i have will remove these, and is more
complicated
> The one i have implemented unifies AWZ and hash based and will also do
predication/value inference.
This is exciting news. It sounds like it will find a lot of the interesting
cases.
> Note that we don't do full-on polynomial time equivalence finding. While
it would be fun to play with such