[SIL][PackageCMO] Allow optimizing [serialized_for_pkg] functions during SIL

inlining, generic/closure specialization, and devirtualization optimization passes.

SILFunction::canBeInlinedIntoCaller now exlicitly requires a caller's SerializedKind_t arg.
isAnySerialized() is added as a convenience function that checks if [serialized] or [serialized_for_pkg].

Resolves rdar://128704752
This commit is contained in:
Ellie Shin
2024-05-23 16:14:15 -07:00
parent 67e9df028e
commit 4ecfc96578
25 changed files with 123 additions and 178 deletions

View File

@@ -154,11 +154,10 @@ public:
/// Check if this global variable is [serialized]. This does not check
/// if it's [serialized_for_package].
bool isSerialized() const;
/// Check if this global variable is [serialized_for_package].
bool isSerializedForPackage() const;
/// Checks whether this global var is neither [serialized] nor
/// [serialized_for_package].
bool isNotSerialized() const;
/// Check if this global variable is [serialized] or [serialized_for_package].
bool isAnySerialized() const;
/// Get this global variable's serialized attribute.
SerializedKind_t getSerializedKind() const;
void setSerializedKind(SerializedKind_t isSerialized);