detect invalid branches in the IR
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest5 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | add testcase for 'jump inside discarded expression statement'validation/ | +28 | 0 replies | |
| 2/5 | add testcases for linearization of invalid labelsvalidation/ | +19 | 0 replies | |
| 3/5 | do not issue a branch to non-existent labellinearize.c validation/ | +11 | 0 replies | |
| 4/5 | extract add_jump() from add_goto()linearize.c | +11 | 0 replies | |
| 5/5 | perform early CFG cleanupflow.c flow.h linearize.c +3 more | +37 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [SPARSE PATCH 0/5] detect invalid branches in the IR
It's not allowed to do a goto into an expression statement. For exemple, it's not well defined what should happen if such an expression is not otherwise reachable and/or can be optimized away. For such situations GCC issues an error, clang doesn't and produce a valid IR but spare produce an invalid IR with branches to unexisting BBs.
The goal of the patches in this series is:
*) To detect such gotos and issue a sensible error. *) To make the IR somehow valid. Since the original
expression has been optimized away, the IR replace the goto by a branch to itself.
-- Luc
base-commit: 79f7ac984473d031dfb9cef00119c2d542d0d4a6
Signature · 1 line
2.26.0