Update comment about the live range implementation details;

This commit is contained in:
Benjamin Bouvier
2019-09-13 17:57:14 +02:00
parent 43a891dfa2
commit b036ab77dc

View File

@@ -58,8 +58,16 @@
//! //!
//! # Implementation notes //! # Implementation notes
//! //!
//! A few notes about the implementation of this data structure. This should not concern someone //! A few notes about the implementation of the live intervals field `liveins`. This should not
//! only looking to use the public interface. //! concern someone only looking to use the public interface.
//!
//! ## Current representation
//!
//! Our current implementation uses a B-tree map with the necessary interface for an efficient
//! implementation of coalescing, implemented as a generic data-structure bforest::Map.
//!
//! A `BTreeMap<Ebb, Inst>` could have been used for the live-in intervals, but it doesn't provide
//! the necessary API to make coalescing easy, nor does it optimize for our types' sizes.
//! //!
//! ## EBB ordering //! ## EBB ordering
//! //!
@@ -99,13 +107,6 @@
//! It is more complicated to work with, though, so it is probably not worth it. The performance //! It is more complicated to work with, though, so it is probably not worth it. The performance
//! benefits of switching to a numerical EBB order only appears if the binary search is doing //! benefits of switching to a numerical EBB order only appears if the binary search is doing
//! EBB-EBB comparisons. //! EBB-EBB comparisons.
//!
//! ## B-tree representation
//!
//! A `BTreeMap<Ebb, Inst>` could also be used for the live-in intervals. It looks like the
//! standard library B-tree doesn't provide the necessary interface for an efficient implementation
//! of coalescing, so we would need to roll our own.
//!
use crate::bforest; use crate::bforest;
use crate::entity::SparseMapValue; use crate::entity::SparseMapValue;