|
|
Created:
4 years, 4 months ago by Jarin Modified:
4 years, 4 months ago Reviewers:
Benedikt Meurer, Michael Starzinger CC:
v8-reviews_googlegroups.com, oth, rmcilroy Base URL:
https://chromium.googlesource.com/v8/v8.git@master Target Ref:
refs/pending/heads/master Project:
v8 Visibility:
Public. |
Description[turbofan] Generate loop exits in the bytecode graph builder.
Committed: https://crrev.com/c38f1011e89ececb2ac7f4acdfdf5216a2e94e83
Cr-Commit-Position: refs/heads/master@{#38429}
Patch Set 1 #Patch Set 2 : Working basic exit #Patch Set 3 : Formatting #Patch Set 4 : Function exits #Patch Set 5 : Year #Patch Set 6 : Rebase #Patch Set 7 : Fix translation of int32 constants to allow smis. #
Total comments: 16
Patch Set 8 : Address review comments #
Total comments: 1
Patch Set 9 : Rebase, review comments #Patch Set 10 : Fix 64-bit #
Created: 4 years, 4 months ago
Messages
Total messages: 35 (26 generated)
The CQ bit was checked by jarin@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by jarin@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: v8_win_rel_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_win_rel_ng/builds/11421) v8_win_rel_ng_triggered on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_win_rel_ng_triggered/bui...)
The CQ bit was checked by jarin@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
jarin@chromium.org changed reviewers: + bmeurer@chromium.org, mstarzinger@chromium.org
Could you take a look, please?
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
LGTM. Just nits. I am unfamiliar with the change in the code generator, I'll leave reviewing that to Benedikt. https://codereview.chromium.org/2188533002/diff/120001/src/compiler/bytecode-... File src/compiler/bytecode-graph-builder.cc (right): https://codereview.chromium.org/2188533002/diff/120001/src/compiler/bytecode-... src/compiler/bytecode-graph-builder.cc:470: void BytecodeGraphBuilder::Environment::PrepareForLoopExit(Node* loop) { nit: Can we move this up a few functions close to "PerpareForLoop" and "PrepareForOsr"? https://codereview.chromium.org/2188533002/diff/120001/src/compiler/bytecode-... src/compiler/bytecode-graph-builder.cc:482: graph()->NewNode(common()->LoopExitValue(), (*values())[i], loop_exit); nit: Just "values_[i]". https://codereview.chromium.org/2188533002/diff/120001/src/compiler/bytecode-... src/compiler/bytecode-graph-builder.cc:483: (*values())[i] = rename; nit: Just "values_[i]". https://codereview.chromium.org/2188533002/diff/120001/src/compiler/bytecode-... src/compiler/bytecode-graph-builder.cc:486: // Rename the effect. nit: Can we handle the effect before the values, just to keep it in sync with other methods? https://codereview.chromium.org/2188533002/diff/120001/src/compiler/bytecode-... File src/compiler/bytecode-graph-builder.h (right): https://codereview.chromium.org/2188533002/diff/120001/src/compiler/bytecode-... src/compiler/bytecode-graph-builder.h:152: // {target_offset}. nit: s/{origin_offset}/the current bytecode offset/ https://codereview.chromium.org/2188533002/diff/120001/src/compiler/bytecode-... File src/compiler/bytecode-loop-analysis.h (right): https://codereview.chromium.org/2188533002/diff/120001/src/compiler/bytecode-... src/compiler/bytecode-loop-analysis.h:8: #include "src/bit-vector.h" nit: Seems the BitVector is not needed in the header? https://codereview.chromium.org/2188533002/diff/120001/src/compiler/bytecode-... src/compiler/bytecode-loop-analysis.h:52: ZoneMap<int, int> backedge_to_header_; nit: Can we leave a comment here that both of these maps will contain one entry per loop? That would clarify that they both take just O(n) space where n is the number of loops. Also might we worth mentioning that both key and value represent bytecode offsets.
https://codereview.chromium.org/2188533002/diff/120001/src/compiler/bytecode-... File src/compiler/bytecode-graph-builder.cc (right): https://codereview.chromium.org/2188533002/diff/120001/src/compiler/bytecode-... src/compiler/bytecode-graph-builder.cc:479: // Rename the environmnent values. Is it OK not to handle "context_" here?
The CQ bit was checked by jarin@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Thanks for the great review! https://codereview.chromium.org/2188533002/diff/120001/src/compiler/bytecode-... File src/compiler/bytecode-graph-builder.cc (right): https://codereview.chromium.org/2188533002/diff/120001/src/compiler/bytecode-... src/compiler/bytecode-graph-builder.cc:470: void BytecodeGraphBuilder::Environment::PrepareForLoopExit(Node* loop) { On 2016/07/29 08:54:46, Michael Starzinger wrote: > nit: Can we move this up a few functions close to "PerpareForLoop" and > "PrepareForOsr"? Done. https://codereview.chromium.org/2188533002/diff/120001/src/compiler/bytecode-... src/compiler/bytecode-graph-builder.cc:479: // Rename the environmnent values. On 2016/07/29 08:58:21, Michael Starzinger wrote: > Is it OK not to handle "context_" here? Not ok, great catch! (Well, not ok if we want to account for all loop exiting values, which was my goal.) https://codereview.chromium.org/2188533002/diff/120001/src/compiler/bytecode-... src/compiler/bytecode-graph-builder.cc:482: graph()->NewNode(common()->LoopExitValue(), (*values())[i], loop_exit); On 2016/07/29 08:54:46, Michael Starzinger wrote: > nit: Just "values_[i]". Done. https://codereview.chromium.org/2188533002/diff/120001/src/compiler/bytecode-... src/compiler/bytecode-graph-builder.cc:483: (*values())[i] = rename; On 2016/07/29 08:54:45, Michael Starzinger wrote: > nit: Just "values_[i]". Done. https://codereview.chromium.org/2188533002/diff/120001/src/compiler/bytecode-... src/compiler/bytecode-graph-builder.cc:486: // Rename the effect. On 2016/07/29 08:54:46, Michael Starzinger wrote: > nit: Can we handle the effect before the values, just to keep it in sync with > other methods? Done. https://codereview.chromium.org/2188533002/diff/120001/src/compiler/bytecode-... File src/compiler/bytecode-graph-builder.h (right): https://codereview.chromium.org/2188533002/diff/120001/src/compiler/bytecode-... src/compiler/bytecode-graph-builder.h:152: // {target_offset}. On 2016/07/29 08:54:46, Michael Starzinger wrote: > nit: s/{origin_offset}/the current bytecode offset/ Done. https://codereview.chromium.org/2188533002/diff/120001/src/compiler/bytecode-... File src/compiler/bytecode-loop-analysis.h (right): https://codereview.chromium.org/2188533002/diff/120001/src/compiler/bytecode-... src/compiler/bytecode-loop-analysis.h:8: #include "src/bit-vector.h" On 2016/07/29 08:54:46, Michael Starzinger wrote: > nit: Seems the BitVector is not needed in the header? Done. https://codereview.chromium.org/2188533002/diff/120001/src/compiler/bytecode-... src/compiler/bytecode-loop-analysis.h:52: ZoneMap<int, int> backedge_to_header_; On 2016/07/29 08:54:46, Michael Starzinger wrote: > nit: Can we leave a comment here that both of these maps will contain one entry > per loop? That would clarify that they both take just O(n) space where n is the > number of loops. Also might we worth mentioning that both key and value > represent bytecode offsets. Done.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
I only did the code generator part as discussed. LGTM for that, once comment addressed. https://codereview.chromium.org/2188533002/diff/140001/src/compiler/code-gene... File src/compiler/code-generator.cc (right): https://codereview.chromium.org/2188533002/diff/140001/src/compiler/code-gene... src/compiler/code-generator.cc:867: if (type.representation() == MachineRepresentation::kTagged) { As discussed offline, this should only ever happen on 32-bit platforms. Please add appropriate checking.
The CQ bit was checked by jarin@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: v8_linux64_asan_rel_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_asan_rel_ng/buil...) v8_linux64_asan_rel_ng_triggered on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_asan_rel_ng_trig...)
The CQ bit was checked by jarin@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
lgtm
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by jarin@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from mstarzinger@chromium.org Link to the patchset: https://codereview.chromium.org/2188533002/#ps180001 (title: "Fix 64-bit")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Committed patchset #10 (id:180001)
Message was sent while issue was closed.
Description was changed from ========== [turbofan] Generate loop exits in the bytecode graph builder. ========== to ========== [turbofan] Generate loop exits in the bytecode graph builder. Committed: https://crrev.com/c38f1011e89ececb2ac7f4acdfdf5216a2e94e83 Cr-Commit-Position: refs/heads/master@{#38429} ==========
Message was sent while issue was closed.
Patchset 10 (id:??) landed as https://crrev.com/c38f1011e89ececb2ac7f4acdfdf5216a2e94e83 Cr-Commit-Position: refs/heads/master@{#38429} |