spv::Builder::Loop constructor inits all members.

After construction, the Loop is effectively const.

This perturbs the IDs in SPIR-V tests because the body block
is created before generating any of the loop code, rather than
only when the body is first referenced.
This commit is contained in:
David Neto
2015-07-17 17:11:22 -04:00
parent 222457054e
commit 3e6a33cedf
16 changed files with 458 additions and 453 deletions

View File

@@ -41,12 +41,12 @@ Linked vertex stage:
7: TypeInt 32 1
8: TypePointer Function 7(int)
10: 7(int) Constant 0
14: TypeBool
15: 14(bool) ConstantTrue
15: TypeBool
16: 15(bool) ConstantTrue
20: 7(int) Constant 1
22: 7(int) Constant 19
27: 7(int) Constant 2
32: 14(bool) ConstantFalse
32: 15(bool) ConstantFalse
36: 7(int) Constant 5
41: 7(int) Constant 3
44: 7(int) Constant 42
@@ -68,25 +68,25 @@ Linked vertex stage:
Store 9(i) 10
Branch 11
11: Label
13: 14(bool) Phi 15 5 32 29 32 39
14: 15(bool) Phi 16 5 32 29 32 39
LoopMerge 12 None
Branch 16
16: Label
SelectionMerge 17 None
BranchConditional 13 17 18
Branch 17
17: Label
SelectionMerge 13 None
BranchConditional 14 13 18
18: Label
19: 7(int) Load 9(i)
21: 7(int) IAdd 19 20
Store 9(i) 21
23: 14(bool) SLessThan 21 22
23: 15(bool) SLessThan 21 22
SelectionMerge 24 None
BranchConditional 23 24 12
24: Label
Branch 17
17: Label
Branch 13
13: Label
Store 25(A) 10
26: 7(int) Load 9(i)
28: 14(bool) IEqual 26 27
28: 15(bool) IEqual 26 27
SelectionMerge 30 None
BranchConditional 28 29 30
29: Label
@@ -97,7 +97,7 @@ Linked vertex stage:
Branch 30
30: Label
35: 7(int) Load 9(i)
37: 14(bool) IEqual 35 36
37: 15(bool) IEqual 35 36
SelectionMerge 39 None
BranchConditional 37 38 39
38: Label