[PATCH] D21387: [CFLAA] Remove non-pointer values from CFLGraph

Jia Chen via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 15 09:24:42 PDT 2016

grievejia created this revision.
grievejia added reviewers: george.burgess.iv, hfinkel.
grievejia added a subscriber: llvm-commits.

This patch introduces no functionality changes.

The goal is to only let CFLAA track pointer values. Non-pointer values do not need to be added to CFLGraph, and any alias queries involving at least one non-pointer value can be answered with "NoAlias" (basicaa does this so I guess with the introduction of AttrEscape it would be fine for CFLAA to do it as well). 

One more change has to be done to achieve this goal, though. For instructions like ptrtoint, the operand is a pointer yet the result is not. Ideally we would want to add the operand to CFLGraph and tag it as AttrEscape, and just ignore the result. However, without this patch we cannot do that since StratifiedAttrs are attached to CFLGrpah's edges, not nodes. All we can do there was to add an edge from the operand to the result with AttrEscape attached to the edge, but then we have to add a non-pointer value (the result) as a node to the graph. This patch fix this issue by moving StratifiedAttrs from edges to nodes. 



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21387.60850.patch
Type: text/x-patch
Size: 12280 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160615/cfd8a8c3/attachment.bin>

More information about the llvm-commits mailing list