C#: Add CFG test with exponential splitting

This test times out as it would require constructing 2^40 copies of the same node.
This commit is contained in:
Tom Hvitved
2019-02-06 10:02:14 +01:00
parent ab8ad9f8e6
commit 7d11eb5758
2 changed files with 174 additions and 0 deletions

View File

@@ -0,0 +1,169 @@
class SplittingStressTest
{
void M(bool b1, bool b2, bool b3, bool b4, bool b5, bool b6, bool b7, bool b8, bool b9, bool b10, bool b11, bool b12, bool b13, bool b14, bool b15, bool b16, bool b17, bool b18, bool b19, bool b20, bool b21, bool b22, bool b23, bool b24, bool b25, bool b26, bool b27, bool b28, bool b29, bool b30, bool b31, bool b32, bool b33, bool b34, bool b35, bool b36, bool b37, bool b38, bool b39, bool b40)
{
if (b1)
;
if (b2)
;
if (b3)
;
if (b4)
;
if (b5)
;
if (b6)
;
if (b7)
;
if (b8)
;
if (b9)
;
if (b10)
;
if (b11)
;
if (b12)
;
if (b13)
;
if (b14)
;
if (b15)
;
if (b16)
;
if (b17)
;
if (b18)
;
if (b19)
;
if (b20)
;
if (b21)
;
if (b22)
;
if (b23)
;
if (b24)
;
if (b25)
;
if (b26)
;
if (b27)
;
if (b28)
;
if (b29)
;
if (b30)
;
if (b31)
;
if (b32)
;
if (b33)
;
if (b34)
;
if (b35)
;
if (b36)
;
if (b37)
;
if (b38)
;
if (b39)
;
if (b40)
;
; // 2^40 splits
if (b1)
;
if (b2)
;
if (b3)
;
if (b4)
;
if (b5)
;
if (b6)
;
if (b7)
;
if (b8)
;
if (b9)
;
if (b10)
;
if (b11)
;
if (b12)
;
if (b13)
;
if (b14)
;
if (b15)
;
if (b16)
;
if (b17)
;
if (b18)
;
if (b19)
;
if (b20)
;
if (b21)
;
if (b22)
;
if (b23)
;
if (b24)
;
if (b25)
;
if (b26)
;
if (b27)
;
if (b28)
;
if (b29)
;
if (b30)
;
if (b31)
;
if (b32)
;
if (b33)
;
if (b34)
;
if (b35)
;
if (b36)
;
if (b37)
;
if (b38)
;
if (b39)
;
if (b40)
;
;
}
}

View File

@@ -0,0 +1,5 @@
import csharp
from ControlFlowElement cfe, int i
where i = strictcount(ControlFlow::Nodes::ElementNode n | n.getElement() = cfe)
select cfe, i