mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Expose canInstUseRefCountValues as swift::canNeverUseValues.
canInstUseRefCountValues should have always been named canInstNotUseRefCountValues. I don't remember how it get renamed as such. Even though it is a little weird to have a "canNever" in a function name, it makes sense here to contrast it with canUseValue which returns if a specific user can use a ptr in a way that requires the ptr to be alive. This in contrast says that a user can never use a ptr in a manner where the ptr must be alive. I.e. this is a universal quantifier. Swift SVN r22961
This commit is contained in:
@@ -203,7 +203,7 @@ static bool canApplyOfBuiltinUseNonTrivialValues(BuiltinInst *BInst) {
|
||||
}
|
||||
|
||||
/// Returns true if Inst is a function that we know never uses ref count values.
|
||||
static bool canInstUseRefCountValues(SILInstruction *Inst) {
|
||||
bool swift::arc::canNeverUseValues(SILInstruction *Inst) {
|
||||
switch (Inst->getKind()) {
|
||||
// These instructions do not use other values.
|
||||
case ValueKind::FunctionRefInst:
|
||||
@@ -302,7 +302,7 @@ bool swift::arc::canUseValue(SILInstruction *User, SILValue Ptr,
|
||||
AliasAnalysis *AA) {
|
||||
// If Inst is an instruction that we know can never use values with reference
|
||||
// semantics, return true.
|
||||
if (canInstUseRefCountValues(User))
|
||||
if (canNeverUseValues(User))
|
||||
return false;
|
||||
|
||||
// If the user is a load or a store and we can prove that it does not access
|
||||
|
||||
Reference in New Issue
Block a user