MCPcopy Create free account
hub / github.com/AliveToolkit/alive2 / parse_shufflevector

Function parse_shufflevector

tools/alive_parser.cpp:1195–1209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1193}
1194
1195static unique_ptr<Instr> parse_shufflevector(string_view name) {
1196 // %p = shufflevector ty %a, ty %b, ty %c
1197 auto &ty_a = parse_type();
1198 auto &a = parse_operand(ty_a);
1199 parse_comma();
1200 auto &ty_b = parse_type();
1201 auto &b = parse_operand(ty_b);
1202
1203 vector<unsigned> mask;
1204 while (tokenizer.consumeIf(COMMA)) {
1205 mask.push_back((unsigned)parse_number());
1206 }
1207 return make_unique<ShuffleVector>(get_sym_type(), string(name), a, b,
1208 std::move(mask));
1209}
1210
1211static unique_ptr<Instr> parse_copyop(string_view name, token t) {
1212 tokenizer.unget(t);

Callers 1

parse_instrFunction · 0.85

Calls 3

parse_commaFunction · 0.85
parse_numberFunction · 0.85
consumeIfMethod · 0.80

Tested by

no test coverage detected