1. 24 Feb, 2016 1 commit
  2. 19 Feb, 2016 1 commit
    • bmeurer's avatar
      [turbofan] Remove the JSContextRelaxation reducer. · 8a7186b8
      bmeurer authored
      This reducer doesn't really add value, because:
      
       (a) it is only concerned with JSCallFunction and JSToNumber, but when
           we get to it, all JSCallFunction nodes will have been replaced by
           Call nodes, and in the not so far future, we will also have
           replaced almost all JSToNumber nodes with better code,
       (b) and the reducer tries to be smart and use one of the outermost
           contexts, but that might not be beneficial always; actually it
           might even create longer live ranges and lead to more spilling
           in some cases.
      
      But most importantly, the JSContextRelaxation currently blocks inlining
      based on SharedFunctionInfo, because it requires the inliner to check
      the native context, which in turn requires JSFunction knowledge. So I'm
      removing this reducer for now to unblock the more important inliner
      changes.
      
      R=jarin@chromium.org
      
      Review URL: https://codereview.chromium.org/1715633002
      
      Cr-Commit-Position: refs/heads/master@{#34139}
      8a7186b8
  3. 16 Feb, 2016 1 commit
  4. 05 Jan, 2016 1 commit
    • sigurds's avatar
      [turbofan] Deopt support for escape analysis · 3b473d7a
      sigurds authored
      Deopt support is added on two levels. On the IR level,
      a new ObjectState node is added, which represenents an
      object to be materialized. ObjectState nodes appear as
      inputs of FrameState and StateValues nodes. On the
      instruction select/code-generation level, the
      FrameStateDescriptor class handles the nesting
      introduced by ObjectState, and ensures that deopt code
      with CAPTURED_OBJECT/DUPLICATED_OBJECT entries are
      generated similarly to what crankshaft's escape
      analysis does.
      
      Two unittests test correctness of the IR level implementation.
      
      Correctness for instruction selection / code generation
      is tested by mjsunit tests.
      
      R=jarin@chromium.org,mstarzinger@chromium.org
      BUG=v8:4586
      LOG=n
      
      Review URL: https://codereview.chromium.org/1485183002
      
      Cr-Commit-Position: refs/heads/master@{#33115}
      3b473d7a
  5. 10 Dec, 2015 1 commit
    • jarin's avatar
      [turbofan] Make MachineType a pair of enums. · bb2a830d
      jarin authored
      MachineType is now a class with two enum fields:
      - MachineRepresentation
      - MachineSemantic
      
      Both enums are usable on their own, and this change switches some places from using MachineType to use just MachineRepresentation. Most notably:
      - register allocator now uses just the representation.
      - Phi and Select nodes only refer to representations.
      
      Review URL: https://codereview.chromium.org/1513543003
      
      Cr-Commit-Position: refs/heads/master@{#32738}
      bb2a830d
  6. 09 Dec, 2015 1 commit
    • bmeurer's avatar
      [turbofan] Add initial support for SOFT deopts. · 7a22fdff
      bmeurer authored
      This only introduces the basic support for both SOFT and EAGER deopts in
      TurboFan, but doesn't make use of SOFT deopts anywhere yet (there are
      some other issues blocking that). Basically every Deoptimize operator
      now has a DeoptimizeKind, which can be either kSoft or kEager.
      
      R=jarin@chromium.org
      
      Review URL: https://codereview.chromium.org/1511883002
      
      Cr-Commit-Position: refs/heads/master@{#32690}
      7a22fdff
  7. 03 Dec, 2015 1 commit
  8. 18 Nov, 2015 2 commits
  9. 30 Oct, 2015 1 commit
    • bmeurer's avatar
      [turbofan] Add support for storing to double fields. · 0df0e254
      bmeurer authored
      Adds new Guard[Type] common operator, which takes value and control
      inputs and records a guaranty that a certain value has a certain type
      in that control path.  This is some kind of ad-hoc SSI similar to what
      we have to do in Crankshaft in some places.
      
      Also introduces an ObjectIsNumber simplified operator, which checks
      whether a certain value is a number (either a Smi or a HeapNumber).
      
      This doesn't yet support transitioning stores to double fields, which
      require support for allocating mutable heap numbers.
      
      R=jarin@chromium.org
      BUG=v8:4470
      LOG=n
      
      Review URL: https://codereview.chromium.org/1420283009
      
      Cr-Commit-Position: refs/heads/master@{#31675}
      0df0e254
  10. 19 Oct, 2015 1 commit
    • jarin's avatar
      [turbofan] Introduce lazy bailout, masked as a call. · f9a9c6be
      jarin authored
      This introduces an explicit lazy bailout. It is wrapped in the call
      node, mostly because the lazy deoptimization processing is married
      to the call processing in the instruction selector and the code generator.
      
      It is still a terrible hack.
      
      R=bmeurer@chromium.org,mstarzinger@chromium.org
      BUG=chromium:543994,v8:4195
      LOG=n
      
      Review URL: https://codereview.chromium.org/1412443003
      
      Cr-Commit-Position: refs/heads/master@{#31353}
      f9a9c6be
  11. 14 Oct, 2015 1 commit
    • jarin's avatar
      [turbofan] Introduce node regions for protection from scheduling. · 59c616cc
      jarin authored
      This CL re-purposes ValueEffect and Finish as delimiters for regions
      that are scheduled atomically (renamed to BeginRegion, FinishRegion).
      
      The BeginRegion node takes and produces an effect. For the uses that do
      not care about the placement in the effect chain, it is ok to feed
      graph->start() as an effect input.
      
      The FinishRegion takes a value and an effect and produces a value and
      an effect. It is important that any value or effect produced inside the
      region is not used outside the region. The FinishRegion node is the only
      way to smuggle an effect and a value out.
      
      At the moment, this does not support control flow inside the region. Control flow would be hard.
      
      During scheduling we do some sanity check, but the checks are not exhaustive. Here is what we check:
      - the effect chain between begin and finish is linear (no splitting,
        single effect input and output).
      - any value produced is consumed by the FinishRegion node.
      - no control flow outputs.
      
      Review URL: https://codereview.chromium.org/1399423002
      
      Cr-Commit-Position: refs/heads/master@{#31265}
      59c616cc
  12. 08 Oct, 2015 1 commit
  13. 01 Sep, 2015 1 commit
  14. 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
  15. 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
  16. 06 Jul, 2015 1 commit
  17. 23 Jun, 2015 1 commit
  18. 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
  19. 18 Jun, 2015 1 commit
  20. 11 Jun, 2015 1 commit
  21. 28 May, 2015 2 commits
  22. 26 May, 2015 2 commits
  23. 15 May, 2015 1 commit
  24. 11 May, 2015 1 commit
  25. 06 May, 2015 1 commit
  26. 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
  27. 22 Apr, 2015 1 commit
  28. 20 Apr, 2015 1 commit
  29. 31 Mar, 2015 2 commits
  30. 19 Mar, 2015 3 commits
  31. 18 Mar, 2015 1 commit
  32. 04 Mar, 2015 1 commit
  33. 20 Feb, 2015 1 commit
  34. 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