search for: divirtualize

Displaying 4 results from an estimated 4 matches for "divirtualize".

Did you mean: devirtualize
2010 Nov 14
2
[LLVMdev] noalias locals
... f.a = 1; >  Foo *p = new (&f) Foo(2); >  // what does p->a contain?  1 or 2? > } > > There's a lot of problems with this example, but I don't know enough > optimizer details to construct a better one. > > Can you get by with a MayAlias?  It seems like you can divirtualize > everything that MustAlias and ignore the rest. I see what you mean. If the placement new result mayalias its original pointer, we can hold both vptrs invariant and have everything else reloaded from memory as appropriate. Now if the placement-new is known to place an object of a different t...
2010 Nov 14
0
[LLVMdev] noalias locals
...) {} }; int main(void) { Foo f; f.a = 1; Foo *p = new (&f) Foo(2); // what does p->a contain? 1 or 2? } There's a lot of problems with this example, but I don't know enough optimizer details to construct a better one. Can you get by with a MayAlias? It seems like you can divirtualize everything that MustAlias and ignore the rest. If I understood the last discussion on this, the reason you don't need to worry about placement new getting called within callees is that you have to use the pointer returned by placement new, or you get undefined behavior, so you can safely assum...
2010 Nov 14
0
[LLVMdev] noalias locals
...(&f) Foo(2); >>  // what does p->a contain?  1 or 2? >> } >> >> There's a lot of problems with this example, but I don't know enough >> optimizer details to construct a better one. >> >> Can you get by with a MayAlias?  It seems like you can divirtualize >> everything that MustAlias and ignore the rest. > > I see what you mean.  If the placement new result mayalias its > original pointer, we can hold both vptrs invariant and have everything > else reloaded from memory as appropriate.  Now if the placement-new is > known to plac...
2010 Nov 14
2
[LLVMdev] noalias locals
Right now, I don't see any way to declare that a pointer value within a function does not alias any pointer not based on it. Basically, I would like to be able to apply "noalias" to an instruction/virtual reg the same way that noalias is applied to function arguments. A few weeks ago when discussing devirtualization possibilities in C++, it turned out that while you can assume that