Displaying 20 results from an estimated 20000 matches similar to: "Propagating llvm.assume across function calls to enhance de-virtualization"
2015 Nov 12
2
[cfe-dev] Propagating llvm.assume across function calls to enhance de-virtualization
There are another things left:
1. Adding check for ubsan to detect UBs caused by inplace new
2. upgrading GVN to optimize based on !invariant.group across BBs
3. Adding something like "nocapture-global" that will say that this pointer
is not being captured by global, but may be captured for example by
returning it from function.
This thing is important because this is exactly what
2017 Jan 20
4
RFC: Emitting empty invariant group for vtable loads
Hi all,
I would like to propose a new way clang would decorate vtable loads in
order to handle devirtualization better.
I've added *llvm-dev* also, because this can start a discussion about
changing invariant.group to just invariant.
PDF version of this RFC can be found here:
https://drive.google.com/file/d/0B72TmzNsY6Z8ZmpOUnB5dDZfSFU/view?usp=sharing
Background:
Initial old design:
2017 Jan 25
4
RFC: Emitting empty invariant group for vtable loads
Hi Piotr,
I think makes sense. Modulo bitcasts, the invariant is identified by a
particular pointer SSA value. Given that you can't sensibly have two
nonequivalent invariants associated with the same pointer SSA value
simultaneously, there's no need to also identify the invariant with a
metadata string as well. When we need a new "identifier" for the
pointed-to value, we
2017 Jan 26
2
[cfe-dev] RFC: Emitting empty invariant group for vtable loads
2017-01-26 3:28 GMT+01:00 Richard Smith <richard at metafoo.co.uk>:
> On 25 January 2017 at 15:03, Hal Finkel via cfe-dev <
> cfe-dev at lists.llvm.org> wrote:
>
>> Hi Piotr,
>>
>> I think makes sense. Modulo bitcasts, the invariant is identified by a
>> particular pointer SSA value. Given that you can't sensibly have two
>> nonequivalent
2018 Mar 28
0
[cfe-dev] RFC: Devirtualization v2
> On Mar 19, 2018, at 7:27 PM, Piotr Padlewski via cfe-dev <cfe-dev at lists.llvm.org> wrote:
>
> Hi folks,
>
> here is a link to the proposal that we've been working on lately:
> https://docs.google.com/document/d/16GVtCpzK8sIHNc2qZz6RN8amICNBtvjWUod2SujZVEo/edit?usp=sharing
2017 Jan 28
2
[cfe-dev] RFC: Emitting empty invariant group for vtable loads
2017-01-26 15:41 GMT+01:00 Hal Finkel <hfinkel at anl.gov>:
>
> On 01/26/2017 06:44 AM, Piotr Padlewski wrote:
>
>
>
> 2017-01-26 3:28 GMT+01:00 Richard Smith <richard at metafoo.co.uk>:
>
>> On 25 January 2017 at 15:03, Hal Finkel via cfe-dev <
>> cfe-dev at lists.llvm.org> wrote:
>>
>>> Hi Piotr,
>>>
>>> I think
2018 Mar 29
2
[cfe-dev] RFC: Devirtualization v2
Hi John,
2018-03-28 23:23 GMT+02:00 John McCall <rjmccall at apple.com>:
>
>
> On Mar 19, 2018, at 7:27 PM, Piotr Padlewski via cfe-dev <
> cfe-dev at lists.llvm.org> wrote:
>
> Hi folks,
>
> here is a link to the proposal that we've been working on lately:
> https://docs.google.com/document/d/16GVtCpzK8sIHNc2qZz6RN8am
>
2017 Jan 31
0
[cfe-dev] RFC: Emitting empty invariant group for vtable loads
On 01/28/2017 10:36 AM, Piotr Padlewski wrote:
>
>
> 2017-01-26 15:41 GMT+01:00 Hal Finkel <hfinkel at anl.gov
> <mailto:hfinkel at anl.gov>>:
>
>
> On 01/26/2017 06:44 AM, Piotr Padlewski wrote:
>>
>>
>> 2017-01-26 3:28 GMT+01:00 Richard Smith <richard at metafoo.co.uk
>> <mailto:richard at metafoo.co.uk>>:
>>
2018 Mar 29
0
[cfe-dev] RFC: Devirtualization v2
> On Mar 29, 2018, at 9:12 AM, Piotr Padlewski <piotr.padlewski at gmail.com> wrote:
> 2018-03-28 23:23 GMT+02:00 John McCall <rjmccall at apple.com <mailto:rjmccall at apple.com>>:
>> On Mar 19, 2018, at 7:27 PM, Piotr Padlewski via cfe-dev <cfe-dev at lists.llvm.org <mailto:cfe-dev at lists.llvm.org>> wrote:
>> Note that adding calls to strip and
2018 Mar 30
2
[cfe-dev] RFC: Devirtualization v2
2018-03-29 18:01 GMT+02:00 John McCall <rjmccall at apple.com>:
> On Mar 29, 2018, at 9:12 AM, Piotr Padlewski <piotr.padlewski at gmail.com>
> wrote:
> 2018-03-28 23:23 GMT+02:00 John McCall <rjmccall at apple.com>:
>>
>> On Mar 19, 2018, at 7:27 PM, Piotr Padlewski via cfe-dev <
>> cfe-dev at lists.llvm.org> wrote:
>> *Note that adding
2016 Aug 25
6
invariant.load metadata semantics
Hi Hal,
Hal Finkel via llvm-dev wrote:
> Some questions: Do we allow stores to these locations at all? Only if
I'd vote for disallowing stores to these locations, but if "stores
allowed only if the value is the same" is helpful in some situation
then I don't have specific reasons why that would be problematic.
> the value is the same? Must any change be observable to
2018 Mar 19
4
RFC: Devirtualization v2
Hi folks,
here is a link to the proposal that we've been working on lately:
https://docs.google.com/document/d/16GVtCpzK8sIHNc2qZz6RN8amICNBt
vjWUod2SujZVEo/edit?usp=sharing
But for the record, I also paste it here. Feedback will be really
appreciated!
2017 May 04
2
Handling invariant.groups with equality + marking it as experimental
Hi folks,
I would like to ask for some help with handling invariant.group metadata
for pointer comparison. Currently, we have a problem with devirtualization
of this code:
void compare() {
A* a = new A;
a->foo();
A* b = new(a) B;
if (a == b) {
b->foo();
}
}
Now because it is legal to replace b with an in the branch the vtable load
will use old pointer operand
2016 Mar 02
2
[cfe-dev] [3.8 Release] Please write release notes!
On Tue, Mar 1, 2016 at 2:39 PM, Eric Christopher <echristo at gmail.com> wrote:
>>
>> - Eric: should the new C API Changes part of the developer policy be
>> pointed out? Maybe in relation to where we mention changes to the C
>> API?
>>
>
> Good point, how about this:
>
> ----
>
> We have documented our C API stability guarantees for both
2017 Mar 31
2
Dereferenceable load semantics & LICM
Hi all,
I have a question about dereferenceable metadata on load instruction. I
have a patch (https://reviews.llvm.org/D31539) for LICM that hoists loads
with !invariant.group.
The motivation example is devirtualization:
struct A {
virtual void foo();
};
int bar();
void indirect(A &a) {
while(bar())
a.foo();
}
With -O2 -fstrict-vtable-pointers we get:
define void
2010 Nov 14
2
[LLVMdev] noalias locals
On Sun, Nov 14, 2010 at 11:45 AM, Reid Kleckner <reid.kleckner at gmail.com> wrote:
> On Sun, Nov 14, 2010 at 11:17 AM, Kenneth Uildriks <kennethuil at gmail.com> wrote:
>> To fix that and compile C++ correctly while aggressively
>> devirtualizing it, we would need to apply "noalias" to the result of
>> placement-new in all cases, even when placement-new
2015 Aug 08
2
[cfe-dev] [LLVMdev] Clang devirtualization proposal
> I suspect #2 is the right design, mostly because I suspect most of the interesting and important inference cases are going to be cases where we can easily infer the stronger guarantee, and once inferred we will have much more freedom to optimize based on this stronger guarantee...
Can't the stronger guarantee be represented in the existing system by either:
* Adding 'readonly'
2010 Nov 14
0
[LLVMdev] noalias locals
On Sun, Nov 14, 2010 at 2:37 PM, Kenneth Uildriks <kennethuil at gmail.com> wrote:
> On Sun, Nov 14, 2010 at 11:45 AM, Reid Kleckner <reid.kleckner at gmail.com> wrote:
>> On Sun, Nov 14, 2010 at 11:17 AM, Kenneth Uildriks <kennethuil at gmail.com> wrote:
>>> To fix that and compile C++ correctly while aggressively
>>> devirtualizing it, we would need
2015 Jul 23
0
[LLVMdev] [cfe-dev] Clang devirtualization proposal
On Thu, Jul 23, 2015 at 11:42 AM, Piotr Padlewski <prazek at google.com> wrote:
> HI,
> Yep, our proposal doesn't cover it, because this load ; icmp ; assume;
> will land global initilizer function, and main will not see it.
> At least if foo would be called multiple times, then we would only have
> one load from vtable, but unfortunatelly we will not be able to inline,
2015 Jul 31
4
[LLVMdev] Clang devirtualization proposal
On Fri, Jul 31, 2015 at 3:53 PM, Philip Reames <listmail at philipreames.com>
wrote:
>
> Quoting from the google doc: "If we don’t know definition of some
> function, we assume that it will not call @llvm.invariant.group.barrier().
> "
> This part really really bugs me. We generally try to assume minimal
> knowledge of external functions (i.e. they can do