// Linearizes the 'graph' such that: // (1): a block is always after its dominator, // (2): blocks of loops are contiguous. // // Storage is obtained through 'allocator' and the linear order it computed // into 'linear_order'. Once computed, iteration can be expressed as: // // for (HBasicBlock* block : linear_order) // linear order // // for (HBasicBlock* block : ReverseRange(linear_order)) // linear post order // template <typename Vector> void LinearizeGraph(const HGraph* graph, Vector* linear_order) {
static_assert(std::is_same<HBasicBlock*, typename Vector::value_type>::value, "Vector::value_type must be HBasicBlock*."); // Resize the vector and pass an ArrayRef<> to internal implementation which is shared // for all kinds of vectors, i.e. ArenaVector<> or ScopedArenaVector<>.
linear_order->resize(graph->GetReversePostOrder().size());
LinearizeGraphInternal(graph, ArrayRef<HBasicBlock*>(*linear_order));
}
} // namespace art
#endif// ART_COMPILER_OPTIMIZING_LINEAR_ORDER_H_
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet am 2026-06-29)
¤
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.