[polly] r262113 - ScopInfo: Add function to invalidate ScopArrayInfo object

Hongbin Zheng via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 26 23:25:11 PST 2016


On Sat, Feb 27, 2016 at 3:21 PM, Tobias Grosser <tobias at grosser.es> wrote:

> On 02/27/2016 08:16 AM, Hongbin Zheng wrote:
>
>>     +  ///
>>     +  /// @param BasePtr The base pointer of the ScopArrayInfo object
>>     to invalidate.
>>     +  /// @param Kind    The Kind of the ScopArrayInfo object.
>>     +  void invalidateScopArrayInfo(Value *BasePtr,
>>     ScopArrayInfo::MemoryKind Kind) {
>>     +    ScopArrayInfoMap.erase(std::make_pair(BasePtr, Kind));
>>
>> Can we use a PointerIntPair as the key here instead? the BasePtr should
>> be already guarded by the AssertingVH inside ScopArrayInfo.
>>
>
> What would be the benefit of using a PointerIntPair? This is a pure
> performance optimization, right?
>
> In case this is just about performance, I would prefer not to use
> PointerIntPairs. This code is likely not performance sensitive and
> PointerIntPairs are from my point of view harder to read and debug as
> normal pairs.
>
Ok

>
> Best,
> Tobias
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160227/47728c2c/attachment.html>


More information about the llvm-commits mailing list