Closed Bug 686589 Opened 13 years ago Closed 6 years ago

Aliasing region for vector metadata

Categories

(Tamarin Graveyard :: Baseline JIT (CodegenLIR), defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: lhansen, Unassigned)

References

Details

Suppose a loop like this:

  var v: Vector.<int> = ...
  var n: int = 0
  for ( var i:int=0 ; i < v.length ; i++ )
    n += v[i]

We want to set up an aliasing region that covers vector metadata: the length field and the "data" pointer.  Operations (stores, calls) that do not destroy vector metadata should be marked as such, allowing the metadata to be cached across those operations.  In the loop above the length should be loaded once and used both for the loop check and the access bounds check.  (A reasonable optimizer would then remove the latter.)  The vector's data pointer should be loaded once and kept for the entire loop.

Operations that definitely do not alter vector metadata are traps in general, vector "read" helpers, but probably many JIT helpers.  TBD.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.