Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] lower-lever IR (A-normal form)"
2013 Jul 11
0
[LLVMdev] lower-lever IR (A-normal form)
I would like to create some tables for my instructions in the IR. For example a table that has all the store instructions.
I want all the arguments to a function or instruction or constant etc to be trivial.
So to fix my previous example instead of having :
call void @llvm.memcpy.i32(i8* %19, i8* getelementptr inbounds ([2 x [2
x [3 x i8]]]* @main.s, i32 0, i32 0, i32 0, i32 0), i32 12, i32
2013 Jul 10
1
[LLVMdev] lower-lever IR (A-normal form)
Hi,
i would like to ask you, if i can get a lower-level representation than the llvm IR.For example, having the following instruction in the llvm IR, call void @llvm.memcpy.i32(i8* %19, i8* getelementptr inbounds ([2 x [2 x [3 x i8]]]* @main.s, i32 0, i32 0, i32 0, i32 0), i32 12, i32 1)
i would like to get something like this (in A-normal form (without nested instructions):%temp = i8*
2013 Jul 01
1
[LLVMdev] Problem with building llvm and running project
Hello,
i am new to LLVM and i want to create my own project with a cpp
file which calls
llvm functions and then run it. I download clang
source, llvm source and compiler-rt source.
I tried to configure and build llvm using this http://llvm.org/docs/GettingStarted.html#getting-started-with-llvm but it failed because .h files included on top of the Hello.cpp couldn't found. Can you tell me
2013 Aug 29
2
[LLVMdev] unique id for a llvm Instruction
what if another pointer points to the same instruction?
Is this possible to happen?
Eirini
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130829/ad6ba4bb/attachment.html>
2013 Sep 24
2
[LLVMdev] get the address in memory where an instruction lives
Hi,
i want to get the address in memory of an instruction pointer and use it as
a key in my tables.
i iterate over the instructions in LLVM IR like this:
for (Module::iterator fi = Mod->begin(), fi_end = Mod->end(); fi != fi_end;
++fi) {
for (inst_iterator I = inst_begin(fi), E = inst_end(fi); I != E; ++I) {
Instruction *ii = dyn_cast<Instruction>(&*I);
2004 Dec 01
1
[OT] [slightly] app lever vs driver level implementation...
I recently posted a message about an interesting dilemma which I could
not figure out. After doing a whole lot more digging I think I have
figured out part of what is going on.
The parking app is implemented as an app, ie can be called from
extensions.conf) but if you look really closely, it is also implemented
in each channels driver (handler, whatever you want to call it) and
those
2011 Aug 27
4
[LLVMdev] How to break/iterate over nested instructions.
Hi Duncan,
Why to break?
I wish to analyse all the operands of getelemetptr instructions. For which I
iterate over the code and get the instruction of interest by
getopcode == getelementptr. But the getelementptrs in this form as in my
last mail are getting away from my pass. So i wish to break it. I have a
work around if breaking is not possible, but I think it may be a common
requirement by
2011 Aug 28
0
[LLVMdev] How to break/iterate over nested instructions.
Dear Manish,
First, in answer to your original question: yes, there is a pass that
will convert constant expression GEPs used within LLVM instructions into
GEP instructions. SAFECode has a pass called BreakConstantGEPs in
safecode/trunk/lib/ArrayBoundChecks/BreakConstantGEPs.cpp
(http://llvm.org/viewvc/llvm-project/safecode/trunk/lib/ArrayBoundChecks/BreakConstantGEPs.cpp?view=log).
It
2013 Sep 24
1
[LLVMdev] get the address in memory where an instruction lives
On 24.09.2013, at 17:38, Eirini Psallida <eirini.psallida at gmail.com
<http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev>> wrote:
>* Hi, *>* i want to get the address in memory of an instruction pointer and use it as a key in my tables.*>* i iterate over the instructions in LLVM IR like this:*>* for (Module::iterator fi = Mod->begin(), fi_end = Mod->end(); fi !=
2013 Sep 28
1
[LLVMdev] Promote constant expressions to registers
Hello,
Is there a way to generate LLVM IR without constant expressions by
promoting constant expressions to registers?
e.g.:
%tmp1 = tail call i8* @foo(i8* bitcast (i32* @x to i8*), i8* %tmp, i64 4) #1
would be converted to:
%tmp1 = bitcast i32* @x to i8*
%tmp2 = tail call i8* @foo(i8* %tmp1, i8* %tmp, i64 4) #1
I find quite inconvenient and redundant to maintain constant
expressions when
2011 Aug 19
1
[LLVMdev] Break operands into multiple instructions
Hi All,
I am creating an instrumentation pass using LLVM libraries. I am using clang++ (version 2.9) to compile cpp code into LLVM bit code. When I generate the llvm bit code using clang++ using -O3, I get many instances of instructions that look like the following.
br i1 icmp ne (i8* bitcast (i32 (i32)* @pthread_cancel to i8*), i8* null), label %bb23, label %bb25
Here three LLVM instructions
2016 Apr 27
3
ArrayBoundChecks in SafeCode-llvm37
Hi,
I am wondering if anyone could run ArrayBoundChecks located in
SafeCode-llvm37 (https://github.com/jtcriswell/safecode-llvm37) on
llvm-3.8?
Thanks.
Syed
--
Rafi
2012 Sep 24
2
[LLVMdev] [cfe-dev] SPIR provisional specification is now available in the Khronos website
>
> For the record, I just workarounded it in pocl by borrowing the
> BreakConstantGEPs code from SAFECode. But for SPIR specs, IMHO, this should
> be reconsidered.
Yes, I agree.
On 24 September 2012 15:08, Pekka Jääskeläinen <pekka.jaaskelainen at tut.fi>wrote:
> Well,
>
> To be honest I'm not very comfortable with the whole constant GEP
> idea. It's a
2013 Aug 29
0
[LLVMdev] unique id for a llvm Instruction
>
>
> what if another pointer points to the same instruction?
>
You can have many pointers to the same instruction. However, the address in
memory where that instruction lives is unique. Instruction pointers (or
Value pointers) are thus commonly used as keys in hash tables or similar.
Instructions or Values are almost never copied, so that you won't find the
same instruction at
2013 Oct 17
1
[LLVMdev] get the value of a Constant in LLVM IR
Hello,
i parse the llvm IR (llvm-3.3 version) and when i meet a constant, i want
to get it's value.
eg i32 5, i want to get the 5.
I am interested in ConstantInt-ConstantFP-ConstantArray-ConstantStruct
subclasses.
Things are a bit easier with ConstantInt and ConstantFP constants but how
could i get the value of a ConstantArray?
The
2010 Oct 20
2
form_tag not working correctly?
So I''m trying to make
<form action=''/path'' method=''get'' class=''ajax_box''>
using:
<% form_tag :action => "search_for", {:method => :get, :class =>
''ajax_box''} do %>
but I get:
<form action=''/path?method=get&class=''ajax_box''
2012 Sep 26
0
[LLVMdev] [cfe-dev] SPIR provisional specification is now available in the Khronos website
Micah, Boaz,
Do you guys have any ideas about how to fix this issue?
Cheers,
James
On 24 September 2012 16:04, James Molloy <james at jamesmolloy.co.uk> wrote:
> For the record, I just workarounded it in pocl by borrowing the
>> BreakConstantGEPs code from SAFECode. But for SPIR specs, IMHO, this
>> should
>> be reconsidered.
>
>
> Yes, I agree.
>
>
2012 Sep 24
0
[LLVMdev] [cfe-dev] SPIR provisional specification is now available in the Khronos website
Well,
To be honest I'm not very comfortable with the whole constant GEP
idea. It's a new thing to me and I do not fully understand its
point in LLVM IR, so I probably wasn't very clear ;)
Anyways, me bringing it up was meant as an example of what can happen
if one (mis)uses the C function static variable semantics for something that
really is a thread local variable (in usual thread
2012 Sep 24
2
[LLVMdev] [cfe-dev] SPIR provisional specification is now available in the Khronos website
Hi,
Sorry, With a prod from Silviu (cc'd) I now understand - I was interpreting
your use of "constant GEP" as "GEP with constant operand" as opposed to
"ConstantGEP node" which of course can only take a Constant* operand, not a
Value* operand.
I now fully see the problem and realise that my solution is also prone to
that problem :)
Cheers,
James
On 24
2011 Jan 23
1
[LLVMdev] Pointers in Load and Store
John,
I have looked at the real code (instead of the obsolete one) and it
appears to be easy to find if an operand is a getelementptr
instruction.
if (ConstantExpr * CE = dyn_cast<ConstantExpr>(I.getOperand(0)))
{ Out<< "*** operand 0 is a constant Expr******";
if (CE->getOpcode() == Instruction::GetElementPtr)
{ Out<< "*** operand 0 is