Min-Yih Hsu
1fe4f2d1a4
[Inliner][test] Fix incorrect REQUIRE line in inline-switch-default.ll (NFC) ( #95009 )
...
It should be `x86-registered-target` because we only need the X86 target
in this case. `x86_64-linux` will be too strict here as it puts a
prerequisite on the default target triple.
2024-06-10 15:32:35 -07:00
DianQK
d48bf8aef2
Reapply "[InlineCost] Correct the default branch cost for the switch statement ( #85160 )"
...
This reverts commit c6e4f6309184814dfc4bb855ddbdb5375cc971e0.
2024-05-10 21:18:53 +08:00
DianQK
c6e4f63091
Revert "[InlineCost] Correct the default branch cost for the switch statement ( #85160 )"
...
This reverts commit 882814edd33cab853859f07b1dd4c4fa1393e0ea.
2024-05-05 21:54:30 +08:00
Quentin Dian
882814edd3
[InlineCost] Correct the default branch cost for the switch statement ( #85160 )
...
Fixes #81723 .
The earliest commit of the related code is:
919f9e8d65 .
I tried to understand the following code with
https://github.com/llvm/llvm-project/pull/77856#issuecomment-1993499085 .
5932fcc478/llvm/lib/Analysis/InlineCost.cpp (L709-L720)
I think only scenarios where there is a default branch were considered.
2024-05-05 21:28:31 +08:00
Quentin Dian
5932fcc478
[InlineCost] Consider the default branch when calculating cost ( #77856 )
...
First step in fixing #76772 .
This PR considers the default branch as a case branch. This will give
the unreachable default branch fair consideration.
2024-02-11 18:24:59 +08:00