// Eliminates unnecessary write barriers from InstanceFieldSet, StaticFieldSet, and ArraySet. // // We can eliminate redundant write barriers as we don't need several for the same receiver. For // example: // MyObject o; // o.inner_obj = io; // o.inner_obj2 = io2; // o.inner_obj3 = io3; // We can keep the write barrier for `inner_obj` and remove the other two. // // In order to do this, we set the WriteBarrierKind of the instruction. The instruction's kind are // set to kEmitBeingReliedOn (if this write barrier coalesced other write barriers, we don't want to // perform the null check optimization), or to kDontEmit (if the write barrier as a whole is not // needed). class WriteBarrierElimination : public HOptimization { public:
WriteBarrierElimination(HGraph* graph,
OptimizingCompilerStats* stats, constchar* name = kWBEPassName)
: HOptimization(graph, name, stats) {}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.