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,
----------------
kparzysz wrote:
> rjmccall wrote:
> > Hmm.  Should we be constructing a struct-path TBAA at all if the base may 
> > alias, as opposed to just using 'char'?
> I did that and got a verifier error: "Old-style TBAA is no longer allowed, 
> use struct-path TBAA instead. fatal error: error in backend: Broken function 
> found, compilation aborted!"
Oh, I haven't been paying enough attention to LLVM's TBAA changes.  It looks 
like they've canonicalized on always using the struct-access-style TBAA 
metadata, which is fine; the point is that we should be using whatever tag we 
would use for dereferencing a simple char*, which I believe just means passing 
true for ConvertTypeToTag to DecorateInstructionWithTBAA .


Repository:
  rL LLVM

https://reviews.llvm.org/D33328



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to