[PATCH] D33328: [CodeGen] Pessimize aliasing for union members (and may-alias) objects

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 23 13:21:39 PDT 2017


rjmccall added inline comments.


================
Comment at: lib/CodeGen/CGExpr.cpp:1436
+    if (BaseInfo.getMayAlias())
+      TBAAInfo = CGM.getTBAAInfo(getContext().CharTy);
     llvm::MDNode *TBAAPath = CGM.getTBAAStructTagInfo(TBAABaseType, TBAAInfo,
----------------
Hmm.  Should we be constructing a struct-path TBAA at all if the base may alias, as opposed to just using 'char'?


Repository:
  rL LLVM

https://reviews.llvm.org/D33328





More information about the cfe-commits mailing list