[PATCH] D11043: Const fold vtable load from global variable

Reid Kleckner rnk at google.com
Thu Jul 23 13:46:40 PDT 2015


rnk added a comment.

In http://reviews.llvm.org/D11043#210866, @gberry wrote:

> Reid,
>
> Thanks for your feedback.  Just to be clear, your objection is that there may be subsequent writes to @gS's vtable pointer during construction such that the value folded into @gS's initializer  (i.e. the first vtable value written) is different from the value that would be loaded at the call site?


Exactly. Right now it seems like you're looking for "does the relevant field of this global have a non-zero value". For now, this coincidentally does the trick, but there's no real guarantee that it will always work.


Repository:
  rL LLVM

http://reviews.llvm.org/D11043







More information about the llvm-commits mailing list