[llvm] Refactored llvm::UpgradeIntrinsicCall() function in lib/IR/AutoUpgrade.cpp with lookup table based on #30382 (PR #128611)

Ali Raeisdanaei via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 27 15:00:49 PST 2025


aliraeisdanaei wrote:

> This change makes very little sense. You're creating the table for every single upgrade and then walking over the table. It makes the code slower and does not make it clearer.

What do you propose be done? The issue related to not using if else statements. You can initialise a lookup table with all the values, but I don't see how you can avoid the walking over. I'm merely asking for your help. Let me know your ideas.

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


More information about the llvm-commits mailing list