Lines Matching defs:program

494     std::vector<Instruction> eliminate_dead_code(std::vector<Instruction> program) {
496 std::vector<bool> live(program.size(), false);
497 for (Val id = program.size(); id--;) {
498 if (live[id] || has_side_effect(program[id].op)) {
500 const Instruction& inst = program[id];
511 for (Val id = 0; id < (Val)program.size(); id++) {
515 const Instruction& inst = program[id];
521 const Instruction& last = program[lastId];
530 // Rewrite the program with only live Instructions:
533 std::vector<Val> new_id(program.size(), NA);
534 for (Val id = 0, next = 0; id < (Val)program.size(); id++) {
536 Instruction& inst = program[id];
548 auto it = std::remove_if(program.begin(), program.end(), [&](const Instruction& inst) {
549 Val id = (Val)(&inst - program.data());
552 program.erase(it, program.end());
554 return program;
557 std::vector<OptimizedInstruction> finalize(const std::vector<Instruction> program) {
558 std::vector<OptimizedInstruction> optimized(program.size());
559 for (Val id = 0; id < (Val)program.size(); id++) {
560 Instruction inst = program[id];
595 optimized[arg].death = (Val)program.size();
605 std::vector<Instruction> program = this->program();
606 program = eliminate_dead_code(std::move(program));
607 return finalize (std::move(program));
645 // the value-producing instruction's own index in the program vector.
2586 // due to timing or program caching.
3580 // On x86 we can work with many values directly from the stack or program constant pool.
4379 // Assemble the program for real with stack_hint/registers_used as feedback from first call.
4393 // Dump the raw program binary.