Displaying 6 results from an estimated 6 matches for "getmyobjectthathappenstobet".
2010 Oct 12
5
[LLVMdev] Missed devirtualization opportunities
...validly formed
> to an object of dynamic type T will always refer to an object of that
> dynamic type.
So does that mean that we're allowed to assume that, given an "old"
pointer to that memory, the vtbl-ptr slot hasn't changed? Which
allows us to devirtualize:
Base* pT = GetMyObjectThatHappensToBeT();
// ...
// stuff that we can't tell what it does to our memory
// ...
pT->A();
// more mysterious stuff
pT->B();
// etc.
as long as we can tell that a given pointer is actually pT and not
another pointer copied from it or aliased to it?
2010 Oct 12
0
[LLVMdev] Missed devirtualization opportunities
...of dynamic type T will always refer to an object of that
>> dynamic type.
>
> So does that mean that we're allowed to assume that, given an "old"
> pointer to that memory, the vtbl-ptr slot hasn't changed? Which
> allows us to devirtualize:
>
> Base* pT = GetMyObjectThatHappensToBeT();
> // ...
> // stuff that we can't tell what it does to our memory
> // ...
> pT->A();
> // more mysterious stuff
> pT->B();
> // etc.
>
> as long as we can tell that a given pointer is actually pT and not
> another pointer copied from it or aliased to it?...
2010 Oct 12
1
[LLVMdev] Missed devirtualization opportunities
...7:00 AM, Kenneth Uildriks <kennethuil at gmail.com> wrote:
>> So does that mean that we're allowed to assume that, given an "old"
>> pointer to that memory, the vtbl-ptr slot hasn't changed? Which
>> allows us to devirtualize:
>>
>> Base* pT = GetMyObjectThatHappensToBeT();
>> // ...
>> // stuff that we can't tell what it does to our memory
>> // ...
>> pT->A();
>> // more mysterious stuff
>> pT->B();
>> // etc.
>>
>> as long as we can tell that a given pointer is actually pT and not
>> another...
2010 Oct 12
0
[LLVMdev] Missed devirtualization opportunities
...e vptr in advance, so invariant doesn't work
here. Making it non-local just means that we would need to know the static
call graph, which we don't because we haven't devirtualized yet so all the
calls are indirect.
Nick
> Which
> allows us to devirtualize:
>
> Base* pT = GetMyObjectThatHappensToBeT();
> // ...
> // stuff that we can't tell what it does to our memory
> // ...
> pT->A();
> // more mysterious stuff
> pT->B();
> // etc.
>
> as long as we can tell that a given pointer is actually pT and not
> another pointer copied from it or aliased to it?...
2010 Oct 12
0
[LLVMdev] Missed devirtualization opportunities
On Oct 11, 2010, at 2:01 PM, Kenneth Uildriks wrote:
> A better way for a front-end to declare that vtbl-ptr-hacking is not
> expected and not supported is for it to emit llvm.invariant.start and
> llvm.invariant.end calls for it.
Some of us were talking about this apropos your earlier post.
@llvm.invariant.start/end aren't appropriate, because the memory *isn't*
invariant; the
2010 Oct 11
3
[LLVMdev] Missed devirtualization opportunities
On Mon, Oct 11, 2010 at 3:55 PM, John McCall <rjmccall at apple.com> wrote:
>
> On Oct 11, 2010, at 10:43 AM, Kenneth Uildriks wrote:
>
> On Mon, Oct 11, 2010 at 12:30 PM, John McCall <rjmccall at apple.com> wrote:
>
> On Oct 11, 2010, at 9:12 AM, Kenneth Uildriks wrote:
>
> 3. The front-end, recognizing that scribbling on an instance's vtbl
>
>