[llvm] [ConstantFolding] Add flag to disable call folding (PR #140270)

Artem Belevich via llvm-commits llvm-commits at lists.llvm.org
Wed May 28 10:10:32 PDT 2025


Artem-B wrote:

> If we want such a debugging flag, I think this is the wrong heuristic.

It's **a** heuristic that works well enough for the immediate use case @LewisCrawford needs it for right now.

But I agree that it would be nice to make the selection more granular. 

I think pattern matching applicable functions, similar to how we select them for `-filter-print-funcs` may work in this case. Selecting them based on argument type happens to work in this case, but, IMO it's a bit too wide (we may not want/need all such functions) and too narrow (we may want other functions. Comparing FP results between host and device is only one of the possible use cases for such a flag)



https://github.com/llvm/llvm-project/pull/140270


More information about the llvm-commits mailing list