[llvm] [InlineCost] Consider the default branch when calculating cost (PR #77856)

Quentin Dian via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 8 05:51:22 PST 2024


DianQK wrote:

> > Emm, looks like a lot of callees cannot be inlined after this patch. I'd like to decrease the inline cost of `switch w/ unreachable default branch` cases, instead of increasing the cost of other common cases.
> 
> Indeed, this is different from what was initially assumed. But from the code, I think there is a real omission of default branch handling here. I was just considering adding a bias experiment, but this would cause the consumption of small no-default branches to go negative.

@dtcxzyw
Any more comments? At least for now, this is because we forgot about the default branching situation earlier.

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


More information about the llvm-commits mailing list