1. 17 Aug, 2017 3 commits
    • Ross McIlroy's avatar
      Reland "[Compiler] Remove CompileDebugCode and EnsureBytecode and replace with Compile" · 73ec5598
      Ross McIlroy authored
      This is a reland of 21da12a9
      Original change's description:
      > [Compiler] Remove CompileDebugCode and EnsureBytecode and replace with Compile
      > 
      > Removes the Compiler::CompileDebugCode and Compiler::EnsureBytecode functions
      > and replaces them with a Compiler::Compile(Handle<SharedFunctionInfo> shared)
      > function. The code in compiler.cc is refactored to use this function to compile
      > the SharedFunctionInfo when compiling a JSFunction.
      > 
      > Also does some other cleanup:
      >  - Removes CompileUnoptimizedFunction and inlines into new Compiler function
      >  - Moves code to create top level SharedFunctionInfo into CompilerTopLevel and
      >    out of FinalizeUnoptimizedCompile.
      > 
      > BUG=v8:6409
      > 
      > Change-Id: Ic54afcd8eb005c17f3ae6b2355060846e3091ca3
      > Reviewed-on: https://chromium-review.googlesource.com/613760
      > Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
      > Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
      > Reviewed-by: Leszek Swirski <leszeks@chromium.org>
      > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#47394}
      
      TBR=yangguo@chromium.org
      TBR=jarin@chromium.org
      
      Bug: v8:6409
      Change-Id: If2eae66a85f129e746a5ca5c04935540f3f86b04
      Reviewed-on: https://chromium-review.googlesource.com/618886Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47399}
      73ec5598
    • Ross McIlroy's avatar
      Revert "[Compiler] Remove CompileDebugCode and EnsureBytecode and replace with Compile" · 0f40415b
      Ross McIlroy authored
      This reverts commit 21da12a9.
      
      Reason for revert: Failing on arm64 simulator
      
      Original change's description:
      > [Compiler] Remove CompileDebugCode and EnsureBytecode and replace with Compile
      > 
      > Removes the Compiler::CompileDebugCode and Compiler::EnsureBytecode functions
      > and replaces them with a Compiler::Compile(Handle<SharedFunctionInfo> shared)
      > function. The code in compiler.cc is refactored to use this function to compile
      > the SharedFunctionInfo when compiling a JSFunction.
      > 
      > Also does some other cleanup:
      >  - Removes CompileUnoptimizedFunction and inlines into new Compiler function
      >  - Moves code to create top level SharedFunctionInfo into CompilerTopLevel and
      >    out of FinalizeUnoptimizedCompile.
      > 
      > BUG=v8:6409
      > 
      > Change-Id: Ic54afcd8eb005c17f3ae6b2355060846e3091ca3
      > Reviewed-on: https://chromium-review.googlesource.com/613760
      > Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
      > Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
      > Reviewed-by: Leszek Swirski <leszeks@chromium.org>
      > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#47394}
      
      TBR=rmcilroy@chromium.org,yangguo@chromium.org,jarin@chromium.org,leszeks@chromium.org
      
      Change-Id: I4ba63e82417a185f1528ff2633eb6c8872fbbfe5
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:6409
      Reviewed-on: https://chromium-review.googlesource.com/618687Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47397}
      0f40415b
    • Ross McIlroy's avatar
      [Compiler] Remove CompileDebugCode and EnsureBytecode and replace with Compile · 21da12a9
      Ross McIlroy authored
      Removes the Compiler::CompileDebugCode and Compiler::EnsureBytecode functions
      and replaces them with a Compiler::Compile(Handle<SharedFunctionInfo> shared)
      function. The code in compiler.cc is refactored to use this function to compile
      the SharedFunctionInfo when compiling a JSFunction.
      
      Also does some other cleanup:
       - Removes CompileUnoptimizedFunction and inlines into new Compiler function
       - Moves code to create top level SharedFunctionInfo into CompilerTopLevel and
         out of FinalizeUnoptimizedCompile.
      
      BUG=v8:6409
      
      Change-Id: Ic54afcd8eb005c17f3ae6b2355060846e3091ca3
      Reviewed-on: https://chromium-review.googlesource.com/613760
      Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47394}
      21da12a9
  2. 13 Jul, 2017 1 commit
  3. 11 Jul, 2017 1 commit
    • Alexandre Talon's avatar
      [Turbofan] Enable reducers to report their name to make reducer tracing clearer · 7a75da34
      Alexandre Talon authored
      Each reducer now has a virtual reducer_name function, returning its name
      (the name of the class containing this reducer). This gets displayed when
      using the --trace_turbo_reduction flag. Also when using this flags more
      messages are displayed.
      
      Actually when a node is replaced in-place (which is called an update
      of the node), other reducers can still update it right after the
      in-place replacement. When a node is really replaced (not in-place),
      then we stop trying to apply reducers to it before we propagate the
      reduction through the relevant nodes.
      
      Before a message got printed only for the last reduction it went
      through. So in case a node was reduced in-place several times
      in a row, only the last update was printed, or none at all if after
      being reduced in-place it got reduced by being replaced by another
      node: only the non-in-place replacement was showed. 
      
      Now each time an in-place reduction is applied to a node, a message
      gets printed.
      
      Bug: 
      Change-Id: Id0f816fecd44c01d0253966c6decc4861be0c2fa
      Reviewed-on: https://chromium-review.googlesource.com/563365Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Commit-Queue: Alexandre Talon <alexandret@google.com>
      Cr-Commit-Position: refs/heads/master@{#46552}
      7a75da34
  4. 13 Feb, 2017 1 commit
    • Michael Starzinger's avatar
      [turbofan] Correct lazy deopt by {JSCreate} operation. · 6ee0b6ce
      Michael Starzinger authored
      This adds support for deoptimizing into the JSConstructStub after the
      receiver instantiation but before the actual constructor invocation.
      Such a deoptimization point is needed for cases where instantiation
      might be observed (e.g. when new.target is a proxy) and hence might
      trigger a deopt.
      
      We use this new deoptimization point for the "after" frame-state the
      inliner attaches to {JSCreate} nodes being inserted when constructor
      calls are being inlined.
      
      R=jarin@chromium.org
      TEST=mjsunit/regress/regress-5638b
      BUG=v8:5638
      
      Change-Id: I7c72c807ee8fb76d12e0e9ccab86d970ab1a0efd
      Reviewed-on: https://chromium-review.googlesource.com/440125Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
      Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
      Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#43149}
      6ee0b6ce
  5. 07 Feb, 2017 1 commit
  6. 06 Feb, 2017 1 commit
    • mstarzinger's avatar
      [turbofan] Enable inlining based on SharedFunctionInfo. · b628aba0
      mstarzinger authored
      This adapts the inlining logic to allow for inlining based solely on a
      statically known underlying SharedFunctionInfo instead of a concrete
      closure of the call target.
      
      In cases where the closure is known, its bound context is constant
      promoted just as before. In the new cases where only the SFI for an
      entire class of closures is known, we use the dynamic SSA-value of the
      bound context.
      
      R=bmeurer@chromium.org
      BUG=v8:2206
      
      Review-Url: https://codereview.chromium.org/2626783003
      Cr-Commit-Position: refs/heads/master@{#42968}
      b628aba0
  7. 14 Nov, 2016 1 commit
    • tebbi's avatar
      This CL enables precise source positions for all V8 compilers. It merges... · c3a6ca68
      tebbi authored
      This CL enables precise source positions for all V8 compilers. It merges compiler::SourcePosition and internal::SourcePosition to a single class used throughout the codebase. The new internal::SourcePosition instances store an id identifying an inlined function in addition to a script offset.
      SourcePosition::InliningId() refers to a the new table DeoptimizationInputData::InliningPositions(), which provides the following data for every inlining id:
       - The inlined SharedFunctionInfo as an offset into DeoptimizationInfo::LiteralArray
       - The SourcePosition of the inlining. Recursively, this yields the full inlining stack.
      Before the Code object is created, the same information can be found in CompilationInfo::inlined_functions().
      
      If SourcePosition::InliningId() is SourcePosition::kNotInlined, it refers to the outer (non-inlined) function.
      So every SourcePosition has full information about its inlining stack, as long as the corresponding Code object is known. The internal represenation of a source position is a positive 64bit integer.
      
      All compilers create now appropriate source positions for inlined functions. In the case of Turbofan, this required using AstGraphBuilderWithPositions for inlined functions too. So this class is now moved to a header file.
      
      At the moment, the additional information in source positions is only used in --trace-deopt and --code-comments. The profiler needs to be updated, at the moment it gets the correct script offsets from the deopt info, but the wrong script id from the reconstructed deopt stack, which can lead to wrong outputs. This should be resolved by making the profiler use the new inlining information for deopts.
      
      I activated the inlined deoptimization tests in test-cpu-profiler.cc for Turbofan, changing them to a case where the deopt stack and the inlining position agree. It is currently still broken for other cases.
      
      The following additional changes were necessary:
       - The source position table (internal::SourcePositionTableBuilder etc.) supports now 64bit source positions. Encoding source positions in a single 64bit int together with the difference encoding in the source position table results in very little overhead for the inlining id, since only 12% of the source positions in Octane have a changed inlining id.
       - The class HPositionInfo was effectively dead code and is now removed.
       - SourcePosition has new printing and information facilities, including computing a full inlining stack.
       - I had to rename compiler/source-position.{h,cc} to compiler/compiler-source-position-table.{h,cc} to avoid clashes with the new src/source-position.cc file.
       - I wrote the new wrapper PodArray for ByteArray. It is a template working with any POD-type. This is used in DeoptimizationInputData::InliningPositions().
       - I removed HInlinedFunctionInfo and HGraph::inlined_function_infos, because they were only used for the now obsolete Crankshaft inlining ids.
       - Crankshaft managed a list of inlined functions in Lithium: LChunk::inlined_functions. This is an analog structure to CompilationInfo::inlined_functions. So I removed LChunk::inlined_functions and made Crankshaft use CompilationInfo::inlined_functions instead, because this was necessary to register the offsets into the literal array in a uniform way. This is a safe change because LChunk::inlined_functions has no other uses and the functions in CompilationInfo::inlined_functions have a strictly longer lifespan, being created earlier (in Hydrogen already).
      
      BUG=v8:5432
      
      Review-Url: https://codereview.chromium.org/2451853002
      Cr-Commit-Position: refs/heads/master@{#40975}
      c3a6ca68
  8. 29 Aug, 2016 1 commit
    • bgeron's avatar
      [turbofan] Also inline into try blocks. · 791118fc
      bgeron authored
      This removes test/webkit/fast/js/stack-overflow-arrity-catch.js, which tests that the stack overflows in a very particular way. It doesn't seem to test anything important, and only used to work because we didn't inline into try-blocks.
      
      BUG=
      R=jarin
      
      Review-Url: https://codereview.chromium.org/2216353002
      Cr-Commit-Position: refs/heads/master@{#38976}
      791118fc
  9. 24 Aug, 2016 1 commit
  10. 05 Aug, 2016 1 commit
  11. 25 May, 2016 1 commit
  12. 09 Mar, 2016 1 commit
  13. 19 Nov, 2015 1 commit
    • mstarzinger's avatar
      [turbofan] Make new.target explicit in JSCallDescriptor. · 0227857d
      mstarzinger authored
      This adds an explicit parameter to the call descriptor having kind
      kJSCallFunction representing the new.target value. Note that for now
      this parameter is not yet passed in and hence cannot be used yet. Also
      contains some refactoring of how parameter index value are calculated,
      establishing Linkage as the central point for such index computations.
      
      This is a preparatory CL to allows us passing new.target in a register
      instead of via a side-channel through the construct stub frame.
      
      R=bmeurer@chromium.org
      BUG=v8:4544
      LOG=n
      
      Review URL: https://codereview.chromium.org/1461973002
      
      Cr-Commit-Position: refs/heads/master@{#32112}
      0227857d
  14. 12 Nov, 2015 1 commit
    • mstarzinger's avatar
      [turbofan] Initial support for constructor call inlining. · 11d5d09c
      mstarzinger authored
      This implements a first version of support for constructor call inlining
      in the inlining machinery. For now we can only inline calls where the
      actual constructor and the original constructor coincide (i.e. no super
      constructor calls). Note that the target of a super constructor call is
      loaded with a runtime call, so there is no way for it to be constant
      promoted at the moment.
      
      R=bmeurer@chromium.org
      BUG=v8:4544
      LOG=n
      
      Review URL: https://codereview.chromium.org/1435873002
      
      Cr-Commit-Position: refs/heads/master@{#31954}
      11d5d09c
  15. 22 Oct, 2015 1 commit
  16. 07 Oct, 2015 1 commit
  17. 01 Sep, 2015 1 commit
  18. 06 Jul, 2015 1 commit
  19. 10 Jun, 2015 1 commit
  20. 27 May, 2015 1 commit
  21. 21 May, 2015 1 commit
  22. 20 May, 2015 1 commit
  23. 15 May, 2015 1 commit
  24. 12 May, 2015 1 commit
  25. 20 Apr, 2015 1 commit
  26. 09 Mar, 2015 1 commit
    • Benedikt Meurer's avatar
      [turbofan] Add support for inlining of builtins. · 25895aee
      Benedikt Meurer authored
      We mark certain builtins for inlining, and those should always be
      inlined into optimized code (CrankShaft already handles it this way), so
      we should support that in TurboFan as well. Currently this mainly
      affects a certain set of Math functions, but once have the basics in
      place we can extend this to any kind of builtin/code stub/accessor.
      
      This adds a new flag --turbo_builtin_inlining (enabled by default), that
      forces the inliner to always inline builtins marked for inlining, but
      does not affect inlining of other functions (this is still controlled by
      the --turbo-inlining flag).
      
      BUG=v8:3952
      LOG=n
      R=jarin@chromium.org
      
      Review URL: https://codereview.chromium.org/993473002
      
      Cr-Commit-Position: refs/heads/master@{#27059}
      25895aee
  27. 20 Feb, 2015 3 commits
  28. 17 Feb, 2015 1 commit
  29. 09 Feb, 2015 1 commit
  30. 26 Jan, 2015 1 commit
  31. 21 Oct, 2014 1 commit
  32. 20 Oct, 2014 1 commit
  33. 18 Sep, 2014 1 commit
  34. 17 Sep, 2014 2 commits
  35. 20 Aug, 2014 1 commit