[PATCH] D84608: [LAA] Avoid adding pointers to the checks if they are not needed.

Stefanos Baziotis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 30 07:40:52 PDT 2020


baziotis added a comment.

In D84608#2184786 <https://reviews.llvm.org/D84608#2184786>, @fhahn wrote:

> Thanks for taking a look @baziotis  & @anemet !
>
> In D84608#2177006 <https://reviews.llvm.org/D84608#2177006>, @baziotis wrote:
>
>> In D84608#2176574 <https://reviews.llvm.org/D84608#2176574>, @fhahn wrote:
>>
>>> In D84608#2174659 <https://reviews.llvm.org/D84608#2174659>, @baziotis wrote:
>>>
>>>> Instead of accumulating in `AccessInfos`, couldn't we just reiterate the alias set (if we didn't bail out)?
>>>
>>> Yes, I think either approach is fine. The current way avoids a few repeated lookups, but in the grand scheme of things I don't think it makes a big difference.
>>
>> You mean in `Accesses`.. Well, since the iteration in an `AliasSet` is deterministic we could also only save the `bool`s in a `BitVector` and both save memory and not do lookups. But never mind if you consider it overthinking / nitpicking.
>
> Yeah, this code is very unlikely to be performance critical, so IMO we should try to make the code as straight-forward as possible. I think it would be good to stick with the version in the patch initially and potentially do follow-on improvements as follow-up patches.

Of course, yes.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84608/new/

https://reviews.llvm.org/D84608



More information about the llvm-commits mailing list