Displaying 20 results from an estimated 21 matches for "intrreadmem".
2015 Dec 01
2
LICM doesn't work for IntrReadMem intrinsic function
Hi, All,
Suppose I define one memory read only intrinsic function "foo" in
Intrinsics.td like this
def int_foo : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
[IntrReadMem]>;
Suppose I have the following IR, which means the intrinsic function "foo"
is called 10 times in a loop. Since the parameters of function "foo" are
invariant and the function "foo" is defined as "IntrReadMem". I assume the
'-licm' can move the f...
2015 Dec 01
2
LICM doesn't work for IntrReadMem intrinsic function
...v <
> llvm-dev at lists.llvm.org> wrote:
> >
> > Hi, All,
> >
> > Suppose I define one memory read only intrinsic function "foo" in
> Intrinsics.td like this
> >
> > def int_foo : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
> [IntrReadMem]>;
> >
> > Suppose I have the following IR, which means the intrinsic function
> "foo" is called 10 times in a loop. Since the parameters of function "foo"
> are invariant and the function "foo" is defined as "IntrReadMem". I assume
>...
2015 Dec 01
3
LICM doesn't work for IntrReadMem intrinsic function
On 1 December 2015 at 12:33, Xiangyang Guo via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> if I have the following IR, LICM doesn't work again, even if I use
> '-loop-rotate' firstly. In this IR, the return value of intrinsic function
> "foo" is used by another function "func2" as parameter. However, for the
> intrinsic function
2017 Jan 27
2
Preserving Call to Intrinsic function
Hello everyone,
Consider we have this following set of code:
int foo() {
int a,b;
a = __builtin_XX(0x11);
b = __builtin_XX(0x11);
return a+b;
}
The problem currently is that LLVM eliminated the second call and copied
the result from the first call into a new set of registers. Is there is a
way to force LLVM to generate two explicit calls to a builtin function. The
builtin takes in an integer
2014 Apr 07
9
[LLVMdev] 3.4.1 Release Plans
...ail.com> - Fix diassembler
> handling of rex.b when mod=00/01/10 and bbb=101. Mod=00 should ignore the
> base register entirely. Mod=01/10 should treat this as R13 plus
> displacment. Fixes PR18860
> 6. r201126 - Robert Khasanov - Changed attributes of all gather intrinsics
> from IntrReadMem to IntrReadArgMem as they access only memory based on
> argument.
>
> Most patches fix different stable issues on X86 target.
>
> Thanks,
> Robert
>
>
>
> 2014-03-26 20:10 GMT+04:00 Tom Stellard <tom at stellard.net>:
>
> > Hi,
> >
> >...
2019 Jul 25
2
Intrinsics InstrReadMem memory properties
...e 'tail' from the call and try out different properties:
- IntrNoMem: memset() and the intrinsic are both optimized away as expected
- IntrWriteMem: memset() optimized away by DSE but the intrinsic isn't. I
would expect both to be removed, since the intrinsic is now also a dead
store.
- IntrReadMem: memset() and the intrinsic are both optimized away
*unexpectedly* (CSE removes the intrinsic, then InstCombine removes
memset). The latter is understandable, but why the intrinsic gets optimized
in the first place?
- IntrArgMemOnly: none gets optimized away as expected
- ReadOnly<0>: none ge...
2008 Dec 04
1
[LLVMdev] optimization whith call of Intrinsics
Thanks Eli.
I will try your solution, but then, what is the difference between
[IntrReadArgMem] and
[IntrReadMem] when specifying an intrinsic ? It seems that both options
specify that a function is 'readonly'
(maybe the difference is not well supported for then moment ?)
Julien
> Dead store elimination is that pass that could do the optimizations in
> question. The second store to @reg_ai_...
2019 Jul 24
2
Intrinsics InstrReadMem memory properties
...entptr inbounds [10 x i32], [10 x i32]* %a, i64 0,
i64 0
%0 = bitcast i32* %arraydecay to i8*
%1 = load i32, i32* %b.addr, align 4
%2 = trunc i32 %1 to i8
call void @llvm.memset.p0i8.i64(i8* align 16 %0, i8 %2, i64 10, i1 false)
ret void
}
Now I have a pass that inserts an intrinsic with IntrReadMem into the IR:
define dso_local void @bar(i32 %b) #0 {
entry:
%b.addr = alloca i32, align 4
%a = alloca [10 x i32], align 16
store i32 %b, i32* %b.addr, align 4
%arraydecay = getelementptr inbounds [10 x i32], [10 x i32]* %a, i64 0,
i64 0
%0 = bitcast i32* %arraydecay to i8*
%1 = load i32...
2014 Apr 08
2
[LLVMdev] 3.4.1 Release Plans
....b when mod=00/01/10 and bbb=101. Mod=00 should ignore the
> > > base register entirely. Mod=01/10 should treat this as R13 plus
> > > displacment. Fixes PR18860
> > > 6. r201126 - Robert Khasanov - Changed attributes of all gather
> > intrinsics
> > > from IntrReadMem to IntrReadArgMem as they access only memory based on
> > > argument.
> > >
> > > Most patches fix different stable issues on X86 target.
> > >
> > > Thanks,
> > > Robert
> > >
> > >
> > >
> > > 2014-03-26 20:...
2011 Oct 24
0
[LLVMdev] Extending Intrinsic Functions
...transforms the pointer into another one and
returns it. It does not read or write memory. The Intrinsic has
properties: IntrNoMem. Is there any other property I can specify for the
intrinsic function such as idempotent? Looking into the code, these are
the properties: IntrNoMem, IntrReadArgMem, IntrReadMem,
IntrReadWriteArgMem, Commutative and NoCapture. Only IntrNoMem applies
to the intrinsic function. Also, what optimizations might be affected by
an intrinsic function that only transforms a pointer? Is there a way to
pass more information so that LLVM can do even more optimizations?
Thanks a l...
2013 Oct 30
0
[LLVMdev] [AVX512] Inconsistent mask types for intrinsics?
...e mask operand:
> def int_x86_avx512_gather_dps_mask_512 : >GCCBuiltin<"__builtin_ia32_mask_gatherdps512">,
> Intrinsic<[llvm_v16f32_ty], [llvm_v16f32_ty, llvm_i16_ty,
> llvm_v16i32_ty, llvm_ptr_ty, llvm_i32_ty],
> [IntrReadMem]>;
I expected a v8i1/v16i1 for the gather intrinsics. Is there a reason
for this type difference or is it just an oversight? This is the case
for the compare, gather, scatter, and blend intrinsics.
Also, please note that the current implementation is functionally
correct. During ISelLowering,...
2009 Apr 15
0
[LLVMdev] Error w/ Tablegen + Intrinsics
Are you using isTarget = 1 in your intrinsics file?
On Apr 14, 2009, at 6:34 PM, Villmow, Micah wrote:
> It seems that Tablegen is generating intrinsic ID’s off by in
> DAGISel.inc
>
> In DAGISel.inc, I have the following pattern:
> int64_t CN1 = Tmp0->getZExtValue();
>
> // Pattern: (intrinsic_w_chain:f32 103:iPTR, GPRF32:f32:$src0,
> GPRF32:f32:$src1,
2008 Dec 04
0
[LLVMdev] optimization whith call of Intrinsics
On Thu, Dec 4, 2008 at 7:38 AM, Julien Schmitt <jschmitt at dibcom.fr> wrote:
> Dear LLVMer ;
>
> i'm trying to use LLVM for a specific target, using different memory banks.
> I have written the frontend to generate a valid IR and want to use the
> existing passes (as defined in tool opt) to optimize the code.
>
> The target has specific instructions, so following
2009 Apr 15
2
[LLVMdev] Error w/ Tablegen + Intrinsics
It seems that Tablegen is generating intrinsic ID's off by in
DAGISel.inc
In DAGISel.inc, I have the following pattern:
int64_t CN1 = Tmp0->getZExtValue();
// Pattern: (intrinsic_w_chain:f32 103:iPTR, GPRF32:f32:$src0,
GPRF32:f32:$src1, GPRF32:f32:$src2)
// Emits: (MACRO_FMA_f32:f32 GPRF32:f32:$src0, GPRF32:f32:$src1,
GPRF32:f32:$src2)
// Pattern complexity = 8 cost
2008 Dec 04
2
[LLVMdev] optimization whith call of Intrinsics
Dear LLVMer ;
i'm trying to use LLVM for a specific target, using different memory banks.
I have written the frontend to generate a valid IR and want to use the
existing passes (as defined in tool opt) to optimize the code.
The target has specific instructions, so following advices given in
documentation, I created an intrinsic function, with attribute
[IntrReadArgMem].
My test case is
2015 Jun 12
2
[LLVMdev] Prevent instruction selection from clobbering an implicit data dependence through flags?
Hi,
In my target, certain intrinsic functions read or write the machine's flag registers. Some of my benchmarks rely on implicit data dependences among such intrinsics. How can I specify that these intrinsics carry this dependence, and that this dependence should be preserved through instruction selection?
For example, suppose I have this snippet of IR:
; (i) Write to flags
tail call
2008 Aug 01
3
[LLVMdev] Using intrinsics with memory operands
Hi all,
I was wondering how to use variations of intrinsic functions that take a
memory operand.
Take for example the SSE4.1 pmovsxbd instruction. One variant takes two XMM
registers, while another has a 32-bit memory location as source operand. The
latter is quite interesting if you know you're reading from memory anyway,
and if it's not 16-byte aligned. It looks like LLVM's
2011 Aug 25
0
[LLVMdev] [RFC] Splitting init.trampoline into init.trampoline and adjust.trampoline
...ArgMem]>,
> - GCCBuiltin<"__builtin_init_trampoline">;
> + [IntrReadWriteArgMem]>;
> +
> +def int_adjust_trampoline : Intrinsic<[llvm_ptr_ty], [llvm_ptr_ty],
> + [IntrReadMem]>;
Since these both now map exactly to the corresponding GCC builtins, there should
be a GCCBuiltin entry for each of them. Note that the previous version of
init.trampoline mapped to the llvm-gcc builtin, which had been modified from the
mainline GCC intrinsic. The new intrinsic won't ma...
2011 Aug 23
2
[LLVMdev] [RFC] Splitting init.trampoline into init.trampoline and adjust.trampoline
Hi!
Attached set of patches splits llvm.init.trampoline into an "init"
phase and an "adjust" phase, as discussed on the "Go on dragonegg"
thread.
Thanks!
--
Sanjoy Das
http://playingwithpointers.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Split-intrinsics-and-DAG-nodes.patch
Type: text/x-diff
Size: 8808 bytes
Desc:
2019 Jul 24
2
Intrinsics InstrReadMem memory properties
Hi Johannes,
Thanks for your reply. I now see more clearly how things work with these
properties. However, what would be an object whose address is potentially
known by a callee? I suppose the intrinsic arguments and global variable?
So IIUC, if not restricted by *only properties, an intrinsic could access
to:
- only its arguments if IntrArgMemOnly specified,
- its arguments and the global