Displaying 20 results from an estimated 10000 matches similar to: "Printing the analysis result of lazy value info"
2016 Jan 13
5
High memory use and LVI/Correlated Value Propagation
Hi all,
with the current trunk I have two major cases where clang needs more
than 2GB memory for compiling programs with -O2. One is related to GVN
and MemoryDependenceAnalysis and has a pending patch. The other is
related to the Correlated Value Propagation and Lazy Value Information
cache. Attached is a heap profile for one of the relevant test cases.
Looking at the sources, I don't see any
2020 Feb 20
2
The semantics of nonnull attribute
Two thoughts:
1. I think that we should aim for regularity, to the extent possible, and so we should treat nonnull, align, etc. similarly w.r.t. to whether they produce poison or UB.
2. I was thinking about the following last night, and it clarified for me why having an not_poison attribute makes sense and seems useful, and how poison/UB might affect things on a function-call boundary itself.
2016 Jan 14
2
High memory use and LVI/Correlated Value Propagation
----- Original Message -----
> From: "Daniel Berlin via llvm-dev" <llvm-dev at lists.llvm.org>
> To: "Joerg Sonnenberger" <joerg at britannica.bec.de>, "llvm-dev"
> <llvm-dev at lists.llvm.org>
> Sent: Thursday, January 14, 2016 10:38:10 AM
> Subject: Re: [llvm-dev] High memory use and LVI/Correlated Value
> Propagation
> On
2020 Feb 18
8
The semantics of nonnull attribute
I think calling the attribute "used" is confusing. I'd suggest the following:
"not_poison": If an argument is marked not_poison, and the argument is poison at runtime, the call is instant UB. Whether an argument is poison is checked after the rules for other attributes like "nonnull" and "align" are applied.
This makes it clear that the IR semantics
2020 Feb 19
3
The semantics of nonnull attribute
On 02/19, Juneyoung Lee via llvm-dev wrote:
> Hello,
>
> > Would it be correct to resolve this by saying that dereferenceable(N)
> > *implies* not_poison? This would be helpful as a clarification of how
> > it all fits together.
>
> Yes, I think it makes sense.
I don't we should do that.
Take the `gep inbounds` example:
char* foo(char *arg) {
return `gep
2016 Jan 14
5
High memory use and LVI/Correlated Value Propagation
On 01/13/2016 04:28 PM, Daniel Berlin via llvm-dev wrote:
>
>
> On Wed, Jan 13, 2016 at 4:23 PM, Joerg Sonnenberger via llvm-dev
> <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
>
> On Wed, Jan 13, 2016 at 03:38:24PM -0800, Philip Reames wrote:
> > I don't think that arbitrary limiting the complexity of the
> search
2019 Nov 27
2
LangRef semantics for shufflevector with undef mask is incorrect
Ok, makes sense.
My suggestion is that we patch the IR Verifier to ensure that the mask is
indeed a vector of constants and/or undefs. Right now it only runs the
standard checks for instructions.
We will also run Alive2 on the test suite to make sure undef is never
replaced in practice.
Thanks,
Nuno
-----Original Message-----
From: Eli Friedman <efriedma at quicinc.com>
Sent: 27 de
2019 Jan 14
7
Reducing the number of ptrtoint/inttoptrs that are generated by LLVM
Hello all,
This is a proposal for reducing # of ptrtoint/inttoptr casts which are not
written by programmers but rather generated by LLVM passes.
Currently the majority of ptrtoint/inttoptr casts are generated by LLVM;
when compiling SPEC 2017 with LLVM r348082 (Dec 2 2018) with -O3,
the output IR contains 22,771 inttoptr instructions. However, when
compiling it with -O0, there are only 1048
2019 Dec 12
3
Adding custom callback function before/after passes
Hello Fedor.
Thank you for the information.
I made a simple patch that exposes PassInstrumentationCallback so
llvmGetPassPluginInfo can use it: https://reviews.llvm.org/D71086 . Would
this change make sense?
Thanks,
Juneyoung Lee
On Thu, Dec 12, 2019 at 12:44 AM Fedor Sergeev <fedor.sergeev at azul.com>
wrote:
>
>
> On 12/3/19 8:01 PM, Juneyoung Lee via llvm-dev wrote:
>
>
2020 Sep 21
2
Is it valid to dereference a pointer that have undef bits in its offset?
I think it’s reasonable to expect that IR generated by frontends doesn’t do this.
Not sure about transforms; I can imagine that we might speculate a load without proving all the bits are well-defined.
-Eli
From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of Juneyoung Lee via llvm-dev
Sent: Sunday, September 20, 2020 3:54 PM
To: llvm-dev <llvm-dev at lists.llvm.org>
2019 Nov 26
4
LangRef semantics for shufflevector with undef mask is incorrect
Hi,
This is a follow up on a discussion around shufflevector with undef mask in
https://reviews.llvm.org/D70641 and
https://bugs.llvm.org/show_bug.cgi?id=43958.
The current semantics of shufflevector in
http://llvm.org/docs/LangRef.html#shufflevector-instruction states:
"If the shuffle mask is undef, the result vector is undef. If any element of
the mask operand is undef, that element
2020 Sep 20
2
Is it valid to dereference a pointer that have undef bits in its offset?
Hello all,
Is it valid to dereference a pointer that has undef bits in its offset?
For example,
%p = alloca [8 x i8]
%p2 = gep %p, (undef & 8)
store 0, %p2
undef & 8 is always less than 8, so technically it will store zero to one
of the array's elements.
The reason is that I want to improve no-undef analysis by suggesting that a
pointer that is passed to load/store is
2020 Oct 10
2
Undef and Poison round table follow-up & a plan
>
> Okay, it's just not immediately undefined behaviour. The C model has more
> issues because of the problem with how "trap representation" is defined
> (which precludes trap representations for unsigned char, two's complement
> signed char, etc.).
This interpretation is further stressed because C only explicitly ascribes
> undefined behaviour to trap
2020 Sep 22
2
Is it valid to dereference a pointer that have undef bits in its offset?
Thank you for the infos; it seems making it raise UB is problematic.
Would clarifying it in LangRef be good? I can update the patch to contain
the information instead.
Another concern is then, how can we efficiently encode an assumption that a
pointer variable in IR does not have undef bits?
Certainly, in the front-end language, (most of) pointers won't have undef
bits, and it would be great
2020 Sep 21
2
Is it valid to dereference a pointer that have undef bits in its offset?
I think we need to allow this. Otherwise, we have to prove that
addresses are non-undef before we can hoist or sink a memory
instruction. Today, aliasing can use things like known bits, and if we
imposed a no-undef in address requirement, we'd either need to replace
such reasoning in AA, or have passes which wish to hoist/sink check the
property afterwards.
Or to say it differently, I
2020 Oct 09
2
Undef and Poison round table follow-up & a plan
>
> // Members are initialized to poison at object creation.
>> p = alloca {i8, i32} // p[0], p[4~7] are poison
>> p[0] is an i8, so it shouldn't be poison?
>
>
My interpretation of standard is that reading uninitialized char can also
yield trap representation.
If uninitialized, char variable has indeterminate value, and C/C++ does not
seem to forbid reading trap
2019 Jan 18
2
Reducing the number of ptrtoint/inttoptrs that are generated by LLVM
Hello Sanjoy,
Yep, combining it with propagateEquality of pointers may raise problem. :\
However I believe propagateEquality should be fixed properly, and adding
psub also suggests a solution for that. :)
It is sound to replace a pointer with another if subtraction of them is 0:
a = malloc()
free(a)
b = malloc() // Assume b == a numerically
if ((psub inbounds a b) == 0) { // a and b are
2020 Oct 09
2
Undef and Poison round table follow-up & a plan
It is UB when a poison is passed to certain operations that raise UB on
poison, such as division by poison/dereferencing poison pointer/branching
on poison condition/etc.
Otherwise, poison is simply propagated, but it does not raise UB
Copying poison bytes is okay:
// Members are initialized to poison at object creation.
p = alloca {i8, i32} // p[0], p[4~7] are poison
q = alloca {i8, i32} // we
2019 Dec 03
3
Adding custom callback function before/after passes
Hello all,
Is there a way to register callback that runs before/after passes?
PassTimingInfo seems to do a similar thing by calling
PassInstrumentationCallbacks::registerBeforePassCallback /
registerAfterPassCallback, but it is hard-wired with
StandardInstrumentations class.
Do we have something similar to RegisterStandardPasses, so custom callbacks
can be added from somewhere outside LLVM?
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,