- 18 May, 2016 1 commit
-
-
Srdjan Obucina authored
This patch adds support for missing integer division instruction sdiv, udiv, srem, urem. R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1989303002 . Patch from Srdjan Obucina <Srdjan.Obucina@imgtec.com>.
-
- 17 May, 2016 1 commit
-
-
Srdjan Obucina authored
This patch adds support for logical operations ashr, lshr and shl. R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1975283002 . Patch from Srdjan Obucina <Srdjan.Obucina@imgtec.com>.
-
- 12 May, 2016 1 commit
-
-
Karl Schimpf authored
Clang doesn't realize that the end of method NaClBitstreamCursor::readArrayAbbreviatedField is unreachable. Add unreachable call to make the compiler happy. BUG=None R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1963193003 .
-
- 10 May, 2016 1 commit
-
-
Jim Stichnoth authored
The README.txt file is new; all other files under pnacl-llvm/ are copied verbatim from the pnacl-llvm repo. BUG= none R=kschimpf@google.com Review URL: https://codereview.chromium.org/1960393002 .
-
- 09 May, 2016 2 commits
-
-
Jim Stichnoth authored
The purpose is to allow pnacl-sz to be built within an LLVM checkout (version 3.9 or later), and not require the complex PNaCl build environment. Within an LLVM checkout, one would do something like the following: cd projects git clone https://chromium.googlesource.com/native_client/pnacl-subzero # change to LLVM build directory cmake -G "Ninja" <path_to_llvm_source_dir> ninja A follow-on CL will add in the PNaCl bitcode reader source files that are needed for compiling and linking. BUG= none R=jpp@chromium.org Review URL: https://codereview.chromium.org/1961743002 .
-
Sagar Thakur authored
This patch adds support for sext, zext, trunc operations on i8, i16, i32 source operand types. Support for i1 source operand type will follow. R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1948093002 . Patch from Sagar Thakur <sagar.thakur@imgtec.com>.
-
- 06 May, 2016 1 commit
-
-
Eric Holk authored
Introduces a new BooleanVariable type which represents zero-extended variables generated from an i1, saving a pointer to the original i1. The Wasm frontend uses this to avoid comparing against 0 if possible when translating branches. This led to about a 12% improvement on the bzip2 spec benchmark. This change also adds the -wasm-disable-bounds-check command line option which omits bounds checking code. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4369 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1961583002 .
-
- 02 May, 2016 2 commits
-
-
Jim Stichnoth authored
Also improve some diagnostic output in the Makefile. BUG= none R=jpp@chromium.org Review URL: https://codereview.chromium.org/1941593002 .
-
Eric Holk authored
Previously we were writing large numbers of zeros to the output file. This change only writes out the initialized portion and allocates the full address space at runtime. This reduces compile time by around 50%. This change also adds a couple of WASM-specific timers. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4369 R=jpp@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/1938643002 .
-
- 29 Apr, 2016 1 commit
-
-
Eric Holk authored
This change fills in several more runtime functions needed by several benchmarks, as well as changing the buffer handling in the WASM decoder. Now the decoder will resize the buffer as needed to accomodate large .wasm modules. Tracing can now be enabled on runtime functions to aid with debugging. Additionally, runtime failures such as bounds check failures or invalid indirect function calls tell what kind of failure occured. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4369 R=jpp@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/1918213003 .
-
- 27 Apr, 2016 1 commit
-
-
John Porto authored
This CL enables subzero to lower shufflevector instructions in x86 using pshufb (only for SSE 4.1) BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4136 BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4077 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1917863004 .
-
- 26 Apr, 2016 1 commit
-
-
John Porto authored
BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4136 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1909013002 .
-
- 25 Apr, 2016 2 commits
-
-
Eric Holk authored
Cleans up and generally improves memory handling in WASM. WasmTranslator now outputs the number of pages requested so the runtime can do correct bounds checks. The runtime also initializes the stack pointer correctly (stored at address 1024), so we no longer have to deal with negative pointers. This allows bounds checks to be done with a single comparison against the size of the heap. Because of this, we now support non-power-of-two heap sizes. Sbrk is implemented by having the runtime keep track of the current heap break and incrementing it as necessary. The heap break is initialized to the start of the first page beyond any initialized data in the WASM heap. These changes allow us to pass the complete set of torture tests that are passing on the Wasm waterfall. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4369 R=kschimpf@google.com, stichnot@chromium.org Review URL: https://codereview.chromium.org/1913153003 .
-
Sagar Thakur authored
R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1898743002 . Patch from Sagar Thakur <sagar.thakur@imgtec.com>.
-
- 22 Apr, 2016 2 commits
-
-
Eric Holk authored
Fixes several bugs in code generation, including handling of booleans, comparisons and shifts. The tests that get through code generation now run successfully (except for the tests that are known to fail on https://wasm-stat.us/). This change also includes improvements to the test infrastructure. The wasm test runner has a list of expected failures to skip. The tests now run in parallel, which significantly cuts down the time to run the whole test suite. Finally, there are some minor improvements to the WASM runtime, including an implementation of syscall20, i.e. getpid(). BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4369 R=kschimpf@google.com, stichnot@chromium.org Review URL: https://codereview.chromium.org/1900213002 .
-
Jim Stichnoth authored
This is the result of an improper rebase in the previous CL. BUG= none R=jpp@chromium.org Review URL: https://codereview.chromium.org/1911983002 .
-
- 21 Apr, 2016 4 commits
-
-
Jim Stichnoth authored
The problem is that bitcode like this: %cond = cmp %var, [mem] store ..., mem br cond, target1, target2 would be bool-folded into this: //deleted cmp store ..., mem br (%var==[mem]), target1, target2 And if the memory operands point to the same location, results are incorrect. In addition to stores, this is a problem for RMW instructions, and most call instructions which could perform stores before returning. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4370 R=eholk@chromium.org, jpp@chromium.org Review URL: https://codereview.chromium.org/1904233002 .
-
John Porto authored
This CL is a first step towards optimizing vector shuffles in Subzero. PNaCl bitcode does not support the shufflevector instruction, so pnacl-clang emits a series of extractelement/insertelement. pnacl-llc is then responsible for performing a pattern match on the output bitcode and rematerialize the shufflevector. With this CL, we enable shufflevector rematerialization in Subzero. To keep this CL simple, we introduce no efficient shufflevector lowering. Instead, we scalarize the rematerialized instructions. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4136 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1897243002 .
-
Jim Stichnoth authored
Due to a mistake in the logic in https://codereview.chromium.org/1903553004 , a warning is printed even when LogFilename is properly set to "-". BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4370 R=jpp@chromium.org Review URL: https://codereview.chromium.org/1911713002 .
-
Jim Stichnoth authored
The problem was that the lowering sequence might lead to the rem result %ah being directly moved into an 8-bit register other than al/bl/cl/dl/ah/bh/ch/dh. This is not encodable, and attempting to encode it leads to actually moving from %spl instead of %ah. The machinery to handle this was already available - copy through a temporary with register class RCX86_IsAhRcvr. So this was just a matter of hooking it up for srem/urem. This CL also requires relaxing some checks in the register allocator for when the -reg-reserve option is used. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4370 R=jpp@chromium.org Review URL: https://codereview.chromium.org/1909853002 .
-
- 20 Apr, 2016 1 commit
-
-
Jim Stichnoth authored
In the browser build only, allows arguments to be explicitly passed to pnacl-sz, in two ways: 1. The SZARGFILE envvar contains the name of a file with arguments, one per line. For each line, initial whitespace is ignored, and lines starting with the '#' comment character are also ignored. 2. The SZARGLIST envvar contains all the arguments, separated by the '|' character. Chrome needs to be started with special options to allow the envvars to be passed through, and also to allow access to the local file system. In addition, specifying "-log=/dev/stderr" or "-o /dev/stderr" gets mapped to std::cerr, in the same way "-" gets mapped to std::cout. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4370 R=jpp@chromium.org Review URL: https://codereview.chromium.org/1903553004 .
-
- 19 Apr, 2016 1 commit
-
-
Sean Klein authored
This change is required to run "toolchain_build_pnacl.py --cmake", since without it, ALLOW_WASM will be undefined and throw a compilation error. BUG=None R=eholk@chromium.org Review URL: https://codereview.chromium.org/1897323002 .
-
- 18 Apr, 2016 3 commits
-
-
John Porto authored
BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4076 R=eholk@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/1891243002 .
-
Eric Holk authored
This modifies the torture test script to actually link and run the tests in addition to just translating them. It includes a number of bug fixes as well, particularly in the handling of boolean values. There is some cleanup of memory address handling, and in many cases it can avoid generating useless address computations. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4369 R=jpp@chromium.org Review URL: https://codereview.chromium.org/1890283002 .
-
Jim Stichnoth authored
Several aspects of compilation can now be controlled with fine per-function granularity: - Focus -timing on individual functions - Only translate certain functions - Enable verbosity only for certain functions - Force O2 translation for certain functions (with Om1 default) In addition, -test-status limits the output of -verbose=status. This is just used to enable lit testing of the RangeSpec class. The main motivation here is to enable bisection debugging of a PNaCl application running in the browser. The initial use is to control O2 versus Om1, and could be extended to control things like address mode inference and advanced phi lowering, possibly even controlling at the granularity of the instruction numbers. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4370 R=eholk@chromium.org, jpp@chromium.org Review URL: https://codereview.chromium.org/1900543002 .
-
- 15 Apr, 2016 2 commits
-
-
Eric Holk authored
This change includes a number of improvements since the last WASM CL. It compiles against a newer version of V8 that matches the current WASM binary format. Many more WASM instructions are supported, as well as global variable initializers. There is also the beginning of a runtime library that implements some system calls required by the WASM C library. The c2wasm-exe.sh script can be used to compile a C program to a .wasm module, which is then compiled by Subzero into a native executable. This change includes a new Breakpoint instruction, which inserts an unconditional breakpoint into the executable. This has been helpful in debugging code generation for some WASM instructions. The Breakpoint instruction is only completely implemented on X86. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4369 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1876413002 .
-
John Porto authored
Also piggy-backs necro-comments from cl 1878943009. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4076 R=kschimpf@google.com Review URL: https://codereview.chromium.org/1886263004 .
-
- 14 Apr, 2016 1 commit
-
-
John Porto authored
This CL un-scalarizes all vector casts operations in Subzero. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4076 R=eholk@chromium.org Review URL: https://codereview.chromium.org/1878943009 .
-
- 13 Apr, 2016 1 commit
-
-
John Porto authored
BUG= R=kschimpf@google.com, stichnot@chromium.org Review URL: https://codereview.chromium.org/1881623002 .
-
- 11 Apr, 2016 3 commits
-
-
Karl Schimpf authored
Investigated how many parser waits occur when the OptQ fills up. The current implementation has 64k entries, which for 10Mb examples, never fill up (but do come close to filling up). To test, I dropped the queue size down. The numbers I got was that the queue size plus the number of parse waits was within 2% of the total number of function blocks. Hence, once OptQ fills up a lot of slow notifies get applied. Hence, for scaling, I modifed the code to not wake up the parse thread (during a pop) until OptQ got half empty. The results were that once the Opt got up to size 1024, less than 100 notifies would be issued. From 1024 on, as the queue size doubled, the number of notifies would drop roughly in half. Based on this, I decided to add the feature that the OptQ did not wake up the waiting parse thread until half empty. Since the queue size was not shrunk, this CL shouldn't add any overhead for the PEXES we have, and very few waits with significantly largers than the current (10Mb) PEXES. BUG=None R=jpp@chromium.org Review URL: https://codereview.chromium.org/1877873002 .
-
Karl Schimpf authored
Adds the VMOV instruction to the integrated assembler. Because #<imm> is complex, and we don't currently have a special ARM class to encode constants defined by ARM method AdvSIMDExpandImm(), it currently only accepts (nonnegative) integer32 constants that can fit into 8 bits. There are no tests for this instruction, since there currently no callers to this instruction. However, John will be checking in a CL shortly that will use this instruction. Add example generator for vector add. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4334 R=jpp@chromium.org Review URL: https://codereview.chromium.org/1879463003 .
-
John Porto authored
Subzero emits the following sequence when extracting elements from a vector of i1: vmov.8 Rt, Dm[I] I should be scaled when accessing v4i1, and v8i1, i.e., to extract the n-th boolean in a v8i1, the emitted code should be vmov.8 Rt, Dm[I*n] Insertions are handled by changing the operands' types, so that a v4i1 is handled as a v4i32, and a v8i1, as a v8i16. I.e., to insert the n-th boolean into a v8i1, the emitted code should be mov.16 Dt[I], Rm instead of mov.8 Dt[I*n], Rm This clears the upper bits for that element. BUG= R=eholk@chromium.org Review URL: https://codereview.chromium.org/1876083004 .
-
- 09 Apr, 2016 2 commits
-
-
Jim Stichnoth authored
Jump table labels change from ".Lxxxxx_yy" to "$Jxxxxx_yy". Pooled float labels change from ".L$float$xxxxyyyy" to "$Fxxxxyyyy". Pooled double labels change from ".L$double$xxxxxxxxyyyyyyyy" to "$Dxxxxxxxxyyyyyyyy". All these should in theory not conflict with C/C++ user symbols. Float labels now likely fit into short strings and don't require extra memory allocation. Double labels may exceed the limit - encoding in base64 instead of hex would fix that. Or, directly use the binary bytes as the string value. BUG= none R=jpp@chromium.org Review URL: https://codereview.chromium.org/1868113002 .
-
Jim Stichnoth authored
For "Flat times" output, adds a column with cumulative percentage. Also, since these percentages add up to less than 100% due to timer overhead, we go ahead and scale up all of the "Flat times" percentages proportionally, to make them add to 100%. This makes it easier to compare breakdowns across different pexes. Also, simplify the output to be simple tabular without extra brackets and whatnot. E.g.: Total across all functions - Cumulative times: Seconds Pct EventCnt TimerPath 8.580407 82.6% 0 szmain 8.580054 82.6% 0 szmain.parseModule 8.405447 80.9% 46473 szmain.parseModule.parseFunctions ... Total across all functions - Flat times: Seconds Pct CumPct EventCnt TimerName 1.354678 16.0% 16.0% 100716 linearScan 1.131292 13.3% 29.3% 139419 liveness 0.728727 8.6% 37.9% 46473 genCode ... BUG= none R=jpp@chromium.org, kschimpf@google.com Review URL: https://codereview.chromium.org/1870073005 .
-
- 07 Apr, 2016 1 commit
-
-
Jim Stichnoth authored
BUG= none R=jpp@chromium.org Review URL: https://codereview.chromium.org/1866993002 .
-
- 06 Apr, 2016 3 commits
-
-
Jim Stichnoth authored
We can use llvm::format() to achieve the same result in these cases. BUG= none R=jpp@chromium.org, kschimpf@google.com Review URL: https://codereview.chromium.org/1866633003 .
-
Jim Stichnoth authored
Undo an overly aggression application of unsigned to register numbers in 8aa39661 (https://codereview.chromium.org/1676123002). Now, instead of -verbose=regalloc output like: ++++++ Unhandled: R=jpp@chromium.org, kschimpf@google.com, 4294967295 V=%__4 Range=[2:7), 4294967295 V=%__5 Range=[7:8), 4294967295 V=%__6 Range=[9:11), -1 V=%__4 Range=[2:7), -1 V=%__5 Range=[7:8), -1 V=%__6 Range=[9:11) we have the originally intended: ++++++ Unhandled: BUG= none Review URL: https://codereview.chromium.org/1868543002 .
-
Jim Stichnoth authored
The problem is that the default timer is renamed to be the current function name, instead of "Total across all functions", but this causes an assertion failure during the final merge of thread-local timers into the global timers, because the names don't match. The solution is to temporarily rename the timer to be the function name, until the timer is dumped, and then restore it to its original value. BUG= none R=jpp@chromium.org Review URL: https://codereview.chromium.org/1867473002 .
-
- 05 Apr, 2016 2 commits
-
-
Jim Stichnoth authored
In a DUMP-enabled build, such as the standard Release+Asserts build, translator performance has regressed as a result of 467ffe51 (https://codereview.chromium.org/1838753002). This is because Variable and CfgNode names are being instantiated unconditionally, rather than on-demand. This CL restores most of that performance by going back to being on-demand. Note that it should have no effect on MINIMAL build performance. Also, it turns out that Variable::getName() does not really need the Cfg* parameter, so that is removed (and all its callers are fixed transitively). In addition, Variable and CfgNode are made more uniform with respect to each other in terms of inline definitions of the ctor, getName(), and setName(). BUG= none R=jpp@chromium.org, kschimpf@google.com Review URL: https://codereview.chromium.org/1866463002 .
-
John Porto authored
BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1860473002 .
-