mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add critical edge verification and fix SIL passes.
SIL passes were violating the existing invariant on non-cond-br critical edges in several places. I fixed the places that I could find. Wherever there was a post-pass to "clean up" critical edges, I replaced it with a a call to verification that the critical edges aren't broken in the first place. We still need to eliminate critical edges entirely before enabling ownership SIL.
This commit is contained in:
@@ -2376,9 +2376,8 @@ class SwiftArrayOptPass : public SILFunctionTransform {
|
||||
for (auto &HoistableLoopNest : HoistableLoopNests)
|
||||
ArrayPropertiesSpecializer(DT, LA, HoistableLoopNest).run();
|
||||
|
||||
// We might have cloned there might be critical edges that need splitting.
|
||||
splitAllCriticalEdges(*getFunction(), true /* only cond_br terminators*/,
|
||||
DT, nullptr);
|
||||
// Verify that no illegal critical edges were created.
|
||||
getFunction()->verifyCriticalEdges();
|
||||
|
||||
LLVM_DEBUG(getFunction()->viewCFG());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user