-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Open
Labels
designDesign of APIs or of the language itselfDesign of APIs or of the language itself
Description
This has been discussed on slack a bit, but the implicit fallthrough terminator design is
pretty terrible from the point of view of a user actually trying to do CFG manipulations.
The main problems I see with it are:
- Basic blocks can't be inserted without worrying about whether the previous block had an implicit fallthrough
- Every manipulation that needs to insert statements at the end of the basic block needs special logic to determine whether or not the final statement is a terminator or not and needs separate code paths based on it
GotoIfNotis not particularly symmetric and operations that operate on it need two separate code paths, depending on whether the case they're interested in is the fallthrough or the explicit terminator.
In general our IR data structures work ok for what we need in base, but are quite problematic for general compiler needs. We should see what part of this needs a refactor in Base and what needs to be provided by external packages.
vtjnash, aviatesk, vchuravy, StefanKarpinski, maleadt and 2 morevchuravy, StefanKarpinski, hildebrandmw and tkf
Metadata
Metadata
Assignees
Labels
designDesign of APIs or of the language itselfDesign of APIs or of the language itself