Open Bug 1229065 Opened 9 years ago Updated 2 years ago

RegisterAllocator: Vectorize LInstructions and remove insData.

Categories

(Core :: JavaScript Engine: JIT, defect, P5)

defect

Tracking

()

Tracking Status
firefox45 --- affected

People

(Reporter: nbp, Unassigned)

References

(Blocks 2 open bugs)

Details

Currently we keep a unique identifier for each instruction which is listed in the LIR Graph. These instructions are being generated as we produce them while lowering the MIR Graph. These unique identifiers are then used by the register allocator as CodePosition. These CodePositions are then mapped back to the original instruction by using the insData structure. The initialization of insData structure takes 1.3% of the GenerateLIR function. If we were to store all LInstructions / LPhi in a (segmented) vector. we could remove the need of storing the unique identifier as part of the LNode, and also remove the need for the initialization of the insData structure. Doing so implies that we would have to store the LDefinition / LAllocation in a different vector as well, as they are currently part of the LInstruction structures. Then we can remove the InlineListNode from LInstructions, as iterating over the set of instruction, would become the same as iterating over a vector. To summarize: - 1 uintptr from LNode (id, declared as a uint32 before a pointer) - 2 pointers (InlineListNode) for each LInstruction. - 1 uintptr from each LNode, with the removal of insData structure. + 1 pointers to the LDefinitions / LAllocations for each instruction. + 4 unused words for each LPhi. - 1.3% of execution of GenerateLIR. - …% of list initialization. - remove insData cache misses.
Priority: -- → P5
Blocks: sm-regalloc
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.