1. 31 Jul, 2014 1 commit
    • Subzero: Fix some issues related to legalization and undef handling. · e377767c
      Matt Wala authored
      1. Much of the lowering code for vector operations was not properly
      checking that the input operand was in a register or memory. This
      problem could be exhibited by passing undef values as inputs.
      
      => Change the vector legalization code to legalize input operands to
      register or memory before producing instructions that use the
      operands. Also, append a suffix to the variable names in the vector
      legalization code to clarify the legalization status of the values.
      
      2. Undef values should never be emitted directly. Rather, they should
      have been appropriately legalized to a zero value.
      
      => To enforce this, make ConstantUndef::emit() issue an error
      message. Do this in the x86 backend, as other backends may decide to
      treat undef values differently.
      
      3. The regalloc_evict_non_overlap test was loading from an undef
      pointer. Subzero was not handling this correctly (the undef pointer was
      being emitted without being legalized), but it does not have to handle
      this case since PNaCl IR disallows undef pointers.
      
      => Fix the regalloc_evict_non_overlap test to use an inttoptr instead of
      directly loading from the undef pointer. Also, add an assert in
      IceTargetLoweringX8632::FormMemoryOperand() to make sure that undef
      pointers are never encountered.
      
      BUG=none
      R=jvoung@chromium.org, stichnot@chromium.org
      
      Review URL: https://codereview.chromium.org/432613002
  2. 30 Jul, 2014 6 commits
  3. 29 Jul, 2014 1 commit
  4. 28 Jul, 2014 2 commits
    • A couple of fixes for using Makefile.standalone on Mac. · 839c4cea
      Jan Voung authored
      (*) PNaCl toolchain_build builds 64-bit libraries for LLVM on Mac.
          That won't link with subzero code if subzero is built with -m32,
          so add an option to override the -m32.
      (*) include locale header
      (*) Mark xMacroIntegrityCheck unused to avoid clang compiler warning.
      (*) virtual dtor, for inheritable class
      (*) Mark compare function const
      
      BUG=none
      R=stichnot@chromium.org
      
      Review URL: https://codereview.chromium.org/428733003
    • Subzero: Make Ice::Ostream a typedef for llvm::raw_ostream. · 78282f6c
      Jim Stichnoth authored
      Previously Ostream was a class that wrapped a raw_ostream pointer,
      structured that way in case we wanted to wrap an alternate stream
      type.
      
      Also, Ostream used to include a Cfg pointer, but that had to go away
      when the Ostream became associated with the GlobalContext which
      persists beyond the Cfg lifetime, so the Cfg pointer was removed
      leaving only the raw_ostream.
      
      Since llvm::raw_ostream is supposed to be very lightweight, we can
      just give up the abstraction and equate it to Ice::Ostream.
      
      BUG= none
      R=kschimpf@google.com
      
      Review URL: https://codereview.chromium.org/413393005
  5. 25 Jul, 2014 1 commit
  6. 24 Jul, 2014 4 commits
  7. 23 Jul, 2014 3 commits
  8. 22 Jul, 2014 3 commits
  9. 21 Jul, 2014 1 commit
  10. 18 Jul, 2014 4 commits
  11. 17 Jul, 2014 1 commit
    • Lower the rest of the vector arithmetic operations. · 7fa22d8a
      Matt Wala authored
      The instructions emitted by the lowering operations require memory
      operands to be aligned to 16 bytes. Since there is no support for
      aligning memory operands in Subzero, do the arithmetic in registers for
      now.
      
      Add vector arithmetic to the arith crosstest. Pass the -mstackrealign
      parameter to the crosstest clang so that llc code called back from
      Subzero code (helper calls) doesn't assume that the stack is aligned at
      the entry to the call.
      
      BUG=none
      R=jvoung@chromium.org, stichnot@chromium.org
      
      Review URL: https://codereview.chromium.org/397833002
  12. 16 Jul, 2014 2 commits
    • Lower casting operations that involve vector types. · 83b8036b
      Matt Wala authored
      Impacted instructions:
      
      bitcast {v4f32, v4i32, v8i16, v16i8} <-> {v4f32, v4i32, v8i16, v16i8}
      bitcast v8i1 <-> i8
      bitcast v16i1 <-> i16
      
      (There was already code present to handle trivial bitcasts like v16i1 <-> v16i1.)
      
      [sz]ext v4i1 -> v4i32
      [sz]ext v8i1 -> v8i16
      [sz]ext v16i1 -> v16i8
      
      trunc v4i32 -> v4i1
      trunc v8i16 -> v8i1
      trunc v16i8 -> v16i1
      
      [su]itofp v4i32 -> v4f32
      fpto[su]i v4f32 -> v4i32
      
      Where there is a relatively simple lowering to x86 instructions, it has been used. Otherwise a helper call is used.
      
      Some lowerings require a materialization of a integer vector with 1s in each entry. Since there is no support for vector constant pools, the constant is materialized purely through register operations.
      
      BUG=none
      R=jvoung@chromium.org, stichnot@chromium.org
      
      Review URL: https://codereview.chromium.org/383303003
    • Lower bitmanip intrinsics, assuming absence of BMI/SSE4.2 for now. · e4da26f6
      Jan Voung authored
      We'll need the fallbacks in any case. However, once we've
      decided on how to specify the CPU features of the user
      machine we can use the nicer LZCNT/TZCNT/POPCNT as well.
      
      Adds cmov, bsf, and bsr instructions.
      
      Calls a popcount helper function for machines without SSE4.2.
      
      Not handling bswap yet (which can also take i16 params).
      
      BUG= https://code.google.com/p/nativeclient/issues/detail?id=3882
      R=stichnot@chromium.org, wala@chromium.org
      
      Review URL: https://codereview.chromium.org/390443005
  13. 15 Jul, 2014 2 commits
  14. 14 Jul, 2014 2 commits
  15. 11 Jul, 2014 4 commits
  16. 10 Jul, 2014 1 commit
  17. 09 Jul, 2014 2 commits