Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(526)

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/codegen_helpers.dart

Issue 12033056: Implement "one-shot" interceptors. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/compiler/implementation/ssa/codegen_helpers.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/codegen_helpers.dart (revision 17552)
+++ sdk/lib/_internal/compiler/implementation/ssa/codegen_helpers.dart (working copy)
@@ -40,14 +40,6 @@
visitDominatorTree(graph);
}
- /**
- * Return whether the instructions do not belong to a loop or
- * belong to the same loop.
- */
- bool notInLoopOrInSameLoop(HInstruction one, HInstruction two) {
- return one.block.enclosingLoopHeader == two.block.enclosingLoopHeader;
- }
-
void analyzeInputs(HInstruction user, int start) {
List<HInstruction> inputs = user.inputs;
for (int i = start; i < inputs.length; i++) {
@@ -62,7 +54,7 @@
// Only consider a pure input if it is in the same loop.
// Otherwise, we might move GVN'ed instruction back into the
// loop.
- if (notInLoopOrInSameLoop(user, input)) {
+ if (user.hasSameLoopHeaderAs(input)) {
// Move it closer to [user], so that instructions in
// between do not prevent making it generate at use site.
input.moveBefore(user);

Powered by Google App Engine
This is Rietveld 408576698