Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] clone function with constant argument, and constant fold it"
2013 Nov 04
0
[LLVMdev] freeing alloca'd variables before function exits
Stack colouring should be able to reuse the same stack space, if the live
ranges of the pointers don't overlap. But I don't think anyone has built a
general solution for alloca'd space.
On Mon, Nov 4, 2013 at 6:30 AM, Ali Javadi <aj14889 at yahoo.com> wrote:
> Hi,
>
> In my llvm code I want to create some function calls. The function
> prototype is as follows:
>
2013 Feb 04
0
[LLVMdev] c-like language implementation using llvm
On Sun, Feb 3, 2013 at 8:55 PM, Ali Javadi <aj14889 at yahoo.com> wrote:
> I am keeping all the types of C, and adding my new types. I thought that,
> for example, I can't map my new type to i32 because that's used for C
> integers. That's what I meant by already used. Am I missing something?
If the type behaves like an i32 then use i32. For example, both signed
and
2013 Nov 03
3
[LLVMdev] freeing alloca'd variables before function exits
Hi,
In my llvm code I want to create some function calls. The function prototype is as follows:
int memoize ( char *function_name,
int *int_params, unsigned num_ints,
double *double_params, unsigned num_doubles)
In order to create these calls I do the following for example:
%88 = alloca [7 x i8]
store volatile [7 x i8] c"ORACLE\00", [7 x i8]*
2013 Feb 04
2
[LLVMdev] c-like language implementation using llvm
Hi Sean,
>> Can I just utilize the i1 type? Is the
>> i1 type already used for something, and thus might create a conflict?
>
> I think you are very confused. LLVM's types are meant to be used to
> represent *your* program :) They can't be "already used".
I am keeping all the types of C, and adding my new types. I thought that, for example, I can't map
2011 Feb 07
1
[LLVMdev] A small pass to constant fold branch conditions in destination blocks
On Mon, Feb 7, 2011 at 8:54 PM, Duncan Sands <baldrick at free.fr> wrote:
> Here is a new and improved version that also does the following: if the
> condition for a conditional branch has the form "A && B" then A, B and the
> condition are all replaced with "true" in the true destination (similarly
> for || conditions in the false destination). Also,
2007 Mar 22
0
[LLVMdev] a question about constant fold for fdiv
On Thu, 2007-03-22 at 15:50 -0700, leo han wrote:
> Hello, I have a question about the constant folding for fdiv instructions.
> For the instruction "fdiv double 0.0, 0.0", the folded result is inf. I
> think this should be nan. Can anyone tell me why it is not nan?
I think the specification says that it is "undefined" so any value will
do. inf is just as undefined
2007 Mar 22
3
[LLVMdev] a question about constant fold for fdiv
Hello, I have a question about the constant folding for fdiv instructions.
For the instruction "fdiv double 0.0, 0.0", the folded result is inf. I
think this should be nan. Can anyone tell me why it is not nan?
Thanks.
Leo
_________________________________________________________________
Exercise your brain! Try Flexicon.
2011 Feb 07
1
[LLVMdev] A small pass to constant fold branch conditions in destination blocks
Hi Jeff, sorry my example was misleading.
> Then I misunderstood it's purpose. I see now that constant propagation could
> remove branches because you know a value is true. I was looking at the problem
> through my 'register allocator' lens. Here is a more expressive example of what
> you are doing.
>
> define i1 @t1(i1 %c) {
> br i1 %c, label %t, label %f
2007 Mar 22
0
[LLVMdev] a question about constant fold for fdiv
Jeff Cohen wrote:
> Reid Spencer wrote:
>> On Thu, 2007-03-22 at 15:50 -0700, leo han wrote:
>>
>>> Hello, I have a question about the constant folding for fdiv instructions.
>>> For the instruction "fdiv double 0.0, 0.0", the folded result is inf. I
>>> think this should be nan. Can anyone tell me why it is not nan?
>>>
2011 Feb 08
0
[LLVMdev] A small pass to constant fold branch conditions in destination blocks
Duncan,
GVN already does this. See lines 1669-1689.
--Owen
On Feb 7, 2011, at 4:50 AM, Duncan Sands wrote:
> Hi all, I wrote a little pass (attached) which does the following: if it sees a
> conditional branch instruction then it replaces all occurrences of the condition
> in the true block with "true" and in the false block with "false". Well, OK, it
> is a
2007 Mar 22
2
[LLVMdev] a question about constant fold for fdiv
Jeff Cohen wrote:
> Jeff Cohen wrote:
>> Reid Spencer wrote:
>>> On Thu, 2007-03-22 at 15:50 -0700, leo han wrote:
>>>
>>>> Hello, I have a question about the constant folding for fdiv instructions.
>>>> For the instruction "fdiv double 0.0, 0.0", the folded result is inf. I
>>>> think this should be nan. Can anyone tell
2013 Feb 13
1
[LLVMdev] c-like language implementation using llvm
Hi there,
I asked this a few days ago and Sean gave a useful answer. Going back to the second question below, I want to clarify something.
On Feb 3, 2013, at 9:04 PM, Sean Silva <silvas at purdue.edu> wrote:
> On Sun, Feb 3, 2013 at 8:55 PM, Ali Javadi <aj14889 at yahoo.com> wrote:
>> I am keeping all the types of C, and adding my new types. I thought that,
>> for
2011 Feb 07
0
[LLVMdev] A small pass to constant fold branch conditions in destination blocks
Are you sure this is really advantageous? '%c' is only one variable, but
when you add the constant propagation, '%c' and false/true are two different
variables. Thus
define i1 @t1(i1 %c) {
br i1 %c, label %t, label %f
t:
ret i1 %c
f:
ret i1 %c
}
should be
br i1 R0, label %t, label %f
t:
ret R0
f:
ret R0
However, with your pass
define i1 @t1(i1 %c) {
br i1
2007 Mar 22
2
[LLVMdev] a question about constant fold for fdiv
Reid Spencer wrote:
> On Thu, 2007-03-22 at 15:50 -0700, leo han wrote:
>
>> Hello, I have a question about the constant folding for fdiv instructions.
>> For the instruction "fdiv double 0.0, 0.0", the folded result is inf. I
>> think this should be nan. Can anyone tell me why it is not nan?
>>
>
> I think the specification says that it is
2011 Feb 07
0
[LLVMdev] A small pass to constant fold branch conditions in destination blocks
Here is a new and improved version that also does the following: if the
condition for a conditional branch has the form "A && B" then A, B and the
condition are all replaced with "true" in the true destination (similarly
for || conditions in the false destination). Also, if the condition has
the form "X == Y" then X is replaced by Y everywhere in the true
2011 Feb 08
0
[LLVMdev] A small pass to constant fold branch conditions in destination blocks
Nick Lewycky wrote:
> Duncan Sands wrote:
>> Here is a new and improved version that also does the following: if the
>> condition for a conditional branch has the form "A && B" then A, B and the
>> condition are all replaced with "true" in the true destination (similarly
>> for || conditions in the false destination). Also, if the condition
2013 May 17
1
[LLVMdev] backend for intrinsic functions
Hi,
I have some newly defined intrinsic functions in my llvm IR code, which I want to translate to X86 instruction set. As a first step, I want to be able to generate "nop" for these instructions, so the program at least compiles successfully.
The call to my intrinsic function looks like this in the IR:
call void @llvm.X(i16 %43)
>From what I understand it may be possible to
2013 Jul 18
1
[LLVMdev] Nested Loop Unrolling
Hi,
In LLVM (using the opt tool), is it possible to force a nested loop be unrolled entirely? Something like a pass option?
I have a nested loop with depth of 4, and all trip counts are known at compile time, but so far I've only been able to do this by 4 invocations of the -loop-simplify, -loop-rotate, -loop-unroll passes.
Thanks,
Ali
2011 Feb 07
0
[LLVMdev] A small pass to constant fold branch conditions in destination blocks
Then I misunderstood it's purpose. I see now that constant propagation could
remove branches because you know a value is true. I was looking at the
problem through my 'register allocator' lens. Here is a more expressive
example of what you are doing.
define i1 @t1(i1 %c) {
br i1 %c, label %t, label %f
t:
br i1 %c, label %t2, label %f2
t2:
code...
ret something
f2:
code...
2011 Feb 08
2
[LLVMdev] A small pass to constant fold branch conditions in destination blocks
Duncan Sands wrote:
> Here is a new and improved version that also does the following: if the
> condition for a conditional branch has the form "A && B" then A, B and the
> condition are all replaced with "true" in the true destination (similarly
> for || conditions in the false destination). Also, if the condition has
> the form "X == Y" then X