[PATCH] D9403: llvm.noalias - Clang CodeGen for local restrict-qualified pointers

Hal Finkel via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 3 14:45:43 PDT 2016


hfinkel added inline comments.


> rjmccall wrote in CGStmt.cpp:525
> It's much more likely that NoAliasScopes will be empty than that MemoryInsts will be empty.  You should probably fast-path using that, or better yet, with the RecordMemoryInsts bit.

I'm not sure that's true; we only record memory-accessing instructions in the first place if there are relevant restrict-qualified pointers around.

> rjmccall wrote in CodeGenFunction.cpp:1900
> Is it intentional that this includes calls and invokes?  If so, please leave a comment describing which instructions we want to apply this to and why.
> 
> In general, this entire patch is really light on comments.

> In general, this entire patch is really light on comments.

Agreed; adding more comments...

> rjmccall wrote in CodeGenFunction.h:541
> Why this is defaultable?

It seems like a reasonable default (i.e. we default to not recording memory instructions); in the current patch, this is used by the `LexicalNoAliasInfo FnNoAliasInfo;` member of CodeGenFunction.

https://reviews.llvm.org/D9403





More information about the cfe-commits mailing list