mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
PassManager: invalidate analysis if a pass forgot to do so.
If a pass forgot to call invalidateAnalysis but deleted some instructions, the pass-manager can fix this. Currently following passes do not invalidate analysis when they change the SIL: * LowerTupleAddrConstructor * DestroyAddrHoisting * MoveOnlyChecker * PredictableDeadAllocationElimination Ideally we should fix those passes. But with this addition in the pass-manager it's not strictly necessary. Fixes a compiler crash.
This commit is contained in:
@@ -1056,6 +1056,10 @@ public:
|
||||
/// See scheduledForDeletion for details.
|
||||
void flushDeletedInsts();
|
||||
|
||||
bool hasInstructionsScheduledForDeletion() const {
|
||||
return !scheduledForDeletion.empty();
|
||||
}
|
||||
|
||||
/// Looks up the llvm intrinsic ID and type for the builtin function.
|
||||
///
|
||||
/// \returns Returns llvm::Intrinsic::not_intrinsic if the function is not an
|
||||
|
||||
Reference in New Issue
Block a user