1. 31 Aug, 2015 1 commit
    • mstarzinger's avatar
      [turbofan] Remove usage of Unique<T> from graph. · 6e65e6db
      mstarzinger authored
      The usage of Unique<T> throughout the TurboFan IR does not have any
      advantage. There is no single point in time when they are initialized
      and most use-sites looked through to the underlying Handle<T> anyways.
      Also there already was a mixture of Handle<T> versus Unique<T> in the
      graph and this unifies the situation to use Handle<T> everywhere.
      
      R=bmeurer@chromium.org,titzer@chromium.org
      
      Review URL: https://codereview.chromium.org/1314473007
      
      Cr-Commit-Position: refs/heads/master@{#30458}
      6e65e6db
  2. 20 Jul, 2015 1 commit
    • danno's avatar
      [turbofan]: Add a context relaxation Reducer · cca5e74a
      danno authored
      In many cases, the context that TurboFan's ASTGraphBuilder or subsequent
      reduction operations attaches to nodes does not need to be that exact
      context, but rather only needs to be one with the same native context,
      because it is used internally only to fetch the native context, e.g. for
      creating and throwing exceptions.
      
      This reducer recognizes common cases where the context that is specified
      for a node can be relaxed to a canonical, less specific one. This
      relaxed context can either be the enclosing function's context or a specific
      Module or Script context that is explicitly created within the function.
      
      This optimization is especially important for TurboFan-generated code stubs
      which use context specialization and inlining to generate optimal code.
      Without context relaxation, many extraneous moves are generated to pass
      exactly the right context to internal functions like ToNumber and
      AllocateHeapNumber, which only need the native context. By turning context
      relaxation on, these moves disappear because all these common internal
      context uses are unified to the context passed into the stub function, which
      is typically already in the correct context register and remains there for
      short stubs. It also eliminates the explicit use of a specialized context
      constant in the code stub in these cases, which could cause memory leaks.
      
      Review URL: https://codereview.chromium.org/1244583003
      
      Cr-Commit-Position: refs/heads/master@{#29763}
      cca5e74a
  3. 06 Jul, 2015 1 commit
  4. 26 Jun, 2015 1 commit
  5. 23 Jun, 2015 1 commit
  6. 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
  7. 18 Jun, 2015 1 commit
  8. 28 May, 2015 2 commits
  9. 26 May, 2015 1 commit
  10. 15 May, 2015 1 commit
  11. 11 May, 2015 1 commit
  12. 06 May, 2015 1 commit
  13. 05 May, 2015 1 commit
    • bmeurer's avatar
      [turbofan] Fix tail call optimization. · d21de2a4
      bmeurer authored
      Tail calls are matched on the graph, with a dedicated tail call
      optimization that is actually testable. The instruction selection can
      still fall back to a regular if the platform constraints don't allow to
      emit a tail call (i.e. the return locations of caller and callee differ
      or the callee takes non-register parameters, which is a restriction that
      will be removed in the future).
      
      Also explicitly limit tail call optimization to stubs for now and drop
      the global flag.
      
      BUG=v8:4076
      LOG=n
      
      Review URL: https://codereview.chromium.org/1114163005
      
      Cr-Commit-Position: refs/heads/master@{#28219}
      d21de2a4
  14. 22 Apr, 2015 1 commit
  15. 20 Apr, 2015 1 commit
  16. 19 Mar, 2015 1 commit
    • jarin's avatar
      [turbofan] Remember types for deoptimization during simplified lowering. · b7dc9c58
      jarin authored
      With this change, we remember the types of frame state inputs (in a new
      operator, called TypedStateValues). Instead of inferring the value types
      when building translations, we used the recorded types.
      
      The original approach was not reliable because the passes after
      simplified lowering can change node types, and this in turn confuses
      the translation builder.
      
      BUG=chromium:468727
      LOG=n
      R=bmeurer@chromium.org
      
      Review URL: https://codereview.chromium.org/1015423002
      
      Cr-Commit-Position: refs/heads/master@{#27310}
      b7dc9c58
  17. 18 Mar, 2015 1 commit
  18. 04 Mar, 2015 1 commit
  19. 20 Feb, 2015 1 commit
  20. 17 Feb, 2015 1 commit
    • bmeurer's avatar
      [turbofan] Optimize certain chains of Branch into a Switch. · acd9c46c
      bmeurer authored
      This adds a new ControlFlowOptimizer that - for now - recognizes chains
      of Branches generated by the SwitchBuilder for a subset of javascript
      switches into Switch nodes. Those Switch nodes are then lowered to
      either table or lookup switches.
      
      Also rename Case to IfValue (and introduce IfDefault) for consistency.
      
      BUG=v8:3872
      LOG=n
      
      Review URL: https://codereview.chromium.org/931623002
      
      Cr-Commit-Position: refs/heads/master@{#26691}
      acd9c46c
  21. 09 Feb, 2015 1 commit
  22. 27 Jan, 2015 1 commit
    • bmeurer's avatar
      [turbofan] Ensure that NTLs are always properly connected to the end. · 59a02ebd
      bmeurer authored
      Up until now we used a special Terminate node to artifically connect non
      terminating loops to the End node, but this was kind of adhoc and didn't
      work for the CFG. So without all kinds of weird hacks, the end block in
      the CFG will not be connected to NTLs, which makes it impossible to
      compute post dominance / control dependence in the current setting.
      
      So instead of Terminate, we add a special Branch to NTLs, whose
      condition is the special Always node, which corresponds to True, except
      that it cannot be folded away. This way we don't need any special
      machinery in the scheduler, since it's just a regular Branch.
      
      R=titzer@chromium.org
      
      Review URL: https://codereview.chromium.org/875263004
      
      Cr-Commit-Position: refs/heads/master@{#26294}
      59a02ebd
  23. 20 Jan, 2015 1 commit
  24. 16 Jan, 2015 1 commit
  25. 12 Jan, 2015 1 commit
  26. 02 Jan, 2015 1 commit
  27. 29 Oct, 2014 2 commits
  28. 27 Oct, 2014 1 commit
  29. 26 Oct, 2014 1 commit
  30. 22 Oct, 2014 2 commits
  31. 07 Oct, 2014 1 commit
  32. 01 Oct, 2014 1 commit
  33. 30 Sep, 2014 1 commit
  34. 29 Sep, 2014 1 commit
  35. 22 Sep, 2014 1 commit
  36. 18 Sep, 2014 1 commit
  37. 17 Sep, 2014 1 commit