mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SILInstruction] Introduce isDebugInstruction().
This is a property of an instruction and should be a member function of `SILInstruction` and not a free function in `DebugUtils`. Discussed with Adrian.
This commit is contained in:
@@ -579,7 +579,7 @@ bool COWArrayOpt::checkSafeArrayAddressUses(UserList &AddressUsers) {
|
||||
|
||||
for (auto *UseInst : AddressUsers) {
|
||||
|
||||
if (isDebugInst(UseInst))
|
||||
if (UseInst->isDebugInstruction())
|
||||
continue;
|
||||
|
||||
if (auto *AI = dyn_cast<ApplyInst>(UseInst)) {
|
||||
@@ -698,7 +698,7 @@ bool COWArrayOpt::checkSafeArrayValueUses(UserList &ArrayValueUsers) {
|
||||
if (isa<MarkDependenceInst>(UseInst))
|
||||
continue;
|
||||
|
||||
if (isDebugInst(UseInst))
|
||||
if (UseInst->isDebugInstruction())
|
||||
continue;
|
||||
|
||||
// Found an unsafe or unknown user. The Array may escape here.
|
||||
@@ -761,7 +761,7 @@ bool COWArrayOpt::checkSafeArrayElementUse(SILInstruction *UseInst,
|
||||
if (isa<MarkDependenceInst>(UseInst))
|
||||
return true;
|
||||
|
||||
if (isDebugInst(UseInst))
|
||||
if (UseInst->isDebugInstruction())
|
||||
return true;
|
||||
|
||||
// If this is an instruction which is a safe array element use if and only if
|
||||
@@ -1764,7 +1764,7 @@ private:
|
||||
bool checkSafeArrayAddressUses(UserList &AddressUsers) {
|
||||
for (auto *UseInst : AddressUsers) {
|
||||
|
||||
if (isDebugInst(UseInst))
|
||||
if (UseInst->isDebugInstruction())
|
||||
continue;
|
||||
|
||||
if (isa<DeallocStackInst>(UseInst)) {
|
||||
|
||||
Reference in New Issue
Block a user