[PATCH] D47103: Implement strip.invariant.group

Piotr Padlewski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 23 16:17:16 PDT 2018


Prazek added inline comments.


================
Comment at: clang/lib/CodeGen/CGExpr.cpp:3858
+    }
+  }
+
----------------
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). 


Repository:
  rL LLVM

https://reviews.llvm.org/D47103





More information about the llvm-commits mailing list