- 22 Sep, 2015 4 commits
-
-
Karl Schimpf authored
Fixes instrinsic function "validateCall" to properly define which parameter type doesn't match the expected signature for that intrinsic. Previous code did not take into account that the first element of the intrinsic signature was the return type. Also fixes error messages to print the name of the intrinsic function. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4326 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1359993002 .
-
Karl Schimpf authored
The bitcode parser assumes that the module symbol table, if it exists, must appear before the first function block (i.e. defininition). However, the parser did not check this constraint. This patch fixes that omission. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4320 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1359923002 .
-
Karl Schimpf authored
Previous code checked, after the fact, that there weren't multiple modules in the block. However, the code for TopLevelParser assumes that there is only on module block, allowing it to more efficiently test internal state. To fix the problem, modified TopLevelParser::ParseBlock to fail, and not attempt to parse the second block if the file contains more than one block. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4260 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1362643002 .
-
David Sehr authored
Hopefully improves perf in fpclassifyd in ammp spec test. BUG=none R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1351133003 .
-
- 21 Sep, 2015 1 commit
-
-
Karl Schimpf authored
Fixes bug where pnacl-sz was not checking if the inserted type matched the element type of the corresponding vector. Also fixes operand look up (within a function) to error recover rather than always die with a fatal error. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4313 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1357273004 .
-
- 18 Sep, 2015 6 commits
-
-
John Porto authored
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4076 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1356763004 .
-
Jim Stichnoth authored
Defer hi/lo i64 var splitting until after the block profiling IR is inserted, since block profiling operates on i64 counters. BUG= none R=jpp@chromium.org Review URL: https://codereview.chromium.org/1357733004 .
-
Karl Schimpf authored
Checks each parameter of a call against the corresponding function signature. It also checks that parameters are valid PNaCl parameter types, unless the call is to an intrinsic. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4309 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1354673002 .
-
John Porto authored
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4076 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1347223003 .
-
Jim Stichnoth authored
1. Regalloc dump output was displaying status updates for the wrong variable in some cases. 2. getPhysicalRegister() creates a variable for referring to a specific physical register for low-level purposes, such as the stack pointer, or the frame pointer, or a pushed/popped callee-save register. We change its behavior so that all such physical registers do not have their liveness tracked/validated, not just the stack pointer. For #2, the original behavior was causing a liveness validation failure if a function had a single basic block and used callee-save registers, and the -asm-verbose flag was used. This is because -asm-verbose runs a final liveness pass after the prolog/epilog are generated, and the initial callee-save register pushes would make it look like single-basic-block variables are live coming into a basic block, which is a hallmark of a liveness problem. BUG= none R=jpp@chromium.org Review URL: https://codereview.chromium.org/1353923004 .
-
Andrew Scull authored
BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1326013002 .
-
- 17 Sep, 2015 2 commits
-
-
Karl Schimpf authored
Fix handling of module value symbol tables. Also deals with case where the module doesn't have a global variables block. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4320 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1345293002 .
-
Andrew Scull authored
This doesn't make a big difference but does reduce the proportion of time spent in malloc and free. BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1349833005 .
-
- 16 Sep, 2015 7 commits
-
-
John Porto authored
Packs VFP arguments as tight as the ABI wants, and adds tests for float and double arguments. vector argument tests will come soon. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4076 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1348393002 .
-
Karl Schimpf authored
Makes sure that names within a symbol table are unique. Also cleans up error reporting to be more consistent between symbol tables. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4301 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1347683003 .
-
Karl Schimpf authored
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4302 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1346723002 .
-
Andrew Scull authored
BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1341423002 .
-
Jim Stichnoth authored
At the end, the ELF emitter code marks all the external symbols that are undefined in this object file, but it filters intrinsics out of this set. Previously, it was asserting on a "bad intrinsic", meaning a function whose name starts with "llvm." but doesn't match a known intrinsic. The assert doesn't really make sense here. Either it should be more strongly validated early on in the translation, or it should just pass through (and the link will probably fail, or maybe not). BUG= https://code.google.com/p/nativeclient/issues/detail?id=4319 R=kschimpf@google.com Review URL: https://codereview.chromium.org/1343283002 .
-
Jim Stichnoth authored
It checks that each phi label corresponds to an incoming edge, and that each incoming edge has a corresponding phi label. It does not check that duplicate incoming edges get the same phi value. Performance impact is minimal (~0.2%) despite the O(N^2) implementation. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4304 R=jpp@chromium.org Review URL: https://codereview.chromium.org/1351433002 .
-
Jim Stichnoth authored
X86 requires an immediate shift value to fit within 8 bits. It's undefined LLVM behavior if it doesn't (or in fact if the value exceeds the number of bits in the type width), but at least we can produce valid x86 instructions. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4316 R=ascull@google.com Review URL: https://codereview.chromium.org/1339603006 .
-
- 15 Sep, 2015 4 commits
-
-
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 .
-
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 .
-
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 .
-
Jim Stichnoth authored
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4307 R=ascull@google.com Review URL: https://codereview.chromium.org/1337113008 .
-
- 14 Sep, 2015 2 commits
-
-
John Porto authored
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4076 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1343783003 .
-
Andrew Scull authored
The C++11 syntax is more powerful as it also allows templating. This commit converts all type aliasing to the same syntax for consistency. BUG= R=jpp@chromium.org Review URL: https://codereview.chromium.org/1343843003 .
-
- 11 Sep, 2015 1 commit
-
-
John Porto authored
64-bit ints (and vectors) are future work. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4076 R=kschimpf@google.com, stichnot@chromium.org Review URL: https://codereview.chromium.org/1330933002 .
-
- 09 Sep, 2015 2 commits
-
-
Andrew Scull authored
1. The assembler tried to write to unaligned addresses but memcpy fixes this. 2. The InstKind and OperandKind enums allowed target specific kinds that did not fall in the defined range. Defining the maximum target kind in the enum sorts this problem. BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1311653003 .
-
Andrew Scull authored
3.8 has stricter warnings which LLVM doesn't pass so we turn them off when including the offending headers. BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1318883007 .
-
- 08 Sep, 2015 2 commits
-
-
Jim Stichnoth authored
Scraped non-pragma related warnings from a recent trybot run: wget -O - 'http://build.chromium.org/p/tryserver.nacl/builders/nacl-toolchain-win7-pnacl-x86_64/builds/3221/steps/llvm_i686_w64_mingw32%20%28build%29/logs/stdio' | grep subzero | grep warning | grep -v pragma BUG= none R=ascull@google.com, jpp@chromium.org Review URL: https://codereview.chromium.org/1315193020.
-
John Porto authored
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4076 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1310863007.
-
- 04 Sep, 2015 3 commits
-
-
John Porto authored
aliases. BUG= R=jvoung@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/1319203005.
-
Jim Stichnoth authored
A NOASSERT/MINIMAL build complains that private field Func is unused, which turned out to be true because of shadowing. BUG= none R=ascull@google.com Review URL: https://codereview.chromium.org/1312903015
-
Andrew Scull authored
further improves spec2k performance and fixes the regression in ammp. Loops are identified using an extension to Tarjan's algorithm. BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1318553003.
-
- 03 Sep, 2015 1 commit
-
-
Jim Stichnoth authored
This is a reStructuredText version of https://docs.google.com/a/google.com/document/d/1DmLVyZqqwWSZ0is91lipTm4xsfjInSba2KBOOxatYhg/edit?usp=sharing which for technical reasons is only visible to @google.com accounts. Also update README.rst to be more accurate. BUG= none R=jfb@chromium.org, jpp@chromium.org, jvoung@chromium.org Review URL: https://codereview.chromium.org/1309073003.
-
- 31 Aug, 2015 1 commit
-
-
John Porto authored
This makes it easier and less error-prone to implement the relatively common pattern of looking at all the Variable operands contained within an instruction. BUG= none R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1323693002.
-
- 28 Aug, 2015 1 commit
-
-
Andrew Scull authored
Count the number of instructions that use a variable following the heuristic that more uses implies higher register priority. This is currently very simple but is precursor work for weighting variables by loop nest depth. BUG= R=jvoung@chromium.org Review URL: https://codereview.chromium.org/1312433004.
-
- 25 Aug, 2015 2 commits
-
-
Karl Schimpf authored
This encorporate the changes introduced by llvm CL https://codereview.chromium.org/1310883003 (see for details). BUG=None R=dschuff@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/1312473006 .
-
Andrew Scull authored
BUG= R=jvoung@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/1310833003.
-
- 21 Aug, 2015 1 commit
-
-
Karl Schimpf authored
The bitcode reader for the switch insruction did not check if the branch labels were defined. This patch fixes the problem. Includes test for such a case. BUG=None R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1303003002 .
-