tbaederr wrote:

> I do not know if this is a good change - There is a pre-existing bug that we 
> recompute constant expressions more than we should [#62947 
> (comment)](https://github.com/llvm/llvm-project/issues/62947#issuecomment-4215827086)
>  And sure, void expressions don't have a result but if we do not cache them 
> they'd be recomputed anyway.
> 
> I don't know how this will matter in the long run - it currently does not per 
> your benchmarks - but if anything we should probably use ConstantExpr in more 
> places, not fewer.

The intent is not to disable caching for void nodes, but to _not_ create 
ConstantExpr nodes if we have no result at all (so if the evaluation failed, or 
if we never evaluated anything). A void ConstantExpr with a `None` result still 
tells us that the evaluation succeeded.

https://github.com/llvm/llvm-project/pull/229761
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to