C++: Minimal IR support for GNUVectorType

Lack of support for the GCC vector extensions was causing a bunch of sanity failures in the syntax zoo. This PR adds minimal IR generation support for these types.

Added `VectorAggregateLiteral`, and factored most of `ArrayAggregateLiteral` out into the common base class `ArrayOrVectorAggregateLiteral`. I'd be happy to merge these all into `ArrayAggregateLiteral` if we don't care about the distinction.

Made a few tweaks to `TranslatedArrayExpr` to compute the element type by looking at the result type of the `ArrayExpr`, not the type of the base operand. Note that this means that for `T a[10]; a[i] = foo;`, the result of the `PointerAdd` for `a[i]` will now be `glvalue<T>`, not `T*`. This is actually more faithful to the source language, and has no semantic difference on the IR.

Added some missing `getInstructionElementSize()` overrides.

Added the new `BuiltIn` opcode, renamed the existing `BuiltInInstruction` to `BuiltInOperationInstruction`, and made any `BuiltInOperation` that we don't specifically handle translate to `BuiltIn`. `BuiltInOperationInstruction` now has a way to get the specific `BuiltInOperation`.

Added `getCanonicalQLClass()` overrides for `GNUVectorType` and `BuiltInOperation`.

Added a simple IR test for vector types.
This commit is contained in:
Dave Bartolomeo
2019-08-15 12:57:32 -07:00
parent f5a63e3a91
commit 3108d97ea5
21 changed files with 447 additions and 145 deletions

View File

@@ -8005,6 +8005,117 @@ ir.cpp:
# 1147| 2: [Handler] <handler>
# 1147| 0: [CatchBlock] { ... }
# 1149| 1: [ReturnStmt] return ...
# 1153| [TopLevelFunction] void VectorTypes(int)
# 1153| params:
# 1153| 0: [Parameter] i
# 1153| Type = [IntType] int
# 1153| body: [Block] { ... }
# 1154| 0: [DeclStmt] declaration
# 1154| 0: [VariableDeclarationEntry] definition of vi4
# 1154| Type = [SpecifiedType] __attribute((vector_size(16UL))) int
# 1154| init: [Initializer] initializer for vi4
# 1154| expr: [VectorAggregateLiteral] {...}
# 1154| Type = [GNUVectorType] __attribute((vector_size(16))) int
# 1154| ValueCategory = prvalue
# 1154| 0: [Literal,Zero] 0
# 1154| Type = [IntType] int
# 1154| Value = [Literal,Zero] 0
# 1154| ValueCategory = prvalue
# 1154| 1: [Literal] 1
# 1154| Type = [IntType] int
# 1154| Value = [Literal] 1
# 1154| ValueCategory = prvalue
# 1154| 2: [Literal] 2
# 1154| Type = [IntType] int
# 1154| Value = [Literal] 2
# 1154| ValueCategory = prvalue
# 1154| 3: [Literal] 3
# 1154| Type = [IntType] int
# 1154| Value = [Literal] 3
# 1154| ValueCategory = prvalue
# 1155| 1: [DeclStmt] declaration
# 1155| 0: [VariableDeclarationEntry] definition of x
# 1155| Type = [IntType] int
# 1155| init: [Initializer] initializer for x
# 1155| expr: [ArrayExpr] access to array
# 1155| Type = [IntType] int
# 1155| ValueCategory = prvalue(load)
# 1155| 0: [VariableAccess] vi4
# 1155| Type = [SpecifiedType] __attribute((vector_size(16UL))) int
# 1155| ValueCategory = lvalue
# 1155| 1: [VariableAccess] i
# 1155| Type = [IntType] int
# 1155| ValueCategory = prvalue(load)
# 1156| 2: [ExprStmt] ExprStmt
# 1156| 0: [AssignExpr] ... = ...
# 1156| Type = [IntType] int
# 1156| ValueCategory = lvalue
# 1156| 0: [ArrayExpr] access to array
# 1156| Type = [IntType] int
# 1156| ValueCategory = lvalue
# 1156| 0: [VariableAccess] vi4
# 1156| Type = [SpecifiedType] __attribute((vector_size(16UL))) int
# 1156| ValueCategory = lvalue
# 1156| 1: [VariableAccess] i
# 1156| Type = [IntType] int
# 1156| ValueCategory = prvalue(load)
# 1156| 1: [VariableAccess] x
# 1156| Type = [IntType] int
# 1156| ValueCategory = prvalue(load)
# 1157| 3: [DeclStmt] declaration
# 1157| 0: [VariableDeclarationEntry] definition of vi4_shuffle
# 1157| Type = [SpecifiedType] __attribute((vector_size(16UL))) int
# 1157| init: [Initializer] initializer for vi4_shuffle
# 1157| expr: [BuiltInOperation] __builtin_shufflevector
# 1157| Type = [GNUVectorType] __attribute((vector_size(16))) int
# 1157| ValueCategory = prvalue
# 1157| 0: [VariableAccess] vi4
# 1157| Type = [SpecifiedType] __attribute((vector_size(16UL))) int
# 1157| ValueCategory = prvalue(load)
# 1157| 1: [VariableAccess] vi4
# 1157| Type = [SpecifiedType] __attribute((vector_size(16UL))) int
# 1157| ValueCategory = prvalue(load)
#-----| 2: [AddExpr] ... + ...
#-----| Type = [IntType] int
#-----| Value = [AddExpr] 3
#-----| ValueCategory = prvalue
# 1157| 0: [Literal] 3
# 1157| Type = [IntType] int
# 1157| Value = [Literal] 3
# 1157| ValueCategory = prvalue
# 1157| 1: [Literal,Zero] 0
# 1157| Type = [IntType] int
# 1157| Value = [Literal,Zero] 0
# 1157| ValueCategory = prvalue
# 1157| 3: [Literal] 2
# 1157| Type = [IntType] int
# 1157| Value = [Literal] 2
# 1157| ValueCategory = prvalue
# 1157| 4: [Literal] 1
# 1157| Type = [IntType] int
# 1157| Value = [Literal] 1
# 1157| ValueCategory = prvalue
# 1157| 5: [Literal,Zero] 0
# 1157| Type = [IntType] int
# 1157| Value = [Literal,Zero] 0
# 1157| ValueCategory = prvalue
# 1158| 4: [ExprStmt] ExprStmt
# 1158| 0: [AssignExpr] ... = ...
# 1158| Type = [SpecifiedType] __attribute((vector_size(16UL))) int
# 1158| ValueCategory = lvalue
# 1158| 0: [VariableAccess] vi4
# 1158| Type = [SpecifiedType] __attribute((vector_size(16UL))) int
# 1158| ValueCategory = lvalue
# 1158| 1: [AddExpr] ... + ...
# 1158| Type = [GNUVectorType] __attribute((vector_size(16))) int
# 1158| ValueCategory = prvalue
# 1158| 0: [VariableAccess] vi4
# 1158| Type = [SpecifiedType] __attribute((vector_size(16UL))) int
# 1158| ValueCategory = prvalue(load)
# 1158| 1: [VariableAccess] vi4_shuffle
# 1158| Type = [SpecifiedType] __attribute((vector_size(16UL))) int
# 1158| ValueCategory = prvalue(load)
# 1159| 5: [ReturnStmt] return ...
perf-regression.cpp:
# 4| [CopyAssignmentOperator] Big& Big::operator=(Big const&)
# 4| params:

