AaronBallman wrote:

> @cor3ntin Looking at this again... while I'd also like to see the general 
> solution, I'd probably apply this anyway since it makes it clearer that this 
> function can actually be fast. Its name is terrible for what it does. It 
> sounds like it's a simply getter but in reality it might be pretty costly to 
> call. This patch would mitigate this somewhat and make the performance 
> expectations clearer when reading the code of this function.

Once we have the general solution, this code would be redundant, wouldn't it? 
(I also would prefer the more general solution if reasonable -- playing 
whack-a-mole on constant evaluation is going to make for maintenance problems 
and this is an issue that plagues other parts of the compiler as well.)

https://github.com/llvm/llvm-project/pull/66203
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to