Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] Casting a Value"
2010 Jul 21
0
[LLVMdev] How to insert a basic block in an edge
Hi,
I could not figure out, how to declare a Pass*. Can anyone give me an
example, how to use SplitEdge() function ?
Please help me out.
Regards,
Chayan
On Tue, Jul 20, 2010 at 10:12 AM, Chayan Sarkar <chayan.ju at gmail.com> wrote:
> Hi All,
>
> Still I could not figure out how to use Pass* while calling
> SplitEdge() function. Can anyone provide me some example?
>
>
2010 Jul 20
2
[LLVMdev] How to insert a basic block in an edge
Hi All,
Still I could not figure out how to use Pass* while calling
SplitEdge() function. Can anyone provide me some example?
Regards,
Chayan
On Sun, Jul 18, 2010 at 11:49 PM, Nick Lewycky <nicholas at mxc.ca> wrote:
> Chayan Sarkar wrote:
>>
>> Hi,
>>
>> I have tried to use SplitEdge function, but failed. Actually the third
>> parameter is a variable of
2010 Jun 05
3
[LLVMdev] Converting into SSA form
But, the mem2reg pass removes all load store instructions. It replaces
all variables by their if possible (kind of constant propagation). I
have generated the bitcode of the source program and the applied the
mem2reg pass and obviously not getting desired thing.
What I want is convert it into SSA form without replacing any variable
by their constant value. Please elaborate on your point.
Also,
2010 Jun 27
1
[LLVMdev] How to assign undef value to a variable
Simply create an undef constant value and add a store instruction to store the undef value into the memory allocated by the alloca.
I believe there is an llvm::Undef class. Check doxygen docs for details.
-----Original Message-----
From: Chayan Sarkar <chayan.ju at gmail.com>
Sent: Sunday, June 27, 2010 12:05 PM
To: llvmdev at cs.uiuc.edu <llvmdev at cs.uiuc.edu>; chayan.ju at
2010 Jun 07
2
[LLVMdev] Converting into SSA form
Hi Jeffrey,
Actually I am trying to implement "E-path PRE" which is based on
non-algebric equivallence. So, the variable names need to be
preserved.
You said that I need to insert these to preserve variable
%a.0 = bitcast i32 2 to i32
So, these need to be inserted before the mem2reg pass or within the pass.
In first case, how to call an inbuilt pass after doing some analysis
from my
2010 Jun 07
0
[LLVMdev] Converting into SSA form
E-path PRE requires the program in SSA form like SSAPRE algorithm.
Then it finds the eliminatable path (e-path) for an expression and
converts partially redundant to fully redundant and removes redundancy
Chayan
On Mon, Jun 7, 2010 at 1:58 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
> On Sun, Jun 6, 2010 at 8:56 PM, Chayan Sarkar <chayan.ju at gmail.com> wrote:
>> Hi
2008 Aug 06
2
[LLVMdev] crash in JIT when running the inliner
Hi,
Today I've been trying to debug a weird bug that makes JIT crash with
certain code and when using the inliner. This may sound weird, but if I
disable the inliner, it doesn't crash.
I include an example gdb dump below. Does something looks wrong? Do you
think it's a bug in JIT or it's just some other piece of code that is
writing on the JIT memory?.. I don't really know
2010 Jun 01
0
[LLVMdev] Converting into SSA form
You can use STOREs and LOADs on memory and then use mem2reg pass.
2010/6/1 Chayan Sarkar <chayan.ju at gmail.com>:
> Hi,
>
> Can anyone tell me, whether it is possible to convert a program into
> SSA form without considering algebric equivalence ?
>
> regards,
> Chayan
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at
2010 Jun 18
1
[LLVMdev] Erasing Instruction
Hi,
Can anyone tell me how to erase an instruction, (specially a
load/store instruction) ?
If I use Instr->eraseFromParent(), I get following error. Note the
instruction does not have any use.
opt: /home/chayan/llvm/llvm-2.6/include/llvm/ADT/ilist.h:218:
llvm::ilist_iterator<NodeTy>&
llvm::ilist_iterator<NodeTy>::operator++() [with NodeTy =
llvm::Instruction]: Assertion
2010 Jun 05
0
[LLVMdev] Converting into SSA form
There is no existing pass to do this in LLVM, mostly because it
wouldn't be useful for optimizing programs. From your input, mem2reg
produces:
define i32 @myfunc(i32 %x, i32 %y) nounwind {
entry:
%cmp = icmp sgt i32 %x, %y ; <i1> [#uses=1]
br i1 %cmp, label %if.then, label %if.else
if.then: ; preds = %entry
%add = add
2010 Jul 18
0
[LLVMdev] How to insert a basic block in an edge
Chayan Sarkar wrote:
> Hi,
>
> I have tried to use SplitEdge function, but failed. Actually the third
> parameter is a variable of type Pass and it need to be non-null. But I
> could not figure out how to use it. Please help me out.
The only reason it needs a non-NULL Pass* is to call llvm::SplitBlock
which uses P->getAnalysisIfAvailable unconditionally. Feel free to wrap
2010 Jun 07
1
[LLVMdev] Converting into SSA form
On Sun, Jun 6, 2010 at 8:56 PM, Chayan Sarkar <chayan.ju at gmail.com> wrote:
> Hi Jeffrey,
>
> Actually I am trying to implement "E-path PRE" which is based on
> non-algebric equivallence. So, the variable names need to be
> preserved.
Then why do you want to run mem2reg before your optimization in the first place?
-Eli
2010 Jul 18
2
[LLVMdev] How to insert a basic block in an edge
Hi,
I have tried to use SplitEdge function, but failed. Actually the third
parameter is a variable of type Pass and it need to be non-null. But I
could not figure out how to use it. Please help me out.
Regards,
Chayan
On Sat, Jul 17, 2010 at 10:16 PM, Nick Lewycky <nicholas at mxc.ca> wrote:
> Chayan Sarkar wrote:
>>
>> Hi all,
>>
>> Suppose in a CFG bb1 has two
2010 Jun 05
2
[LLVMdev] Converting into SSA form
Suppose my Input function is like :
myfunc(int x,int y){
int a=2, b=3,c=5;
if(x>y) {
c=a+b;
a=6;
}
else {
c=a*b;
b=4;
}
a=c+a;
c=a+b;
}
and the output should be :
myfunc(int x,int y){
int a.0=2, b.0=3,c.0=5;
if(x>y) {
c.1=a.0+b.0;
a.1=6;
}
else {
c.2=a.0*b.0;
b.1=4;
}
2013 Aug 28
0
[LLVMdev] [polly] one more slow pretty printing in the default path
On 08/28/2013 10:08 AM, Sebastian Pop wrote:
> Hi,tic
>
> in lib/Analysis/RegionPass.cpp there are 3 occurrences of:
> CurrentRegion->getNameStr()
> These are slowing down compile times with polly.
> I would suggest to either remove these calls,
> or only turn on when the programmer asks for -debug.
>
> The reason for the slow pretty printing of types is the same as
2010 Jun 01
2
[LLVMdev] Converting into SSA form
Hi,
Can anyone tell me, whether it is possible to convert a program into
SSA form without considering algebric equivalence ?
regards,
Chayan
2011 May 20
3
[LLVMdev] convert a char * to a value
Hi all,
Please i need help, I have a method that takes 2 arguments with type char *:
void branchPredict(char *b1, char *b2){
---
--
}
i'm supposed to add this method, in an IR basic bloc:
to add it into a basic bloc i do:
//i: is the basic bloc
std::vector<Value*> void_43_params;
Constant* tbname = ConstantArray::get(M.getContext(),i->getNameStr() ,
true);
Constant* pbname =
2010 Jul 17
1
[LLVMdev] replace instruction
Hello all,
Suppose I have an Instruction like
%1 = add i32 %a, %b
and I want to convert it like
%t = add i32 %a, %b
and assign the value of %t to %1 (something like %1 <- %t )
how can I accomplish this?
Regards,
Chayan
2009 Feb 09
0
[LLVMdev] overflow + saturation stuff
On Feb 8, 2009, at 11:33 AM, Chris Lattner wrote:
>
> On Feb 8, 2009, at 8:58 AM, Dan Gohman wrote:
>
>> Hi Chris,
>>
>> Would it be better to split add into multiple opcodes instead of
>> using
>> SubclassData bits?
>
> No, I don't think so. The big difference here is that (like type)
> "opcode" never changes for an instruction
2009 Nov 13
1
[LLVMdev] dodgy use of c_str()
>From llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp:
void DebugInfo::EmitGlobalVariable(GlobalVariable *GV, tree decl) {
// Gather location information.
expanded_location Loc = expand_location(DECL_SOURCE_LOCATION(decl));
DIType TyD = getOrCreateType(TREE_TYPE(decl));
const char *DispName = GV->getNameStr().c_str();
Isn't this use of c_str() dodgy, because the temporary string returned