Closed Bug 886632 Opened 13 years ago Closed 13 years ago

PJS: Separate ParallelArrayAnalysis into 2 phases

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: shu, Assigned: shu)

References

Details

Attachments

(3 files, 1 obsolete file)

Separate PAA into 2 phases: 1) A phase that runs on the main thread that replaces MIR with their parallel variants. This needs access to JSContext in case it needs to do some VM ops (like making new template objects) 2) A phase in OptimizeMIR that only checks for safety and replaces unsafe blocks with bailouts.
Assignee: general → shu
Attachment #766986 - Flags: review?(nmatsakis)
Blocks: 885769
Move visitThrow back into ParallelArraySafetyAnalysis
Attachment #766986 - Attachment is obsolete: true
Attachment #766986 - Flags: review?(nmatsakis)
Attachment #766993 - Flags: review?(nmatsakis)
Calling DCE from the safety analysis has been removed, but we still need to call UCE to remove the dead blocks. Now, UCE itself has several phases as it tries to rerun alias analysis and GVN. However, since this is now called *before* alias analysis, all MDefinitions' dependency() will be NULL. This means that UCE won't see the need to rerun alias analysis, as no instruction can depend on a removed block (since there's no dependency information). So calling UCE inside the safety analysis will only go up to recomputing dominators and adjusting phis. The PA jit tests pass with --tbpl with this patch; not sure what asserts you were running into before.
Attachment #767007 - Flags: review?(nmatsakis)
(In reply to Shu-yu Guo [:shu] from comment #0) > Separate PAA into 2 phases: > > 1) A phase that runs on the main thread that replaces MIR with their > parallel variants. This needs access to JSContext in case it needs to do > some VM ops (like making new template objects) I recently encountered a similar issue with string concatenation done by constant folding. The problem is that the constant folding might not be infer ahead of time and so we cannot do it because strings are GC things. The solution I tried to suggest was to keep track of what would have to be substitute in the generated code and do the allocations in the link phase instead of doing them up-front in the MIR. There is no such feature yet, but this would help if we handle this problem by doing the relocation of temporary objects.
Comment on attachment 766993 [details] [diff] [review] Part 1: Split ParallelArrayAnalysis v1 Cancelling review; with bug 887002 we don't need to split this for the time being.
Attachment #766993 - Flags: review?(nmatsakis)
Attachment #767007 - Flags: review?(nmatsakis)
Depends on: 887002
Attachment #767445 - Flags: review?(nmatsakis) → review+
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: