-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CIR][IR] Refactor parsing/printing of implicitly terminated regions (#…
…310) Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * #314 * #313 * #312 * #311 * __->__ #310 The `shouldPrintTerm` and `checkBlockTerminator` were replaced in favor of `omitRegionTerm` and `ensureRegionTerm` respectively. The first is essentially the same method but simplified. The latter was refactored to do only two things: check if the terminator omission of a region is valid and, if so, insert the omitted terminator into the region. The simplifications mostly leverage the fact that we only omit empty yield values in a single-block region.
- Loading branch information
1 parent
ed1bd8f
commit 9af56b7
Showing
2 changed files
with
55 additions
and
91 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