search for: juneyoung

Displaying 20 results from an estimated 59 matches for "juneyoung".

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> Subject: [EXT] Re: [llvm-dev] Is it valid to dereference a pointer that have undef bits in its offset? > %p2 = gep %p, (undef & 8) A silly typo: undef & 8 -> undef & 7 On Mo...
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: > > Hello all, > > Is there a way to register callback that runs before/after passes? > PassTimingInfo seems to do a simi...
2020 Oct 10
2
Undef and Poison round table follow-up & a plan
...imized to undef, but according to the previous link ( http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1787), this isn't valid because unspecified value is a 'stable' value. In our suggestion, well-defined bits are stored into padding at object creation, so it becomes okay. Juneyoung On Fri, Oct 9, 2020 at 11:58 PM Hubert Tong < hubert.reinterpretcast at gmail.com> wrote: > On Thu, Oct 8, 2020 at 11:54 PM Juneyoung Lee <juneyoung.lee at sf.snu.ac.kr> > wrote: > >> // Members are initialized to poison at object creation. >>>> p = alloca {...
2020 Sep 22
2
Is it valid to dereference a pointer that have undef bits in its offset?
...an be encoded using noundef, but, e.g., for a pointer that is loaded from memory, such information disappears. I think this information is helpful reducing the cost of fixing existing undef/poison-related optimizations, because we can conclude that we don't need to insert freeze in more cases. Juneyoung On Tue, Sep 22, 2020 at 5:51 AM Johannes Doerfert < johannesdoerfert at gmail.com> wrote: > To be fair, if the address has to be `noundef` the example would just be > UB. That said, I still believe it "is not". > > > On 9/21/20 1:41 PM, Philip Reames wrote: > &g...
2020 Oct 09
2
Undef and Poison round table follow-up & a plan
...indeterminate value as an unsigned char should yield unspecified value in the C++14 draft in the past, but it is removed: http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1787 The removed phrase did not exist in C++11, so I believe it is fine to use poison for uninitialized char types. Juneyoung On Fri, Oct 9, 2020 at 12:19 PM Hubert Tong < hubert.reinterpretcast at gmail.com> wrote: > On Thu, Oct 8, 2020 at 11:09 PM Juneyoung Lee <juneyoung.lee at sf.snu.ac.kr> > wrote: > >> It is UB when a poison is passed to certain operations that raise UB on >> poiso...
2020 Sep 21
2
Is it valid to dereference a pointer that have undef bits in its offset?
...nds >> 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> >> Subject: [EXT] Re: [llvm-dev] Is it valid to dereference a pointer >> that have undef bits in its offset? >> >>> %p2 = gep %p, (undef & 8) &...
2020 Sep 20
2
Is it valid to dereference a pointer that have undef bits in its offset?
...nalysis by suggesting that a pointer that is passed to load/store is well-defined, by making it raise UB when a pointer with undef bits is given. A suggested patch is here: https://reviews.llvm.org/D87994 I wonder whether there is a case using this to do something that I'm not aware. Thanks, Juneyoung -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200921/9a03c974/attachment.html>
2020 Oct 09
2
Undef and Poison round table follow-up & a plan
...ers are initialized to poison at object creation. p = alloca {i8, i32} // p[0], p[4~7] are poison q = alloca {i8, i32} // we want to copy p to q v = load i8* p[0] // v is poison store i8 v, i8* q[0] // poison is simply copied; no UB happened Similarly, passing/returning poison is allowed as well. Juneyoung On Fri, Oct 9, 2020 at 10:45 AM Hubert Tong < hubert.reinterpretcast at gmail.com> wrote: > On Thu, Oct 8, 2020 at 7:13 PM Juneyoung Lee <juneyoung.lee at sf.snu.ac.kr> > wrote: > >> > It is important to note that this applies to trap representations and >> not...
2019 Jan 18
2
Reducing the number of ptrtoint/inttoptrs that are generated by LLVM
...a = malloc() free(a) b = malloc() // Assume b == a numerically if ((psub inbounds a b) == 0) { // a and b are pointing to different objects, so the comparison becomes poison use(a) } => a = malloc() free(a) b = malloc() // Assume b == a numerically if ((psub inbounds a b) == 0) { use(b) } Juneyoung Lee On Fri, Jan 18, 2019 at 7:50 AM Sanjoy Das <sanjoy at playingwithpointers.com> wrote: > On Mon, Jan 14, 2019 at 3:23 AM Juneyoung Lee via llvm-dev > <llvm-dev at lists.llvm.org> wrote: > > Patch https://reviews.llvm.org/D56598 adds llvm.psub(p1,p2) intrinsic > funct...
2019 Mar 07
3
Printing the analysis result of lazy value info
...able-output` with a following program as the input: ``` define i32 @f(i32 %a, i32 %b) { %i = icmp eq i32 %a, 10 br i1 %i, label %A, label %B A: %c = add i32 %a, 20 ret i32 %c B: ret i32 0 } ``` However, it shows a following line only: ``` LVI for function 'f': ``` Thank you :) Juneyoung Lee -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190307/b3826be3/attachment.html>
2020 Feb 20
2
The semantics of nonnull attribute
...rgonne National Laboratory ________________________________ From: llvm-dev <llvm-dev-bounces at lists.llvm.org> on behalf of Finkel, Hal J. via llvm-dev <llvm-dev at lists.llvm.org> Sent: Wednesday, February 19, 2020 2:29 AM To: Doerfert, Johannes <johannesdoerfert at gmail.com>; Juneyoung Lee <juneyoung.lee at sf.snu.ac.kr> Cc: llvm-dev <llvm-dev at lists.llvm.org>; Nuno Lopes <nuno.lopes at ist.utl.pt>; John Regehr <regehr at cs.utah.edu> Subject: Re: [llvm-dev] The semantics of nonnull attribute On 2/19/20 1:16 AM, Doerfert, Johannes via llvm-dev wrote: O...
2020 Aug 19
2
The value of padding when storing an aggregate into memory
Hello Alexander, > Interesting topic. Is any such optimization reachable from C? Yes, I think so - both PassBuilder and PassManagerBuilder add MemCpyOpt & IPSCCP in the default pass pipeline. Juneyoung On Wed, Aug 19, 2020 at 8:43 PM Alexander Cherepanov <ch3root at openwall.com> wrote: > On 19/08/2020 06.05, Juneyoung Lee via llvm-dev wrote: > > LangRef isn't clear about the value of padding when an aggregate value is > > stored into memory, and I'd like to suggest...
2019 Dec 03
3
Adding custom callback function before/after passes
...o 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? Thanks, Juneyoung Lee -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191204/1a07f148/attachment.html>
2017 Jul 17
3
A bug related with undef value when bootstrap MemorySSA.cpp
...o hide it well enough that we get the months we > need for various folks to work on the larger proposals. > Which sucks, but not sure we have a better answer, because i don't think we > are going to commit the freeze/etc patches tomorrow. > > > On Mon, Jul 17, 2017 at 1:34 PM, Juneyoung Lee <juneyoung.lee at sf.snu.ac.kr> > wrote: >> >> Hello, some of the patches had conflicts with LLVM head, so I updated >> them. If you experienced patch failure before then you can try it again. >> >> I compiled your code (1.c) with LLVM r308173 with the 5 p...
2017 Jul 17
2
A bug related with undef value when bootstrap MemorySSA.cpp
...memory, and also be passed by a function argument. `isGuaranteedNotToBeUndefOrPoison` will virtually return `false` for all cases except the value is some integer constant. Sanjoy's suggestion might be helpful (if I understood correctly), but I'm not sure how much it will be. Best Regards, Juneyoung Lee On Tue, Jul 18, 2017 at 3:43 AM, Sanjoy Das via llvm-dev < llvm-dev at lists.llvm.org> wrote: > On Mon, Jul 17, 2017 at 11:21 AM, Daniel Berlin <dberlin at dberlin.org> > wrote: > >> On Mon, Jul 17, 2017 at 10:32 AM, Xinliang David Li <davidxl at google.com >...
2020 Oct 08
2
Undef and Poison round table follow-up & a plan
...lues. A structure or union never has a trap representation. Yes, nondeterministic bits would work for padding of struct/union, as described in (3) The third case is the value of struct/union padding. For the members of struct/union, it is allowed to have trap representation, so poison can be used. Juneyoung On Fri, Oct 9, 2020 at 5:37 AM Hubert Tong <hubert.reinterpretcast at gmail.com> wrote: > On Thu, Oct 8, 2020 at 12:12 PM Juneyoung Lee via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> Hello all, >> >> Thank everyone who participated in the (imprompt...
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 d...
2020 Aug 19
2
The value of padding when storing an aggregate into memory
...constant: https://godbolt.org/z/hY6ndd / https://godbolt.org/z/3WMP5a - Alive2 (with store operation updated) did not find any problematic transformation from LLVM unit tests and while running translation validation on a few C programs. The patch is here: https://reviews.llvm.org/D86189 Thanks, Juneyoung -- Juneyoung Lee Software Foundation Lab, Seoul National University -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200819/482c1806/attachment.html>
2017 Jul 17
3
A bug related with undef value when bootstrap MemorySSA.cpp
...or various folks to work on the larger proposals. >> > Which sucks, but not sure we have a better answer, because i don't think >> > we >> > are going to commit the freeze/etc patches tomorrow. >> > >> > >> > On Mon, Jul 17, 2017 at 1:34 PM, Juneyoung Lee >> > <juneyoung.lee at sf.snu.ac.kr> >> > wrote: >> >> >> >> Hello, some of the patches had conflicts with LLVM head, so I updated >> >> them. If you experienced patch failure before then you can try it >> >> again. >&gt...
2019 Jan 15
2
Reducing the number of ptrtoint/inttoptrs that are generated by LLVM
...re subtraction occurred between objects. Hello David, If C programmer wants to get distance between two different objects, s/he can use (intptr_t)p - (intptr_t)q instead of p - q. I believe this situation is similar to one adopting optimizations/analyses that exploit signed overflow / TBAA / etc. Juneyoung Lee On Tue, Jan 15, 2019 at 11:59 AM David Chisnall via llvm-dev < llvm-dev at lists.llvm.org> wrote: > On 14/01/2019 20:55, Juneyoung Lee via llvm-dev wrote: > > Correctness of psub is guaranteed by the specification of pointer > > subtraction of C/C++. > > When two po...