Commit Graph

5 Commits

Author SHA1 Message Date
vegorov@google.com 55c9c6c444 Allow bound check elimination to eliminate checks when both array length and index boundaries are expressed through the same symbol.
For example:

var list = new List(n);
for (var i = 0; i < n; i++) list[i];

R=fschneider@google.com
BUG=

Review URL: https://codereview.chromium.org//11273111

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14293 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-30 16:26:46 +00:00
fschneider@google.com 323e06222e Reland "Add a simple dominator based redundancy elimination" and fix a register allocation bug.
Original CL: http://codereview.chromium.org/10872035/

It enables elimination of redundant expressions across
basic blocks.

Currently used for smi checks and class checks, but will
be extended to other expressions in a separate CL.


Additionally, this fixes a bug in the register allocator where
a blocked register was illegally assigned to an unallocated live range.

It also fixes a Mac compiler issue with the constructor of
DirectChainedHashMap.
Review URL: https://chromiumcodereview.appspot.com//10871060

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11302 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-24 11:10:36 +00:00
fschneider@google.com 212c5a4994 Revert my last change r11227.
TBR=kmillikin@google.com
Review URL: https://chromiumcodereview.appspot.com//10871040

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11229 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 13:39:24 +00:00
fschneider@google.com cd606f44f0 Add a simple dominator based redundancy elimination.
It enables elimination of redundant expressions across
basic blocks.

Currently used for smi checks and class checks, but will
be extended to other expressions in a separate CL.
Review URL: https://chromiumcodereview.appspot.com//10872035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11227 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 13:17:16 +00:00
fschneider@google.com 253c3f8499 Implement class id checks as a separate instruction and add a local CSE optimization pass.
This CL contains:
A new CheckClassComp instruction. Currently it is used only for instance loads:
(LoadInstanceFieldComp)

A pass LocalCSE that performs block-local common subexpression elimination. To identify
redundant expressions I use a hash map per basic block. Computations that do not have
side effects can participate in CSE. For now, I only enabled it for CheckClass.
Any computation that participates in CSE must implement the AttributesEqual function.


Other smaller fixes:

Places where we can pass the correct initial size for GrowableArrays
that have a known size. We should consider having a FixedLengthArray for this purpose.

Made the accessors ic_data() and set_ic_data() use a const ICData*.
Review URL: https://chromiumcodereview.appspot.com//10824349

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10948 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 12:40:14 +00:00