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

@@ -35,8 +35,8 @@ Linked vertex stage:
7: TypeInt 32 1
8: TypePointer Function 7(int)
10: 7(int) Constant 0
14: 7(int) Constant 10
15: TypeBool
15: 7(int) Constant 10
16: TypeBool
19: 7(int) Constant 1
21: 7(int) Constant 2
30: 7(int) Constant 5
@@ -54,15 +54,15 @@ Linked vertex stage:
Store 9(i) 10
Branch 11
11: Label
13: 7(int) Load 9(i)
16: 15(bool) SLessThan 13 14
14: 7(int) Load 9(i)
17: 16(bool) SLessThan 14 15
LoopMerge 12 None
BranchConditional 16 17 12
17: Label
BranchConditional 17 13 12
13: Label
Store 18(A) 19
20: 7(int) Load 9(i)
22: 7(int) SMod 20 21
23: 15(bool) IEqual 22 10
23: 16(bool) IEqual 22 10
SelectionMerge 25 None
BranchConditional 23 24 25
24: Label
@@ -74,7 +74,7 @@ Linked vertex stage:
25: Label
29: 7(int) Load 9(i)
31: 7(int) SMod 29 30
32: 15(bool) IEqual 31 10
32: 16(bool) IEqual 31 10
SelectionMerge 34 None
BranchConditional 32 33 34
33: Label