[LLVMdev] dragonegg: switch from old TBAA format to the new struct-path aware TBAA format

Manman Ren manman.ren at gmail.com
Mon Oct 7 17:47:55 PDT 2013


Hi Duncan,

I am hoping to remove the support for the old TBAA format soon.
You should be able to switch to the new format by replacing

MDNode *AliasTag = MDHelper.createTBAANode(TreeName, getTBAARoot());

with
MDNode *AliasType = MDHelper.createTBAAScalarTypeNode(TreeName,
getTBAARoot());
MDNode *AliasTag = MDHelper.createTBAAStructTagNode(AliasType, AliasType, 0)

Also replacing
LeafTag->replaceAllUsesWith(getTBAARoot());

with
MDNode *Root = getTBAARoot();
LeafTag->replaceAllUsesWith(MDHelper.createTBAAStructTagNode(Root, Root, 0)

The document is currently at the beginning of TypeBasedAliasAnalysis.cpp. I
am going to update the language ref when struct-path aware TBAA is on by
default.

Let me know if you have any problem with it.

Thanks,
Manman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131007/05fbe87a/attachment.html>


More information about the llvm-dev mailing list