Commit b0769aa
authored
[IR] Make intrinsic checks more efficient (NFC) (#148682)
Directly cast the callee operand instead of going through
getCalledFunction(). We can do this because for intrinsics the function
type between the call and the function is guaranteed to match.
This is a minor compile-time improvement as is, but has a much bigger
impact with a future change that makes getCalledFunction() more
expensive.
There is some code duplication between these four uses, but they are
each just different enough that representing one in terms of another
would be less efficient.1 parent 13d8188 commit b0769aa
File tree
3 files changed
+5
-6
lines changed- llvm
- include/llvm/IR
- lib/IR
3 files changed
+5
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
135 | | - | |
136 | | - | |
| 134 | + | |
| 135 | + | |
137 | 136 | | |
138 | 137 | | |
139 | 138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2633 | 2633 | | |
2634 | 2634 | | |
2635 | 2635 | | |
2636 | | - | |
| 2636 | + | |
2637 | 2637 | | |
2638 | 2638 | | |
2639 | 2639 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
358 | | - | |
| 358 | + | |
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
| |||
0 commit comments