It was still broken, even after `feature/alignment-fixes`, so
this commit softens requirements even further, to allow some of
the desired cases to pass through the verifier.
Improve the detection of non-module files in `MyPyPass` to avoid python
scripts being erroneously passed to mypy together, causing the error
`Duplicate module named` in mypy.
Implement a new beautify pass which simplifies away `SwitchBreakNode`s
that constitute the entire body of `case`s in `switch`es, that do not,
have a `default` case. In such situations indeed, the semantics is,
preserved by removing the `SwitchBreakNode`s.
We drop the assumption that each weaved `switch` must be nested inside
its related main `switch`, as a consequence of having generalized the
tiling algorithm in order to be able to emit a weaved `switch` as a AST
successors of the related main `switch`.
Various improvements to the debug graphs for `restructure-cfg` and
`beautify`:
- Normalize casing and syntax of debug graphs.
- Improve the graph folders name and layout.
- Implement `CFGDumper` and `ASTDumper` for when we need a serialization
with incremental indexes.
- Remove old and stale graph serializations.
Do not re-enqueue conditional nodes a for combing, when duplicating a
conditional.
This can be done in such way, thanks to the property that we process
conditional nodes in postorder. Therefore, if conditional node A causes
the duplication of, say, node B, we have the guarantee that such node B
has already been processed by the combing. Therefore, the clone of node
B, say node B', should not be reprocessed for combing.
Rewrite the `getOptionsfromCFGFile` function using llvm facilities.
The new code has the following features.
- It avoids the default behaviour of `std::fstream` of opening the file
in read-write.
- It's stricter should an error occur when opening the file.