summaryrefslogtreecommitdiffstats
path: root/src/compiler
Commit message (Collapse)AuthorAgeFilesLines
...
| * Rename abstract method code_ to entry_point_from_compiled_code_.Jeff Hao2013-05-136-10/+10
| | | | | | | | Change-Id: I9b02d2df95bbeafa6e6387b461f574c57337a61e
* | Merge "Compiler: replace DOM traversal computation" into dalvik-devbuzbee2013-05-1314-113/+150
|\ \ | |/ |/|
| * Compiler: replace DOM traversal computationbuzbee2013-05-1314-113/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Originally the old trace JIT used a few recursive graph walking algorithms - which was perfectly reasonable given that the graph size was capped at a few dozen nodes at most. These were replaced with iterative walk order computations - or at least I thought they all were. Missed one of them, which caused a stack overflow on a pathologically large method compilation. Renaming of some arena_allocator items for consistency and clarity. More detailed memory usage logging. Reworked the allocator to waste less space when an allocation doesn't fit and a new block must be allocated. Change-Id: I4d84dded3c47819eefa0de90ebb821dd12eb8be8
* | Improve interpreter to interpreter invokes.Jeff Hao2013-05-101-2/+1
| | | | | | | | | | | | | | | | The interpreter constructs a shadow frame instead of arg array to make interpreter to interpreter transitions faster. This adds a pointer to an entry for the interpreter to each method. Change-Id: If48911d3aa3470847b8548a9e92090b829f4f254
* | Fixed Android.common.mk #define setting for small artAnwar Ghuloum2013-05-101-1/+2
|/ | | | | | | | We were seeing things compile when they shouldn't have. This fixes it. Plus added a bit more documentation to options, set default values for the two small art related thresholds to zero. Change-Id: Id5db11962f3e30d8d4ee6b85d4cf7d6e66323adb
* Tracking merge of JWR32E (#656244) to dalvik-devBrian Carlstrom2013-05-041-5/+45
| | | | Change-Id: I2c7baf8e3ccb7a0f05f767628917caed83720a2a
* Supporting de-virtualization for precise types.Sameer Abu Asal2013-05-025-12/+53
| | | | | | | | | | | | | | | | | | | | | | Sharpening invoke-virtual and invoke-interface calls to invoke-direct for cases where the type of "this" pointer in the invoke- params is precisely known. Instructions that have an invoke opcode are marked as interesting, for each invoke-virtual/interface we come across with a precise type for "this" we mark the location as a candidate for sharpening, resolve the concrete method and save its method reference <DexFile, DexMethodIndex> to be sharpened in CompilerDriver::ComputeInvokeInfo(). Added a new entry to AOT statistics showing the percentage of sharpened calls that were based on type analysis. Fix a minor bug in type creation for GetSuperClass(). Previously super class of a precise reference had precise types created which is not necessarily the case. Fixed DCHECK in Class::FindVirtualMethodForVirtual to handle cases for Miranda methods. Sharpening only takes place for cases where no soft failures happen at verification time. Change-Id: Ic027d0226d6f95260c1918014cb6313f2e0ca455
* Merge "Compile filter for small applications and methods" into dalvik-devAnwar Ghuloum2013-05-012-10/+7
|\
| * Compile filter for small applications and methodsAnwar Ghuloum2013-04-302-10/+7
| | | | | | | | | | | | | | | | Adds a filter per method and program size (in method count). Right now, options are treated as runtime options...but we might want to change this and separate options for compilers and runtime. Change-Id: I8c3e925116119af8ffa95ff09f77bcfdd173767b
* | Track rename of JSSEKenny Root2013-04-301-6/+6
| | | | | | | | Change-Id: I1e038e63ccad098a5812bbb1532ca4dd839d4be0
* | Revert "Supporting de-virtualization for precise types."Brian Carlstrom2013-04-305-62/+12
| | | | | | | | This reverts commit 31d4b8e0058b33e2c5ce792a69e5e897583652e2.
* | Supporting de-virtualization for precise types.Sameer Abu Asal2013-04-295-12/+62
|/ | | | | | | | | | | | | | | | | | | | Sharpening invoke-virtual and invoke-interface calls to invoke-direct for cases where the type of "this" pointer in the invoke- params is precisely known. Instructions that have an invoke opcode are marked as interesting, for each invoke-virtual/interface we come across with a precise type for "this" we mark the location as a candidate for sharpening, resolve the concrete method and save its method reference <DexFile, DexMethodIndex> to be sharpened in CompilerDriver::ComputeInvokeInfo(). Added a new entry to AOT statistics showing the percentage of sharpened calls that were based on type analysis. Fix a minor bug in type creation for GetSuperClass(). Previously super class of a precise reference had precise types created which is not necessarily the case. Fixed DCHECK in Class::FindVirtualMethodForVirtual to handle cases for Miranda methods. Change-Id: I0626d5cd1bc70a685db71abec067370ebdaf6edc
* Merge "Revert "Supporting de-virtualization for precise types."" into dalvik-devIan Rogers2013-04-265-62/+12
|\
| * Revert "Supporting de-virtualization for precise types."Ian Rogers2013-04-265-62/+12
| | | | | | | | | | | | This reverts commit b0682d5f7970470130f43d35f37ae7605a8a9bb8 Change-Id: I2b0dc3e716ee5c23b89d9fa6eb0ef05c24784b3e
* | Merge "Supporting de-virtualization for precise types." into dalvik-devIan Rogers2013-04-265-12/+62
|\|
| * Supporting de-virtualization for precise types.Sameer Abu Asal2013-04-265-12/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sharpening invoke-virtual and invoke-interface calls to invoke-direct for cases where the type of "this" pointer in the invoke- params is precisely known. Instructions that have an invoke opcode are marked as interesting, for each invoke-virtual/interface we come across with a precise type for "this" we mark the location as a candidate for sharpening, resolve the concrete method and save its method reference <DexFile, DexMethodIndex> to be sharpened in CompilerDriver::ComputeInvokeInfo(). Added a new entry to AOT statistics showing the percentage of sharpened calls that were based on type analysis. Fix a minor bug in type creation for GetSuperClass(). Previously super class of a precise reference had precise types created which is not necessarily the case. Change-Id: Iee61858e84242dfc82be363ee221d2747a1ac86a
* | Removing remaining compiled stubs from image.Jeff Hao2013-04-262-38/+0
|/ | | | | | | Abstract method error stub and jni dlsym lookup stubs are gone. After this change, the image no longer needs to be executable. Change-Id: Ic75d72bf7e76e3b8ecc596e82af68ab592dde15e
* Removed compiled resolution trampoline.Jeff Hao2013-04-232-22/+0
| | | | | | | Created assembly versions of resolution trampoline for portable and quick. Removed compiled version from the image. Change-Id: I183e110c4e102fb45ce6e7f4e855f8bed7986251
* Fix memory leak of and use without initialization.Ian Rogers2013-04-184-17/+17
| | | | | | | | | Arena allocator's empty arena needs to be released in a destructor, this removes the neeed for Reset. The DataflowIterator needs to clear changed_ upon construction to avoid use without initialization. Change-Id: I56e3cb8c3e06c08ab0ff42447bd6e05792fc70af
* MIR tidying.Ian Rogers2013-04-187-12/+15
| | | | | | | Fix memory leak in the MIR graph m_units_. Don't shadow the arena_ field in Backend. Change-Id: I0ffaebd088f1383205bde9fb34c5d33156bb7260
* minor cleanupAnwar Ghuloum2013-04-171-2/+1
| | | | Change-Id: I92dda15aaa2626821befcb9a5db3801b0ab074e5
* Add bool to verifier to allow soft failures.Jeff Hao2013-04-161-1/+1
| | | | | | | | When false, soft failures in the verifier become hard failures. It should only be false when not compiling, and calling the verifier from the class linker. Change-Id: I664e5cbe491784b280aa5bfdb7e7fc0b771814f5
* Compile less stuffAnwar Ghuloum2013-04-162-10/+21
| | | | | | | | | | | | | Don't compile class initializers, compile programs with fewer than commmand-line specified number of methods, mildly refactor SLOW_MODE, rename into LIGHT_MODE. Also, walks the image for uncompiled methods and fixes up with pointers to the interpreter entry point. (Removed hot method list and light method limit as these are experimental.) Change-Id: I2ae33d8add84ab9f4d76f9d910cae422c81a7832
* Remove SLOW_ART output spam in compiler driver.Jeff Hao2013-04-111-3/+0
| | | | Change-Id: I3a0961be43dc366552b8f1f2219b16cf7d20fac9
* Merge "Compiler: continuing refactoring" into dalvik-devbuzbee2013-04-1138-1390/+1271
|\
| * Compiler: continuing refactoringbuzbee2013-04-1038-1390/+1271
| | | | | | | | | | | | | | | | | | | | | | | | | | Moving the arena memory allocation mechanism into it's own class as a prelude to cleaning up the MIR and LIR data structures. Reworked bit vector as a class using placement new w/ the arena allocator. Reworked GrowableList as a class template using the new arena allocator and renamed to GrowableArray. Change-Id: I639c4c08abe068094cae2649e04f58c8addd0015
* | Fix abort regression.Ian Rogers2013-04-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change https://googleplex-android-review.googlesource.com/#/c/249463/ set a boolean prior to testing it meaning that all aborts were seen as recursive and no meaningful log information was given. Also a fix related to https://googleplex-android-review.googlesource.com/293665 where we were attempting to dump other threads stacks during aborting even though those threads weren't suspended. Change-Id: I1f848512c5e380529579db3d16bb8f5ddda36ad3
* | Build fix.Ian Rogers2013-04-091-0/+1
| | | | | | | | Change-Id: If187062cc456db49a6eb4987c0548f09fac75cf4
* | Interpreter entries and instrumentation as a listener.Ian Rogers2013-04-086-65/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the instrumentation responsible for whether we want method entry/exit stubs, and allow it to use interpreter entry stubs when instruction by instruction instrumentation is required. Improve deoptimization so more JDWP test cases are passing. Refactor exception debug posting, in particular improve reporting in the interpreter. Improve class linker exception throwing so that broken dex files are more likely to be reported. Fixes the performance issue Bug: 8410519. Fix some error reporting lock level errors for the large object space. Make fast object verification faster. Add some debug mode robustness to finding dex PCs in GC maps. Add printf attributes to JniAbortF and fix errors. Expand run-test 044 to test return behaviors and fix issues with not throwing appropriate exceptions for proxies. Ensure causes are reported with a class linker NoClassDefFoundError and JNI NoSuchFieldError. Remove unused debugMe and updateDebuggerFromCode. There's a minor sizing tweak to the arg array builder, and an extra reference array check in the interpreter. Some clean-up of trace code. Fix reg type cache destructor if it is called after the reg type cache is shutdown (as is the case in oatdump). Change-Id: I6519c7b35df77f978d011999354c864f4918e8ce
* | Remove remaining code related to compiled invoke and proxy stubs.Jeff Hao2013-04-086-276/+0
|/ | | | Change-Id: Ib0b2829fed9d7efee09d098ce4db9d13f2fa2eac
* Compiler: stop wasting cycles....buzbee2013-04-022-20/+6
| | | | | | | | | | | | | | | Must have gotten carried away during the refactoring of the graph traversal code... The quick codegen's mechanism to sum the static uses of SSA regs and bucket them by parent Dalvik vreg was getting run once for each basic block, when all it needed was to be run once per method. This had no effect on register allocation because the use counts kept their relative position, but it uselessly wasted cycles. Also fixed an inconsistency in the promotion threshold. Change-Id: I58b438fe419f789ed11f7b136db645b2d23395de
* Compiler: LIR restructuringbuzbee2013-04-0149-7638/+7485
| | | | | | | | | | | | | | | Continuing restructuring of the compiler. In this installment, all LIR reverences are moved from compiler_ir down to quick. Further, all Portable data is moved to from compiler_ir down to portable. In short, the great dumping ground of CompilationUnit has been split into three smaller dumping grounds of MIRGraph, Codegen and MIRConverter. From here, subsequent CLs will repartition those smaller dumping grounds into (hopefully) more coherent classes. As a result, most function signatures have been altered to remove the passing around of a CompilationUnit* pointer. Change-Id: I7195f7baecd81e87786a952e18bbce0b6ceeaac4
* Merge branch 'dalvik-dev' of ↵Brian Carlstrom2013-03-3010-775/+14
|\ | | | | | | | | | | https://googleplex-android.googlesource.com/a/platform/art into fixes-for-art-build-with-mr2 Change-Id: Ie46d1f77f98b8a6f55f02b8614cb88b36b6a2d44
| * Use Thumb sp-relative store.Sebastien Hertz2013-03-281-2/+7
| | | | | | | | | | | | | | | | When storing a register to stack, we used to always generate Thumb2 store. This CL uses a kThumbStrSpRel instruction when generating sp-relative stores with a Thumb source register. Change-Id: If729b5428c41350f8dc253e71ce8b63acbbc2acc
| * Merge "Remove code related to compiled invoke stubs." into dalvik-devJeff Hao2013-03-279-773/+1
| |\
| | * Remove code related to compiled invoke stubs.Jeff Hao2013-03-279-773/+1
| | | | | | | | | | | | | | | | | | | | | Note that the oat file version is now bumped to 004. A clean-oat will be necessary after syncing this change. Change-Id: If8875335b7fcc39b6b40c6f95de07da50da7b6b8
| * | Disable close of compiler_library_ to workaround mclinker bug affecting ↵Brian Carlstrom2013-03-271-0/+6
| |/ | | | | | | | | | | gtest output Change-Id: I93b4a83861803a5e610c719bf3468f8967701ff0
* | Disable branch weights due to issue with llvm jb-mr2Brian Carlstrom2013-03-291-1/+4
| | | | | | | | | | Bug: 8511695 Change-Id: I3805f234125063e5412068cc081158718eefbdb5
* | Update class_initializer_black_list for jb-mr2Brian Carlstrom2013-03-241-1/+1
| | | | | | | | Change-Id: I7b5c604601958c80050d19fd337cfca494d94554
* | Changes to move to jb-mr2 based llvmBrian Carlstrom2013-03-2418-137/+154
|/ | | | Change-Id: Iae8b2164f25146807662a6025a254fec6d40bb52
* Merge "Compiler: rework dataflow iterator." into dalvik-devbuzbee2013-03-219-124/+160
|\
| * Compiler: rework dataflow iterator.buzbee2013-03-219-124/+160
| | | | | | | | | | | | | | This cl addresses comments from 278630 - rework DatflowIterator to be a parent class for the various iteration modes. Change-Id: Ic16c093597e2d754761b4fdfa47f665d8b315542
* | Slow ART.Ian Rogers2013-03-201-3/+12
|/ | | | | | Run ART with the interpreter for all but boot.oat code. Change-Id: I1654ecff6769a6c754f713be7580717d5ce07dc1
* Merge "Make shadow frame addresses unique." into dalvik-devSebastien Hertz2013-03-201-7/+28
|\
| * Make shadow frame addresses unique.Sebastien Hertz2013-03-191-7/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | This CL makes each virtual register's shadow frame address unique in the LLVM function. Every shadow frame address (gep instructions) are placed right after allocas to dominate all their uses. This reduces the number of emitted gep instructions and the memory footprint. This may also "help" optimization passes to simplify the detection of addresses in load/store operations where some transformations may be simplified. Change-Id: I8fe155108db1736c533289962c983caea8c2b63f
* | Some common frontend tidying.Ian Rogers2013-03-193-331/+290
| | | | | | | | Change-Id: I1fa955cf8c4be45887e63085cbc2637569b7e545
* | Compiler: Spring cleaningbuzbee2013-03-1946-6354/+4640
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Significant restructuring of the Quick compiler to break out the common frontend more cleanly. Additional C++'ification. The goal is to move from the monolithic structure of the old JIT towards a more modular model in which components - in particular the compiler backend - can be replaced. This CL focuses on moving MIR-related data from the CompilationUnit struct into a new MIRGraph class. The next CL will isolate all LIR-related data and code down into the Quick backend. This change will happen in multiple steps, and may look uglier before it starts looking better. Among the changes: o Moved all mir-related fields from CompilationUnit to new MirGraph class. o Moved the register promotion stuff into the Quick backend. o Deleted the GBC to LIR conversion code. o Replaced with old C-style function pointer dataflow analysis dispatcher with a basic block iterator class. o Renamed some files to make the name more consistent with what the code actually does. o Added the foundation for future inlining support. o Stripped out the remains of the old fingerprinting mechanism. Change-Id: I6c30facc642f8084b1c7b2075cf7014de387aa56
* Various performance improvements.Ian Rogers2013-03-1810-5/+17
| | | | | | | | | Performance had regressed due to verify object and method invocation changes. Avoid trampolines for static calls in same class. Various inlining changes. Make verify object something that's only compiled-in in debug builds. Change-Id: Ia261a52232c3b10667c668f8adfadc0da3048bc5
* Fix object verification.Ian Rogers2013-03-162-0/+2
| | | | | | | Refactor VERIFY_OBJECT_ENABLED to become less brittle to change enum and global constant. Change-Id: Ie405106be81dce9a913730c7f46a5659582fa18b
* Some comment tweaks in quick.Ian Rogers2013-03-151-8/+8
| | | | Change-Id: I223ebb1dc4132f6dec33024195c3144b356f9303