[PATCH] D47103: Implement strip.invariant.group

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 23 21:08:53 PDT 2018


rjmccall added inline comments.


================
Comment at: clang/lib/CodeGen/CGExpr.cpp:3858
+    }
+  }
+
----------------
Prazek wrote:
> rjmccall wrote:
> > Please add a comment explaining why this is necessary.  (I'm actually not sure why it is, because surely the invariant groups we generate don't contain assumptions about memory from fields, right?)
> Short answer: you can only make virtual calls on a dynamic pointer that carries invariant.group and you can't do anything other because it could leak the information about this pointer (which when used with comparison could break devirtualization). 
Alright, sure.


Repository:
  rL LLVM

https://reviews.llvm.org/D47103





More information about the cfe-commits mailing list