Age | Commit message (Collapse) | Author |
|
The NullConstant may be added to the graph during other passes that
happen between ReferenceTypePropagation and Inliner (e.g.
InstructionSimplifier). If the inliner doesn't run or doesn't inline
anything, the NullConstant remains untyped.
The infrastructure to properly type NullConstants everywhere is to
complex to add for the benefits
Bug: 25786318
Change-Id: I904a3e605b57f8cac9936e82f19a4994c7b1a82a
Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
|
|
Make sure we merge the ClinitCheck only with LoadClass and
HInvokeStaticOrDirect that is a part of the very same dex
instruction. This fixes incorrect stack traces from class
initializers (wrong dex pcs).
Rewrite the pruning to do all the ClinitCheck merging when
we see the ClinitCheck, instead of merging ClinitCheck into
LoadClass and then LoadClass into HInvokeStaticOrDirect.
When we later see an HInvokeStaticOrDirect with an explicit
check (i.e. not merged), we know that some other instruction
is doing the check and the invoke doesn't need to, so we
mark it as not requiring the check at all. (Previously it
would have been marked as having an implicit check.)
Remove the restriction on merging with inlined invoke static
as this is not necessary anymore. This was a workaround for
X.test():
invoke-static C.foo() [1]
C.foo():
invoke-static C.bar() [2]
After inlining and GVN we have
X.test():
LoadClass C (from [1])
ClinitCheck C (from [1], to be merged to LoadClass)
InvokeStaticOrDirect C.bar() (from [2])
and the LoadClass must not be merged into the invoke as this
would cause the resolution trampoline to see an inlined
frame from the not-yet-loaded class C during the stack walk
and try to load the class. However, we're not allowed to
load new classes at that point, so an attempt to do so leads
to an assertion failure. With this CL, LoadClass is not
merged when it comes from a different instruction, so we can
guarantee that all inlined frames seen by the stack walk in
the resolution trampoline belong to already loaded classes.
Change-Id: I2b8da8d4f295355dce17141f0fab2dace126684d
|
|
This reverts commit 271743601650308c7ac5c7a3ec35025d8130a298.
Change-Id: I173e27a0a4d7d54f90ca459eb48d280d1d40ab70
|
|
Add helper methods on HBasicBlock which return ArrayRef with the
suitable sub-array of the `successors_` list.
Change-Id: I66c83bb56f2984d7550bf77c48110af4087515a8
|
|
This reverts commit 4e5dd521063beae1706410419f19c7e224db50fe.
Change-Id: I0de261d14dd3f71abe05f9bc71744820cf23b937
|
|
Currently we run a type propagation pass unconditionally after the
inliner. This change looks at the returned value (if any) and runs a
minimal type propagation only if its type has changed.
Change-Id: I0dd72bd481219081e8a978d2632426afc980d73a
|
|
|
|
Change-Id: I89f72fef3be35a4dd9585d97d03a3150386e0891
|
|
Implement dchecked_vector<> template that DCHECK()s element
access and insert()/emplace()/erase() positions. Change the
ArenaVector<> and ScopedArenaVector<> aliases to use the new
template instead of std::vector<>. Remove DCHECK()s that
have now become unnecessary from the Optimizing compiler.
Change-Id: Ib8506bd30d223f68f52bd4476c76d9991acacadc
|
|
Change-Id: I0e299a81e560eb9cb0737ec46125dffc99333b54
|
|
The CL also changes the calling convetion for 64bit static field set
to use kArg2 instead of kArg1. This allows optimizing to keep
the asumptions:
- arm pairs are always of form (even_reg, odd_reg)
- ecx_edx is not used as a register on x86.
This reverts commit e6f49b47b6a4dc9c7684e4483757872cfc7ff1a1.
Change-Id: I93159917565824084abc96775f31be1a4249f2f3
|
|
Change-Id: I8b57dafcd321c9afa1bbfc6a0674cbea15cbf10c
|
|
breaks debuggable tests.
This reverts commit 23a8e35481face09183a24b9d11e505597c75ebb.
Change-Id: I8e60b5c8f48525975f25d19e5e8066c1c94bd2e5
|
|
Change-Id: I9941fa5fcb6ef0a7a253c7a0b479a44a0210aad4
|
|
Change-Id: If2da02b50d2fa668cd58f134a005f1752e7746b1
|
|
Replace GrowableArray with ArenaVector in HGraph and related
classes HEnvironment, HLoopInformation, HInvoke and HPhi,
and tag allocations with new arena allocation types.
Change-Id: I3d79897af405b9a1a5b98bfc372e70fe0b3bc40d
|
|
Replace GrowableArray with ArenaVector in HBasicBlock and,
to track the source of allocations, assign one new and two
Quick's arena allocation types to these vectors. Rename
kArenaAllocSuccessor to kArenaAllocSuccessors.
Bug: 23736311
Change-Id: Ib52e51698890675bde61f007fe6039338cf1a025
|
|
Reverting so that we can have more discussion about the STL API.
This reverts commit 91e11c0c840193c6822e66846020b6647de243d5.
Change-Id: I187fe52f2c16b6e7c5c9d49c42921eb6c7063dba
|
|
Replace GrowableArray with ArenaVector in HBasicBlock and,
to track the source of allocations, assign one new and two
Quick's arena allocation types to these vectors. Rename
kArenaAllocSuccessor to kArenaAllocSuccessors.
Bug: 23736311
Change-Id: I984aef6e615ae2380a532f5c6726af21015f43f5
|
|
reference type propagation"""""
|
|
ReferenceTypePropagation"""""
|
|
type propagation""""
This reverts commit b734808d0c93af98ec4e3539fdb0a8c0787263b0.
Change-Id: Ifd925f166761bcb9be2268ff0fc9fa3a72f00c6f
|
|
Fixes any prior intrinsics recognition being lost if the containing code
block is inlined.
Change-Id: I6c89973545af97a4fe2444a9bd6efcc12d0d1b10
|
|
ReferenceTypePropagation""""
This reverts commit e344a8070d4549d513413c06767abf8a2c5e9709.
Change-Id: I400fab0e02ce3c11376cc1f3ae9c7cf2c82ffcc1
|
|
This reverts commit 00e3b38be4b280d6d7a7e843cd336ffbd2ba4365.
Change-Id: I4dbadb2d7312a410f1c56283f063dd82156cf702
|
|
This reverts commit 9b0096ba77e7e61bc2dcbbf954831dcae54a6c27.
Change-Id: I824f16e800ca32e646577d5e1e0d593887ccead1
|
|
|
|
|
|
This reverts commit 3fabec7a25d151b26ba7de13615bbead0dd615a6.
Change-Id: Id8614f6b6e3e0e4c9caeb9f771e4c145d9fec64f
|
|
This reverts commit b0d5fc0ac139da4aaa1440263416b9bde05630b0.
Change-Id: Iea8adfc0bd4cb7ee2b292278b8bac80a259acbd1
|
|
|
|
|
|
This properly types all instructions, making it safe to query the type
at any time.
This also moves a few functions from class.h to class-inl.h to please
gcc linker when compiling for target.
Change-Id: I6b7ce965c10834c994b95529ab65a548515b4406
|
|
- Bound object types after a CheckCast. This increases the precision of
(inlining) generic operations.
- Make sure that the BoundType is exact when the class is final.
- Make sure that we don't duplicate BoundTypes when we run the analysis
more than once.
Change-Id: Ic22b610766fae101f942c0d753ddcac32ac1844a
|
|
This patch implements support for try/catch in the SsaBuilder.
Values of locals are propagated from throwing sites inside try
blocks to their respective catch blocks and phis ("catch phis")
are created when necessary.
Change-Id: I0736565c2c4ff3f9f0924b6e3a785a50023f875a
|
|
The original CL broke libcore tests because monitor-exit instructions
did not have any side-effects and got removed by DCE once not labelled
throwing any more.
This reverts commit efe374d7c25c1d48945a9198d96469de99e0c1bd.
Change-Id: I624c0f91676d9baaada6f33be9d7091f68d57535
|
|
Turns out monitor-exit *can* throw... Need to investigate
This reverts commit 8f8ee680bec71a28d9d7b7538e8c7ca100a18184.
Change-Id: I8b42690918833c917b6a7fc3ceea932b7c1a6f15
|
|
In order to avoid complex removal of redundant exceptional edges in
the SSA builder, this patch modified the graph builder to consider
blocks without throwing instructions as not in a try block, even if
covered by a TryItem.
In some corner cases, this may generate more TryBoundaries than
necessary, but those can be removed once the SSA form is built.
Change-Id: I158c4542b2c1964a8dd532f82e921b9cb1997e1e
|
|
Change-Id: I64340fbd08282acb0eb4142d17d37e69bba507cf
|
|
|
|
This patch adds an additional case into the insertion algorithm for
HTryBoundary inside HGraphBuilder in order to better handle catch
blocks covered by a TryItem.
Building SSA form also required to stop combining HTryBoundaries for
neighbouring TryItems because it was not clear which exception
handlers belong to which try block.
Change-Id: Ic68bd6ef98fee784609fa593cb08dca1f00a15e0
|
|
Change-Id: I832f823463569724fca9c38cd70d9dd552f15b3a
|
|
This reverts commit 63107a804ce17db9789051e1fe310d99d1dae1cb.
bug:22116987
Change-Id: I49a376a5bd2073a69babe122ec0d26e5d2f82461
|
|
This reverts commit 30eb58c548bee08468f68eb140a74a51dd7d9b43.
Change-Id: Icd959e868160fc3ee7031dd2927554ac5b21d40f
|
|
This is both an optimization to avoid unneeded nodes,
and correctness to avoid replacing the second input
of `HInstanceOf` and `HCheckCast` to something that is
not `HLoadClass`.
bug:22116987
Change-Id: I4907197a9002883d7cae8265a9642512b6201396
|
|
This patch enables the GraphBuilder to generate blocks and edges which
represent the exceptional control flow when try/catch blocks are
present in the code. Actual compilation is still delegated to Quick
and Baseline ignores the additional code.
To represent the relationship between try and catch blocks, Builder
splits the edges which enter/exit a try block and links the newly
created blocks to the corresponding exception handlers. This layout
will later enable the SsaBuilder to correctly infer the dominators of
the catch blocks and to produce the appropriate reverse post ordering.
It will not, however, allow for building the complete SSA form of the
catch blocks and consequently optimizing such blocks.
To this end, a new TryBoundary control-flow instruction is introduced.
Codegen treats it the same as a Goto but it allows for additional
successors (the handlers).
This reverts commit 3e18738bd338e9f8363b26bc895f38c0ec682824.
Change-Id: I4f5ea961848a0b83d8db3673763861633e9bfcfb
|
|
Causes OutOfMemory issues, need to investigate.
This reverts commit 0b5c7d1994b76090afcc825e737f2b8c546da2f8.
Change-Id: I263e6cc4df5f9a56ad2ce44e18932ca51d7e349f
|
|
This patch enables the GraphBuilder to generate blocks and edges which
represent the exceptional control flow when try/catch blocks are
present in the code. Actual compilation is still delegated to Quick
and Baseline ignores the additional code.
To represent the relationship between try and catch blocks, Builder
splits the edges which enter/exit a try block and links the newly
created blocks to the corresponding exception handlers. This layout
will later enable the SsaBuilder to correctly infer the dominators of
the catch blocks and to produce the appropriate reverse post ordering.
It will not, however, allow for building the complete SSA form of the
catch blocks and consequently optimizing such blocks.
To this end, a new TryBoundary control-flow instruction is introduced.
Codegen treats it the same as a Goto but it allows for additional
successors (the handlers).
Change-Id: I415b985596d5bebb7b1bb358a46e08b7b04bb53a
|
|
The HGraphVisualizer used to crash if it failed to dlopen the
libart(d)-disassembler.so. This patch fixes that.
Bug: 22001285
Change-Id: Ibe9b9af17a77e22e3571c886f77918e9491b7827
|
|
This is automatically added to the '.cfg' output when using the usual
`--dump-cfg` option.
Change-Id: I864bfc3a8299c042e72e451cc7730ad8271e4deb
|