- 15 Apr, 2016 1 commit
-
-
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 4 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 .
-
John Porto authored
BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1856323004 .
-
Eric Holk authored
BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1837663002 .
-
- 04 Apr, 2016 2 commits
-
-
David Sehr authored
BUG= R=jpp@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/1847423003 .
-
Jim Stichnoth authored
1. Generate dummy FunctionXXX function names when either of those flags is given. 2. Remove the browser code that automatically sets F/G prefixes instead of Function/Global, since that performance tweak is no longer relevant. 3. Fix a presumably long-standing bug where -timing-focus would accumulate timings into the TLS copy of the timers, but would then try to print timing info based on the currently-empty GlobalContext copy of the timers. BUG= none R=kschimpf@google.com Review URL: https://codereview.chromium.org/1855683002 .
-
- 02 Apr, 2016 3 commits
-
-
Karl Schimpf authored
Fixes error reporting in function blocks by adding a start address with parallel parses, and then using the getErrorBitNo() method of the bitstream cursor to correct error bit number, based on the start address. Dependent on CL https://codereview.chromium.org/1851163002. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4363 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1848313003 .
-
Karl Schimpf authored
This CL removes all indirect pointer chasing to get the values of command line flags. Since we are only using 1 copy of ClFlags, this CL introduces a static field Flags to hold the defined command line flags (it was previously a static field of GlobalContext). For those few contexts where one must change CL flags due to context (such as testsing and running in the browser), use ClFlags::Flags. In the remainder of the cases, the code uses getFlags() which returns a constant reference to ClFlags::Flags, allowing access to the get accessors. BUG=None R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1848303003 .
-
Jim Stichnoth authored
This corrects a "cleanup" mistake in line 414/417 of https://codereview.chromium.org/1838753002/diff/120001/src/IceTargetLoweringX8664.cpp . This wasn't caught before because "make presubmit" doesn't run any sandboxed x86-64 tests. So we add that to the presubmit script. In addition, the "make check-spec" is changed to run each spec component via the "--run" flag of szbuild_spec2k.py. Otherwise, the makefile was hard-coding running the native binary setup instead of the sandboxed or nonsfi setup. BUG= none R=jpp@chromium.org Review URL: https://codereview.chromium.org/1852713004 .
-
- 01 Apr, 2016 2 commits
-
-
John Porto authored
BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1850163003 .
-
John Porto authored
Creates a local arena allocator for holding liveness data structures. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4366 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1838973005 .
-
- 31 Mar, 2016 5 commits
-
-
Karl Schimpf authored
The code previously had to navigate through 1 (or more) indirect pointers to find the CL flags. Since CL flags are a static field in the global context, simplify these references. Note: I have added member functions to do this (where appropriate) so that fixing code could be easy if we choose to move where the command line flags are stored. BUG=None R=eholk@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/1845913003 .
-
Karl Schimpf authored
When threads=0, it doesn't pay to run a parallel parse, since each parallel parse slows down parsing by requiring a copy of bits in the function block. BUG=None R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1848873002 .
-
Jim Stichnoth authored
Liveness analysis uses a pair of bit vectors in each CFG node. The early bits correspond to "global" variables that are referenced in more than one block, and the latter bits correspond to "local" variables that are referenced in only that particular single block. Due to an oversight, variables that have no uses are conservatively classified as global, and consume space in every liveness bit vector. This CL improves memory usage by reducing liveness bit vector size: 1. Identify variables with no actual uses and exclude them from the bit vectors. 2. Don't do liveness analysis on rematerializable variables, because they have no need to be involved in register allocation or dead code elimination. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4366 R=jpp@chromium.org Review URL: https://codereview.chromium.org/1844713004 .
-
Jim Stichnoth authored
The problem is that the memory usage that comes from the -track-memory option is not very well-defined (it's a hidden LLVM option after all). It gives an OK sense of memory growth over time, but sometimes we really want to know how much CFG-local arena memory was allocated for a particular function. To help with this, we add another row to the stats output, giving the MB size of the CFG arena at the end of translating the method. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4366 R=kschimpf@google.com Review URL: https://codereview.chromium.org/1848733002 .
-
Karl Schimpf authored
This CL modifies the code so that we can do sequential and parallel parsing of function blocks in bitcode files, based on a command line argument. The command line argument was added because during testing, I had one compilation failure (transient), and do not know the cause. Hence, I was reluctant to install this CL without a command-line flag. To test the new parallel parser, the easiest solution is to edit IceClFlags.def and set the default value of ParseParallel to true. This code also fixes up unit parsing tests, as well as one parsing test. The cause of these problems was the implicit assumption that function blocks are parsed sequentially, which no longer applies when function blocks are parsed in parallel. To fix this, the "threads=0" command line argument was added. It also added the starting up of worker threads, since parsing of function blocks will happen in the translation thread if parallel parsing is turned on. The OptQ queue was modified to contain OptWorkerItem instances with a single virtual to get the parsed code. This allows the IceConverter to continue to work, by simply passing the generated Cfg as a work item. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4363 R=jpp@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/1834473002 .
-
- 30 Mar, 2016 1 commit
-
-
Jim Stichnoth authored
The motivating example (simplified) is this: %__698:eax = phi i32 [ %__646:ebx, %__188 ] // LIVEEND={%__646:ebx} %__617:bh = phi i8 [ %__618:ah, %__188 ] // LIVEEND={%__618:ah} %__615:bl = phi i8 [ %__616:al, %__188 ] // LIVEEND={%__616:al} By default, it first lowers the __698 assignment. However, that assignment has two "predecessors" because there are two other instructions whose dest variable aliases the __698 assignment's source operand. This triggers an assertion failure where we assume there is only one predecessor. The fix is two-pronged. First, we go ahead and generate as many temp assignments as needed to break the cycle, simply by changing an "if" to a "while". Second, when we need to break a cycle, we give preference to an instruction with only one predecessor so that only one temp assignment needs to be added. (It might be possible to prove that the second approach, i.e. preferring single-predecessor assignments, makes the first approach unnecessary, i.e. changing "if" to "while".) This change has no effect on the x86 output for spec2k. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4365 R=jpp@chromium.org Review URL: https://codereview.chromium.org/1839263003 .
-
- 29 Mar, 2016 1 commit
-
-
Jim Stichnoth authored
The purpose is to get control over excess string creation and deletion, especially when the strings are long enough to involve malloc/free. Strings that interface with the outside world, or used for dump/debug, are now explicitly std::string. Variable names and node names are represented as string IDs and pooled locally in the CFG. (In a non-DUMP build, this pool should always be empty.) Other strings that are used across functions are represented as string IDs and pooled globally in the GlobalContext. The --dump-strings flag allows these strings to be dumped for sanity checking, even in a MINIMAL build. In a MINIMAL build, the set of strings includes external symbol names, intrinsic names, helper function names, and label names of pooled constants to facilitate deterministic ELF string table output. For now, it also includes jump table entry names until that gets sorted out. Constants are fixed so that the name and pooled fields are properly immutable after the constant is fully initialized. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4360 R=jpp@chromium.org Review URL: https://codereview.chromium.org/1838753002 .
-
- 25 Mar, 2016 1 commit
-
-
Karl Schimpf authored
This CL fixes pnacl-sz to handle smoothnacl.pexe. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4364 R=jpp@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/1831043002 .
-
- 24 Mar, 2016 1 commit
-
-
John Porto authored
Valgrind used to report errors about uninitialized variable access in Subzero, when it was built with -O2. The problem was traced to size_t Alignment = Var->getAlignment; Alignment = std::max(MinAlignment, Var->getAlignment()) Apparently, the compiler will not correctly zero-extend Var->getAlignment(), and thus Alignment's upper 32-bits would be garbage. BUG= R=kschimpf@google.com, stichnot@chromium.org Review URL: https://codereview.chromium.org/1825363003 .
-
- 21 Mar, 2016 3 commits
-
-
Jim Stichnoth authored
BUG= none R=kschimpf@google.com Review URL: https://codereview.chromium.org/1819153002 .
-
Jim Stichnoth authored
The big reduction is in greatly reducing the set of non-native cross tests. Also, not so many copies of spec2k are run, and only one "representative" sandboxed target is built. BUG= none R=eholk@chromium.org Review URL: https://codereview.chromium.org/1824723002 .
-
John Porto authored
BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1803403002 .
-
- 17 Mar, 2016 2 commits
-
-
David Sehr authored
BUG= R=jpp@chromium.org, kschimpf@google.com, stichnot@chromium.org Review URL: https://codereview.chromium.org/1781213002 .
-
Karl Schimpf authored
This code moves some constants used by the target lowering, so that they are defined (and cached) during static initialization of the target lowering, rather than looking up everytime they are used. This CL does this for the constant zero, and predefined helper functions. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4076 R=jpp@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/1775253003 .
-
- 16 Mar, 2016 1 commit
-
-
John Porto authored
Uses the compiler's frontend -MD -MP options to auto-generate make dependencies. BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1801273003 .
-
- 15 Mar, 2016 2 commits
-
-
Jim Stichnoth authored
Reverts part of 843142fe (https://codereview.chromium.org/1776343004). Makes global prefixes short in all non-DUMP builds, not just the browser build, so that the user doesn't need to remember to supply the override options in a command-line MINIMAL build. BUG= none R=jpp@chromium.org Review URL: https://codereview.chromium.org/1805593002 .
-
John Porto authored
Because explicit memory ownership is awesome! BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1804133002 .
-