[PATCH] D31123: RegisterPressure: Add operators to RegisterMaskPair

Mekhanoshin, Stanislav via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 19 14:39:41 PDT 2017


It may open Pandora's box. I would rather create an ancestor of a map with operator[] redefined for your instantiation.

Stas

-----Original Message-----
From: Axel Davy [mailto:axel.davy at ens.fr] 
Sent: Sunday, March 19, 2017 12:45 PM
To: reviews+D31123+public+a88be35608dd4bb7 at reviews.llvm.org; matze at braunis.de; Mekhanoshin, Stanislav; timofeev.alexander at gmail.com
Cc: llvm-commits at lists.llvm.org
Subject: Re: [PATCH] D31123: RegisterPressure: Add operators to RegisterMaskPair

This is similar to just allocating the structure.

Somehow to use maps, it complained without this constructor.
I don't think however any possible initialization value would make sense.

Perhaps UINT_MAX for Reg and 0 for LaneMask ? To clearly indicate there is error if you see these in logs ?

Axel

On 19/03/2017 20:23, Stanislav Mekhanoshin via Phabricator wrote:
> rampitec added inline comments.
>
>
> ================
> Comment at: include/llvm/CodeGen/RegisterPressure.h:45
> +
> +  RegisterMaskPair() {}
> +
> ----------------
> That is undesirable to have a constructor which does not initialize fields.
>
>
> Repository:
>    rL LLVM
>
> https://reviews.llvm.org/D31123
>
>
>



More information about the llvm-commits mailing list