Repository navigation
Conversation
Coverage
Diff CoverageDiff CoverageDiff: origin/main...HEAD, staged and unstaged changes
Summary
genext.hppLines 743-756 743 Value* built = builder.build_call(syms.build_resize_f, Type::Ptr, build_args);
744 return built;
745 }
746 if (ClzInst* i = dynamic_cast<ClzInst*>(inst)) {
! 747 std::vector<Value*> build_args;
! 748 build_args.push_back(jitir_builder);
! 749 build_args.push_back(args[0]);
! 750 Value* built = builder.build_call(syms.build_clz, Type::Ptr, build_args);
! 751 return built;
! 752 }
753 if (PopcountInst* i = dynamic_cast<PopcountInst*>(inst)) {
754 std::vector<Value*> build_args;
755 build_args.push_back(jitir_builder);
756 build_args.push_back(args[0]);jitir.hppLines 1468-1508 1468 stream << ' ';
1469 bool is_first = true;
1470 write_args(stream, is_first);
1471 }
! 1472 void write_json(std::ostream& stream) const override {
! 1473 stream << "{";
! 1474 stream << "\"kind\": ";
! 1475 stream << "\"Clz\"";
! 1476 stream << ", ";
! 1477 stream << "\"args\": ";
! 1478 write_args_json(stream);
! 1479 stream << ", ";
! 1480 stream << "\"name\": ";
! 1481 stream << name();
! 1482 stream << ", ";
! 1483 stream << "\"type\": ";
! 1484 stream << "\"" << type() << "\"";
! 1485 stream << "}";
! 1486 } bool equals(const Value* other) const override {
! 1487 if (this == other) { return true; }
! 1488 if (other == nullptr) { return false; }
! 1489 if (typeid(*this) != typeid(*other)) { return false; }
! 1490 const ClzInst* other_inst = (const ClzInst*) other;
! 1491 if (arg_count() != other_inst->arg_count()) { return false; }
! 1492 for (size_t it = 0; it < arg_count(); it++) {
! 1493 if (arg(it) != other_inst->arg(it)) { return false; }
! 1494 }
! 1495 return true;
! 1496 }
! 1497 size_t hash() const override {
! 1498 size_t hash = 1634601664939153448ULL;
! 1499 hash ^= std::hash<size_t>()(arg_count());
! 1500 for (size_t it = 0; it < arg_count(); it++) {
! 1501 hash ^= std::hash<Value*>()(arg(it));
! 1502 }
! 1503 return hash;
! 1504 }
1505 };
1506 class PopcountInst final: public Inst {
1507 private:
1508 public:Lines 4711-4721 4711 }
4712 void* jitir_build_resize_f(void* builder, void* a, uint32_t type) {
4713 return (void*)((::metajit::TraceBuilder*)builder)->build_resize_f((Value*) a, (Type) type);
4714 }
! 4715 void* jitir_build_clz(void* builder, void* a) {
! 4716 return (void*)((::metajit::TraceBuilder*)builder)->build_clz((Value*) a);
! 4717 }
4718 void* jitir_build_popcount(void* builder, void* a) {
4719 return (void*)((::metajit::TraceBuilder*)builder)->build_popcount((Value*) a);
4720 }
4721 void* jitir_build_bit_reverse(void* builder, void* a) {Lines 5299-5309 5299 Type type = read_type();
5300 return _builder.build_resize_f(a, type)
5301 ;
5302 } else if (opcode == "Clz") {
! 5303 Value* a = read_value_arg();
! 5304 return _builder.build_clz(a)
! 5305 ;
5306 } else if (opcode == "Popcount") {
5307 Value* a = read_value_arg();
5308 return _builder.build_popcount(a)
5309 ;Lines 9576-9586 9576 ResizeFInst* clone = builder.build_resize_f(clone_arg(inst->arg(0), builder, values), ((ResizeFInst*) inst)->type());
9577 return clone;
9578 }
9579 if (dynamic_cast<ClzInst*>(inst)) {
! 9580 ClzInst* clone = builder.build_clz(clone_arg(inst->arg(0), builder, values));
! 9581 return clone;
! 9582 }
9583 if (dynamic_cast<PopcountInst*>(inst)) {
9584 PopcountInst* clone = builder.build_popcount(clone_arg(inst->arg(0), builder, values));
9585 return clone;
9586 }jitir_llvmapi.hppLines 652-667 652 assert(build_args.size() == 3);
653 llvm::Value* built = builder.CreateCall(api.build_resize_f, build_args);
654 return built;
655 }
! 656 if (ClzInst* i = dynamic_cast<ClzInst*>(inst)) {
! 657 std::vector<llvm::Value*> build_args;
! 658 build_args.push_back(jitir_builder);
! 659 build_args.push_back(args[0]);
! 660 assert(build_args.size() == 2);
! 661 llvm::Value* built = builder.CreateCall(api.build_clz, build_args);
! 662 return built;
! 663 }
664 if (PopcountInst* i = dynamic_cast<PopcountInst*>(inst)) {
665 std::vector<llvm::Value*> build_args;
666 build_args.push_back(jitir_builder);
667 build_args.push_back(args[0]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.