mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #82800 from eeckstein/fix-metatype-in-mpo-6.2
[6.2] MandatoryPerformanceOptimizations: don't specialize vtables for thin class metatype instructions
This commit is contained in:
@@ -122,7 +122,8 @@ private func optimize(function: Function, _ context: FunctionPassContext, _ modu
|
||||
}
|
||||
}
|
||||
case let metatype as MetatypeInst:
|
||||
if context.options.enableEmbeddedSwift {
|
||||
if context.options.enableEmbeddedSwift,
|
||||
metatype.type.representationOfMetatype == .thick {
|
||||
let instanceType = metatype.type.loweredInstanceTypeOfMetatype(in: function)
|
||||
if instanceType.isClass {
|
||||
specializeVTable(forClassType: instanceType, errorLocation: metatype.location, moduleContext) {
|
||||
|
||||
Reference in New Issue
Block a user