1. 13 Mar, 2015 1 commit
  2. 12 Mar, 2015 1 commit
  3. 10 Mar, 2015 2 commits
    • Subzero: Enable a cmake build. · cd912149
      Jim Stichnoth authored
      This just puts the CMakeLists.txt file in place.  A couple other
      changes are needed in other repos to make this take effect.
      
      BUG= none
      R=dschuff@chromium.org, mtrofin@chromium.org
      
      Review URL: https://codereview.chromium.org/998693003
    • Subzero: Run cross tests as a much more configurable python script. · dc7c597e
      Jim Stichnoth authored
      The runtests.sh script is removed and replaced with crosstest_generator.py.
      
      "make check" limits to a relevant subset of cross tests to control the combinatorial explosion.  We cut the native tests almost in half, and the sandboxed tests down to a quarter.
      
      The --include and --exclude logic is copied/adapted from szbuild.py.
      
      The script works by running through every possible test in the combinatorial explosion, and if the test is a match against the --include and --exclude arguments, the test is built and run.
      
      The script includes lit support, which is the most likely way it will be run.  When run with the --lit argument, it sprays the output directory with lit test files in the form of shell scripts, and "make check" runs lit on that directory.
      
      BUG= https://code.google.com/p/nativeclient/issues/detail?id=4085
      R=jvoung@chromium.org, mtrofin@chromium.org
      
      Review URL: https://codereview.chromium.org/987503004
  4. 06 Mar, 2015 1 commit
  5. 05 Mar, 2015 1 commit
  6. 04 Mar, 2015 3 commits
  7. 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
  8. 02 Mar, 2015 2 commits
  9. 26 Feb, 2015 3 commits
  10. 25 Feb, 2015 3 commits
  11. 24 Feb, 2015 4 commits
  12. 20 Feb, 2015 2 commits
  13. 19 Feb, 2015 1 commit
  14. 13 Feb, 2015 5 commits
  15. 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
  16. 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
  17. 09 Feb, 2015 1 commit
  18. 06 Feb, 2015 1 commit
  19. 05 Feb, 2015 1 commit
  20. 04 Feb, 2015 2 commits
  21. 03 Feb, 2015 1 commit
    • Subzero: Fix unittest build dependencies. · 6e861d5f
      Jim Stichnoth authored
      The unittest .o files also depend on some of the llvm2ice headers, as well as the unittest headers.
      
      To reproduce the problem, try this:
      
      make -f Makefile.standalone clean
      make -f Makefile.standalone check-unit 2>/dev/null | grep BitcodeMunge.cpp
      
      This will print a line containing BitcodeMunge.cpp.
      
      Now do:
      
      touch unittest/BitcodeMunge.h
      make -f Makefile.standalone check-unit 2>/dev/null | grep BitcodeMunge.cpp
      
      This should print a line, but it doesn't.
      
      Finally:
      
      touch src/PNaClTranslator.h
      make -f Makefile.standalone check-unit 2>/dev/null | grep BitcodeMunge.cpp
      
      This should also print a line, but it doesn't.
      
      With this patch, the unittest files get rebuilt after header file changes.
      
      BUG= none
      R=jvoung@chromium.org, kschimpf@google.com
      
      Review URL: https://codereview.chromium.org/895143003