1. 04 Mar, 2015 2 commits
  2. 03 Mar, 2015 2 commits
    • Ignore NaCl st_blksize of 0 and buffer writes to raw_fd_ostream. · 437ceff2
      Jan Voung authored
      The default LLVM raw_fd_ostream buffer size is based on stat'ing the
      FD and then checking st_blksize. Unfortunately, in the NaCl sandboxed
      build of pnacl-sz, NaCl's syscall returns st_blksize of 0 which makes
      the writes unbuffered. There is a comment in "src/trusted/service_runtime/include/bits/stat.h":
      
        nacl_abi_blksize_t nacl_abi_st_blksize;   /* not implemented */
      
      And the " src/trusted/desc/" implementation sets this to 0.
      
      This results in half a million write syscalls to translate the GCC pexe,
      which roughly doubles the translation time in sandboxed mode vs
      unsandboxed mode.
      
      Manually set a buffer size (Linux st_blksize seems to be about
      4KB for comparison). This drops the number of write syscalls
      to about 200 for translating the GCC pexe.
      
      BUG= https://code.google.com/p/nativeclient/issues/detail?id=4091
      R=stichnot@chromium.org
      
      Review URL: https://codereview.chromium.org/969403003
    • Subzero: Fix a register allocation issue for "advanced phi lowering". · 5bc44313
      Jim Stichnoth authored
      When the advanced phi lowering handles a phi arg that is Undef, it lowers it to an assignment of a constant zero (or vector of zeroes).  The ad-hoc register allocation was missing the fact that a vector of zeroes is done with "pxor %reg, %reg".  This resulted in a pxor instruction with invalid addressing modes at emission time.
      
      The fix is to tell legalize() to use the dest physical register if dest has one; and if dest lacks a register, take the path where it actually does the ad-hoc register allocation as though the source operand were a memory operand.
      
      Tests are added for these vector undef phi args, and for scalar undef phi args as well for good measure.
      
      BUG= none
      R=jvoung@chromium.org
      
      Review URL: https://codereview.chromium.org/969703002
  3. 02 Mar, 2015 2 commits
  4. 26 Feb, 2015 3 commits
  5. 25 Feb, 2015 3 commits
  6. 24 Feb, 2015 4 commits
  7. 20 Feb, 2015 2 commits
  8. 19 Feb, 2015 1 commit
  9. 13 Feb, 2015 5 commits
  10. 12 Feb, 2015 2 commits
    • Subzero: Use -filetype instead of -ias and -elf-writer. · d442e7ee
      Jim Stichnoth authored
      This matches LLVM's -filetype={obj,asm} options, and also adds -filetype=iasm to get textual rendering with the integrated assembler.
      
      It also removes the old illegal combination of -ias=0 -elf-writer.
      
      BUG= none
      R=jvoung@chromium.org, kschimpf@google.com
      
      Review URL: https://codereview.chromium.org/920953002
    • Subzero: Emit functions and global initializers in a separate thread. · bbca754a
      Jim Stichnoth authored
      (This is a continuation of https://codereview.chromium.org/876083007/ .)
      
      Emission is done in a separate thread when -threads=N with N>0 is specified.  This includes both functions and global initializers.
      
      Emission is deterministic.  The parser assigns sequence numbers, and the emitter thread reassembles work units into their original order, regardless of the number of threads.
      
      Dump output, however, is not intended to be in deterministic, reassembled order.  As such, lit tests that test dump output (i.e., '-verbose inst') are explicitly run with -threads=0.
      
      For -elf-writer and -ias=1, the translator thread invokes Cfg::emitIAS() and the assembler buffer is passed to the emitter thread.  For -ias=0, the translator thread passed the Cfg to the emitter thread which then invokes Cfg::emit() to produce the textual asm.
      
      Minor cleanup along the way:
        * Removed Flags from the Ice::Translator object and ctor, since it was redundant with Ctx->getFlags().
        * Cfg::getAssembler<> is the same as Cfg::getAssembler<Assembler> and is useful for just passing the assembler around.
        * Removed the redundant Ctx argument from TargetDataLowering::lowerConstants() .
      
      BUG= https://code.google.com/p/nativeclient/issues/detail?id=4075
      R=jvoung@chromium.org
      
      Review URL: https://codereview.chromium.org/916653004
  11. 10 Feb, 2015 1 commit
    • Fix PNaCl bitcode reader to release global variables to emitter. · 6ca7d2b6
      Karl Schimpf authored
      Fixes the PNaCl bitcode reader to maintain two lists of global
      variables. The first, VariableDeclarations, is the list of
      variable declarations to be lowered by the emitter. The second,
      ValueIDConstants, is the corresponding constant symbol to use
      when references to the corresponding global variable declaration
      is referenced when processing functions.
      
      BUG=None
      R=jvoung@chromium.org, stichnot@chromium.org
      
      Review URL: https://codereview.chromium.org/883673005
  12. 09 Feb, 2015 1 commit
  13. 06 Feb, 2015 1 commit
  14. 05 Feb, 2015 1 commit
  15. 04 Feb, 2015 2 commits
  16. 03 Feb, 2015 4 commits
  17. 01 Feb, 2015 2 commits
  18. 31 Jan, 2015 2 commits
    • Subzero: Fix stats collection and output for multithreading. · a1dd3cc8
      Jim Stichnoth authored
      Updates of current-function and cumulative stats are done entirely in TLS.  At the end, cumulative stats are merged across all threads' TLS into the global cumulative stats.
      
      Printing of cumulative stats after every function is removed, since there's very little value from that.  It was probably done in the first place just to give partial cumulative information in the face of crashes or assertion failures.
      
      BUG= none
      R=jfb@chromium.org
      
      Review URL: https://codereview.chromium.org/887213002
    • Fix subzero Windows build · ae6e12ca
      JF Bastien authored
      MinGW's GCC 4.8.1 was sad because SectionType was shadowing the other SectionType. Also, the enum's values are in the ELFObjectWriter namespace, not ELFObjectWriter::SectionType.
      
      R=stichnot@chromium.org, jvoung@chromium.org
      BUG= Windows build is sad
      
      Review URL: https://codereview.chromium.org/891953002