1. 23 Feb, 2017 1 commit
  2. 20 Jan, 2017 1 commit
  3. 19 Dec, 2016 1 commit
  4. 16 Dec, 2016 1 commit
    • vegorov's avatar
      Move TraceInlinedFunction from Hydrogen graph builder to internal::CodeGenerator. · 686d8c86
      vegorov authored
      This allows to share source dumping infrastructure between CS and TF and opens a possibility for external tools like IRHydra to perform deoptimization to source mapping for TF generated code based on --trace-deopt --print-opt-code --code-comments output.
      
      This CL also restores an old TraceInlinedFunction behavior which was lost during source positions refactoring - originally TraceInlinedFunction dumped source code only once per-SFI to avoid large traces whenever some helper function is inlined multiple times.
      
      This CL also adds --print-opt-source flag that would in the future replace obsolete --hydrogen-track-positions.
      
      BUG=
      
      Review-Url: https://codereview.chromium.org/2575703003
      Cr-Commit-Position: refs/heads/master@{#41758}
      686d8c86
  5. 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
  6. 17 Oct, 2016 2 commits
  7. 20 Sep, 2016 1 commit
  8. 31 Aug, 2016 1 commit
  9. 23 Aug, 2016 1 commit
  10. 19 Aug, 2016 1 commit
  11. 09 Aug, 2016 2 commits
  12. 25 Jul, 2016 1 commit
  13. 15 Jul, 2016 1 commit
    • bgeron's avatar
      [turbolizer] Show a label with a shorter parameter for some opcodes. · feb93dd6
      bgeron authored
      With this patch, every node in turbo-*.json has an opcode, a title, and
      a label. The label field is new; the opcode and title were already
      there. The title is for the mouseover text. The label is what will be
      displayed in the graph view, unless it's too long, in which case only
      the opcode will be displayed. (This is similar to the preexisting
      behaviour of putting titles in labels, except that the titles were
      rarely short enough to fit in a label.)
      
      With this patch, the labels generated are in practice the same as the
      titles we had before, except for LoadField and StoreField, which will be
      rendered as LoadField[[+432]] and StoreField[[+432]] (if 432 was the
      offset).
      
      This diff adds an overloadable method
      
          virtual void Operator1<T>::PrintParameter(ostream&, PrintVerbosity)
      
      for each type T to Operator1. Its default implementation just uses
      operator<<(ostream&, T const&) and adds square brackets around it, but
      it is overridden for FieldAccess to print "[+432]" in the example case.
      
      BUG=
      R=jarin,danno
      
      Review-Url: https://codereview.chromium.org/2093013002
      Cr-Commit-Position: refs/heads/master@{#37795}
      feb93dd6
  14. 01 Jul, 2016 1 commit
  15. 28 Jun, 2016 1 commit
    • mattloring's avatar
      Reland of Include file names in trace_turbo output (patchset #1 id:1 of... · 9480ea44
      mattloring authored
      Reland of Include file names in trace_turbo output (patchset #1 id:1 of https://codereview.chromium.org/2083153004/ )
      
      Reason for revert:
      Ready to test fix and reland.
      
      Original issue's description:
      > Revert of Include file names in trace_turbo output (patchset #3 id:40001 of https://codereview.chromium.org/2083863004/ )
      >
      > Reason for revert:
      > Many build bots are failing with a message of the form:
      >
      > Missing or invalid v8 JSON file: /tmp/tmp2qcEUy_swarming/0/output.json
      >
      > Can be relanded once we understand why these failures are occuring.
      >
      > Original issue's description:
      > > Include file names in trace_turbo output
      > >
      > > The trace turbo output will overwrite itself when functions in different
      > > files share the same name. Output files now have the form
      > > `turbo-<function_name>:<opt_file_name>-<opt_phase>.suffix`.
      > >
      > > R=ofrobots@google.com
      > > BUG=
      > >
      > > Committed: https://crrev.com/a53b9bf02f31e5647c37e0392afa19f74df1a3ba
      > > Cr-Commit-Position: refs/heads/master@{#37199}
      >
      > TBR=ofrobots@google.com,bmeurer@chromium.org,danno@chromium.org
      > # Skipping CQ checks because original CL landed less than 1 days ago.
      > NOPRESUBMIT=true
      > NOTREECHECKS=true
      > NOTRY=true
      > BUG=
      >
      > Committed: https://crrev.com/97c2bc362f234bd58515a0faf6af23b4f8ad183a
      > Cr-Commit-Position: refs/heads/master@{#37204}
      
      TBR=ofrobots@google.com,bmeurer@chromium.org,danno@chromium.org,machenbach@google.com
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=
      
      Review-Url: https://codereview.chromium.org/2081323007
      Cr-Commit-Position: refs/heads/master@{#37303}
      9480ea44
  16. 27 Jun, 2016 1 commit
  17. 22 Jun, 2016 2 commits
  18. 08 Jun, 2016 1 commit
  19. 03 Jun, 2016 1 commit
  20. 13 May, 2016 1 commit
  21. 10 May, 2016 1 commit
    • bbudge's avatar
      [turbofan] Rename floating point register / slot methods. · 8c8600db
      bbudge authored
      Renames IsDouble* predicates to IsFP*.
      Adds specific IsFloat*, IsDouble*, and IsSimd128* predicates.
      Adds specific GetFloatRegister, GetDoubleRegister, and
      GetSimd128Register methods.
      
      This is mostly a mechanical renaming of IsDouble* to IsFP* methods.
      
      This shouldn't change code generation at all. All fp registers are still
      treated as double registers.
      
      LOG=N
      BUG=v8:4124
      
      Review-Url: https://codereview.chromium.org/1959763002
      Cr-Commit-Position: refs/heads/master@{#36146}
      8c8600db
  22. 26 Apr, 2016 1 commit
  23. 14 Apr, 2016 1 commit
  24. 01 Apr, 2016 1 commit
  25. 29 Feb, 2016 1 commit
  26. 11 Jan, 2016 1 commit
  27. 11 Dec, 2015 1 commit
  28. 22 Oct, 2015 1 commit
  29. 02 Oct, 2015 3 commits
    • danno's avatar
      Re-reland: Remove register index/code indirection · 5cf1c0bc
      danno authored
      Previous to this patch, both the lithium and TurboFan register
      allocators tracked allocated registers by "indices", rather than
      the register codes used elsewhere in the runtime. This patch
      ensures that codes are used everywhere, and in the process cleans
      up a bunch of redundant code and adds more structure to how the
      set of allocatable registers is defined.
      
      Some highlights of changes:
      
      * TurboFan's RegisterConfiguration class moved to V8's top level
        so that it can be shared with Crankshaft.
      * Various "ToAllocationIndex" and related methods removed.
      * Code that can be easily shared between Register classes on
        different platforms is now shared.
      * The list of allocatable registers on each platform is declared
        as a list rather than implicitly via the register index <->
        code mapping.
      
      Committed: https://crrev.com/80bc6f6e11f79524e3f1ad05579583adfd5f18b2
      Cr-Commit-Position: refs/heads/master@{#30913}
      
      Committed: https://crrev.com/7b7a8205d9a00c678fb7a6e032a55fecbc1509cf
      Cr-Commit-Position: refs/heads/master@{#31075}
      
      Review URL: https://codereview.chromium.org/1287383003
      
      Cr-Commit-Position: refs/heads/master@{#31087}
      5cf1c0bc
    • danno's avatar
      Revert of Reland: Remove register index/code indirection (patchset #20... · 00e07b00
      danno authored
      Revert of Reland: Remove register index/code indirection (patchset #20 id:380001 of https://codereview.chromium.org/1287383003/ )
      
      Reason for revert:
      Failures on MIPS
      
      Original issue's description:
      > Remove register index/code indirection
      >
      > Previous to this patch, both the lithium and TurboFan register
      > allocators tracked allocated registers by "indices", rather than
      > the register codes used elsewhere in the runtime. This patch
      > ensures that codes are used everywhere, and in the process cleans
      > up a bunch of redundant code and adds more structure to how the
      > set of allocatable registers is defined.
      >
      > Some highlights of changes:
      >
      > * TurboFan's RegisterConfiguration class moved to V8's top level
      >   so that it can be shared with Crankshaft.
      > * Various "ToAllocationIndex" and related methods removed.
      > * Code that can be easily shared between Register classes on
      >   different platforms is now shared.
      > * The list of allocatable registers on each platform is declared
      >   as a list rather than implicitly via the register index <->
      >   code mapping.
      >
      > Committed: https://crrev.com/80bc6f6e11f79524e3f1ad05579583adfd5f18b2
      > Cr-Commit-Position: refs/heads/master@{#30913}
      >
      > Committed: https://crrev.com/7b7a8205d9a00c678fb7a6e032a55fecbc1509cf
      > Cr-Commit-Position: refs/heads/master@{#31075}
      
      TBR=akos.palfi@imgtec.com,bmeurer@chromium.org,jarin@chromium.org,paul.lind@imgtec.com,titzer@chromium.org
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      
      Review URL: https://codereview.chromium.org/1380863004
      
      Cr-Commit-Position: refs/heads/master@{#31083}
      00e07b00
    • danno's avatar
      Remove register index/code indirection · 7b7a8205
      danno authored
      Previous to this patch, both the lithium and TurboFan register
      allocators tracked allocated registers by "indices", rather than
      the register codes used elsewhere in the runtime. This patch
      ensures that codes are used everywhere, and in the process cleans
      up a bunch of redundant code and adds more structure to how the
      set of allocatable registers is defined.
      
      Some highlights of changes:
      
      * TurboFan's RegisterConfiguration class moved to V8's top level
        so that it can be shared with Crankshaft.
      * Various "ToAllocationIndex" and related methods removed.
      * Code that can be easily shared between Register classes on
        different platforms is now shared.
      * The list of allocatable registers on each platform is declared
        as a list rather than implicitly via the register index <->
        code mapping.
      
      Committed: https://crrev.com/80bc6f6e11f79524e3f1ad05579583adfd5f18b2
      Cr-Commit-Position: refs/heads/master@{#30913}
      
      Review URL: https://codereview.chromium.org/1287383003
      
      Cr-Commit-Position: refs/heads/master@{#31075}
      7b7a8205
  30. 24 Sep, 2015 2 commits
    • danno's avatar
      Revert of Remove register index/code indirection (patchset #17 id:320001 of... · 3ac27431
      danno authored
      Revert of Remove register index/code indirection (patchset #17 id:320001 of https://codereview.chromium.org/1287383003/ )
      
      Reason for revert:
      Failures on greedy RegAlloc, Fuzzer
      
      Original issue's description:
      > Remove register index/code indirection
      >
      > Previous to this patch, both the lithium and TurboFan register
      > allocators tracked allocated registers by "indices", rather than
      > the register codes used elsewhere in the runtime. This patch
      > ensures that codes are used everywhere, and in the process cleans
      > up a bunch of redundant code and adds more structure to how the
      > set of allocatable registers is defined.
      >
      > Some highlights of changes:
      >
      > * TurboFan's RegisterConfiguration class moved to V8's top level
      >   so that it can be shared with Crankshaft.
      > * Various "ToAllocationIndex" and related methods removed.
      > * Code that can be easily shared between Register classes on
      >   different platforms is now shared.
      > * The list of allocatable registers on each platform is declared
      >   as a list rather than implicitly via the register index <->
      >   code mapping.
      >
      > Committed: https://crrev.com/80bc6f6e11f79524e3f1ad05579583adfd5f18b2
      > Cr-Commit-Position: refs/heads/master@{#30913}
      
      TBR=akos.palfi@imgtec.com,bmeurer@chromium.org,jarin@chromium.org,paul.lind@imgtec.com,titzer@chromium.org
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      
      Review URL: https://codereview.chromium.org/1365073002
      
      Cr-Commit-Position: refs/heads/master@{#30914}
      3ac27431
    • danno's avatar
      Remove register index/code indirection · 80bc6f6e
      danno authored
      Previous to this patch, both the lithium and TurboFan register
      allocators tracked allocated registers by "indices", rather than
      the register codes used elsewhere in the runtime. This patch
      ensures that codes are used everywhere, and in the process cleans
      up a bunch of redundant code and adds more structure to how the
      set of allocatable registers is defined.
      
      Some highlights of changes:
      
      * TurboFan's RegisterConfiguration class moved to V8's top level
        so that it can be shared with Crankshaft.
      * Various "ToAllocationIndex" and related methods removed.
      * Code that can be easily shared between Register classes on
        different platforms is now shared.
      * The list of allocatable registers on each platform is declared
        as a list rather than implicitly via the register index <->
        code mapping.
      
      Review URL: https://codereview.chromium.org/1287383003
      
      Cr-Commit-Position: refs/heads/master@{#30913}
      80bc6f6e
  31. 16 Sep, 2015 1 commit
  32. 04 Sep, 2015 1 commit
  33. 26 Aug, 2015 1 commit
    • mtrofin's avatar
      [turbofan] Separate LiveRange and TopLevelLiveRange concepts · 0ee4b473
      mtrofin authored
      A TopLevelLiveRange is the live range of a virtual register. Through
      register allocation, it may end up being split in a succession of child
      live ranges, where data flow is handled through moves from
      predecessor to successor child.
      
      Today, the concepts of "top level" and "child" live ranges are conflated
      under the LiveRange class. However, a good few APIs pertain solely
      to TopLevelLiveRanges. This was communicated through comments or
      DCHECKs - but this makes for poor code comprehensibility and maintainability.
      
      For example, the worklist of the register allocator (live_ranges()) needs
      to only contain TopLevelLiveRanges; spill range concerns are associated
      only with the top range; phi-ness; certain phases in the allocation pipeline;
      APIs on LiveRange used for initial construction - before splitting;
      splintering - these are all responsibilities associated to TopLevelLiveRanges,
      and not child live ranges.
      
      This change separates the concepts.
      
      An effect of this change is that child live range allocation need not involve
      RegisterAllocationData. That's "a good thing" (lower coupling), but it has
      the side-effect of not having a good way to construct unique identifiers for
      child live ranges, relative to a given InstructionSequence.
      
      LiveRange Id are used primarily for tracing/output-ing, and debugging.
      
      I propose a 2-component identifier: a virtual register (vreg) number,
      uniquely identifying TopLevelLiveRanges; and a relative identifier, which
      uniquely identifies children of a given TopLevelLiveRange. "0" is reserved
      for the TopLevel range. The relative identifier does not necessarily
      indicate order in the child chain, which is no worse than the current state
      of affairs.
      
      I believe this change should make it easier to understand a trace output
      (because the virtual register number is readily available). I plan to formalize
      with a small structure the notion of live range id, and consolidate tracing
      around that, as part of a separate CL. (there are seemingly disparate ways
      to trace - printf or stream-based APIs - so this seems like an opportune
      change to consolidate that)
      
      Review URL: https://codereview.chromium.org/1311983002
      
      Cr-Commit-Position: refs/heads/master@{#30370}
      0ee4b473
  34. 24 Aug, 2015 1 commit
    • rmcilroy's avatar
      Add CompileInfo::GetDebugName() · 53ac9fe8
      rmcilroy authored
      Replaces all instances of the code which computed the debug
      name of a stub or function with calls to CompileInfo::GetDebugName instead.
      
      Also:
        - Removes useless parameter on CodeStub::GetMajorName
        - Removes FakeStubForTesting since it is no longer required
        - Adds CompileInfo::ShouldEnsureSpaceForLazyDeopt() to replace unclear calls to IsStub().
      
      Review URL: https://codereview.chromium.org/1297203002
      
      Cr-Commit-Position: refs/heads/master@{#30324}
      53ac9fe8