847 {
849
853
854 BitVector* kill =
kill_[i];
856 last_loads->Clear();
857
858
859
860
861
862
863
864 if (block->InsideTryBlock()) {
865 live_in->SetAll();
866 continue;
867 }
868
869
870 for (BackwardInstructionIterator it(block); !it.Done(); it.Advance()) {
871 Instruction* current = it.Current();
872
873 LoadLocalInstr*
load = current->AsLoadLocal();
874 if (
load !=
nullptr) {
875 const intptr_t index = flow_graph_->
EnvIndex(&
load->local());
876 if (index >= live_in->length()) continue;
877 live_in->Add(index);
878 if (!last_loads->Contains(index)) {
879 last_loads->Add(index);
881 }
882 continue;
883 }
884
885 StoreLocalInstr*
store = current->AsStoreLocal();
886 if (
store !=
nullptr) {
887 const intptr_t index = flow_graph_->
EnvIndex(&
store->local());
888 if (index >= live_in->length()) continue;
889 if (kill->Contains(index)) {
890 if (!live_in->Contains(index)) {
892 }
893 } else {
894 if (!live_in->Contains(index)) {
896 }
897 kill->Add(index);
898 }
899 live_in->Remove(index);
900 continue;
901 }
902 }
903
904
905
906 const bool is_function_entry = block->IsFunctionEntry();
907 const bool is_osr_entry = block->IsOsrEntry();
908 const bool is_catch_block_entry = block->IsCatchBlockEntry();
909 if (is_function_entry || is_osr_entry || is_catch_block_entry) {
910 const intptr_t parameter_count =
911 (is_osr_entry || is_catch_block_entry)
914 for (intptr_t i = 0; i < parameter_count; ++i) {
915 live_in->Remove(i);
916 kill->Add(i);
917 }
918 }
919 if (is_function_entry) {
922 live_in->Remove(index);
923 kill->Add(index);
924 }
925 }
926 }
927}
intptr_t ArgumentDescriptorEnvIndex() const
const ParsedFunction & parsed_function() const
intptr_t num_direct_parameters() const
intptr_t variable_count() const
intptr_t EnvIndex(const LocalVariable *variable) const
const intptr_t variable_count_
GrowableArray< BitVector * > kill_
GrowableArray< BitVector * > live_in_
const GrowableArray< BlockEntryInstr * > & postorder_
bool has_arg_desc_var() const