This is an archive of the discontinued LLVM Phabricator instance.

llvm.noalias - Clang CodeGen - check restrict variable map only for restrict-qualified lvalues
AcceptedPublic

Authored by hfinkel on Jul 9 2016, 1:38 PM.

Details

Summary

As part of D9403, John McCall asked to avoid making a DenseMap query per emitted store instruction. This can be done by restricting the query to stores to restrict-qualified LValues. I'm posting this as a separate enhancement patch to D9403 to avoid cluttering it.

Diff Detail

Event Timeline

hfinkel updated this revision to Diff 63399.Jul 9 2016, 1:38 PM
hfinkel retitled this revision from to llvm.noalias - Clang CodeGen - check restrict variable map only for restrict-qualified lvalues.
hfinkel updated this object.
hfinkel added a subscriber: cfe-commits.
majnemer accepted this revision.Jul 11 2016, 6:03 PM
majnemer added a reviewer: majnemer.
majnemer added a subscriber: majnemer.

LGTM

lib/CodeGen/CodeGenFunction.h
2752

Multiple bool parameters aren't super great. Could we make it an enum and | the two properties as needed? If it's super painful, this could be done later.

This revision is now accepted and ready to land.Jul 11 2016, 6:03 PM
rjmccall added inline comments.Jul 12 2016, 8:26 AM
lib/CodeGen/CodeGenFunction.h
2752

Alternatively, is there a reason that the qualifiers on Ty aren't sufficient for this? If we're passing down the access type anyway, I'm not sure why we need to be separately passing Volatile.

hfinkel updated this revision to Diff 73345.Oct 3 2016, 2:47 PM
hfinkel edited edge metadata.

Rebased

shafik added a subscriber: shafik.Sep 21 2023, 9:03 AM

@rjmccall is this still relevant or can we close it?

Herald added a project: Restricted Project. · View Herald TranscriptSep 21 2023, 9:03 AM