- 16 Sep, 2014 1 commit
-
-
Jim Stichnoth authored
A "standalone" version of dump() is provided, taking just an Ostream argument and not requiring a Cfg or GlobalContext argument. BUG= none R=kschimpf@google.com Review URL: https://codereview.chromium.org/570713006
-
- 15 Sep, 2014 2 commits
-
-
Karl Schimpf authored
LLVM objects/libraries are now built using clang from chrome. This CL changes the compiler to chrome clang, and adds an appropriate dynamic library path to the linked executable so that llvm2ice can be run in any directory. BUG=None R=jvoung@chromium.org Review URL: https://codereview.chromium.org/571973004
-
Jim Stichnoth authored
Also, refactor the key part of the address mode inference into separate functions, since it's getting unwieldy. The main thing is that we mark phi temporaries as multi-definition, and disallow address mode inference transformations that involve such temporaries, because this is incorrect particular when there are backward branches involved. BUG= none R=jvoung@chromium.org Review URL: https://codereview.chromium.org/557953007
-
- 12 Sep, 2014 4 commits
-
-
Jim Stichnoth authored
In x86-32, floating point values are returned to the caller on the top of the x87 floating point stack. The caller is required to remove it from the x87 FP stack, e.g. via the fstp instruction. This must be done even when the return value is not actually used anywhere else in the function, in which case O2 is likely to want to dead-code eliminate the fstp instruction. We enforce this by adding a fake use of the fstp destination. BUG= none R=jvoung@chromium.org Review URL: https://codereview.chromium.org/563303003
-
Jan Voung authored
ffs() vs findFirstSet() are slightly different, indexing is 0-based instead of 1-based. Example mingw error: http://build.chromium.org/p/tryserver.nacl/builders/nacl-toolchain-win7-pnacl-x86_64/builds/1920/steps/llvm_i686_w64_mingw32%20%28build%29/logs/stdio BUG=none R=stichnot@chromium.org Review URL: https://codereview.chromium.org/563303002
-
Karl Schimpf authored
This is a workaround for issue that Subzero currently assumes all global addresses have a name, but finalized pexe files leave most global addresses unnamed. It does this by allowing two optional command-line flag name prefixes that are used to generate names for unnamed global addresses. BUG= None R=stichnot@chromium.org Review URL: https://codereview.chromium.org/567703003
-
Jan Voung authored
BUG=none R=stichnot@chromium.org Review URL: https://codereview.chromium.org/567553003
-
- 11 Sep, 2014 3 commits
-
-
Karl Schimpf authored
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3892 R=jvoung@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/568473002
-
Jim Stichnoth authored
BUG= none R=jfb@chromium.org Review URL: https://codereview.chromium.org/565553002
-
Karl Schimpf authored
Also fixes minor issues with branches in instructions (i.e. defining entry node and computing predecessors). BUG= https://code.google.com/p/nativeclient/issues/detail?id=3892 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/561823002
-
- 10 Sep, 2014 3 commits
-
-
Karl Schimpf authored
Fixes call to extractElement. BUG= None R=stichnot@chromium.org Review URL: https://codereview.chromium.org/562783002
-
Karl Schimpf authored
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3892 R=jvoung@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/561883002
-
Jim Stichnoth authored
This addresses a TODO and fixes a code generation bug that was causing sprintf and _vfprintf_r to execute incorrectly. BUG= none R=jvoung@chromium.org Review URL: https://codereview.chromium.org/560773002
-
- 09 Sep, 2014 5 commits
-
-
Jan Voung authored
Ended up needing to fix the InstX8632Lockable error that JF ran into now that -O0 is really -O0: https://codereview.chromium.org/512933006/ BUG=none R=stichnot@chromium.org Review URL: https://codereview.chromium.org/557933002
-
Jim Stichnoth authored
BUG= none R=jvoung@chromium.org Review URL: https://codereview.chromium.org/560493002
-
Karl Schimpf authored
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3894 R=jvoung@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/545623005
-
Jim Stichnoth authored
The script translates a pexe using both Subzero and llc, and then uses linker tricks to resolve each symbol into either its Subzero or llc version. This enables quick bisection-based debugging of Subzero code generation. BUG= none R=jfb@chromium.org, jvoung@chromium.org Review URL: https://codereview.chromium.org/551953002
-
Jim Stichnoth authored
1. Modify dump() to match LLVM. 2. If it weren't for minimum stack alignment, the alignment code would be broken, so add a test in case the alignment code changes. BUG= none R=jvoung@chromium.org, kschimpf@google.com Review URL: https://codereview.chromium.org/557533003
-
- 08 Sep, 2014 4 commits
-
-
Karl Schimpf authored
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3894 R=jvoung@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/548553002
-
Jim Stichnoth authored
This makes it much easier to run scripts from different working directories, as long as they are run somewhere under the native_client directory. BUG= none R=jvoung@chromium.org Review URL: https://codereview.chromium.org/554013002
-
Jim Stichnoth authored
One issue is that the test_arith cross test defined functions on i1 but never actually invoked them. Another issue is that the lowering was using 8-bit registers for i1 values, but was being sloppy about leaving stuff in the upper 7 bits, and then using all 8 bits for tests. This takes the approach of explicitly masking the result whenever it's possible for the result to exceed one bit, such as trunc, fptosi, fptoui. Another possibility might be to allow the upper 7 bits to stay sloppy, and explicitly only test the lower bit. Additionally, some "CHECK: ret" lines were removed, since they aren't actually needed after the change to use CHECK-LABEL, and they are affected by an llvm-dump bug (which is fixed in LLVM 3.6). BUG= none R=jvoung@chromium.org Review URL: https://codereview.chromium.org/547033002
-
Jim Stichnoth authored
This is the truncating cvt instruction instead of rounding. A few interesting floating point inputs are added to the cross tests. Also, the cross test error output is modified to be more clear. BUG= none R=jvoung@chromium.org Review URL: https://codereview.chromium.org/550723002
-
- 05 Sep, 2014 2 commits
-
-
Karl Schimpf authored
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3894 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/545603003
-
Karl Schimpf authored
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3894 R=jvoung@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/543793003
-
- 04 Sep, 2014 4 commits
-
-
Jim Stichnoth authored
Also declare a few variables as Constant* instead of Operand* when they hold the result of Ctx->getConstantInt(), to be consistent with the rest of the code. BUG= none R=jvoung@chromium.org Review URL: https://codereview.chromium.org/541093002
-
Karl Schimpf authored
BUG=https: //code.google.com/p/nativeclient/issues/detail?id=3894 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/531123002
-
Jim Stichnoth authored
There's already a hack that emits asm like: lea eax, myglobal instead of: mov eax, [myglobal] because of an llvm-mc parser bug. However, the lea hack still doesn't work if the symbol is a reserved word, e.g.: lea eax, flags The extra hack is to drop into AT&T syntax temporarily: .att_syntax leal flags, %eax .intel_syntax BUG= none R=jvoung@chromium.org Review URL: https://codereview.chromium.org/543803002
-
Jim Stichnoth authored
The bug was first spotted in the optimized gl_Color4ub() from spec2k's mesa. The lowering sequences for fptosi and fptoui with i8 or i16 include "mov T_2, T_1" where T_1 and T_2 may have different integer types, and the statement: T_2->setPreferredRegister(T_1, true); If T_2's type is i8 and T_1 is assigned a register that has no 8-bit version, then T_2 gets an unsuitable register. The fix is to honor RegisterOverlap only when RegMask allows. It's hard to construct a good test for this, since it depends heavily on register allocation decisions, which will change over time. BUG= none R=jvoung@chromium.org Review URL: https://codereview.chromium.org/544713002
-
- 03 Sep, 2014 2 commits
-
-
Jim Stichnoth authored
Integers are generally dumped as signed instead of unsigned values. Integers of i1 type are dumped as 'false' and 'true'. Floating point values still don't match LLVM. BUG= none R=kschimpf@google.com Review URL: https://codereview.chromium.org/539743002
-
Karl Schimpf authored
BUG= //code.google.com/p/nativeclient/issues/detail?id=3894 R=jvoung@chromium.org Review URL: https://codereview.chromium.org/529113002
-
- 02 Sep, 2014 3 commits
-
-
Jim Stichnoth authored
BUG= none R=jvoung@chromium.org Review URL: https://codereview.chromium.org/535623002
-
Jim Stichnoth authored
Now it assumes tests are being run from within the Subzero portion of the native_client tree, and sets up PATH to find PNaCl tools relative to there. It may be necessary to do a one-time setup to be able to build pexes: pnacl/build.sh sdk newlib or the equivalent scons commands. If the tool chain is updated, propagate the changes via: toolchain_build/toolchain_build_pnacl.py llvm_i686_linux --install=toolchain/linux_x86/pnacl_newlib BUG= none R=jvoung@chromium.org Review URL: https://codereview.chromium.org/525603002 -
Karl Schimpf authored
Also clean up other error cases (in function block) to simply return, since they have already generated an error message. BUG= https://code.google.com/p/nativeclient/issues/detail?id=3894 R=jvoung@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/514273002
-
- 29 Aug, 2014 1 commit
-
-
Jan Voung authored
Then when we have an integrated assembler, we can check its disassembly and the result should be the same. This only touches the tests that invoke llvm-mc currently. There are other tests which check for .s file output. There are quite a bit of quirks with llvm-objdump, which is unfortunate: (*) The symbolizer doesn't pick up non-section-local function calls. Some externals were converted to be local functions. Workaround: where it counts, I just left a check via .s files and a new --check-prefix. It's a little better in 3.6. (*) The symbolizer doesn't pick up global variable names. I just checked for the relocation addend instead. Didn't check if it was better in 3.6, but maybe. (*) We have a bug in bundling lock + instructions. See BUG=https://code.google.com/p/nativeclient/issues/detail?id=3929 (*) There's no disassembly for branch lables. Checks of jump instructions were converted to check for positive or negative values, depending on whether it is a forward or backward branch. BUG=none R=stichnot@chromium.org Review URL: https://codereview.chromium.org/509233002
-
- 28 Aug, 2014 2 commits
-
-
Jan Voung authored
BUG=none R=stichnot@chromium.org Review URL: https://codereview.chromium.org/515993002
-
Jan Voung authored
Otherwise, I don't have pnacl-freeze in my path, and I think the lit tests have trouble finding it. src/PNaClTranslator.cpp: In member function ‘uint32_t {anonymous}::FunctionParser::convertRelativeToAbsIndex(int32_t)’: src/PNaClTranslator.cpp:882:55: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] if (Id > 0 && AbsNextId < static_cast<uint32_t>(Id)) { ^ BUG=none R=kschimpf@google.com, stichnot@chromium.org Review URL: https://codereview.chromium.org/515003004
-
- 27 Aug, 2014 4 commits
-
-
Karl Schimpf authored
Handle binops and returns. BUG= https://code.google.com/p/nativeclient/issues/detail?id=3894 R=jvoung@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/395193005
-
Jim Stichnoth authored
Also adds much-needed logging of the decision process that goes into the address mode optimization. BUG= none R=jvoung@chromium.org Review URL: https://codereview.chromium.org/490333003
-
Jim Stichnoth authored
With the original link command, -lpthread comes before some other LLVM libraries, and this ends up causing undefined pthreads symbols. The new link command makes sure the -lpthread part comes last. BUG= none R=jvoung@chromium.org Review URL: https://codereview.chromium.org/514723004
-
Jim Stichnoth authored
Some lowering sequences were incorrectly allowing immediate operands in native instructions. This includes 32-bit icmp, 64-bit icmp, select, switch, and 64-bit mul. BUG= none R=jvoung@chromium.org Review URL: https://codereview.chromium.org/511543002
-