Performance annotations: add attributes @_noLocks and @_noAllocation

This commit is contained in:
Erik Eckstein
2021-10-21 22:04:27 +02:00
parent 60f3d61031
commit 8229b374b1
16 changed files with 113 additions and 11 deletions

View File

@@ -526,14 +526,16 @@ SILDeserializer::readSILFunctionChecked(DeclID FID, SILFunction *existingFn,
GenericSignatureID genericSigID;
unsigned rawLinkage, isTransparent, isSerialized, isThunk,
isWithoutactuallyEscapingThunk, specialPurpose, inlineStrategy,
optimizationMode, subclassScope, hasCReferences, effect, numSpecAttrs,
optimizationMode, perfConstr,
subclassScope, hasCReferences, effect, numSpecAttrs,
hasQualifiedOwnership, isWeakImported, LIST_VER_TUPLE_PIECES(available),
isDynamic, isExactSelfClass;
ArrayRef<uint64_t> SemanticsIDs;
SILFunctionLayout::readRecord(
scratch, rawLinkage, isTransparent, isSerialized, isThunk,
isWithoutactuallyEscapingThunk, specialPurpose, inlineStrategy,
optimizationMode, subclassScope, hasCReferences, effect, numSpecAttrs,
optimizationMode, perfConstr,
subclassScope, hasCReferences, effect, numSpecAttrs,
hasQualifiedOwnership, isWeakImported, LIST_VER_TUPLE_PIECES(available),
isDynamic, isExactSelfClass, funcTyID, replacedFunctionID, genericSigID,
clangNodeOwnerID, SemanticsIDs);
@@ -656,6 +658,7 @@ SILDeserializer::readSILFunctionChecked(DeclID FID, SILFunction *existingFn,
fn->setSpecialPurpose(SILFunction::Purpose(specialPurpose));
fn->setEffectsKind(EffectsKind(effect));
fn->setOptimizationMode(OptimizationMode(optimizationMode));
fn->setPerfConstraints((PerformanceConstraints)perfConstr);
fn->setAlwaysWeakImported(isWeakImported);
fn->setClassSubclassScope(SubclassScope(subclassScope));
fn->setHasCReferences(bool(hasCReferences));
@@ -2921,14 +2924,16 @@ bool SILDeserializer::hasSILFunction(StringRef Name,
GenericSignatureID genericSigID;
unsigned rawLinkage, isTransparent, isSerialized, isThunk,
isWithoutactuallyEscapingThunk, isGlobal, inlineStrategy,
optimizationMode, subclassScope, hasCReferences, effect, numSpecAttrs,
optimizationMode, perfConstr,
subclassScope, hasCReferences, effect, numSpecAttrs,
hasQualifiedOwnership, isWeakImported, LIST_VER_TUPLE_PIECES(available),
isDynamic, isExactSelfClass;
ArrayRef<uint64_t> SemanticsIDs;
SILFunctionLayout::readRecord(
scratch, rawLinkage, isTransparent, isSerialized, isThunk,
isWithoutactuallyEscapingThunk, isGlobal, inlineStrategy,
optimizationMode, subclassScope, hasCReferences, effect, numSpecAttrs,
optimizationMode, perfConstr,
subclassScope, hasCReferences, effect, numSpecAttrs,
hasQualifiedOwnership, isWeakImported, LIST_VER_TUPLE_PIECES(available),
isDynamic, isExactSelfClass, funcTyID, replacedFunctionID, genericSigID,
clangOwnerID, SemanticsIDs);