regis@google.com
912194a756
Fix vm code base so that it can be built for --arch=simarm (no snapshot yet).
...
Review URL: https://codereview.chromium.org//11956004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17246 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 00:34:20 +00:00
fschneider@google.com
87a3a4b479
Support immediate and memory operands for PushArgumentInstr in optimized code.
...
If a value is a constant or stored on the stack this change avoids loading it into a
new register before pushing it.
Review URL: https://codereview.chromium.org//11791051
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16806 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-08 16:51:57 +00:00
fschneider@google.com
8aa175b9e6
Restrict immediate operands to smi where only smis are supported.
...
Re-enable redundant phi elimination.
Add x64 codegen templates and assembler instructions for immediate operands.
Fix x64 assembler for imull when using r8-r15.
Add x64 instruction for imulq(reg, imm).
Fix x64 disassembler printing of immediates.
Review URL: https://codereview.chromium.org//11362210
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14814 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 22:44:34 +00:00
vegorov@google.com
5f9ff89e0a
Add support for WritableRegister policy in the register allocator.
...
Use it to eliminate push/pop on the fast path of the write barrier.
Tighten assertions in StoreIntoObject to ensure that value register is not equal to object register. Current code can't cope with that.
BUG=
Review URL: https://chromiumcodereview.appspot.com//10909169
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12193 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-11 12:50:52 +00:00
cshapiro@google.com
da14bf70a7
Add attributions so printf like functions can have their arguments checked.
...
This change also corrects some misuses of format strings and format
arguments that discovered by the compiler checks.
Review URL: https://chromiumcodereview.appspot.com//10869063
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11912 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 00:58:25 +00:00
kmillikin@google.com
0750c472dc
Reapply "Remove classes Computation and BindInstr."
...
Reapply svn revision 11868 with a bugfix.
Original code review at http://codereview.chromium.org/10908091/
R=fschneider@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10912094
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11890 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-05 17:04:49 +00:00
kmillikin@google.com
7e36720fa8
Revert "Remove classes Computation and BindInstr."
...
This reverts svn revision 11868.
TBR=fschneider@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10917085
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11869 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-05 11:20:14 +00:00
kmillikin@google.com
bd84c7ee22
Remove classes Computation and BindInstr.
...
The former Computation classes are folded into the Instruction class
hierarchy.
R=fschneider@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10908091
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11868 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-05 11:15:34 +00:00
fschneider@google.com
30a026f240
Support immediate operands for array bounds checks.
...
Review URL: https://chromiumcodereview.appspot.com//10916090
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11824 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-04 15:15:36 +00:00
vegorov@google.com
a573d2dec8
Unbox phis that were proven to be of type Double.
...
Eliminate Boxing/Unboxing pairs.
Allow boxing, unboxing and double binary operations to participate in CSE.
Allow double comparisons to operate on unboxed inputs.
Support XMM registers and double spill slots in deoptimization.
Save XMM registers when calling to runtime from WriteBarrier stub.
R=srdjan@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10919008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11652 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 20:39:48 +00:00
vegorov@google.com
264c4f6d1a
Add support for XMM registers in SSA code generation pipeline.
...
Split BinaryDoubleOp into several instructions that manipulate unboxed doubles.
R=fschneider@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10875030
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11313 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-24 14:45:42 +00:00
vegorov@google.com
181be0165b
Rename is_call to always_calls and contains_call to can_call.
...
R=kmillikin@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10824308
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10735 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 14:26:39 +00:00
vegorov@google.com
fe291bf0fa
Implement basic support for deferred slow path code with calls that save and restore live registers.
...
Use it to avoid spilling over stack-checks.
R=kmillikin@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10823308
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10639 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 12:47:42 +00:00
kmillikin@google.com
172ee045f3
Build and use stack maps in the SSA compiler.
...
Add a stack bitmap to the location summaries for calls that are GC
safepoints. The bitmap covers the spill slots. The register
allocator collects these bitmaps into a list and then marks live
pointer values during register allocation. When emitting code for a
call, a heap-allocated stackmap is built.
BUG=
Review URL: https://chromiumcodereview.appspot.com//10831261
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10618 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 06:59:24 +00:00
vegorov@google.com
abfb2bf67a
Implement simple spill store elimination.
...
Values that are spilled somewhere during their life-time are spilled eagerly at their definiton.
Additionally improve liverange printing used for debugging purposes.
R=srdjan@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10828115
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10155 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 08:45:49 +00:00
kmillikin@google.com
25ac913c69
Remove the default contains_call parameter on location summaries.
...
The plan is to use this parameter to make finer distinctions between
calls (e.g., safepoint vs. non-safepoint). It's a bit safer to eliminate
the default.
R=vegorov@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10843006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10052 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-31 11:51:47 +00:00
vegorov@google.com
c9e8d9594e
Add support for fixed parameters in the register allocator.
...
This remove bailout for functions with non-zero number of non-fixed parameters and increases our coverage.
SpillSlot location was renamed into StackSlot location and now allows to address spill slots (positive stack index) and incoming parameters (negative stack index).
Environment was reordered to match order of values on the stack (previously it was inversed).
Correctly reserve spill slots in the prologue of the code. Previously register allocator was allocating spill slots, but generated code did not reserve any space for them on the stack so they might have been overwritten by calls.
Fix off by one in DeoptimizationStub::GenerateCode - we were reserving one slot too many.
Change --optimization-filter flag to use substring search instead of prefix comparison, this is much more useful when VM prefixes function name with a path to the file.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10828018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9934 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-26 13:21:39 +00:00
vegorov@google.com
16e25206d1
New linear scan allocator.
...
Review URL: https://chromiumcodereview.appspot.com//10800037
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9851 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-24 16:01:54 +00:00
vegorov@google.com
d83a634324
Add spill slot locations.
...
Review URL: https://chromiumcodereview.appspot.com//10805053
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9810 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-23 14:05:48 +00:00
srdjan@google.com
66d31c8b23
Fix crash during parallel moves. Made MoveOperands ZoneAlloacted. Non-const ValueObjects a fragile, since it is easy to modify a copy instead of the original. It is also dangereous to use pointers to ValueObjects that contain copy constructors.
...
Review URL: https://chromiumcodereview.appspot.com//10806047
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9790 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-20 21:16:06 +00:00
vegorov@google.com
1bd5a9b414
Skeleton of a linear scan register allocator.
...
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10696151
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9563 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-11 18:52:17 +00:00
vegorov@google.com
1ae72fbd8b
Change comparison-to-branch fusion to actually remove comparison from the graph.
...
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10698153
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9556 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-11 17:41:54 +00:00
vegorov@google.com
959cf98b00
Implement a simple register allocator that tries to keep instruction results in registers.
...
Add --optimization-filter flag that allows to disbable optimizations for all function which do not match prefix. This allows to quickly localize problems with code generation.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10559035
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8811 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-18 18:04:22 +00:00
srdjan@google.com
b4b68ef347
Move ReturnInstr to new scheme (x64 and ia32) and implement more code in new ia32 compiler.
...
Review URL: https://chromiumcodereview.appspot.com//10458050
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8166 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-31 17:24:23 +00:00
srdjan@google.com
742a716dc7
Fix a bug in ia32 shift left , implemented more inlined binary operations in x64.
...
Review URL: https://chromiumcodereview.appspot.com//10440082
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8119 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-30 17:35:20 +00:00
fschneider@google.com
7a212e5d27
Add support for temp locations and port Load-/StoreStaticField to use locations.
...
The temps are allocated like inputs (can be fixed register or not). Temp registers
are always distinct from all inputs and the output.
Review URL: https://chromiumcodereview.appspot.com//10443013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7961 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-24 20:14:53 +00:00
srdjan@google.com
d67923100b
CTX and TMP registers may not be allocated.
...
Review URL: https://chromiumcodereview.appspot.com//10399136
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7888 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-23 00:27:01 +00:00
vegorov@google.com
7f95f43a76
Introduce locations based code generation.
...
Instructions and computations switched to the new code generation scheme should implement two virtual functions:
- locs() should return pointer to a LocationSummary object, that specifies location constraints for the instruction/computation.
- EmitNativeCode() should emit instructions/computations native code using locations provided through LocationSummary object attached to the instruction.
For converted functions instruction pattern should be removed from the FlowGraphCompiler visitor. It will not be used as long as instruction/computation returns non-NULL from locs().
Review URL: https://chromiumcodereview.appspot.com//10382234
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7818 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-21 19:51:17 +00:00