- 20 Nov, 2015 4 commits
-
-
Karl Schimpf authored
Also removes redundant rule checks in emitType01(). BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4334 R=jpp@chromium.org Review URL: https://codereview.chromium.org/1460523005 .
-
John Porto authored
Pre-computes the max stack size outgoing arguments, and pre-allocates it during prolog, deallocating during epilog. With this CL, there are no more StackAdjustments needed for the ARM32, which will simplify rematerializing alloca'd variables. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4076 R=sehr@chromium.org Review URL: https://codereview.chromium.org/1467473003 .
-
John Porto authored
This pass gives Targets the ability to pre-lower high-level instructions that will later be lowered to a target-specific helper, e.g., 64-bit division on targets that can't natively handle them. This is a pre-requirement for correct outargs pre-allocation during function prolog. R=sehr@chromium.org Review URL: https://codereview.chromium.org/1455033005 .
-
David Sehr authored
BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1460003003 .
-
- 19 Nov, 2015 2 commits
-
-
Karl Schimpf authored
Also does some clean up on emitType01 methods (making optional argument explicit, and moving rule checks to the lowest level). BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4334 R=jpp@chromium.org Review URL: https://codereview.chromium.org/1456783003 .
-
John Porto authored
This CL removes two warts from the ARM32 backend: 1) during argument lowering, if a stack parameter is assigned a register, the backend creates a new Variable that references the stack location with the incoming argument, and _mov() it to the parameter. 2) During stack slot legalization, all _mov(Mem(), Reg) are converted to stores; and all _mov(Reg, Mem()) are converted to loads. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4076 R=kschimpf@google.com Review URL: https://codereview.chromium.org/1457683004 .
-
- 18 Nov, 2015 2 commits
-
-
Karl Schimpf authored
Adds BL and BLX to ARM integrated assembler. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4334 R=jpp@chromium.org Review URL: https://codereview.chromium.org/1452293003 .
-
Jim Stichnoth authored
To see the main effect of this, look at the doxygen for file IceGlobalContext.h to see the effect of turning this on. Without it, the nested classes are not available because they are private. My guess is that often doxygen is used to generate API documents and for that reason, exporting of private info is excluded by default. BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1411123019 .
-
- 17 Nov, 2015 8 commits
-
-
John Porto authored
Creates a special OperandARM32 for representing imm5 used when performing a shift operation. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4076 R=kschimpf@google.com Review URL: https://codereview.chromium.org/1449263003 .
-
Karl Schimpf authored
BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1458523002 .
-
Jim Stichnoth authored
1. Include a test build (but no link) using g++, to identify errors and warnings before they hit the Windows bots. 2. Move "git diff --quiet" to the end so that the presubmit tests can easily be run before committing locally, if desired. 3. Add "make presubmit" as an alias for "make check-presubmit". 4. Document the individual steps. BUG= none R=jpp@chromium.org Review URL: https://codereview.chromium.org/1453713002 .
-
John Porto authored
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4076 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1438773004 .
-
Jim Stichnoth authored
BUG= none TEST= make -j32 -f Makefile.standalone CXX=g++ LLVM_EXTRA_WARNINGS="-Wno-unknown-pragmas -Wno-unused-parameter -Wno-comment -Wno-enum-compare -Wno-strict-aliasing" STDLIB_FLAGS= (this command will compile but fail to link) R=jpp@chromium.org Review URL: https://codereview.chromium.org/1452993002 .
-
Jim Stichnoth authored
The register allocator does not need to be considering rematerializable variables at all. When it does, there tends to be a big performance cost because the live range of a rematerializable variable tends to be large, leading to lots of expensive overlap computations against register allocation candidates. BUG= none R=jpp@chromium.org, sehr@chromium.org Review URL: https://codereview.chromium.org/1450233002 .
-
David Sehr authored
Rather than bumping the stack pointer around the scalar return sequence in _fld, ensure the prolog allocates enough space. BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1442753008 .
-
David Sehr authored
Also removes reliance on lowerAlloca entirely for the fixed allocations. BUG= R=jpp@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/1435363002 .
-
- 16 Nov, 2015 3 commits
-
-
Jim Stichnoth authored
No functional changes, as measured by identical spec2k asm output. 1. Use early "return" and "continue" to reduce "if" nesting. 2. Reflow comments to 80 columns (instead of presumably 79). 3. Add some BuildDefs::dump() tests to reduce translator code size. BUG= none R=kschimpf@google.com Review URL: https://codereview.chromium.org/1448773002 .
-
Jim Stichnoth authored
BUG= none R=jpp@chromium.org Review URL: https://codereview.chromium.org/1452553002 .
-
Karl Schimpf authored
Fixes case where the ARM integrated assembler for class InstARM32Mov did not revert to using the stand-alone assembler (method emit) to generate the corresponding assembly instructions(s). This fixes last known problem with method emitIAS (other than reverting to the stand-alone assembler if not implemented). Removes use of workaround flag "-unsafe-ias". BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1448783004 .
-
- 14 Nov, 2015 2 commits
-
-
David Sehr authored
Lots of definitions of Target outside of asserts. BUG= Review URL: https://codereview.chromium.org/1448673002 .
-
David Sehr authored
This involves changing AdjustStack to grow/shrink the stack, and to use that operation exclusively to move the StackAdjustment variable in lowering, rather than in call emission as before. BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1449523002 .
-
- 13 Nov, 2015 2 commits
-
-
Jim Stichnoth authored
There are situations where a variable is assigned as the result of a rematerializable alloca instruction, and then another variable is assigned as essentially a known-offset interior pointer into the alloca space. In this case, the secondary variable is also rematerializable. We add a pass, after alloca analysis, to find these derived variables and mark them transitively as rematerializable. Because we lack use-def chains (or in fact any map to variable use locations), we need to iterate over the CFG until convergence. Fortunately, this is pretty cheap, and not even done unless the alloca analysis seeds it with an initial set of rematerializable variables. This analysis is only really needed for arithmetic instructions, but we also need to apply it to assignments and pointer-type bitcasts that are added when the IceConverter directly parses a .ll file rather than a .pexe file. BUG= none R=jpp@chromium.org, sehr@chromium.org Review URL: https://codereview.chromium.org/1441793002 .
-
Jim Stichnoth authored
BUG= none R=jpp@chromium.org, sehr@chromium.org Review URL: https://codereview.chromium.org/1439363002 .
-
- 12 Nov, 2015 4 commits
-
-
David Sehr authored
Remove a bit of complex repeated template naming. BUG= R=jpp@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/1438933002 .
-
Jim Stichnoth authored
getOffset() was being dereferenced even when it was nullptr. BUG= none R=kschimpf@google.com Review URL: https://codereview.chromium.org/1435283003 .
-
Jim Stichnoth authored
This just prints the function being translated, once per function. This is useful if there is a crash or fatal error somewhere, and you want to quickly discover which function to set -verbose-focus on. Also, fixes some warnings/errors in the MINIMAL build. BUG= none R=kschimpf@google.com Review URL: https://codereview.chromium.org/1439983002 .
-
Karl Schimpf authored
These two methods introduce multiple instructions. Between each instruction a newline must be inserted, and a call to startNextInt(). This CL makes sure both cases are met. BUG=None R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1441023002 .
-
- 11 Nov, 2015 7 commits
-
-
Karl Schimpf authored
BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1432413003 .
-
Karl Schimpf authored
This CL passes in context from the ARM target lowering, so that it can figure out what register (SP or FP) and offset to use when loading/storing variables. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1414043015 .
-
David Sehr authored
Partition allocas that occur in the entry block into two categories. The first is those whose size is fixed and alignment are less than or equal to the stack alignment. These are emitted relative to a pointer, either in increasing offset relative to the stack pointer or decreasing offset relative to the frame pointer. (Actually, we are not enabling this optimization for frame pointer frames yet) The second category is allocas whose size is dynamic or alignment is creater than the stack alignment. These are emitted relative to a user variable in increasing offset order. This optimization is only enabled for x86 at O2. BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1411583007 .
-
Karl Schimpf authored
Extends assembler movw method to handle integer constants in addition to relocatable constants, since (32-bit) integer constants are frequently used in movw instructions. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1440693002 .
-
John Porto authored
Improves the bool folding logic so that branches are short circuited. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4076 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1417393003 .
-
Karl Schimpf authored
Removes blank line after push instructions. BUG=None R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1439683002 .
-
David Sehr authored
Fold and/or followed by branch to eliminate cmp. Also, fold fcmp instructions into branches similarly to what was done for icmp instructions. BUG= R=jpp@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/1436623002 .
-
- 10 Nov, 2015 4 commits
-
-
Jim Stichnoth authored
Originally, for each non-deleted instruction, CfgNode::emit() would call the virtual Inst::emit() and then print a newline (also printing end-of-live-range info as necessary). This resulted in clumsy blank lines in the asm output, corresponding to non target specific pseudo instructions such as FakeDef, FakeUse, FakeKill. We change this so that CfgNode::emit() only prints a newline for an InstTarget subclass, or if any end-of-live-range text was printed. If a high-level instruction still wants to emit something in a comment, it's responsible for printing its own newline. BUG= none TEST= ./pydir/szbuild_spec2k.py -O2 --force -v --filetype=asm --sz=--asm-verbose=0 TEST= ./pydir/szbuild_spec2k.py -O2 --force -v --filetype=asm --sz=--asm-verbose=1 TEST= ./pydir/szbuild_spec2k.py -O2 --force -v --filetype=asm --target=arm32 R=kschimpf@google.com Review URL: https://codereview.chromium.org/1431353003 .
-
Karl Schimpf authored
BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4334 R=jpp@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/1433743002 .
-
Jim Stichnoth authored
This enables the following workflow: 1. Run "szbuild.py --filetype=asm ..." to generate a .s file. 2. Edit the .s file to mock up a Subzero change. 3. Run "szbuild.py --filetype=asm --no-sz ..." to restart the build post pnacl-sz. This workflow is good for trying out localized changes to hot basic blocks, though it isn't really appropriate for global optimizations like register allocation. BUG= none R=kschimpf@google.com Review URL: https://codereview.chromium.org/1417003005 .
-
Reed Kotler authored
BUG= R=jpp@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/1430273004 . Patch from Reed Kotler <rkotlerimgtec@gmail.com>.
-
- 09 Nov, 2015 2 commits
-
-
John Porto authored
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4076 R=kschimpf@google.com, stichnot@chromium.org Review URL: https://codereview.chromium.org/1422753010 .
-
Karl Schimpf authored
Also formatted IceCfg.cpp, since it needed it. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1422253003 .
-