1. 22 Sep, 2015 4 commits
  2. 21 Sep, 2015 1 commit
  3. 18 Sep, 2015 6 commits
  4. 17 Sep, 2015 2 commits
  5. 16 Sep, 2015 7 commits
  6. 15 Sep, 2015 4 commits
    • Subzero: Add a flag to mock up bounds checking on unsafe references. · ad2989b6
      Jim Stichnoth authored
      The idea is that, before each load or store operation, we add a couple of compares/branches against the load/store address, one for the lower bound and one for the upper bound.  The conditional branches would be to an error throwing routine, and would never be taken in practice.  The compares might be against an immediate or a global location.  So a load of [reg] will mock-expand to this:
      
        cmp reg, 0
        je label
        cmp reg, 1
        je label
      label:
        mov xxx, [reg]
      
      We also make address mode inference less aggressive, because for a load of e.g. [eax+4*ecx], we can't compare that address expression against anything in any instruction, so we would have to reconstruct the address and undo at least part of the address mode inference.
      
      The bounds-check mock is added for loads, stores, and rmw operations (with an exclusion for stores to the stack for out-arg pushes).  There are probably a small handful of other cases that are missing the bounds check, but if we add the transformation inside legalize(), which is the most obvious place, we may add extra bounds checks because sometimes legalize() is called twice on the same operand.
      
      BUG= none
      R=ascull@google.com
      
      Review URL: https://codereview.chromium.org/1338633005 .
    • Subzero: Fix off-by-one asserts in intrinsic info lookup routines. · 92b31446
      Jim Stichnoth authored
      It turns out that getNumArgs() and getReturnType() were never actually called except to print errors, so this bug was never encountered until now.
      
      BUG= https://code.google.com/p/nativeclient/issues/detail?id=4315
      R=ascull@google.com
      
      Review URL: https://codereview.chromium.org/1347683002 .
    • Subzero: Fix labels for block profiling. · e7dbc0bc
      Jim Stichnoth authored
      The problem is that the block profiling pass runs at the very beginning and commits to particular label strings, but the actual label names might change by emission time because of node reordering.
      
      There was actually something of a workaround - given a label string from the profile output, inspect the *profiled* asm code and search for the block containing the increment of the counter location, as the name of the counter location label is related to the label string in the profile output.  However, it's tedious to mentally filter out the counter update code, and the counter update code has a huge impact on register allocation.
      
      The solution is to use a persistent number in CfgNode for constructing the label string, which doesn't change when the nodes are reordered.
      
      One note (independent of this change): Without block profiling, empty basic blocks are deleted and don't appear in the asm output.  But with block profiling, these blocks are never empty because they contain profile update instructions.  This means the profile output may contain labels that don't exist in the non-profiled asm.
      
      Another note: New nodes created as a result of edge splitting from advanced phi lowering are not profiled.
      
      BUG= none
      R=ascull@google.com, jpp@chromium.org
      
      Review URL: https://codereview.chromium.org/1341613002 .
  7. 14 Sep, 2015 2 commits
  8. 11 Sep, 2015 1 commit
  9. 09 Sep, 2015 2 commits
  10. 08 Sep, 2015 2 commits
  11. 04 Sep, 2015 3 commits
  12. 03 Sep, 2015 1 commit
  13. 31 Aug, 2015 1 commit
  14. 28 Aug, 2015 1 commit
  15. 25 Aug, 2015 2 commits
  16. 21 Aug, 2015 1 commit