View File

@@ -1148,4 +1148,14 @@ void TryCatchNoCatchAny(bool b) {
}
}
// semmle-extractor-options: -std=c++17
#define vector(elcount, type) __attribute__((vector_size((elcount)*sizeof(type)))) type
void VectorTypes(int i) {
vector(4, int) vi4 = { 0, 1, 2, 3 };
int x = vi4[i];
vi4[i] = x;
vector(4, int) vi4_shuffle = __builtin_shufflevector(vi4, vi4, 3+0, 2, 1, 0);
vi4 = vi4 + vi4_shuffle;
}
// semmle-extractor-options: -std=c++17 --clang

View File

@@ -784,7 +784,7 @@ ir.cpp:
# 174| r0_10(int *) = Load : &:r0_9, ~mu0_2
# 174| r0_11(glval<int>) = VariableAddress[i] :
# 174| r0_12(int) = Load : &:r0_11, ~mu0_2
# 174| r0_13(int *) = PointerAdd[4] : r0_10, r0_12
# 174| r0_13(glval<int>) = PointerAdd[4] : r0_10, r0_12
# 174| r0_14(int) = Load : &:r0_13, ~mu0_2
# 174| r0_15(glval<int>) = VariableAddress[x] :
# 174| mu0_16(int) = Store : &:r0_15, r0_14
@@ -792,7 +792,7 @@ ir.cpp:
# 175| r0_18(int *) = Load : &:r0_17, ~mu0_2
# 175| r0_19(glval<int>) = VariableAddress[i] :
# 175| r0_20(int) = Load : &:r0_19, ~mu0_2
# 175| r0_21(int *) = PointerAdd[4] : r0_18, r0_20
# 175| r0_21(glval<int>) = PointerAdd[4] : r0_18, r0_20
# 175| r0_22(int) = Load : &:r0_21, ~mu0_2
# 175| r0_23(glval<int>) = VariableAddress[x] :
# 175| mu0_24(int) = Store : &:r0_23, r0_22
@@ -802,7 +802,7 @@ ir.cpp:
# 177| r0_28(int *) = Load : &:r0_27, ~mu0_2
# 177| r0_29(glval<int>) = VariableAddress[i] :
# 177| r0_30(int) = Load : &:r0_29, ~mu0_2
# 177| r0_31(int *) = PointerAdd[4] : r0_28, r0_30
# 177| r0_31(glval<int>) = PointerAdd[4] : r0_28, r0_30
# 177| mu0_32(int) = Store : &:r0_31, r0_26
# 178| r0_33(glval<int>) = VariableAddress[x] :
# 178| r0_34(int) = Load : &:r0_33, ~mu0_2
@@ -810,7 +810,7 @@ ir.cpp:
# 178| r0_36(int *) = Load : &:r0_35, ~mu0_2
# 178| r0_37(glval<int>) = VariableAddress[i] :
# 178| r0_38(int) = Load : &:r0_37, ~mu0_2
# 178| r0_39(int *) = PointerAdd[4] : r0_36, r0_38
# 178| r0_39(glval<int>) = PointerAdd[4] : r0_36, r0_38
# 178| mu0_40(int) = Store : &:r0_39, r0_34
# 180| r0_41(glval<int[10]>) = VariableAddress[a] :
# 180| mu0_42(int[10]) = Uninitialized[a] : &:r0_41
@@ -818,7 +818,7 @@ ir.cpp:
# 181| r0_44(int *) = Convert : r0_43
# 181| r0_45(glval<int>) = VariableAddress[i] :
# 181| r0_46(int) = Load : &:r0_45, ~mu0_2
# 181| r0_47(int *) = PointerAdd[4] : r0_44, r0_46
# 181| r0_47(glval<int>) = PointerAdd[4] : r0_44, r0_46
# 181| r0_48(int) = Load : &:r0_47, ~mu0_2
# 181| r0_49(glval<int>) = VariableAddress[x] :
# 181| mu0_50(int) = Store : &:r0_49, r0_48
@@ -826,7 +826,7 @@ ir.cpp:
# 182| r0_52(int *) = Convert : r0_51
# 182| r0_53(glval<int>) = VariableAddress[i] :
# 182| r0_54(int) = Load : &:r0_53, ~mu0_2
# 182| r0_55(int *) = PointerAdd[4] : r0_52, r0_54
# 182| r0_55(glval<int>) = PointerAdd[4] : r0_52, r0_54
# 182| r0_56(int) = Load : &:r0_55, ~mu0_2
# 182| r0_57(glval<int>) = VariableAddress[x] :
# 182| mu0_58(int) = Store : &:r0_57, r0_56
@@ -836,7 +836,7 @@ ir.cpp:
# 183| r0_62(int *) = Convert : r0_61
# 183| r0_63(glval<int>) = VariableAddress[i] :
# 183| r0_64(int) = Load : &:r0_63, ~mu0_2
# 183| r0_65(int *) = PointerAdd[4] : r0_62, r0_64
# 183| r0_65(glval<int>) = PointerAdd[4] : r0_62, r0_64
# 183| mu0_66(int) = Store : &:r0_65, r0_60
# 184| r0_67(glval<int>) = VariableAddress[x] :
# 184| r0_68(int) = Load : &:r0_67, ~mu0_2
@@ -844,7 +844,7 @@ ir.cpp:
# 184| r0_70(int *) = Convert : r0_69
# 184| r0_71(glval<int>) = VariableAddress[i] :
# 184| r0_72(int) = Load : &:r0_71, ~mu0_2
# 184| r0_73(int *) = PointerAdd[4] : r0_70, r0_72
# 184| r0_73(glval<int>) = PointerAdd[4] : r0_70, r0_72
# 184| mu0_74(int) = Store : &:r0_73, r0_68
# 185| v0_75(void) = NoOp :
# 171| v0_76(void) = ReturnVoid :
@@ -863,7 +863,7 @@ ir.cpp:
# 188| r0_7(char *) = Convert : r0_6
# 188| r0_8(glval<int>) = VariableAddress[i] :
# 188| r0_9(int) = Load : &:r0_8, ~mu0_2
# 188| r0_10(char *) = PointerAdd[1] : r0_7, r0_9
# 188| r0_10(glval<char>) = PointerAdd[1] : r0_7, r0_9
# 188| r0_11(char) = Load : &:r0_10, ~mu0_2
# 188| mu0_12(char) = Store : &:r0_5, r0_11
# 189| r0_13(glval<wchar_t *>) = VariableAddress[pwc] :
@@ -876,7 +876,7 @@ ir.cpp:
# 190| r0_20(wchar_t *) = Load : &:r0_19, ~mu0_2
# 190| r0_21(glval<int>) = VariableAddress[i] :
# 190| r0_22(int) = Load : &:r0_21, ~mu0_2
# 190| r0_23(wchar_t *) = PointerAdd[4] : r0_20, r0_22
# 190| r0_23(glval<wchar_t>) = PointerAdd[4] : r0_20, r0_22
# 190| r0_24(wchar_t) = Load : &:r0_23, ~mu0_2
# 190| mu0_25(wchar_t) = Store : &:r0_18, r0_24
# 191| v0_26(void) = NoOp :
@@ -2402,35 +2402,35 @@ ir.cpp:
# 520| r0_7(glval<int[3]>) = VariableAddress[a1] :
# 520| mu0_8(int[3]) = Uninitialized[a1] : &:r0_7
# 520| r0_9(int) = Constant[0] :
# 520| r0_10(glval<int>) = PointerAdd : r0_7, r0_9
# 520| r0_10(glval<int>) = PointerAdd[4] : r0_7, r0_9
# 520| r0_11(unknown[12]) = Constant[0] :
# 520| mu0_12(unknown[12]) = Store : &:r0_10, r0_11
# 521| r0_13(glval<int[3]>) = VariableAddress[a2] :
# 521| mu0_14(int[3]) = Uninitialized[a2] : &:r0_13
# 521| r0_15(int) = Constant[0] :
# 521| r0_16(glval<int>) = PointerAdd : r0_13, r0_15
# 521| r0_16(glval<int>) = PointerAdd[4] : r0_13, r0_15
# 521| r0_17(glval<int>) = VariableAddress[x] :
# 521| r0_18(int) = Load : &:r0_17, ~mu0_2
# 521| mu0_19(int) = Store : &:r0_16, r0_18
# 521| r0_20(int) = Constant[1] :
# 521| r0_21(glval<int>) = PointerAdd : r0_13, r0_20
# 521| r0_21(glval<int>) = PointerAdd[4] : r0_13, r0_20
# 521| r0_22(glval<float>) = VariableAddress[f] :
# 521| r0_23(float) = Load : &:r0_22, ~mu0_2
# 521| r0_24(int) = Convert : r0_23
# 521| mu0_25(int) = Store : &:r0_21, r0_24
# 521| r0_26(int) = Constant[2] :
# 521| r0_27(glval<int>) = PointerAdd : r0_13, r0_26
# 521| r0_27(glval<int>) = PointerAdd[4] : r0_13, r0_26
# 521| r0_28(int) = Constant[0] :
# 521| mu0_29(int) = Store : &:r0_27, r0_28
# 522| r0_30(glval<int[3]>) = VariableAddress[a3] :
# 522| mu0_31(int[3]) = Uninitialized[a3] : &:r0_30
# 522| r0_32(int) = Constant[0] :
# 522| r0_33(glval<int>) = PointerAdd : r0_30, r0_32
# 522| r0_33(glval<int>) = PointerAdd[4] : r0_30, r0_32
# 522| r0_34(glval<int>) = VariableAddress[x] :
# 522| r0_35(int) = Load : &:r0_34, ~mu0_2
# 522| mu0_36(int) = Store : &:r0_33, r0_35
# 522| r0_37(int) = Constant[1] :
# 522| r0_38(glval<int>) = PointerAdd : r0_30, r0_37
# 522| r0_38(glval<int>) = PointerAdd[4] : r0_30, r0_37
# 522| r0_39(unknown[8]) = Constant[0] :
# 522| mu0_40(unknown[8]) = Store : &:r0_38, r0_39
# 523| v0_41(void) = NoOp :
@@ -2607,7 +2607,7 @@ ir.cpp:
# 572| mu0_6(char[1]) = Store : &:r0_3, r0_5
# 572| r0_7(unknown[31]) = Constant[0] :
# 572| r0_8(int) = Constant[1] :
# 572| r0_9(glval<char>) = PointerAdd : r0_3, r0_8
# 572| r0_9(glval<char>) = PointerAdd[1] : r0_3, r0_8
# 572| mu0_10(unknown[31]) = Store : &:r0_9, r0_7
# 573| r0_11(glval<char[4]>) = VariableAddress[a_nopad] :
# 573| r0_12(glval<char[4]>) = StringConstant["foo"] :
@@ -2622,37 +2622,37 @@ ir.cpp:
# 576| r0_21(glval<char[2]>) = VariableAddress[c] :
# 576| mu0_22(char[2]) = Uninitialized[c] : &:r0_21
# 576| r0_23(int) = Constant[0] :
# 576| r0_24(glval<char>) = PointerAdd : r0_21, r0_23
# 576| r0_24(glval<char>) = PointerAdd[1] : r0_21, r0_23
# 576| r0_25(unknown[2]) = Constant[0] :
# 576| mu0_26(unknown[2]) = Store : &:r0_24, r0_25
# 577| r0_27(glval<char[2]>) = VariableAddress[d] :
# 577| mu0_28(char[2]) = Uninitialized[d] : &:r0_27
# 577| r0_29(int) = Constant[0] :
# 577| r0_30(glval<char>) = PointerAdd : r0_27, r0_29
# 577| r0_30(glval<char>) = PointerAdd[1] : r0_27, r0_29
# 577| r0_31(char) = Constant[0] :
# 577| mu0_32(char) = Store : &:r0_30, r0_31
# 577| r0_33(int) = Constant[1] :
# 577| r0_34(glval<char>) = PointerAdd : r0_27, r0_33
# 577| r0_34(glval<char>) = PointerAdd[1] : r0_27, r0_33
# 577| r0_35(char) = Constant[0] :
# 577| mu0_36(char) = Store : &:r0_34, r0_35
# 578| r0_37(glval<char[2]>) = VariableAddress[e] :
# 578| mu0_38(char[2]) = Uninitialized[e] : &:r0_37
# 578| r0_39(int) = Constant[0] :
# 578| r0_40(glval<char>) = PointerAdd : r0_37, r0_39
# 578| r0_40(glval<char>) = PointerAdd[1] : r0_37, r0_39
# 578| r0_41(char) = Constant[0] :
# 578| mu0_42(char) = Store : &:r0_40, r0_41
# 578| r0_43(int) = Constant[1] :
# 578| r0_44(glval<char>) = PointerAdd : r0_37, r0_43
# 578| r0_44(glval<char>) = PointerAdd[1] : r0_37, r0_43
# 578| r0_45(char) = Constant[1] :
# 578| mu0_46(char) = Store : &:r0_44, r0_45
# 579| r0_47(glval<char[3]>) = VariableAddress[f] :
# 579| mu0_48(char[3]) = Uninitialized[f] : &:r0_47
# 579| r0_49(int) = Constant[0] :
# 579| r0_50(glval<char>) = PointerAdd : r0_47, r0_49
# 579| r0_50(glval<char>) = PointerAdd[1] : r0_47, r0_49
# 579| r0_51(char) = Constant[0] :
# 579| mu0_52(char) = Store : &:r0_50, r0_51
# 579| r0_53(int) = Constant[1] :
# 579| r0_54(glval<char>) = PointerAdd : r0_47, r0_53
# 579| r0_54(glval<char>) = PointerAdd[1] : r0_47, r0_53
# 579| r0_55(unknown[2]) = Constant[0] :
# 579| mu0_56(unknown[2]) = Store : &:r0_54, r0_55
# 580| v0_57(void) = NoOp :
@@ -2980,7 +2980,7 @@ ir.cpp:
# 694| r0_10(int(&)[10]) = Load : &:r0_9, ~mu0_2
# 694| r0_11(int *) = Convert : r0_10
# 694| r0_12(int) = Constant[5] :
# 694| r0_13(int *) = PointerAdd[4] : r0_11, r0_12
# 694| r0_13(glval<int>) = PointerAdd[4] : r0_11, r0_12
# 694| r0_14(int) = Load : &:r0_13, ~mu0_2
# 694| mu0_15(int) = Store : &:r0_8, r0_14
# 695| v0_16(void) = NoOp :
@@ -3898,14 +3898,14 @@ ir.cpp:
# 875| r0_14(glval<char[5]>) = VariableAddress[a] :
# 875| r0_15(char *) = Convert : r0_14
# 875| r0_16(int) = Constant[0] :
# 875| r0_17(char *) = PointerAdd[1] : r0_15, r0_16
# 875| r0_17(glval<char>) = PointerAdd[1] : r0_15, r0_16
# 875| r0_18(char *) = Convert : r0_17
# 875| r0_19(glval<char *>) = VariableAddress[p] :
# 875| mu0_20(char *) = Store : &:r0_19, r0_18
# 876| r0_21(glval<char[5]>) = StringConstant["test"] :
# 876| r0_22(char *) = Convert : r0_21
# 876| r0_23(int) = Constant[0] :
# 876| r0_24(char *) = PointerAdd[1] : r0_22, r0_23
# 876| r0_24(glval<char>) = PointerAdd[1] : r0_22, r0_23
# 876| r0_25(glval<char *>) = VariableAddress[p] :
# 876| mu0_26(char *) = Store : &:r0_25, r0_24
# 877| r0_27(glval<char(&)[5]>) = VariableAddress[ra] :
@@ -4197,30 +4197,30 @@ ir.cpp:
# 962| r0_3(glval<int[1000]>) = VariableAddress[a1] :
# 962| mu0_4(int[1000]) = Uninitialized[a1] : &:r0_3
# 962| r0_5(int) = Constant[0] :
# 962| r0_6(glval<int>) = PointerAdd : r0_3, r0_5
# 962| r0_6(glval<int>) = PointerAdd[4] : r0_3, r0_5
# 962| r0_7(unknown[8]) = Constant[0] :
# 962| mu0_8(unknown[8]) = Store : &:r0_6, r0_7
# 962| r0_9(int) = Constant[2] :
# 962| r0_10(glval<int>) = PointerAdd : r0_3, r0_9
# 962| r0_10(glval<int>) = PointerAdd[4] : r0_3, r0_9
# 962| r0_11(int) = Constant[10002] :
# 962| mu0_12(int) = Store : &:r0_10, r0_11
# 962| r0_13(int) = Constant[3] :
# 962| r0_14(glval<int>) = PointerAdd : r0_3, r0_13
# 962| r0_14(glval<int>) = PointerAdd[4] : r0_3, r0_13
# 962| r0_15(unknown[3588]) = Constant[0] :
# 962| mu0_16(unknown[3588]) = Store : &:r0_14, r0_15
# 962| r0_17(int) = Constant[900] :
# 962| r0_18(glval<int>) = PointerAdd : r0_3, r0_17
# 962| r0_18(glval<int>) = PointerAdd[4] : r0_3, r0_17
# 962| r0_19(int) = Constant[10900] :
# 962| mu0_20(int) = Store : &:r0_18, r0_19
# 962| r0_21(int) = Constant[901] :
# 962| r0_22(glval<int>) = PointerAdd : r0_3, r0_21
# 962| r0_22(glval<int>) = PointerAdd[4] : r0_3, r0_21
# 962| r0_23(unknown[396]) = Constant[0] :
# 962| mu0_24(unknown[396]) = Store : &:r0_22, r0_23
# 963| r0_25(glval<int>) = VariableAddress[#return] :
# 963| r0_26(glval<int[1000]>) = VariableAddress[a1] :
# 963| r0_27(int *) = Convert : r0_26
# 963| r0_28(int) = Constant[900] :
# 963| r0_29(int *) = PointerAdd[4] : r0_27, r0_28
# 963| r0_29(glval<int>) = PointerAdd[4] : r0_27, r0_28
# 963| r0_30(int) = Load : &:r0_29, ~mu0_2
# 963| mu0_31(int) = Store : &:r0_25, r0_30
# 961| r0_32(glval<int>) = VariableAddress[#return] :
@@ -4387,7 +4387,7 @@ ir.cpp:
# 988| r0_8(glval<int *>) = VariableAddress[a] :
# 988| r0_9(int *) = Load : &:r0_8, ~mu0_2
# 988| r0_10(int) = Constant[0] :
# 988| r0_11(int *) = PointerAdd[4] : r0_9, r0_10
# 988| r0_11(glval<int>) = PointerAdd[4] : r0_9, r0_10
# 988| r0_12(int) = Load : &:r0_11, ~mu0_2
# 988| r0_13(glval<..(*)(..)>) = VariableAddress[fn] :
# 988| r0_14(..(*)(..)) = Load : &:r0_13, ~mu0_2
@@ -4748,7 +4748,7 @@ ir.cpp:
#-----| r0_14(glval<int &>) = FieldAddress[x] : r0_13
#-----| r0_15(int &) = Load : &:r0_14, ~mu0_2
# 1034| r0_16(int) = Load : &:r0_15, ~mu0_2
# 1034| r0_17(char *) = PointerAdd[1] : r0_11, r0_16
# 1034| r0_17(glval<char>) = PointerAdd[1] : r0_11, r0_16
# 1034| r0_18(char) = Load : &:r0_17, ~mu0_2
# 1034| mu0_19(char) = Store : &:r0_6, r0_18
# 1034| r0_20(glval<char>) = VariableAddress[#return] :
@@ -4788,7 +4788,7 @@ ir.cpp:
#-----| r0_12(lambda [] type at line 1036, col. 21 *) = CopyValue : r0_3
#-----| r0_13(glval<int>) = FieldAddress[x] : r0_12
#-----| r0_14(int) = Load : &:r0_13, ~mu0_2
# 1036| r0_15(char *) = PointerAdd[1] : r0_10, r0_14
# 1036| r0_15(glval<char>) = PointerAdd[1] : r0_10, r0_14
# 1036| r0_16(char) = Load : &:r0_15, ~mu0_2
# 1036| mu0_17(char) = Store : &:r0_6, r0_16
# 1036| r0_18(glval<char>) = VariableAddress[#return] :
@@ -4812,7 +4812,7 @@ ir.cpp:
# 1038| r0_11(char *) = Call : func:r0_10, this:r0_9
# 1038| mu0_12(unknown) = ^CallSideEffect : ~mu0_2
# 1038| r0_13(int) = Constant[0] :
# 1038| r0_14(char *) = PointerAdd[1] : r0_11, r0_13
# 1038| r0_14(glval<char>) = PointerAdd[1] : r0_11, r0_13
# 1038| r0_15(char) = Load : &:r0_14, ~mu0_2
# 1038| mu0_16(char) = Store : &:r0_6, r0_15
# 1038| r0_17(glval<char>) = VariableAddress[#return] :
@@ -4867,7 +4867,7 @@ ir.cpp:
# 1040| r0_10(char *) = Call : func:r0_9, this:r0_8
# 1040| mu0_11(unknown) = ^CallSideEffect : ~mu0_2
# 1040| r0_12(int) = Constant[0] :
# 1040| r0_13(char *) = PointerAdd[1] : r0_10, r0_12
# 1040| r0_13(glval<char>) = PointerAdd[1] : r0_10, r0_12
# 1040| r0_14(char) = Load : &:r0_13, ~mu0_2
# 1040| mu0_15(char) = Store : &:r0_6, r0_14
# 1040| r0_16(glval<char>) = VariableAddress[#return] :
@@ -4893,7 +4893,7 @@ ir.cpp:
#-----| r0_13(lambda [] type at line 1042, col. 32 *) = CopyValue : r0_3
#-----| r0_14(glval<int>) = FieldAddress[x] : r0_13
#-----| r0_15(int) = Load : &:r0_14, ~mu0_2
# 1042| r0_16(char *) = PointerAdd[1] : r0_11, r0_15
# 1042| r0_16(glval<char>) = PointerAdd[1] : r0_11, r0_15
# 1042| r0_17(char) = Load : &:r0_16, ~mu0_2
# 1042| mu0_18(char) = Store : &:r0_6, r0_17
# 1042| r0_19(glval<char>) = VariableAddress[#return] :
@@ -4928,7 +4928,7 @@ ir.cpp:
# 1045| r0_22(int &) = Load : &:r0_21, ~mu0_2
# 1045| r0_23(int) = Load : &:r0_22, ~mu0_2
# 1045| r0_24(int) = Sub : r0_19, r0_23
# 1045| r0_25(char *) = PointerAdd[1] : r0_11, r0_24
# 1045| r0_25(glval<char>) = PointerAdd[1] : r0_11, r0_24
# 1045| r0_26(char) = Load : &:r0_25, ~mu0_2
# 1045| mu0_27(char) = Store : &:r0_6, r0_26
# 1045| r0_28(glval<char>) = VariableAddress[#return] :
@@ -5270,6 +5270,68 @@ ir.cpp:
# 1133| v13_1(void) = ReturnVoid :
#-----| Goto -> Block 1
# 1153| void VectorTypes(int)
# 1153| Block 0
# 1153| v0_0(void) = EnterFunction :
# 1153| mu0_1(unknown) = AliasedDefinition :
# 1153| mu0_2(unknown) = UnmodeledDefinition :
# 1153| r0_3(glval<int>) = VariableAddress[i] :
# 1153| mu0_4(int) = InitializeParameter[i] : &:r0_3
# 1154| r0_5(glval<__attribute((vector_size(16))) int>) = VariableAddress[vi4] :
# 1154| mu0_6(__attribute((vector_size(16))) int) = Uninitialized[vi4] : &:r0_5
# 1154| r0_7(int) = Constant[0] :
# 1154| r0_8(glval<int>) = PointerAdd[4] : r0_5, r0_7
# 1154| r0_9(int) = Constant[0] :
# 1154| mu0_10(int) = Store : &:r0_8, r0_9
# 1154| r0_11(int) = Constant[1] :
# 1154| r0_12(glval<int>) = PointerAdd[4] : r0_5, r0_11
# 1154| r0_13(int) = Constant[1] :
# 1154| mu0_14(int) = Store : &:r0_12, r0_13
# 1154| r0_15(int) = Constant[2] :
# 1154| r0_16(glval<int>) = PointerAdd[4] : r0_5, r0_15
# 1154| r0_17(int) = Constant[2] :
# 1154| mu0_18(int) = Store : &:r0_16, r0_17
# 1154| r0_19(int) = Constant[3] :
# 1154| r0_20(glval<int>) = PointerAdd[4] : r0_5, r0_19
# 1154| r0_21(int) = Constant[3] :
# 1154| mu0_22(int) = Store : &:r0_20, r0_21
# 1155| r0_23(glval<int>) = VariableAddress[x] :
# 1155| r0_24(glval<__attribute((vector_size(16))) int>) = VariableAddress[vi4] :
# 1155| r0_25(glval<int>) = VariableAddress[i] :
# 1155| r0_26(int) = Load : &:r0_25, ~mu0_2
# 1155| r0_27(glval<int>) = PointerAdd[4] : r0_24, r0_26
# 1155| r0_28(int) = Load : &:r0_27, ~mu0_2
# 1155| mu0_29(int) = Store : &:r0_23, r0_28
# 1156| r0_30(glval<int>) = VariableAddress[x] :
# 1156| r0_31(int) = Load : &:r0_30, ~mu0_2
# 1156| r0_32(glval<__attribute((vector_size(16))) int>) = VariableAddress[vi4] :
# 1156| r0_33(glval<int>) = VariableAddress[i] :
# 1156| r0_34(int) = Load : &:r0_33, ~mu0_2
# 1156| r0_35(glval<int>) = PointerAdd[4] : r0_32, r0_34
# 1156| mu0_36(int) = Store : &:r0_35, r0_31
# 1157| r0_37(glval<__attribute((vector_size(16))) int>) = VariableAddress[vi4_shuffle] :
# 1157| r0_38(glval<__attribute((vector_size(16))) int>) = VariableAddress[vi4] :
# 1157| r0_39(__attribute((vector_size(16))) int) = Load : &:r0_38, ~mu0_2
# 1157| r0_40(glval<__attribute((vector_size(16))) int>) = VariableAddress[vi4] :
# 1157| r0_41(__attribute((vector_size(16))) int) = Load : &:r0_40, ~mu0_2
#-----| r0_42(int) = Constant[3] :
# 1157| r0_43(int) = Constant[2] :
# 1157| r0_44(int) = Constant[1] :
# 1157| r0_45(int) = Constant[0] :
# 1157| r0_46(__attribute((vector_size(16))) int) = BuiltIn[__builtin_shufflevector] : 0:r0_39, 1:r0_41, 2:r0_42, 3:r0_43, 4:r0_44, 5:r0_45
# 1157| mu0_47(__attribute((vector_size(16))) int) = Store : &:r0_37, r0_46
# 1158| r0_48(glval<__attribute((vector_size(16))) int>) = VariableAddress[vi4] :
# 1158| r0_49(__attribute((vector_size(16))) int) = Load : &:r0_48, ~mu0_2
# 1158| r0_50(glval<__attribute((vector_size(16))) int>) = VariableAddress[vi4_shuffle] :
# 1158| r0_51(__attribute((vector_size(16))) int) = Load : &:r0_50, ~mu0_2
# 1158| r0_52(__attribute((vector_size(16))) int) = Add : r0_49, r0_51
# 1158| r0_53(glval<__attribute((vector_size(16))) int>) = VariableAddress[vi4] :
# 1158| mu0_54(__attribute((vector_size(16))) int) = Store : &:r0_53, r0_52
# 1159| v0_55(void) = NoOp :
# 1153| v0_56(void) = ReturnVoid :
# 1153| v0_57(void) = UnmodeledUse : mu*
# 1153| v0_58(void) = ExitFunction :
perf-regression.cpp:
# 6| void Big::Big()
# 6| Block 0
@@ -5279,7 +5341,7 @@ perf-regression.cpp:
# 6| r0_3(glval<Big>) = InitializeThis :
# 6| r0_4(glval<char[1073741824]>) = FieldAddress[buffer] : r0_3
# 6| r0_5(int) = Constant[0] :
# 6| r0_6(glval<char>) = PointerAdd : r0_4, r0_5
# 6| r0_6(glval<char>) = PointerAdd[1] : r0_4, r0_5
# 6| r0_7(unknown[1073741824]) = Constant[0] :
# 6| mu0_8(unknown[1073741824]) = Store : &:r0_6, r0_7
# 6| v0_9(void) = NoOp :

