#include <redundancy_elimination.h>
Definition at line 19 of file redundancy_elimination.h.
◆ AllocationSinking()
dart::AllocationSinking::AllocationSinking |
( |
FlowGraph * |
flow_graph | ) |
|
|
inlineexplicit |
◆ candidates()
◆ DetachMaterializations()
void dart::AllocationSinking::DetachMaterializations |
( |
| ) |
|
Definition at line 3767 of file redundancy_elimination.cc.
3767 {
3768 for (MaterializeObjectInstr* mat : materializations_) {
3769 mat->previous()->LinkTo(mat->next());
3770 mat->set_next(nullptr);
3771 mat->set_previous(nullptr);
3772 }
3773}
◆ MaterializationFor()
Definition at line 3803 of file redundancy_elimination.cc.
3805 {
3806 if (
exit->IsMaterializeObject()) {
3808 }
3809
3810 for (MaterializeObjectInstr* mat =
exit->previous()->AsMaterializeObject();
3811 mat != nullptr; mat = mat->previous()->AsMaterializeObject()) {
3812 if (mat->allocation() == alloc) {
3813 return mat;
3814 }
3815 }
3816
3817 return nullptr;
3818}
static Instruction * ExitForMaterialization(MaterializeObjectInstr *mat)
◆ Optimize()
void dart::AllocationSinking::Optimize |
( |
| ) |
|
Definition at line 3689 of file redundancy_elimination.cc.
3689 {
3690
3691
3693 return;
3694 }
3695
3696 CollectCandidates();
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720 for (intptr_t
i = 0;
i < candidates_.length();
i++) {
3721 InsertMaterializations(candidates_[
i]);
3722 }
3723
3724
3725
3726
3727
3728
3729
3730
3731
3733
3734 NormalizeMaterializations();
3735
3736 RemoveUnusedMaterializations();
3737
3738
3739
3740 DiscoverFailedCandidates();
3741
3742
3743
3744
3745
3746 for (intptr_t
i = 0;
i < candidates_.length();
i++) {
3747 EliminateAllocation(candidates_[
i]);
3748 }
3749
3750
3751
3752
3753
3754 for (intptr_t
i = 0;
i < materializations_.length();
i++) {
3755 MaterializeObjectInstr* mat = materializations_[
i];
3756 for (intptr_t j = 0; j < mat->InputCount(); j++) {
3757 Definition* defn = mat->InputAt(j)->definition();
3758 if (defn->IsBox()) {
3759 mat->InputAt(j)->BindTo(defn->InputAt(0)->definition());
3760 }
3761 }
3762 }
3763}
bool is_huge_method() const
static bool OptimizeGraph(FlowGraph *graph)
The documentation for this class was generated from the following files: