Skip to content

Commit

Permalink
[Transforms] Fix -Wunused-variable and remove redundant VerifyStates …
Browse files Browse the repository at this point in the history
…after #75826 (NFC)

llvm-project/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp:1064:18: error: unused variable 'I' [-Werror,-Wunused-variable]
    Instruction *I = cast<Instruction>(Pair.first);
                 ^
llvm-project/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp:1066:11: error: unused variable 'BaseValue' [-Werror,-Wunused-variable]
    auto *BaseValue = State.getBaseValue();
          ^
2 errors generated.
  • Loading branch information
DamonFool committed Jan 22, 2024
1 parent ebb853f commit ac3ee1b
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,6 @@ static Value *findBasePointer(Value *I, DefiningValueMapTy &Cache,
for (const auto &Pair : States) {
LLVM_DEBUG(dbgs() << " " << Pair.second << " for " << *Pair.first << "\n");
}
#endif

// since we do the conflict marking as part of the fixpoint iteration this
// loop only asserts that invariants are met
Expand All @@ -1072,9 +1071,6 @@ static Value *findBasePointer(Value *I, DefiningValueMapTy &Cache,
"why did it get added?");
assert(!State.isUnknown() && "Optimistic algorithm didn't complete!");
}

#ifndef NDEBUG
VerifyStates();
#endif

// Insert Phis for all conflicts
Expand Down

0 comments on commit ac3ee1b

Please sign in to comment.