search for: backedge_condit

Displaying 2 results from an estimated 2 matches for "backedge_condit".

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
2017 Mar 31
2
Dereferenceable load semantics & LICM
...iant.group load, GVN > > hoists the second load and I am not sure why it is legal then. > > I suspect what's going on is that we first canonicalize the loop to: > > if (precondition) { > do { > vptr = load vtable; > fptr = *vptr; > ... > } while (backedge_condition); > } > > after which it is safe to transform the program to (modulo aliasing): > > if (precondition) { > vptr = load vtable; > fptr = *vptr; > do { > ... > } while (backedge_condition); > } > > since the we moved a load from a ("strongly&q...