Commit Graph

14 Commits

Author SHA1 Message Date
Zachary Anderson 6cd8a79078 VM: Re-format to use at most one newline between functions
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2974233002 .
2017-07-13 08:08:37 -07:00
Zachary Anderson a1bcf051d8 clang-format runtime/vm
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2481873005 .
2016-11-08 13:54:47 -08:00
Ivan Posva 4bd7cdc75c - Ensure that HandleScope is initialized with a thread. (Remove
deprecated isolate based API.)
- Update all code impacted by this change. E.g. DARTSCOPE
- TEST_CASE now passes the current thread as a parameter to the   unit test.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org//1310463005 .
2015-09-01 17:18:55 -07:00
koda@google.com 99127744c6 Add Zone-based handle allocation interface and reduce use of Isolate-based interfaces.
Remove deprecated Isolate-based BitVector constructor.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43136 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-26 14:54:02 +00:00
srdjan@google.com b8891bf412 Pass isolate to BitVector constructor.
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40528 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-19 23:14:34 +00:00
vegorov@google.com 81ecaba321 Re-apply r20377.
Compute local variable liveness before translation to SSA.

Use it to remove dead values from deoptimization environments.

R=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21439 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 11:53:50 +00:00
vegorov@google.com 535ed8eb25 Revert "Compute local variable liveness before translation to SSA."
Attaching environments to branches on strict comparisons breaks pattern matching in the optimizer and regresses performance.

This reverts commit r20377.

TBR=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20400 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-22 18:32:17 +00:00
vegorov@google.com 66ecd504f9 Compute local variable liveness before translation to SSA.
Use it to remove dead values from deoptimization environments.

R=kmillikin@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20377 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-22 12:33:42 +00:00
vegorov@google.com 1ee5f51793 Improve redundant load elimination.
Previously it incorrectly computed OUT sets during the fix point iteration: did not propagate changed from IN to OUT.

However just computing bitset representation of IN set was actually not enough because different values might be coming in from different predecessors.

This algorithm inserts phis at merge points.

R=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16109 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-13 14:10:38 +00:00
fschneider@google.com 7b70f56dfd Simple redundant load elimination.
This analysis uses bit vectors to track side effects. Currently, there is
only one type of side effect which affects all mutable load-field instructions.
The elimination pass is a dominator tree preorder traversal like the existing
CSE pass. Instead of a hash-map it keeps an array with the current dominating
occurrence for each load expression.
Review URL: https://codereview.chromium.org//10914314

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12437 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-17 14:27:45 +00:00
fschneider@google.com ac0dd6c295 Add a backward instruction iterator and use it in the liveness analysis.
This avoids the complication when collecting the initial live_in sets while iterating forward.

Also simplify the ForwardInstructionIterator class because we have Goto instructions now and
the last instruction of each block does not use the next-link to
indicate a fall-through anymore.
Review URL: https://chromiumcodereview.appspot.com//10796108

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9875 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-25 08:31:50 +00:00
vegorov@google.com 2f23dc4b60 Simple iterative liveness analysis over SSA.
R=fschneider@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10666026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9069 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-25 17:07:16 +00:00
fschneider@google.com ee4a0fd042 First step to SSA construction: Phi insertion.
This CL contains the phi insertion step of the SSA construction algorithmus: The phi instructions inserted are not functional yet. Renaming is not included yet.


I based it on Kevin's CL (http://codereview.chromium.org/10388161/), rebased and fixed a bug (added missing iterator.Advance()) there.

It also reintroduces the Definition IL class because Phi-instructions are also
definitions that are referenced by UseVal.

I also added the set of immediately dominated blocks to each basic block.
This will be needed for pre-order dominator-tree traversal in the renaming pass.
Review URL: https://chromiumcodereview.appspot.com//10539108

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8604 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-13 13:36:04 +00:00
kmillikin@google.com e4030da968 Compute assigned variables and dominance frontiers.
During basic block discovery, compute assigned variables in each
block.  After computing immediate dominators, compute dominance
frontiers.  Both of these will be used for SSA construction.

R=fschneider@google.com,srdjan@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10377104

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7685 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-16 13:28:02 +00:00