You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[IR] Don't store switch case values as operands (#166842)
SwitchInst case values must be ConstantInt, which have no use list.
Therefore it is not necessary to store these as Use, instead store them
more efficiently as a simple array of pointers after the uses, similar
to how PHINode stores basic blocks.
After this change, the successors of all terminators are stored
consecutively in the operand list. This is preparatory work for
improving the performance of successor access.
Copy file name to clipboardExpand all lines: llvm/docs/ReleaseNotes.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,6 +74,7 @@ Changes to the LLVM IR
74
74
format string function implementations from statically-linked libc's based on
75
75
the requirements of each call. Currently only `float` is supported; this can
76
76
keep floating point support out of printf if it can be proven unused.
77
+
* Case values are no longer operands of `SwitchInst`.
77
78
78
79
Changes to LLVM infrastructure
79
80
------------------------------
@@ -178,6 +179,7 @@ Changes to the C API
178
179
* Add `LLVMGetOrInsertFunction` to get or insert a function, replacing the combination of `LLVMGetNamedFunction` and `LLVMAddFunction`.
179
180
* Allow `LLVMGetVolatile` to work with any kind of Instruction.
180
181
* Add `LLVMConstFPFromBits` to get a constant floating-point value from an array of 64 bit values.
182
+
* Add `LLVMGetSwitchCaseValue` and `LLVMSetSwitchCaseValue` to get and set switch case values; switch case values are no longer operands of the instruction.
0 commit comments