This patch implements analysis for new-format TBAA access tags with aggregate types as their final access types.
Details
Diff Detail
Event Timeline
lib/Analysis/TypeBasedAliasAnalysis.cpp | ||
---|---|---|
164 | Add a comment here reminding the reader that, in the old format, this first operand was a string. | |
236 | 0 does not seem like a conservatively-correct result. I think this should either assert or return UINT64_MAX. | |
277 | This is the same as the function above. Maybe make a static helper function to avoid repeating the logic? | |
336 | Align this with the unsigned above. | |
554 | I think this should be UINT64_MAX, not 0, to be conservatively correct. IR generated by this code might be interpreted later by an implementation that does care about the sizes. | |
579 | Please document the meaning of this function's parameters and return value. | |
603 | Space after for. | |
607 | The assert should have a string that explains what's going on. |
A couple comments, but otherwise LGTM.
lib/Analysis/TypeBasedAliasAnalysis.cpp | ||
---|---|---|
640 | Please name this something other than BaseType because we already have a variable by that name in scope, and moreover, this is an access type (and so calling it 'BaseType' seems somewhat confusing (given that BaseType above is not necessarily an access type). Maybe just calling it BaseAccessType would be better. Alternatively, just remove this because, to get here, I think that BaseType is always equal to the access type. | |
642 | Especially because, in the past, access types were only scalars, I think it would be useful to have a comment here reminding the reader than the access type might be an aggregate (thus explaining the need for this check). |
Add a comment here reminding the reader that, in the old format, this first operand was a string.