mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +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:
@@ -160,7 +160,7 @@ bool ConditionForwarding::tryOptimize(SwitchEnumInst *SEI) {
|
||||
if (ArgUser == SEI)
|
||||
continue;
|
||||
|
||||
if (isDebugInst(ArgUser))
|
||||
if (ArgUser->isDebugInstruction())
|
||||
continue;
|
||||
|
||||
if (ArgUser->getParent()->getSinglePredecessorBlock() == SEI->getParent()) {
|
||||
@@ -227,7 +227,7 @@ bool ConditionForwarding::tryOptimize(SwitchEnumInst *SEI) {
|
||||
while (!Arg->use_empty()) {
|
||||
Operand *ArgUse = *Arg->use_begin();
|
||||
SILInstruction *ArgUser = ArgUse->getUser();
|
||||
if (isDebugInst(ArgUser)) {
|
||||
if (ArgUser->isDebugInstruction()) {
|
||||
// Don't care about debug instructions. Just remove them.
|
||||
ArgUser->eraseFromParent();
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user