Displaying 20 results from an estimated 21 matches for "surinder".
2011 Jan 24
3
[LLVMdev] LLVM grammar for ANTLR
Has anyone written a grammar for LLVM for ANTLR. I mean an ANTLR
grammar that parses LLVM instructions. Is an LLVM grammar available
for any other parsing tool?
Surinder
2011 Jan 25
1
[LLVMdev] LLVM grammar for ANTLR
...am considering to dump llvm as it is into Haskell program and then use
a parser tool to do llvm statement translation to dfl. The
translation is a set of simple rewrite tools.
You can get further details from my website
http://it.usyd.edu.au/~suri or you can ask me.
Thank you for your interest.
Surinder
On Tue, Jan 25, 2011 at 3:22 AM, Samuel Crow <samuraileumas at yahoo.com> wrote:
> Hello Surinder,
>
> The existing hand-written parser is callable from almost anywhere so the only
> reason you'd need to have a parser for it would be to extend it. Originally it
> was writ...
2011 Jan 24
0
[LLVMdev] LLVM grammar for ANTLR
Hello Surinder,
The existing hand-written parser is callable from almost anywhere so the only
reason you'd need to have a parser for it would be to extend it. Originally it
was written using Flex and Bison but Chris Lattner rewrote it from scratch to
catch more errors at the parsing stage.
The only feat...
2011 Jan 31
2
[LLVMdev] Error : llvm/include/llvm/Pass.h:188: error: incomplete type 'llvm::DominatorTree' used in nested name specifier
...ss (function pass) called Dfl from the Hello
example and notes on "Writing an LLVM Pass". When I compile the
program I get inncomplete type error (llvm/include/llvm/Pass.h:188:
error: incomplete type 'llvm::DominatorTree' used in nested name
specifier). The code is given below.
Surinder
struct Dfl : public FunctionPass {
raw_ostream *Out;
static char ID;
//
Dfl() : FunctionPass(&ID) { }
//
virtual bool runOnFunction(Function &F) {
// //BlocksCounter++; EdgesCounter++; InstCounter++;
bool modified=false;
errs() << "In Df...
2011 Jan 31
0
[LLVMdev] Error : llvm/include/llvm/Pass.h:188: error: incomplete type 'llvm::DominatorTree' used in nested name specifier
Hi Surinder,
Did you remember to #include "llvm/Analysis/Dominators.h"?
Best,
Douglas
On Sun, Jan 30, 2011 at 11:24 PM, Surinder <surifilms at gmail.com> wrote:
> I am creating a new pass (function pass) called Dfl from the Hello
> example and notes on "Writing an LLVM Pass"...
2011 Jan 22
2
[LLVMdev] Pointers in Load and Store
...getNumElements();
But this does not recognize that operand(0) of instruction I is even
an instruction, let alone a get element pointer instruction. I have
taken the code from line 632 and line 757 of
safecode/lib/ArrayBoundsChecks/ArrayBoundCheck.cpp
I must be doing something wrong, what is it?
Surinder Kumar Jain
PS: Yes, I will be using safecode but still I want to know why above
code does not work. I am posting a separate mail wioth the title "OPT
optimizations"
On Fri, Jan 21, 2011 at 3:12 PM, John Criswell <criswell at illinois.edu> wrote:
> On 1/20/2011 10:02 PM, Suri...
2011 Jan 22
0
[LLVMdev] Pointers in Load and Store
On 1/21/2011 10:46 PM, Surinder wrote:
> John,
>
> I have looked at the SAFECode and thought following sould work
>
> if (isa<Constant>(I.getOperand(0)))
> { Out<< "*** operand 0 is a constant ******";
> if (Instruction *operandI = dyn_cast<Instruction>(I...
2011 Jan 31
3
[LLVMdev] How to convert an iterator to an object pointer
I have a pointer to a basic block and am iterating thru its
predecessor blocks. I want to get a pointer to the predecessor block.
How do I do it. I am using following code and it given compile time
errors.
error: cannot convert 'llvm::const_pred_iterator' to 'const
llvm::BasicBlock*' in initialization
const BasicBlock *b = PH->getParent();
// process all pred block
2011 Jan 23
1
[LLVMdev] Pointers in Load and Store
...produces array bounds in the way I
need. (I need a check that array bounds are being voilated for my
reaserch to detect overflows.)
I will then run opt as
opt -load../unGep.so
to produce llvm code without geps as operands.
Please advise if this will work or if there is an easier way.
Thanks.
Surinder Kumar Jain
On Sat, Jan 22, 2011 at 4:08 PM, John Criswell <criswell at illinois.edu> wrote:
> On 1/21/2011 10:46 PM, Surinder wrote:
>>
>> John,
>>
>> I have looked at the SAFECode and thought following sould work
>>
>> if (isa<Constant>(I...
2011 Jan 21
2
[LLVMdev] Pointers in Load and Store
...erand(0)
However, I want to find out which of the two forms of load have been
produced because in the second case, I want to insert checks for array
bounds.
How can I find out when I am in Instruction object I and I.getOpcode()
== 29 whether I am dealing with type (1) or type (2) above.
Thanks.
Surinder Kumar Jain
2011 Jan 31
0
[LLVMdev] How to convert an iterator to an object pointer
Hi Surinder,
You'll need to dereference your iterator to get a pointer:
const BasicBlock *p = *pr;
Cheers,
Lang.
On Mon, Jan 31, 2011 at 3:04 PM, Surinder <surifilms at gmail.com> wrote:
> I have a pointer to a basic block and am iterating thru its
> predecessor blocks. I want to get a po...
2011 Jan 21
0
[LLVMdev] Pointers in Load and Store
On 1/20/2011 10:02 PM, Surinder wrote:
> When I compile C programs into llvm, it produces load instructions in
> two different flavours.
>
> (1) %8 = load i8** %bp, align 8
>
> (2) %1 = load i8* getelementptr inbounds ([4 x i8]* @.str, i64 0,
> i64 0), align 1
>
> I know that %bp in first case and...
2011 Jan 31
2
[LLVMdev] Segmentation fault on using get parent of a PHINode
...d
/u1/suri/llvm-local/build/x86-64/Debug/llvm/Debug/lib/dfl.so -dfl
/u1/suri/suri/testing/cfgs/test99foo.c.bc
1. Running pass 'Function Pass Manager' on module
'/u1/suri/suri/testing/cfgs/test99foo.c.bc'.
2. Running pass 'emit cfg in dfl format' on function '@main'
Surinder
>
2011 Jan 31
0
[LLVMdev] llvm::Pass::Pass(llvm::PassKind, intptr_t): Assertion `pid && "pid cannot be 0"' failed.
llvm/include/llvm/Pass.h:93: llvm::Pass::Pass(llvm::PassKind,
intptr_t): Assertion `pid && "pid cannot be 0"' failed.
On Mon, Jan 31, 2011 at 3:55 PM, Surinder <surifilms at gmail.com> wrote:
> I have written a new pass, it compiles ok but crashes when i run it
> with error (llvm::Pass::Pass(llvm::PassKind, intptr_t): Assertion `pid
> && "pid cannot be 0"' failed.).
>
> The pass is :
>
> using namespace llv...
2011 Jan 23
2
[LLVMdev] Undoing SSA and Phi instructions
....
The resulting code has Phi nodes and is perhaps in SSA form. I want
to undo the SSA form while retaining all the other optimizations. Is
mem2reg the right optimization to be added after -O3, i.e.,
opt -O3 -mem2reg -print-module test.bc
will print the llvm in non-SSA form with no Phi nodes.
Surinder
2011 Feb 05
0
[LLVMdev] Segmentation fault on using get parent of a PHINode
Hi Surinder, I don't see anything obviously wrong with your code. I suggest
that (1) you build LLVM with assertions enabled, (2) you run the verifier on
your bitcode, and (3) run your program under valgrind.
Ciao, Duncan.
> I am getting a segmentation fault as soon as I touch the Basic block
> *...
2011 Jan 31
2
[LLVMdev] llvm::Pass::Pass(llvm::PassKind, intptr_t): Assertion `pid && "pid cannot be 0"' failed.
I have written a new pass, it compiles ok but crashes when i run it
with error (llvm::Pass::Pass(llvm::PassKind, intptr_t): Assertion `pid
&& "pid cannot be 0"' failed.).
The pass is :
using namespace llvm;
namespace
{
struct Dfl : public FunctionPass {
static char ID;
Dfl() : FunctionPass(ID) { }
virtual bool runOnFunction(Function &F) {
bool
2011 Jan 12
1
[LLVMdev] newbi to llvm - how to get array size
...etNumElements() to
give me the array size (after casting ptrval to array type)
I am not getting the array size, I am getting a value of zero.
Can someone point out to me how to get array size (number of elements in the
array) from the type object. What about multi-dimension arrays too.
Thanks.
Surinder Kumar Jain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110112/5c38c29d/attachment.html>
2011 Jan 22
1
[LLVMdev] OPT optimizations
...i,
OPT documentation mentions optimization options -O1,-O2 and -O3 etc.
(I am using -O0, no optimizations). The documentation does not tell
you what optimizations are included in each option. It says they are
same as gcc. gcc dodoc is not of much help either. Where can I find
this information.
Surinder Kumar Jain
2011 Jan 23
0
[LLVMdev] Undoing SSA and Phi instructions
On 01/22/2011 10:30 PM, Surinder wrote:
> Hi,
>
> I am emitting llvm bit code using
>
> llvm-gcc -c -emit-llvm -O0 -o test.bc test.c
>
> and then optimizing it with
>
> opt -O3 -print-module test.bc
>
> in order to obtain a dump of generated IR.
>
>
> The resulting code has Phi nodes and i...