1. 26 Sep, 2014 5 commits
  2. 25 Sep, 2014 3 commits
    • Fix bug in Subzero bitcode reader for insertelement instruction. · f0657dd8
      Karl Schimpf authored
      Instruction insertelement was incorrectly generating a result
      corresponding to the element type, instead of the updated
      vector type.
      
      BUG= None
      R=jvoung@chromium.org
      
      Review URL: https://codereview.chromium.org/604023003
    • Subzero: Automatically infer regalloc preferences and overlap. · ad403539
      Jim Stichnoth authored
      Originally, for a given Variable, register preference and overlap were manually specified.  That is, when choosing a free register for a Variable, it would be manually specified which (if any) related Variable would be a good choice for register selection, all things being equal.  Also, it allowed the rather dangerous "AllowOverlap" specification which let the Variable use its preferred Variable's register, even if their live ranges overlap.
      
      Now, all this selection is automatic, and the machinery for manual specification is removed.
      
      A few other changes in this CL:
      
      - Address mode inference leverages the more precise
      
      - Better regalloc dump messages to follow the logic
      
      - "-verbose most" enables all verbose options except regalloc and time
      
      - "-ias" is an alias for "-integrated-as"
      
      - Bug fix: prevent 8-bit register ah from being used in register allocation, unless it is pre-colored
      
      - Bug fix: the _mov helper where Dest is NULL wasn't always actually creating a new Variable
      
      - A few tests are updated based on slightly different O2 register allocation decisions
      
      The static stats actually improve slightly across the board (around 1%), except that frame size improves by 6-10%.  This is probably from smarter register allocation decisions, particularly involving phi lowering temporaries, where the manual hints weren't too good to start with.
      
      BUG= none
      R=jvoung@chromium.org
      
      Review URL: https://codereview.chromium.org/597003004
    • Clean up run script to use for testing Subzero. · 2a5324a1
      Karl Schimpf authored
      Adds the python script run-llvm2ice.py (was llvm2iceinsts.py) that
      automatically handles conversion of LLVM source to a PEXE file,
      and then runs llvm2ice on the corresponding PEXE file.
      
      Also, defines three paths in tests, based on the executable chosen:
      
        %lc2i - Directly reads from LLVM source, and converts to Subzero.
        %l2i  - Parses a PEXE file into LLVM IR, and converts to Subzero.
        %p2i  - Parses a PEXE directly into Subzero.
      
      Note that for all three executables, the same arguments can be used,
      making it easy to change how the input is handled.
      
      Also moves tests to use %p2i whenever possible.
      
      BUG= https://code.google.com/p/nativeclient/issues/detail?id=3892
      R=jvoung@chromium.org
      
      Review URL: https://codereview.chromium.org/600043002
  3. 24 Sep, 2014 1 commit
  4. 23 Sep, 2014 2 commits
  5. 22 Sep, 2014 3 commits
  6. 20 Sep, 2014 1 commit
    • Subzero: Change the way bitcast stack slot lowering is handled. · 800dab29
      Jim Stichnoth authored
      When doing a bitcast between int and FP types, the way lowering works
      is that a spill temporary is created, with regalloc weight of zero to
      inhibit register allocation, and this spill temporary is used for the
      cvt instruction.  If the other variable does not get
      register-allocated, then addProlog() forces the spill temporary to
      share the same stack slot as the other variable.
      
      Currently, the lowering code passes this information to addProlog()
      by using the setPreferredRegister() mechanism.
      
      This is changed by creating a target-specific subclass of Variable, so
      that only the spill temporaries need to carry this extra information.
      
      Ultimately, many of the existing Variable fields will be refactored
      into a separate structure, and only generated/used as needed by
      various optimization passes.  The spill temporary linkage is the one
      thing that is still needed with Om1 when no optimizations are enabled,
      motivating this change.
      
      A couple other minor cleanups are also done here.
      
      The key test is that the cast cross tests continue to work,
      specifically the bitcast tests.
      
      BUG= none
      R=jvoung@chromium.org
      
      Review URL: https://codereview.chromium.org/586943003
  7. 19 Sep, 2014 3 commits
  8. 18 Sep, 2014 2 commits
    • Subzero: Allow extra args to be passed to llc and Subzero. · 89906a5e
      Jim Stichnoth authored
      Use --llc to pass extra arguments to pnacl-translate.
      
      Use --sz to pass extra arguments to llvm2ice.
      
      The --stats argument is removed from the script because it is Subzero-only, and can now be done with --sz=--stats .
      
      BUG= none
      R=jvoung@chromium.org
      
      Review URL: https://codereview.chromium.org/582593002
    • Subzero: Add branch optimization. · ff9c7063
      Jim Stichnoth authored
      1. Unconditional branch to the next basic block is removed.
      
      2. For a conditional branch with a "false" edge to the next basic block, remove the unconditional branch to the fallthrough block.
      
      3. For a conditional branch with a "true" edge to the next basic block, invert the condition and do like #2.
      
      This is enabled only for O2, particularly because inverting the branch condition is a marginally risky operation.
      
      This decreases the instruction count by about 5-6%.
      
      Also, --stats prints a final tally to make it easier to post-process the output.
      
      BUG= none
      R=jvoung@chromium.org
      
      Review URL: https://codereview.chromium.org/580903005
  9. 17 Sep, 2014 5 commits
  10. 16 Sep, 2014 5 commits
  11. 15 Sep, 2014 2 commits
  12. 12 Sep, 2014 4 commits
  13. 11 Sep, 2014 3 commits
  14. 10 Sep, 2014 1 commit