- 24 Feb, 2016 1 commit
-
-
bmeurer authored
These macro operators represent a conditional eager deoptimization exit without explicit branching, which greatly reduces overhead of both scheduling and register allocation, and thereby greatly reduces overall compilation time, esp. when there are a lot of eager deoptimization exits. R=jarin@chromium.org Review URL: https://codereview.chromium.org/1721103003 Cr-Commit-Position: refs/heads/master@{#34239}
-
- 19 Feb, 2016 1 commit
-
-
bmeurer authored
This reducer doesn't really add value, because: (a) it is only concerned with JSCallFunction and JSToNumber, but when we get to it, all JSCallFunction nodes will have been replaced by Call nodes, and in the not so far future, we will also have replaced almost all JSToNumber nodes with better code, (b) and the reducer tries to be smart and use one of the outermost contexts, but that might not be beneficial always; actually it might even create longer live ranges and lead to more spilling in some cases. But most importantly, the JSContextRelaxation currently blocks inlining based on SharedFunctionInfo, because it requires the inliner to check the native context, which in turn requires JSFunction knowledge. So I'm removing this reducer for now to unblock the more important inliner changes. R=jarin@chromium.org Review URL: https://codereview.chromium.org/1715633002 Cr-Commit-Position: refs/heads/master@{#34139}
-
- 16 Feb, 2016 1 commit
-
-
mstarzinger authored
The LazyBailout operator (modelled as a nop-call) was introduced for placing a deoptimization point into exception handlers. Now that we are no longer re-entering lazy deoptimized code, the support can be removed. R=jarin@chromium.org BUG=v8:4195 LOG=n Review URL: https://codereview.chromium.org/1697503002 Cr-Commit-Position: refs/heads/master@{#34020}
-
- 05 Jan, 2016 1 commit
-
-
sigurds authored
Deopt support is added on two levels. On the IR level, a new ObjectState node is added, which represenents an object to be materialized. ObjectState nodes appear as inputs of FrameState and StateValues nodes. On the instruction select/code-generation level, the FrameStateDescriptor class handles the nesting introduced by ObjectState, and ensures that deopt code with CAPTURED_OBJECT/DUPLICATED_OBJECT entries are generated similarly to what crankshaft's escape analysis does. Two unittests test correctness of the IR level implementation. Correctness for instruction selection / code generation is tested by mjsunit tests. R=jarin@chromium.org,mstarzinger@chromium.org BUG=v8:4586 LOG=n Review URL: https://codereview.chromium.org/1485183002 Cr-Commit-Position: refs/heads/master@{#33115}
-
- 10 Dec, 2015 1 commit
-
-
jarin authored
MachineType is now a class with two enum fields: - MachineRepresentation - MachineSemantic Both enums are usable on their own, and this change switches some places from using MachineType to use just MachineRepresentation. Most notably: - register allocator now uses just the representation. - Phi and Select nodes only refer to representations. Review URL: https://codereview.chromium.org/1513543003 Cr-Commit-Position: refs/heads/master@{#32738}
-
- 09 Dec, 2015 1 commit
-
-
bmeurer authored
This only introduces the basic support for both SOFT and EAGER deopts in TurboFan, but doesn't make use of SOFT deopts anywhere yet (there are some other issues blocking that). Basically every Deoptimize operator now has a DeoptimizeKind, which can be either kSoft or kEager. R=jarin@chromium.org Review URL: https://codereview.chromium.org/1511883002 Cr-Commit-Position: refs/heads/master@{#32690}
-
- 03 Dec, 2015 1 commit
-
-
mstarzinger authored
This moves the proper handling for the end node withing the constructed graph into the RawMachineAssembler. This simplifies all assemblers and makes the handling of {Start} and {End} symmetrical. R=bmeurer@chromium.org Review URL: https://codereview.chromium.org/1493963003 Cr-Commit-Position: refs/heads/master@{#32563}
-
- 18 Nov, 2015 2 commits
-
-
titzer authored
R=bmeurer@chromium.org BUG= Review URL: https://codereview.chromium.org/1460583003 Cr-Commit-Position: refs/heads/master@{#32082}
-
mstarzinger authored
This ensures the class in question specifies the correct equality and hashing function when instantiated. Note that this introduces two new structs (i.e. OpEqualTo and OpHash) which can be used for defaults within OpParameter as well. R=titzer@chromium.org,bmeurer@chromium.org TEST=cctest/test-operator Review URL: https://codereview.chromium.org/1455913003 Cr-Commit-Position: refs/heads/master@{#32080}
-
- 30 Oct, 2015 1 commit
-
-
bmeurer authored
Adds new Guard[Type] common operator, which takes value and control inputs and records a guaranty that a certain value has a certain type in that control path. This is some kind of ad-hoc SSI similar to what we have to do in Crankshaft in some places. Also introduces an ObjectIsNumber simplified operator, which checks whether a certain value is a number (either a Smi or a HeapNumber). This doesn't yet support transitioning stores to double fields, which require support for allocating mutable heap numbers. R=jarin@chromium.org BUG=v8:4470 LOG=n Review URL: https://codereview.chromium.org/1420283009 Cr-Commit-Position: refs/heads/master@{#31675}
-
- 19 Oct, 2015 1 commit
-
-
jarin authored
This introduces an explicit lazy bailout. It is wrapped in the call node, mostly because the lazy deoptimization processing is married to the call processing in the instruction selector and the code generator. It is still a terrible hack. R=bmeurer@chromium.org,mstarzinger@chromium.org BUG=chromium:543994,v8:4195 LOG=n Review URL: https://codereview.chromium.org/1412443003 Cr-Commit-Position: refs/heads/master@{#31353}
-
- 14 Oct, 2015 1 commit
-
-
jarin authored
This CL re-purposes ValueEffect and Finish as delimiters for regions that are scheduled atomically (renamed to BeginRegion, FinishRegion). The BeginRegion node takes and produces an effect. For the uses that do not care about the placement in the effect chain, it is ok to feed graph->start() as an effect input. The FinishRegion takes a value and an effect and produces a value and an effect. It is important that any value or effect produced inside the region is not used outside the region. The FinishRegion node is the only way to smuggle an effect and a value out. At the moment, this does not support control flow inside the region. Control flow would be hard. During scheduling we do some sanity check, but the checks are not exhaustive. Here is what we check: - the effect chain between begin and finish is linear (no splitting, single effect input and output). - any value produced is consumed by the FinishRegion node. - no control flow outputs. Review URL: https://codereview.chromium.org/1399423002 Cr-Commit-Position: refs/heads/master@{#31265}
-
- 08 Oct, 2015 1 commit
-
-
bradnelson authored
This will allow exploration of possibilities like passing around buffer base and length. BUG=None TEST=test-multiple-return LOG=N R=mtrofin@chromium.org,titzer@chromium.org Review URL: https://codereview.chromium.org/1391333003 Cr-Commit-Position: refs/heads/master@{#31184}
-
- 01 Sep, 2015 1 commit
-
-
mstarzinger authored
Now that it is no longer needed, this also removes the invalid inclusion of "object-inl.h" within the "unique.h" header file. Note that this change still leaves 2 violations of that rule in the code, checked with the "tools/check-inline-includes.sh" tool. R=bmeurer@chromium.org Review URL: https://codereview.chromium.org/1321223002 Cr-Commit-Position: refs/heads/master@{#30503}
-
- 31 Aug, 2015 1 commit
-
-
mstarzinger authored
The usage of Unique<T> throughout the TurboFan IR does not have any advantage. There is no single point in time when they are initialized and most use-sites looked through to the underlying Handle<T> anyways. Also there already was a mixture of Handle<T> versus Unique<T> in the graph and this unifies the situation to use Handle<T> everywhere. R=bmeurer@chromium.org,titzer@chromium.org Review URL: https://codereview.chromium.org/1314473007 Cr-Commit-Position: refs/heads/master@{#30458}
-
- 20 Jul, 2015 1 commit
-
-
danno authored
In many cases, the context that TurboFan's ASTGraphBuilder or subsequent reduction operations attaches to nodes does not need to be that exact context, but rather only needs to be one with the same native context, because it is used internally only to fetch the native context, e.g. for creating and throwing exceptions. This reducer recognizes common cases where the context that is specified for a node can be relaxed to a canonical, less specific one. This relaxed context can either be the enclosing function's context or a specific Module or Script context that is explicitly created within the function. This optimization is especially important for TurboFan-generated code stubs which use context specialization and inlining to generate optimal code. Without context relaxation, many extraneous moves are generated to pass exactly the right context to internal functions like ToNumber and AllocateHeapNumber, which only need the native context. By turning context relaxation on, these moves disappear because all these common internal context uses are unified to the context passed into the stub function, which is typically already in the correct context register and remains there for short stubs. It also eliminates the explicit use of a specialized context constant in the code stub in these cases, which could cause memory leaks. Review URL: https://codereview.chromium.org/1244583003 Cr-Commit-Position: refs/heads/master@{#29763}
-
- 06 Jul, 2015 1 commit
-
-
bmeurer authored
The value output count for Start is currently off by 1 for code stubs, because the CommonOperatorBuilder hardcodes the receiver parameter. R=mstarzinger@chromium.org Review URL: https://codereview.chromium.org/1217553005 Cr-Commit-Position: refs/heads/master@{#29490}
-
- 23 Jun, 2015 1 commit
-
-
jarin authored
This also threads through the parameter count and local count to the instruction selector. This will be later used to allow merging of various StateValues vector (and prepare for differential encoding which will not distinguish between parameters, locals and expression stack). BUG= Review URL: https://codereview.chromium.org/1191243003 Cr-Commit-Position: refs/heads/master@{#29214}
-
- 19 Jun, 2015 1 commit
-
-
bmeurer authored
The three different concerns that the ControlReducer used to deal with are now properly separated into a.) DeadCodeElimination, which is a regular AdvancedReducer, that propagates Dead via control edges, b.) CommonOperatorReducer, which does strength reduction on common operators (i.e. Branch, Phi, and friends), and c.) GraphTrimming, which removes dead->live edges from the graph. This will make it possible to run the DeadCodeElimination together with other passes that actually introduce Dead nodes, i.e. typed lowering; and it opens the door for general inlining without two stage fix point iteration. To make the DeadCodeElimination easier and more uniform, we basically reverted the introduction of DeadValue and DeadEffect, and changed the Dead operator to produce control, value and effect. Note however that this is not a requirement, but merely a way to make dead propagation easier and more uniform. We could always go back and decide to have different Dead operators if some other change requires that. Note that there are several additional opportunities for cleanup now, i.e. OSR deconstruction could be a regular reducer now, and we don't need to use TheHole as dead value marker in the GraphReducer. And we can actually run the dead code elimination together with the other passes instead of using separate passes over the graph. We will do this in follow up CLs. R=jarin@chromium.org, mstarzinger@chromium.org Review URL: https://codereview.chromium.org/1193833002 Cr-Commit-Position: refs/heads/master@{#29146}
-
- 18 Jun, 2015 1 commit
-
-
mstarzinger authored
R=bmeurer@chromium.org Review URL: https://codereview.chromium.org/1186033006 Cr-Commit-Position: refs/heads/master@{#29104}
-
- 11 Jun, 2015 1 commit
-
-
mstarzinger authored
This is needed in order to allow expansion of a throwing node into a set of nodes that produce different effects for the successful and the exceptional continuation. R=bmeurer@chromium.org Review URL: https://codereview.chromium.org/1179543002 Cr-Commit-Position: refs/heads/master@{#28918}
-
- 28 May, 2015 2 commits
-
-
mstarzinger authored
This introduces a conservative prediction for each exception handler whether it will locally catch an exception or re-throw it to outside the code bondaries. It will allow for a more intuitive prediction of whether an exception is considered "caught" or "uncaught". R=bmeurer@chromium.org,yangguo@chromium.org BUG=chromium:492522 LOG=N Review URL: https://codereview.chromium.org/1158563008 Cr-Commit-Position: refs/heads/master@{#28681}
-
bmeurer authored
We need the shared function info of inlined functions to prevent code flushing for their unoptimized code, and also to make sure that liveedit can find the proper functions to deoptimize. R=jarin@chromium.org Review URL: https://codereview.chromium.org/1156403002 Cr-Commit-Position: refs/heads/master@{#28677}
-
- 26 May, 2015 2 commits
-
-
bmeurer authored
This way we don't need to connect (potentially) non-terminating loops later during control reduction, which saves one forward pass over the control graph. Long term we will move the trimming functionality of the control reducer to the GraphReducer, and get rid of the Finish method again. As a bonus, this change also properly rewires Terminate, Throw and Deoptimize during inlining. R=mstarzinger@chromium.org Review URL: https://codereview.chromium.org/1155683004 Cr-Commit-Position: refs/heads/master@{#28625}
-
bmeurer authored
This simplifies the handling of the End node. Based on this CL we will finally fix terminating every loop from the beginning (via Terminate nodes) and fix inlining of Throw, Deoptimize and Terminate. R=mstarzinger@chromium.org Review URL: https://codereview.chromium.org/1157023002 Cr-Commit-Position: refs/heads/master@{#28620}
-
- 15 May, 2015 1 commit
-
-
bmeurer authored
First step towards support for inlining based on SharedFunctionInfo instead of JSFunction. R=jarin@chromium.org Review URL: https://codereview.chromium.org/1134713004 Cr-Commit-Position: refs/heads/master@{#28419}
-
- 11 May, 2015 1 commit
-
-
titzer authored
R=jarin@chromium.org BUG= Review URL: https://codereview.chromium.org/1131853002 Cr-Commit-Position: refs/heads/master@{#28330}
-
- 06 May, 2015 1 commit
-
-
bmeurer authored
This revives the Terminate operator and removes the weird Always operator. As a first step we let the ControlReducer connect non terminating loops via Terminate. The next step will be to change the graph builder to insert Terminate nodes into every loop. Review URL: https://codereview.chromium.org/1123213002 Cr-Commit-Position: refs/heads/master@{#28259}
-
- 05 May, 2015 1 commit
-
-
bmeurer authored
Tail calls are matched on the graph, with a dedicated tail call optimization that is actually testable. The instruction selection can still fall back to a regular if the platform constraints don't allow to emit a tail call (i.e. the return locations of caller and callee differ or the callee takes non-register parameters, which is a restriction that will be removed in the future). Also explicitly limit tail call optimization to stubs for now and drop the global flag. BUG=v8:4076 LOG=n Review URL: https://codereview.chromium.org/1114163005 Cr-Commit-Position: refs/heads/master@{#28219}
-
- 22 Apr, 2015 1 commit
-
-
titzer authored
R=bmeurer@chromium.org, mstarzinger@chromium.org BUG= Review URL: https://codereview.chromium.org/1090303004 Cr-Commit-Position: refs/heads/master@{#28002}
-
- 20 Apr, 2015 1 commit
-
-
Ross McIlroy authored
R=jochen@chromium.org Review URL: https://codereview.chromium.org/1088993003 Cr-Commit-Position: refs/heads/master@{#27937}
-
- 31 Mar, 2015 2 commits
-
-
mstarzinger authored
This changes the IrOpcode::kThrow operator to have kNoThrow property, which sounds unintuitive, but holds for our graphs. The operators is used to indicate exceptional control flow out of the function, but in itself does not throw, the throwing is done by a runtime call. R=titzer@chromium.org TEST=unittests/CommonOperatorTest/CommonSharedOperatorTest.Properties Review URL: https://codereview.chromium.org/1046173002 Cr-Commit-Position: refs/heads/master@{#27541}
-
mstarzinger authored
TEST=cctest/test-run-jsexceptions Review URL: https://codereview.chromium.org/989123003 Cr-Commit-Position: refs/heads/master@{#27537}
-
- 19 Mar, 2015 3 commits
-
-
jarin authored
With this change, we remember the types of frame state inputs (in a new operator, called TypedStateValues). Instead of inferring the value types when building translations, we used the recorded types. The original approach was not reliable because the passes after simplified lowering can change node types, and this in turn confuses the translation builder. BUG=chromium:468727 LOG=n R=bmeurer@chromium.org Review URL: https://codereview.chromium.org/1015423002 Cr-Commit-Position: refs/heads/master@{#27310}
-
titzer authored
R=bmeurer@chromium.org BUG= Review URL: https://codereview.chromium.org/1020873002 Cr-Commit-Position: refs/heads/master@{#27304}
-
bmeurer authored
The control input is only relevant for operations that may "write" (to prevent hoisting) or "throw" (because they are part of the control chain). R=jarin@chromium.org Review URL: https://codereview.chromium.org/1015353004 Cr-Commit-Position: refs/heads/master@{#27288}
-
- 18 Mar, 2015 1 commit
-
-
bmeurer authored
R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/1015053002 Cr-Commit-Position: refs/heads/master@{#27260}
-
- 04 Mar, 2015 1 commit
-
-
jarin authored
BUG= Review URL: https://codereview.chromium.org/961973002 Cr-Commit-Position: refs/heads/master@{#26993}
-
- 20 Feb, 2015 1 commit
-
-
mstarzinger authored
R=titzer@chromium.org,bmeurer@chromium.org Review URL: https://codereview.chromium.org/928213003 Cr-Commit-Position: refs/heads/master@{#26766}
-
- 17 Feb, 2015 1 commit
-
-
bmeurer authored
This adds a new ControlFlowOptimizer that - for now - recognizes chains of Branches generated by the SwitchBuilder for a subset of javascript switches into Switch nodes. Those Switch nodes are then lowered to either table or lookup switches. Also rename Case to IfValue (and introduce IfDefault) for consistency. BUG=v8:3872 LOG=n Review URL: https://codereview.chromium.org/931623002 Cr-Commit-Position: refs/heads/master@{#26691}
-