SwiftCompilerSources: move SIL-related Context APIs from Optimizer to the SIL module

This commit is contained in:
Erik Eckstein
2025-07-28 10:38:45 +02:00
parent 319f49ad9f
commit 41a6b8e257
20 changed files with 361 additions and 430 deletions

View File

@@ -56,7 +56,7 @@ extension BuiltinInst : OnoneSimplifiable, SILCombineSimplifiable {
case .Xor:
simplifyNegation(context)
default:
if let literal = constantFold(context) {
if let literal = context.constantFold(builtin: self) {
uses.replaceAll(with: literal, context)
}
}
@@ -240,7 +240,7 @@ private extension BuiltinInst {
if constantFoldStringNullPointerCheck(isEqual: isEqual, context) {
return
}
if let literal = constantFold(context) {
if let literal = context.constantFold(builtin: self) {
uses.replaceAll(with: literal, context)
}
}