mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ownership] Change SILUndef to return Any ownership for trivial values and owned for non-trivial values.
This is in preparation for verifying that when ownership verification is enabled that only enums and trivial values can have any ownership. I am doing this in preparation for eliminating ValueOwnershipKind::Trivial. rdar://46294760
This commit is contained in:
@@ -595,7 +595,7 @@ static bool removeAndReleaseArray(SingleValueInstruction *NewArrayValue,
|
||||
return false;
|
||||
}
|
||||
// For each store location, insert releases.
|
||||
SILSSAUpdater SSAUp;
|
||||
SILSSAUpdater SSAUp(ArrayDef->getModule());
|
||||
ValueLifetimeAnalysis::Frontier ArrayFrontier;
|
||||
if (!VLA.computeFrontier(ArrayFrontier,
|
||||
ValueLifetimeAnalysis::UsersMustPostDomDef,
|
||||
|
||||
@@ -1191,7 +1191,7 @@ void BlockState::dump(RLEContext &Ctx) {
|
||||
RLEContext::RLEContext(SILFunction *F, SILPassManager *PM, AliasAnalysis *AA,
|
||||
TypeExpansionAnalysis *TE, PostOrderFunctionInfo *PO,
|
||||
EpilogueARCFunctionInfo *EAFI, bool disableArrayLoads)
|
||||
: Fn(F), PM(PM), AA(AA), TE(TE), PO(PO), EAFI(EAFI),
|
||||
: Fn(F), PM(PM), AA(AA), TE(TE), Updater(F->getModule()), PO(PO), EAFI(EAFI),
|
||||
ArrayType(disableArrayLoads ?
|
||||
F->getModule().getASTContext().getArrayDecl() : nullptr)
|
||||
#ifndef NDEBUG
|
||||
|
||||
@@ -207,7 +207,7 @@ static bool isUsedOutsideOfBlock(SILValue V, SILBasicBlock *BB) {
|
||||
/// Helper function to perform SSA updates in case of jump threading.
|
||||
void swift::updateSSAAfterCloning(BasicBlockCloner &Cloner,
|
||||
SILBasicBlock *SrcBB, SILBasicBlock *DestBB) {
|
||||
SILSSAUpdater SSAUp;
|
||||
SILSSAUpdater SSAUp(SrcBB->getParent()->getModule());
|
||||
for (auto AvailValPair : Cloner.AvailVals) {
|
||||
ValueBase *Inst = AvailValPair.first;
|
||||
if (Inst->use_empty())
|
||||
|
||||
Reference in New Issue
Block a user