1. 18 Aug, 2015 1 commit
    • danno's avatar
      [turbofan] Unify referencing of stack slots · cbbaf9ea
      danno authored
      Previously, it was not possible to specify StackSlotOperands for all
      slots in both the caller and callee stacks. Specifically, the region
      of the callee's stack including the saved return address, frame
      pointer, function pointer and context pointer could not be addressed
      by the register allocator/gap resolver.
      
      In preparation for better tail call support, which will use the gap
      resolver to reconcile outgoing parameters, this change makes it
      possible to address all slots on the stack, because slots in the
      previously inaccessible dead zone may become parameter slots for
      outgoing tail calls. All caller stack slots are accessible as they
      were before, with slot -1 corresponding to the last stack
      parameter. Stack slot indices >= 0 access the callee stack, with slot
      0 corresponding to the callee's saved return address, 1 corresponding
      to the saved frame pointer, 2 corresponding to the current function
      context, 3 corresponding to the frame marker/JSFunction, and slots 4
      and above corresponding to spill slots.
      
      The following changes were specifically	needed:
      
      * Frame	has been changed to explicitly manage three areas of the
        callee frame, the fixed header, the spill slot area, and the
        callee-saved register area.
      * Conversions from stack slot indices to fp offsets all now go through
        a common bottleneck: OptimizedFrame::StackSlotOffsetRelativeToFp
      * The generation of deoptimization translation tables has been changed
        to support the new stack slot indexing scheme. Crankshaft, which
        doesn't support the new slot numbering in its register allocator,
        must adapt the indexes when creating translation tables.
      * Callee-saved parameters are now kept below spill slots, not above,
        to support saving only the optimal set of used registers, which is
        only known after register allocation is finished and spill slots
        have been allocated.
      
      Review URL: https://codereview.chromium.org/1261923007
      
      Cr-Commit-Position: refs/heads/master@{#30224}
      cbbaf9ea
  2. 06 Jul, 2015 3 commits
    • bmeurer's avatar
      [turbofan] Reland "Add new JSFrameSpecialization reducer." and "Perform OSR... · ef661b08
      bmeurer authored
      [turbofan] Reland "Add new JSFrameSpecialization reducer." and "Perform OSR deconstruction early and remove type propagation.".
      
      We have to reland these two commits at once, because the first breaks
      some asm.js benchmarks without the second. The change was reverted
      because of bogus checks in the verifier, which will not work in the
      presence of OSR (and where hidden because of the type back propagation
      hack in OSR so far). Original messages are below:
      
      [turbofan] Add new JSFrameSpecialization reducer.
      
      The JSFrameSpecialization specializes an OSR graph to the current
      unoptimized frame on which we will perform the on-stack replacement.
      This is used for asm.js functions, where we cannot reuse the OSR
      code object anyway because of context specialization, and so we could as
      well specialize to the max instead.
      
      It works by replacing all OsrValues in the graph with their values
      in the JavaScriptFrame.
      
      The idea is that using this trick we get better performance without
      doing the unsound backpropagation of types to OsrValues later. This
      is the first step towards fixing OSR for TurboFan.
      
      [turbofan] Perform OSR deconstruction early and remove type propagation.
      
      This way we don't have to deal with dead pre-OSR code in the graph
      and risk optimizing the wrong code, especially we don't make
      optimistic assumptions in the dead code that leaks into the OSR code
      (i.e. deopt guards are in dead code, but the types propagate to OSR
      code via the OsrValue type back propagation).
      
      BUG=v8:4273
      LOG=n
      R=jarin@chromium.org
      
      Review URL: https://codereview.chromium.org/1226673005
      
      Cr-Commit-Position: refs/heads/master@{#29486}
      ef661b08
    • machenbach's avatar
      Revert "[turbofan] Add new JSFrameSpecialization reducer." · 9e71cdba
      machenbach authored
      Also revert "[turbofan] Perform OSR deconstruction early and remove type propagation."
      
      This reverts commit b0a852e8.
      
      This reverts commit cdbb6c48.
      
      NOTRY=true
      NOTREECHECKS=true
      BUG=v8:4273
      LOG=n
      TBR=bmeurer@chromium.org
      
      Review URL: https://codereview.chromium.org/1225743002
      
      Cr-Commit-Position: refs/heads/master@{#29480}
      9e71cdba
    • bmeurer's avatar
      [turbofan] Perform OSR deconstruction early and remove type propagation. · cdbb6c48
      bmeurer authored
      This way we don't have to deal with dead pre-OSR code in the graph and
      risk optimizing the wrong code, especially we don't make optimistic
      assumptions in the dead code that leaks into the OSR code (i.e. deopt
      guards are in dead code, but the types propagate to OSR code via the
      OsrValue type back propagation).
      
      BUG=v8:4273
      LOG=n
      R=jarin@chromium.org
      
      Review URL: https://codereview.chromium.org/1215333005
      
      Cr-Commit-Position: refs/heads/master@{#29478}
      cdbb6c48
  3. 19 Jun, 2015 1 commit
    • bmeurer's avatar
      [turbofan] Proper dead code elimination as regular reducer. · 733a2463
      bmeurer authored
      The three different concerns that the ControlReducer used to deal with
      are now properly separated into
      
        a.) DeadCodeElimination, which is a regular AdvancedReducer, that
            propagates Dead via control edges,
        b.) CommonOperatorReducer, which does strength reduction on common
            operators (i.e. Branch, Phi, and friends), and
        c.) GraphTrimming, which removes dead->live edges from the graph.
      
      This will make it possible to run the DeadCodeElimination together with
      other passes that actually introduce Dead nodes, i.e. typed lowering;
      and it opens the door for general inlining without two stage fix point
      iteration.
      
      To make the DeadCodeElimination easier and more uniform, we basically
      reverted the introduction of DeadValue and DeadEffect, and changed the
      Dead operator to produce control, value and effect. Note however that
      this is not a requirement, but merely a way to make dead propagation
      easier and more uniform. We could always go back and decide to have
      different Dead operators if some other change requires that.
      
      Note that there are several additional opportunities for cleanup now,
      i.e. OSR deconstruction could be a regular reducer now, and we don't
      need to use TheHole as dead value marker in the GraphReducer. And we can
      actually run the dead code elimination together with the other passes
      instead of using separate passes over the graph.  We will do this in
      follow up CLs.
      
      R=jarin@chromium.org, mstarzinger@chromium.org
      
      Review URL: https://codereview.chromium.org/1193833002
      
      Cr-Commit-Position: refs/heads/master@{#29146}
      733a2463
  4. 17 Jun, 2015 1 commit
  5. 12 Jun, 2015 1 commit
    • bmeurer's avatar
      [turbofan] Use appropriate type for NodeId. · c487aba7
      bmeurer authored
      Up until now we used int32_t for NodeId, but that was not ideal because
      negative values are invalid for NodeId and we use it as an array index
      for example in the NodeMarker class, where C++ compilers on x64 have to
      generate code that does proper sign extension for the indices, which is
      completely unnecessary.
      
      R=svenpanne@chromium.org
      
      Review URL: https://codereview.chromium.org/1178403004
      
      Cr-Commit-Position: refs/heads/master@{#28997}
      c487aba7
  6. 26 May, 2015 1 commit
  7. 06 May, 2015 1 commit
    • bmeurer's avatar
      [turbofan] Add support for advanced reducers. · 7b33409b
      bmeurer authored
      An AdvancedReducer is basically a regular Reducer with an editor
      that can perform graph editing operations beyond changing or
      replacing the node that is currently being reduced. The GraphReducer
      is the default implementation of the AdvancedReducer::Editor interface.
      
      The ControlReducerImpl is now just an AdvancedReducer, which
      temporarily requires a Finish method in the reducer to implement
      the dead node trimming until we move that to the GraphReducer
      (which in turn requires that all loops are connected to End).
      
      Review URL: https://codereview.chromium.org/1122423003
      
      Cr-Commit-Position: refs/heads/master@{#28251}
      7b33409b
  8. 27 Apr, 2015 1 commit
  9. 17 Mar, 2015 1 commit
  10. 19 Feb, 2015 2 commits
  11. 17 Feb, 2015 2 commits
  12. 16 Feb, 2015 1 commit
  13. 11 Feb, 2015 1 commit
  14. 02 Feb, 2015 1 commit
  15. 30 Jan, 2015 3 commits
  16. 29 Jan, 2015 1 commit
  17. 12 Jan, 2015 1 commit