[PATCH] D86295: [analyzer] Reorder the layout of MemRegion and cache by hand for optimal size

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 21 23:58:25 PDT 2020


NoQ added a comment.

In D86295#2230603 <https://reviews.llvm.org/D86295#2230603>, @steakhal wrote:

> In D86295#2229712 <https://reviews.llvm.org/D86295#2229712>, @NoQ wrote:
>
>> Heh, nice! Did you try to measure the actual impact of this change on memory and/or performance?
>
> Eh, I don't really know how to bench this.

I mean, like, you can measure the entire process with `time` or something like that. I believe @vsavchenko's docker thingy already knows how to do that.

> It seems that at least with this configuration the `MemRegion::getAsOffset` was called every single time.

What i'm trying to say is that for almost every region //R// it's a trivial O(1) operation that yields `RegionOffset` (//R//, +0). It is only non-trivial for non-base regions like `FieldRegion` or `ElementRegion` or, well, `CXXBaseObjectRegion`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86295



More information about the cfe-commits mailing list