View File

@@ -9,7 +9,6 @@ missingOperandType
instructionWithoutSuccessor
| VacuousDestructorCall.cpp:2:29:2:29 | InitializeParameter: y |
| assume0.cpp:7:2:7:2 | Chi: call to f |
| builtin.c:15:18:15:21 | VariableAddress: definition of vec2 |
| condition_decls.cpp:16:19:16:20 | Chi: call to BoxedInt |
| condition_decls.cpp:26:23:26:24 | Chi: call to BoxedInt |
| condition_decls.cpp:41:22:41:23 | Chi: call to BoxedInt |

View File

@@ -1,6 +1,4 @@
missingOperand
| builtin.c:15:25:15:71 | Store: __builtin_shufflevector | Instruction 'Store' is missing an expected operand with tag 'StoreValue' in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:18:3:18:80 | Convert: (void)... | Instruction 'Convert' is missing an expected operand with tag 'Unary' in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| condition_decls.cpp:16:6:16:20 | ConditionalBranch: (condition decl) | Instruction 'ConditionalBranch' is missing an expected operand with tag 'Condition' in function '$@'. | condition_decls.cpp:15:6:15:17 | IR: if_decl_bind | void if_decl_bind(int) |
| condition_decls.cpp:26:3:36:3 | Switch: switch (...) ... | Instruction 'Switch' is missing an expected operand with tag 'Condition' in function '$@'. | condition_decls.cpp:25:6:25:21 | IR: switch_decl_bind | void switch_decl_bind(int) |
| condition_decls.cpp:41:9:41:23 | ConditionalBranch: (condition decl) | Instruction 'ConditionalBranch' is missing an expected operand with tag 'Condition' in function '$@'. | condition_decls.cpp:40:6:40:20 | IR: while_decl_bind | void while_decl_bind(int) |
@@ -27,18 +25,6 @@ instructionWithoutSuccessor
| VacuousDestructorCall.cpp:4:3:4:3 | Load: y |
| assume0.cpp:7:2:7:2 | CallSideEffect: call to f |
| assume0.cpp:9:11:9:11 | Constant: (bool)... |
| builtin.c:14:26:14:26 | Constant: 0 |
| builtin.c:14:29:14:29 | Constant: 1 |
| builtin.c:14:32:14:32 | Constant: 2 |
| builtin.c:14:35:14:35 | Constant: 3 |
| builtin.c:15:18:15:21 | VariableAddress: definition of vec2 |
| builtin.c:15:25:15:71 | Store: __builtin_shufflevector |
| builtin.c:15:49:15:51 | Load: vec |
| builtin.c:15:54:15:56 | Load: vec |
| builtin.c:15:64:15:64 | Constant: 2 |
| builtin.c:15:67:15:67 | Constant: 1 |
| builtin.c:15:70:15:70 | Constant: 0 |
| builtin.c:18:33:18:35 | Load: vec |
| condition_decls.cpp:16:19:16:20 | CallSideEffect: call to BoxedInt |
| condition_decls.cpp:26:19:26:19 | CallSideEffect: call to operator int |
| condition_decls.cpp:26:23:26:24 | CallSideEffect: call to BoxedInt |
@@ -48,7 +34,6 @@ instructionWithoutSuccessor
| file://:0:0:0:0 | CompareNE: (bool)... |
| file://:0:0:0:0 | CompareNE: (bool)... |
| file://:0:0:0:0 | CompareNE: (bool)... |
| file://:0:0:0:0 | Constant: ... + ... |
| misc.c:171:10:171:13 | Uninitialized: definition of str2 |
| misc.c:171:15:171:31 | Add: ... + ... |
| misc.c:173:14:173:26 | Mul: ... * ... |
@@ -625,48 +610,6 @@ backEdgeCountMismatch
useNotDominatedByDefinition
| VacuousDestructorCall.cpp:4:3:4:3 | Load | Operand 'Load' is not dominated by its definition in function '$@'. | VacuousDestructorCall.cpp:2:6:2:6 | IR: CallDestructor | void CallDestructor<int>(int, int*) |
| assume0.cpp:11:2:11:2 | Operand | Operand 'Operand' is not dominated by its definition in function '$@'. | assume0.cpp:5:6:5:6 | IR: h | void h() |
| builtin.c:5:5:5:11 | Load | Operand 'Load' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:15:25:15:71 | Address | Operand 'Address' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:15:49:15:51 | Load | Operand 'Load' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:15:54:15:56 | Load | Operand 'Load' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:18:33:18:35 | Load | Operand 'Load' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:20:3:20:36 | Load | Operand 'Load' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:20:10:20:31 | Operand | Operand 'Operand' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:20:33:20:33 | Load | Operand 'Load' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:21:3:21:39 | Load | Operand 'Load' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:21:10:21:31 | Operand | Operand 'Operand' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:21:33:21:33 | Load | Operand 'Load' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:21:38:21:38 | Load | Operand 'Load' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:22:3:22:40 | Load | Operand 'Load' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:22:10:22:32 | Operand | Operand 'Operand' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:22:34:22:34 | Load | Operand 'Load' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:22:39:22:39 | Load | Operand 'Load' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:24:7:24:7 | Load | Operand 'Load' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:25:5:25:25 | Operand | Operand 'Operand' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:28:7:28:29 | Operand | Operand 'Operand' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:28:31:28:33 | Load | Operand 'Load' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:29:12:29:14 | Load | Operand 'Load' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:34:3:34:35 | Load | Operand 'Load' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:34:10:34:20 | Operand | Operand 'Operand' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:34:34:34:34 | Load | Operand 'Load' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:39:3:39:46 | Load | Operand 'Load' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:39:10:39:23 | Operand | Operand 'Operand' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:39:25:39:25 | Load | Operand 'Load' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:39:30:39:30 | Load | Operand 'Load' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:43:3:43:24 | Operand | Operand 'Operand' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:43:26:43:26 | Load | Operand 'Load' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:43:37:43:37 | Load | Operand 'Load' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:45:3:45:42 | Load | Operand 'Load' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:45:10:45:31 | Operand | Operand 'Operand' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:47:7:47:22 | Operand | Operand 'Operand' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:48:2:48:6 | Load | Operand 'Load' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:51:3:51:47 | Load | Operand 'Load' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:51:10:51:27 | Operand | Operand 'Operand' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:51:41:51:41 | Load | Operand 'Load' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:51:43:51:43 | Load | Operand 'Load' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:54:3:54:42 | Load | Operand 'Load' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:54:10:54:26 | Operand | Operand 'Operand' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| builtin.c:56:10:56:12 | Load | Operand 'Load' is not dominated by its definition in function '$@'. | builtin.c:5:5:5:11 | IR: builtin | int builtin(int, int) |
| condition_decls.cpp:16:15:16:15 | Operand | Operand 'Operand' is not dominated by its definition in function '$@'. | condition_decls.cpp:15:6:15:17 | IR: if_decl_bind | void if_decl_bind(int) |
| condition_decls.cpp:16:15:16:16 | Load | Operand 'Load' is not dominated by its definition in function '$@'. | condition_decls.cpp:15:6:15:17 | IR: if_decl_bind | void if_decl_bind(int) |
| condition_decls.cpp:17:5:17:15 | Load | Operand 'Load' is not dominated by its definition in function '$@'. | condition_decls.cpp:15:6:15:17 | IR: if_decl_bind | void if_decl_bind(int) |

View File

@@ -18,7 +18,6 @@ missingOperandType
instructionWithoutSuccessor
| VacuousDestructorCall.cpp:2:29:2:29 | InitializeParameter: y |
| assume0.cpp:7:2:7:2 | CallSideEffect: call to f |
| builtin.c:15:18:15:21 | VariableAddress: definition of vec2 |
| condition_decls.cpp:16:19:16:20 | CallSideEffect: call to BoxedInt |
| condition_decls.cpp:26:23:26:24 | CallSideEffect: call to BoxedInt |
| condition_decls.cpp:41:22:41:23 | CallSideEffect: call to BoxedInt |