1. 15 Dec, 2015 3 commits
  2. 11 Dec, 2015 1 commit
  3. 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
  4. 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
  5. 30 Nov, 2015 1 commit
  6. 26 Nov, 2015 1 commit
  7. 25 Nov, 2015 4 commits
  8. 24 Nov, 2015 1 commit
    • danno's avatar
      [turbofan] Add general support for sp-based frame access · 51669873
      danno authored
      Some highlights of this CL:
      * Refactor the mutable state out of Frame into FrameAccessState,
        which is maintained and updated during code generation to
        record whether sp- or fp-based frame access is currently active
        and how deep the stack on top of the frame is.
      * The operand resultion in linkage.cc now uses FrameAccessState
        to determine how to generate frame-accessing operands.
      * Update all platforms to accurately track additionally pushed
        stack slots (e.g. arguments for calls) in the FrameAccessState.
      * Add a flag, --turbo_sp_frame_access, which forces all frame
        access to be sp-based whenever possible. This will likely never
        be used in production, but for testing it's useful in verifying
        that the stack-tracking of each platform maintained in the
        FrameAccessState is correct.
      * Use sp-based frame access for gap resolving before tail
        calls. This will allow for slightly more efficient restoration
        of the frame pointer in the tail call in a later CL.
      * Remove most ad hoc groping into CallDescriptors to
        determine if a frame is needed, instead consistently use
        predicates like needs_frame(), IsCFunctionCall() and
        IsJSFunctionCall().
      
      BUG=v8:4076
      LOG=n
      
      Review URL: https://codereview.chromium.org/1460183002
      
      Cr-Commit-Position: refs/heads/master@{#32234}
      51669873
  9. 20 Nov, 2015 1 commit
  10. 16 Nov, 2015 2 commits
    • ahaas's avatar
      [turbofan] Added the optional Float64RoundTiesEven operator to turbofan. · dffecf31
      ahaas authored
      The TiesEven rounding mode rounds float64 numbers to the nearest
      integer. If there are two nearest integers, then the number is rounded
      to the even one.  This is the default rounding mode according to
      IEEE~754.
      
      I implemented the operator on ia32, x64, arm, arm64, mips, and mips64.
      
      I think there is a bug in the current implementation of the ppc
      simulator, which kept me from implementing the operator on ppc.
      According to my understanding of the ppc instruction manual, the FRIN
      instruction provides the right behavior for Float64RoundTiesEven. In the
      simulator, however, FRIN provides a different semantics. If there are
      two nearest integers, then the simulator returns the one which is
      further away form 0.
      
      Review URL: https://codereview.chromium.org/1440293002
      
      Cr-Commit-Position: refs/heads/master@{#32005}
      dffecf31
    • ahaas's avatar
      [turbofan] Added the optional Float64RoundUp operator to turbofan. · 1389b9f5
      ahaas authored
      I implemented it on x64, ia32, arm, arm64, mips, mips64, and ppc.
      
      Review URL: https://codereview.chromium.org/1444583002
      
      Cr-Commit-Position: refs/heads/master@{#32004}
      1389b9f5
  11. 13 Nov, 2015 1 commit
    • danno's avatar
      [turbofan] Better and more sane support for tail calls · ff283f7d
      danno authored
      * Limit triggering of tail calls to explicit use of a new inline runtime
        function %_TailCall. %_TailCall works just like %_Call except for using
        tail-calling mechanics (currently only in TF).
      * Remove hack that recognized some specific usages of %_Call and converted them
        into tail calls.
      * Support tail calls for all calls where the number of callee stack parameters
        is less than or equal to the number of caller stack parameters.
      * Use the gap resolver to swizzle parameters and registers to tail calls.
      
      BUG=v8:4076
      LOG=n
      
      Review URL: https://codereview.chromium.org/1439613003
      
      Cr-Commit-Position: refs/heads/master@{#31987}
      ff283f7d
  12. 10 Nov, 2015 1 commit
  13. 26 Oct, 2015 2 commits
  14. 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
  15. 16 Oct, 2015 1 commit
  16. 15 Oct, 2015 1 commit
  17. 29 Sep, 2015 1 commit
    • jacob.bramley's avatar
      [arm] Fix a double-register push operation. · f20d6461
      jacob.bramley authored
      It is not safe to access memory below sp, and this is also forbidden by
      the ABI. When pushing, we must either use an atomic operation (such as
      vstm+db_w) or move sp before writing the data.
      
      This patch fixes one stack access, and also adds vpush and vpop helpers
      to simplify similar code.
      
      BUG=
      
      Review URL: https://codereview.chromium.org/1378563002
      
      Cr-Commit-Position: refs/heads/master@{#31008}
      f20d6461
  18. 24 Sep, 2015 2 commits
    • pierre.langlois's avatar
      [arm] Optimize vcmp when lhs operand is #0.0 · d1472d65
      pierre.langlois authored
      This patch checks the type of the lhs operand of a floating point
      comparison for ARM, and commutes the operands if it is #0.0.  It allows
      us to optimize a comparison with zero, as the vcmp instruction
      accepts #0.0 as rhs operand.
      
      Code before for "0.0 < 0.123":
      ------------------------------
      movw ip, #29360
      movt ip, #37224
      movw r9, #31981
      movt r9, #16319
      vmov d0, ip, r9
      mov ip, #0
      vmov d1, ip, ip
      vcmp.f64 d1, d0
      vmrs APSR, FPSCR
      bcc +12
      
      Code after:
      -----------
      movw ip, #29360
      movt ip, #37224
      movw r9, #31981
      movt r9, #16319
      vmov d0, ip, r9
      vcmp.f64 d0, #0.0
      vmrs APSR, FPSCR
      bgt +12
      
      BUG=
      
      Review URL: https://codereview.chromium.org/1361913003
      
      Cr-Commit-Position: refs/heads/master@{#30911}
      d1472d65
    • martyn.capewell's avatar
      [turbofan] Elide fp32 convert for const compares · 809f6b15
      martyn.capewell authored
      Reduce operations of the form f64cmp(fp32to64(x), k) to f32cmp(x, k) when k
      can be encoded as a 32-bit float.
      
      Review URL: https://codereview.chromium.org/1365623002
      
      Cr-Commit-Position: refs/heads/master@{#30909}
      809f6b15
  19. 23 Sep, 2015 1 commit
    • pierre.langlois's avatar
      [arm64] Optimize fcmp when lhs operand is #0.0 · e28ae8ca
      pierre.langlois authored
      This patch checks the type of the lhs operand of a floating point
      comparison, and commutes the operands if it is #0.0.  It allows us to
      optimize a comparison with zero, as the fcmp instruction accepts #0.0 as
      rhs operand.
      
      Code before for "0.0 < 0.123":
      ------------------------------
      fmov d1, xzr
      ldr d0, pc+96
      fcmp d1, d0
      b.lo #+0xc
      
      Code after:
      -----------
      ldr d0, pc+92
      fcmp d0, #0.0
      b.gt #+0xc
      
      Before this patch, we used unsigned condition codes for floating point
      comparisons, but the unordered case was not correctly commuted.
      
      Review URL: https://codereview.chromium.org/1356283003
      
      Cr-Commit-Position: refs/heads/master@{#30881}
      e28ae8ca
  20. 21 Sep, 2015 1 commit
  21. 03 Sep, 2015 1 commit
  22. 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
  23. 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
  24. 17 Aug, 2015 1 commit
  25. 11 Aug, 2015 2 commits
  26. 10 Aug, 2015 1 commit
  27. 07 Aug, 2015 2 commits
  28. 31 Jul, 2015 1 commit
  29. 30 Jul, 2015 2 commits
    • titzer's avatar
      [turbofan] Factor C call descriptor building into compiler/c-linkage.cc. · c215c956
      titzer authored
      This is the first step in cutting the Gordian linkage/linkage-impl knot.
      
      This basically changes the axis along which we organize call descriptor
      building logic from having platform-specific files dedicated to all call
      descriptor types to having call-descriptor-type-specific files that have
      
      The next step is to factor the JS, code stub, and runtime call descriptors
      similarly, dumping them into:
        compiler/js-linkage.cc
        compiler/runtime-linkage.cc
        compiler/code-stub-linkage.cc
      
       or, alternatively, all of them just into compiler/js-linkage.cc.
      
      This also anticipates a wasm-linkage.cc file in the future.
      
      R=bmeurer@chromium.org,danno@chromium.org
      BUG=
      
      Review URL: https://codereview.chromium.org/1266603002
      
      Cr-Commit-Position: refs/heads/master@{#29931}
      c215c956
    • rmcilroy's avatar
      [interpreter] Add Interpreter{Entry,Exit}Trampoline builtins. · c5dd553c
      rmcilroy authored
      Adds interpreter entry and exit trampoline builtins. Also implements the
      Return bytecode handler and fixes a few bugs in InterpreterAssembler
      highlighted by running on other architectures.
      
      MIPS and MIPS64 port contributed by Paul Lind (paul.lind@imgtec.com)
      
      BUG=v8:4280
      LOG=N
      
      Review URL: https://codereview.chromium.org/1245133002
      
      Cr-Commit-Position: refs/heads/master@{#29929}
      c5dd553c