-
Notifications
You must be signed in to change notification settings - Fork 413
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19858 from dlongnecke-cray/dyno-pass-call-destruc…
…tors-0 Turn some subpasses in callDestructors into PassManager passes (#19858) Turn some subpasses within the `callDestructors` pass into passes runnable by the new `PassManager`. The functions turned into passes are: - `createIteratorBreakBlocks()`: Lowering, creates blocks to cleanup local variables in an iterator at each yield point - `fixupDestructors()`: Generate destructor bodies by issuing concrete destructor calls for each field - `insertAutoDestroyPrimsForLoopExprTemps()`: Fixes a memory leak related to bracket loops being interpreted as types? Not entirely sure, but a pass meant to fix a leak. Additionally, adjust the pass managers to iterate over the `Vec` and `std::vector` types using fixed-length index based iteration instead of range based for (e.g., `for (int i = 0; ...)` versus `for (auto x : vec)`. This is because some passes over e.g., `CallExpr` will also insert additional calls into the global vector, which causes iterator invalidation if the vector is resized. Preemptively adjust the `convertClassTypes` pass so that it does not take a function pointer argument, and calls `convertToCanonical` instead. I think in the future `dyno` should probably just emit canonical class types directly, though. Reviewed by @mppf. Thanks! TESTING - [x] `ALL` on `linux64`, `standard` Signed-off-by: David Longnecker <dlongnecke-cray@users.noreply.github.com>
- Loading branch information
Showing
6 changed files
with
219 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.