Displaying 20 results from an estimated 20000 matches similar to: "[LLVMdev] Adding an intrinsic that requires a constant parameter"
2012 Jul 02
4
[LLVMdev] [NVPTX] Backend failure in LegalizeDAG due to unimplemented expand in target lowering
Okay, few issues here:
First, i1 is used in the NVPTX back-end to map to the predicate (.pred)
type. We definitely do not want to declare this type as illegal. The real
issue is lack of complete support for this type. The PTX language places
restrictions on what can be done with .pred registers, and it looks like
the failure is here:
kernelgen_hostcall.exit228: ; preds =
2012 Jul 08
1
[LLVMdev] [NVPTX] Backend failure in LegalizeDAG due to unimplemented expand in target lowering
OK, thanks.
For our project I implemented a similar workaround: extend each i1
memory item to i8 and load/store i1 to i8 with a type cast. Still, the
issue in NVPTX remains. I don't know whether NVIDIA or community
fellows have any reasonable priority to fix it (or at least put an NYI
assertion!). It seems to be quite more complex, than implementing
custom lowering handler, that's why
2016 Feb 17
7
RFC: Add guard intrinsics to LLVM
This is a proposal to add guard intrinsics to LLVM.
Couple of glossary items: when I say "interpreter" I mean "the most
conservative tier in the compilation stack" which can be an actual
interpreter, a "splat compiler" or even a regular JIT that doesn't
make optimistic assumptions. By "bailing out to the interpreter" I
mean "side exit" as
2012 Jul 03
0
[LLVMdev] [NVPTX] Backend failure in LegalizeDAG due to unimplemented expand in target lowering
In our (NVIDIA's) NVVM IR spec, we define i1 having a memory size of 8 bit.
setOperationAction(ISD::LOAD, MVT::i1, Custom);
setOperationAction(ISD::STORE, MVT::i1, Custom);
is the right way to go.
Yuan
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Justin Holewinski
Sent: Monday, July 02, 2012 9:55 AM
To: Dmitry N. Mikushin
Cc: llvmdev at
2015 Jan 19
2
[LLVMdev] [INCOMPLETE] [GC] Support wrapping vararg functions in statepoint
I actually need this feature quite badly in my untyped language
compiler: since I support first-class functions, I've made the types of
all functions a standard vararg (so I can box them).
The implementation crashes when I try to read out the value of
gc.result. Hints as to what might be wrong?
Signed-off-by: Ramkumar Ramachandra <artagnon at gmail.com>
---
2015 Nov 02
2
[StructurizeCFG] Trouble with branches out of a loop
Hi,
I've been investigating the StructurizeCFG pass, and it looks like it has
trouble handling CFG edges that break out of a loop and go directly to the
function exit. Am I running up against a bug in the structurizer, or a
general limitation of the algorithm used? As an aside, is there any
documentation for the algorithm used? Is it based on a published paper?
The input IR I have is the
2012 Jul 01
0
[LLVMdev] [NVPTX] Backend failure in LegalizeDAG due to unimplemented expand in target lowering
Hi Duncan,
Sorry I don't understand your point, could you please explain a little bit more?
Why i1 should be declared illegal? Operations on byte-wide types like
char or bool are pretty legal, according to PTX spec:
"Registers may be typed (signed integer, unsigned integer, floating
point, predicate) or untyped. Register size is restricted; aside from
predicate registers which are
2016 Feb 09
2
[GVN] same sequence of instructions in if and else branch
and by "right thing" i mean it can hoist if you want and it can prove it
will not extend the live range.
Note that VBE (very busy expressions) is a code size optimization only. It
does not save time.
On Tue, Feb 9, 2016 at 12:26 PM, Daniel Berlin <dberlin at dberlin.org> wrote:
> This GVN does not do that, this is correct. It is a very simple GVN. All
> phi nodes are
2016 Feb 18
2
RFC: Add guard intrinsics to LLVM
Sanjoy gave the long answer, let me give the short one. :)
"deopt" argument bundles are used in the middle end, they are lowered
into a statepoint, and generate the existing stackmap format. i.e. one
builds on the other.
On 02/18/2016 11:43 AM, Eric Christopher wrote:
> Hi Sanjoy,
>
> A quick question here. With the bailing to the interpreter support
> that you're
2012 Jun 30
2
[LLVMdev] [NVPTX] Backend failure in LegalizeDAG due to unimplemented expand in target lowering
Hi Dmitry,
>> did you declare i1 to be an illegal type?
>
> No. How?
I think it will be considered illegal if you don't add it to any
register class.
Ciao, Duncan.
>
> 2012/6/30 Duncan Sands <baldrick at free.fr>:
>> Hi Dmitry,
>>> So instead of setOperationAction(ISD::STORE, MVT::i1, Expand); one
>>> should probably do
2015 Dec 09
2
persuading licm to do the right thing
When I compile two different modules using
clang -O -S -emit-llvm
I get different .ll files, no surprise.
The first looks like
double *v;
double zap(long n) {
double sum = 0;
for (long i = 0; i < n; i++)
sum += v[i];
return sum;
}
yielding
@v = common global double* null, align 8
; Function Attrs: nounwind readonly uwtable
define double @zap(i64 %n) #0 {
entry:
%cmp4 =
2013 Aug 19
3
[LLVMdev] Issue with X86FrameLowering __chkstk on Windows 8 64-bit / Visual Studio 2012
Hi,
I'm using LLVM to convert expressions to native assembly, the problem
is when LLVM compiles this code:
define void @fn_0000000000000000(i8*, i8*, i8*) {
bb:
%res = alloca i32
%3 = load i32* %res
%4 = bitcast i8* %0 to i32*
%5 = load i32* %4
%6 = bitcast i8* %0 to i32*
%7 = load i32* %6
%8 = xor i32 %5, %7
store volatile i32 %8, i32* %res
%9 = load i32* %res
%10 = icmp
2015 Dec 09
2
persuading licm to do the right thing
On some targets with limited addressing modes,
getting that 64-bit relocatable but loop-invariant value into a register
requires several instructions. I'd like those several instruction outside
the loop, where they belong.
Yes, my experience is that something (I assume instcombine) recanonicalizes.
Thanks,
Preston
On Tue, Dec 8, 2015 at 11:21 PM, Mehdi Amini <mehdi.amini at
2015 Dec 09
2
persuading licm to do the right thing
I'm trying to make the IR "better", in a machine-independent fashion,
without having to do any lowering.
I've written code that rewrites GEPs as simple adds and multiplies,
which helps a lot, but there's still some sort of re-canonicalization
that's getting in my way. Is there perhaps a way to suppress it?
Thanks,
Preston
On Wed, Dec 9, 2015 at 7:47 AM, Mehdi Amini
2020 Jul 11
3
Bug in pass 'ipsccp' on function attribute 'argmemonly'?
Hi all,
Let's see an example (from Alexandre Isoard) first:
****************************************************************************************
; RUN: opt -ipsccp -deadargelim -licm -O2 -S < %s
@g = internal global i32 0
; Function Attrs: argmemonly
define internal void @foo(i32* nonnull dereferenceable(4) %arg, i32 %val) #0
{
entry:
store i32 %val, i32* %arg
ret void
}
define
2017 Feb 17
2
[MemorySSA] inserting or removing memory instructions
In particular, if you want to add support, the right way to know what to
rename is (off the top of my head)
add a flag or something to have renamepass reset all uses it sees (you only
have to change the uses, defs are all linked together and thus already
fixed by the updater). Right now it only does that if they have no
defining access.
Make it skip blocks already in the visited set (the
2013 Jan 21
2
[LLVMdev] introducing sign extending halfword loads into the LLVM IR
On 21 Jan 2013, at 14:39, Justin Holewinski <justin.holewinski at gmail.com> wrote:
> Instruction selection happens on a different IR: SelectionDAG. In this IR, there are sign-extending loads that the IR converter will use, and are used for example to load 8/16-bit values into 32-bit registers (with sign or zero extension). Any optimizations performed during codegen will be in this
2013 Feb 04
2
[LLVMdev] Problem with PTX assembly printing (NVPTX backend)
Hi,
> Can you post the llc command line you're using? Can you post an LLVM IR
> file that causes this behavior?
yes:
${LLVM_PATH}/bin/llc -o helloworld.s -march=nvptx helloworld.ll
where LLVM_PATH my local installation path for LLVM.
Also attaching helloworld.c:
#include <stdio.h>
int main(void) {
printf("Hello World!\n");
return 0;
}
and helloworld.ll:
2013 Jan 21
3
[LLVMdev] introducing sign extending halfword loads into the LLVM IR
On Jan 21, 2013, at 6:34 AM, Justin Holewinski <justin.holewinski at gmail.com> wrote:
>
> On Mon, Jan 21, 2013 at 9:16 AM, Bjorn De Sutter <bjorn.desutter at elis.ugent.be> wrote:
> On 21 Jan 2013, at 14:39, Justin Holewinski <justin.holewinski at gmail.com> wrote:
>
>> Instruction selection happens on a different IR: SelectionDAG. In this IR, there are
2016 Feb 09
2
[GVN] same sequence of instructions in if and else branch
There is a phi-node "%phi = phi i64 [%cast1, %if], [%cast2, %else]" in the common successor. The actual control flow is a bit more complex, but there is a common successor block, and %cast1 and %cast2 are the two values that the phi node in the common successor takes.
Does the existence of the phi node affect optimization?
Thanks,
Taewook
From: <mats.o.petersson at