aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/mem2reg/cond-expr5.c
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-11-12 22:01:10 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-11-17 18:03:24 +0100
commit28677f8ac6efd939b2bd306a2b1af0f95ef44136 (patch)
treedd406eaa21360a4cd21aa206ccf5bb9f6cf3b298 /validation/mem2reg/cond-expr5.c
parent6b5e7cf5ac390f12472f914737c8a947eed0afe0 (diff)
downloadsparse-dev-28677f8ac6efd939b2bd306a2b1af0f95ef44136.tar.gz
cfg: early CFG simplification
The linearization step sometimes creates a lot of intermediate basic blocks, often containing just a branch. Their presence often make things more complicated than needed (more work to do in later phases, visual clutter when inspection the IR 'by hand') and they can sometimes, indirectly hinder some optimizations. Happily, most of them can trivially be optimized away. So, add a CFG simplification phase running very early and doing: *) jump threading (eliminate jump to jump) *) merge single-child/sinle-parents basic blocks. These changes slightly decrease the number of 'context imbalance' warnings (32 less on a total of 995 warnings) and the size of the generated IR (only ~0.4% but this is very significant relatively to most other simplifications). They also seem to improve the kernel tests' running time: before after real 4m19.261s real 4m17.548s user 72m03.634s user 71m34.642s sys 29m05.573s sys 29m01.856s but it's probably just noise. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/mem2reg/cond-expr5.c')
-rw-r--r--validation/mem2reg/cond-expr5.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/validation/mem2reg/cond-expr5.c b/validation/mem2reg/cond-expr5.c
index a3ce5e3a..beef8f25 100644
--- a/validation/mem2reg/cond-expr5.c
+++ b/validation/mem2reg/cond-expr5.c
@@ -15,7 +15,6 @@ int foo(int p, int q, int a)
* check-output-ignore
* check-output-excludes: load\\.
* check-output-excludes: store\\.
- * check-output-excludes: phi\\..*, .*, .*
- * check-output-pattern(3): phi\\.
- * check-output-pattern(5): phisrc\\.
+ * check-output-pattern(2): phi\\.
+ * check-output-pattern(4): phisrc\\.
*/