summaryrefslogtreecommitdiff
path: root/compiler/llvm
AgeCommit message (Collapse)Author
2014-12-12Remove portable. Elliott Hughes
Change-Id: I3bf3250fa866fd2265f1b115d52fa5dedc48a7fc
2014-11-19Fix the last users of TARGET_CPU_SMP. Elliott Hughes
Everyone else assumes SMP. Change-Id: I7ff7faef46fbec6c67d6e446812d599e473cba39
2014-11-03Remove -Wno-unused-parameter and -Wno-sign-promo from base cflags. Ian Rogers
Fix associated errors about unused paramenters and implict sign conversions. For sign conversion this was largely in the area of enums, so add ostream operators for the effected enums and fix tools/generate-operator-out.py. Tidy arena allocation code and arena allocated data types, rather than fixing new and delete operators. Remove dead code. Change-Id: I5b433e722d2f75baacfacae4d32aef4a828bfe1b
2014-08-22ART: Clean up compiler Andreas Gampe
Clean up the compiler: less extern functions, dis-entangle compilers, hide some compiler specifics, lower global includes. Change-Id: Ibaf88d02505d86994d7845cf0075be5041cc8438
2014-07-11Replace memory barriers to better reflect Java needs. Hans Boehm
Replaces barriers that enforce ordering of one access type (e.g. Load) with respect to another (e.g. store) with more general ones that better reflect both Java requirements and actual hardware barrier/fence instructions. The old code was inconsistent and unclear about which barriers implied which others. Sometimes multiple barriers were generated and then eliminated; sometimes it was assumed that certain barriers implied others. The new barriers closely parallel those in C++11, though, for now, we use something closer to the old naming. Bug: 14685856 Change-Id: Ie1c80afe3470057fc6f2b693a9831dfe83add831
2014-06-02Make class status volatile. Ian Rogers
Discourage loads and stores from reordering around the status being updated. Bug: 15347354 Change-Id: Ice805cb834617747c8209e98a142d3e5c7585719
2014-05-19Now we have a proper C++ library, use std::unique_ptr. Ian Rogers
Also remove the Android.libcxx.mk and other bits of stlport compatibility mechanics. Change-Id: Icdf7188ba3c79cdf5617672c1cfd0a68ae596a61
2014-05-06Give Compiler a back reference to the driver. Ian Rogers
The compiler driver is a single object delegating work to the compiler, rather than passing it through to every Compiler call make it a member of Compiler so that it maybe queried. This simplifies the Compiler API and makes the relationship to CompilerDriver more explicit. Remove reference arguments that contravene code style. Change-Id: Iba47f2e3cbda679a7ec7588f26188d77643aa2c6
2014-05-01Use instruction specific dalvik cache dirs. Narayan Kamath
- All oat & art files are now placed under /data/dalvik-cache/<isa>/. - GetDalvikCacheOrDie now requires a mandatory subdirectory argument, and is implicitly rooted under /data/. - Added helper methods to convert InstructionSet enums into strings and vice versa. (cherry picked from commit 2974bc3d8a5d161d449dd66826d668d87bdc3cbe) Change-Id: Ic7986938e6a7091a2af675ebafec768f7b5fb8cd
2014-04-14Centralize instruction-set pointer-size, alignment, 64b-width code Andreas Gampe
in instruction_set.h/cc This allows to clean up some places that currently make explicit comparisons. Change-Id: I0dcc924c52fa53306f706aceea93a2d4a655c5df
2014-03-13Add command line support for enabling the optimizing compiler. Nicolas Geoffray
Also run tests with the optimizing compiler enabled when the file art/USE_OPTIMIZING_COMPILER is present. Change-Id: Ibc33eed62a43547bc3b9fe786d014c0d81b5add8
2014-03-03Cache field lowering info in mir_graph. Vladimir Marko
Change-Id: I9f9d76e3ae6c31e88bdf3f59820d31a625da020f
2014-03-01Make out arguments non-reference types. Ian Rogers
Also, tidy some portable related code. Change-Id: I67c8aa52eef8b556ca117ecda1b1e75465ba06a5
2014-02-18Rewrite the compiler interface for CompilerDriver. Nicolas Geoffray
Change-Id: I15fa9afe7ffb7283ebda8d788a1e02793e3f75a6
2014-02-06Object model changes to support 64bit. Ian Rogers
Modify mirror objects so that references between them use an ObjectReference value type rather than an Object* so that functionality to compress larger references can be captured in the ObjectRefererence implementation. ObjectReferences are 32bit and all other aspects of object layout remain as they are currently. Expand fields in objects holding pointers so they can hold 64bit pointers. Its expected the size of these will come down by improving where we hold compiler meta-data. Stub out x86_64 architecture specific runtime implementation. Modify OutputStream so that reads and writes are of unsigned quantities. Make the use of portable or quick code more explicit. Templatize AtomicInteger to support more than just int32_t as a type. Add missing, and fix issues relating to, missing annotalysis information on the mutator lock. Refactor and share implementations for array copy between System and uses elsewhere in the runtime. Fix numerous 64bit build issues. Change-Id: I1a5694c251a42c9eff71084dfdd4b51fff716822
2014-01-28Add VerfiedMethod to DexCompilationUnit. Vladimir Marko
Avoid some mutex locking and map lookups. Change-Id: I8e0486af77e38dcd065569572a6b985eb57f4f63
2014-01-28Refactor verification results. Vladimir Marko
Rename VerificationMethodsData to VerificationResults. Create new class VerifiedMethod to hold all the data for a given method. Change-Id: Ife1ac67cede20f3a2f9c7f5345f08a851cf1ed20
2014-01-08Remove intialized static storage from dex cache. Ian Rogers
The initialized static storage array is used by compiled code to determine if for a sget/sput class initialization is necessary. The compiled code typically doesn't require this test as the class is pre-initialized or the class being accessed is the same as the current method. Change-Id: Icbc45e692b3d0ac61e559e69edb6c9b29439e571
2013-12-17Move compiler code out of method verifier. Vladimir Marko
We want to detect small methods for inlining at the end of the method verification. Instead of adding more compiler code to the runtime, we create a callback from the runtime into the compiler, so that we can keep the code there. Additionally, we move the compiler-related code that was already in the method verifier to the compiler since it doesn't really belong to the runtime in the first place. Change-Id: I708ca13227c809e07917ff3879a89722017e83a9
2013-11-25Update ART for LLVM merge up to r187914. Stephen Hines
Removed NoFramePointerElimNonLeaf because this is now only specified via a function attribute (and thus covered by existing cases). Switch to llvm::sys::fs::F_* enums. Remove unused DisableSimplifyLibCalls(). (cherry picked from commit 1961a2716cf02f597f06c27a0850daa2dc917586) Change-Id: Ic7b311b635483a44265c89d47f37f4202a5b18f7
2013-11-07Revert "Update ART for LLVM merge up to r187914." Brian Carlstrom
This reverts commit f7ee11632e3dfda29d553d8962be9747d5ce6dfd.
2013-11-06Update ART for LLVM merge up to r187914. Stephen Hines
Removed NoFramePointerElimNonLeaf because this is now only specified via a function attribute (and thus covered by existing cases). Switch to llvm::sys::fs::F_* enums. Remove unused DisableSimplifyLibCalls(). (cherry picked from commit 1961a2716cf02f597f06c27a0850daa2dc917586) Change-Id: Idc2e3fb73d798a62b6ebf6f55aff5c715b2c62f7
2013-10-02Inflate contended lock word by suspending owner. Ian Rogers
Bug 6961405. Don't inflate monitors for Notify and NotifyAll. Tidy lock word, handle recursive lock case alongside unlocked case and move assembly out of line (except for ARM quick). Also handle null in out-of-line assembly as the test is quick and the enter/exit code is already a safepoint. To gain ownership of a monitor on behalf of another thread, monitor contenders must not hold the monitor_lock_, so they wait on a condition variable. Reduce size of per mutex contention log. Be consistent in calling thin lock thread ids just thread ids. Fix potential thread death races caused by the use of FindThreadByThreadId, make it invariant that returned threads are either self or suspended now. Code size reduction on ARM boot.oat 0.2%. Old nexus 7 speedup 0.25%, new nexus 7 speedup 1.4%, nexus 10 speedup 2.24%, nexus 4 speedup 2.09% on DeltaBlue. Change-Id: Id52558b914f160d9c8578fdd7fc8199a9598576a
2013-09-19Use class def index from java.lang.Class. Ian Rogers
Bug: 10244719 Depends on: https://googleplex-android-review.git.corp.google.com/362363 This removes the computation of the dex file index, when necessary this is computed by searching the dex file. Its only necessary in dalvik.system.DexFile.defineClassNative and DexFile::FindInClassPath, the latter not showing up significantly in profiling with this change. Change-Id: I20c73a3b17d86286428ab0fd21bc13f51f36c85c
2013-09-09Move disassembler out of runtime. Ian Rogers
Bug: 9877500. Change-Id: Ica6d9f5ecfd20c86e5230a2213827bd78cd29a29
2013-09-06Refactor CompilerDriver::Compute..FieldInfo Ian Rogers
Don't use non-const reference arguments. Move ins before outs. Change-Id: I7b251156388d8f07513b3da62ebfd29e5fd9ff76
2013-09-06Refactor CompilerDriver::ComputeInvokeInfo Ian Rogers
Don't use non-const reference arguments. Move ins before outs. Change-Id: I4a7b8099abe91ea60f93a56077f4989303fa4876
2013-09-06Merge "Disable devirtualization detection in DEX-to-DEX compiler." into ↵ Sebastien Hertz
dalvik-dev
2013-09-06Disable devirtualization detection in DEX-to-DEX compiler. Sebastien Hertz
This CL allows the DEX-to-DEX compiler to disable devirtualization detection. This allows to quicken invoke-virtual/range instructions that used to be eligible for devirtualization. Bug: 10632943 Change-Id: I6c9f4d3249cf42b47f004be5825b3186fa83501e
2013-09-05Shard dedupe set locks. Ian Rogers
We're seeing contention during compilation on the dedupe locks, sharding 4 ways on an occam brings down contention by > 5x. Improve dedupe hash function to have a FNV hash function at its heart. Improve naming of dedupe locks. Tidy portable JNI compiler paramters to be pointers, given that's their primary use. Change-Id: I95d905f2ca5fee4e83a0034926a5f6501b4aeb79
2013-09-03am 22955837: Merge "Multi threaded hashed deduplication during compilation." ↵ Mathieu Chartier
into klp-dev * commit '22955837e20f126845ff0e516dfa6f74ec81d240': Multi threaded hashed deduplication during compilation.
2013-09-03Multi threaded hashed deduplication during compilation. Mathieu Chartier
Moved deduplication to be in the compiler driver instead of oat writer. This enables deduplication to be performed on multiple threads. Also added a hash function to avoid excessive comparison of byte arrays. Improvements: Before (alloats host): real 1m6.967s user 4m22.940s sys 1m22.610s Thinkfree.apk (target mako): 0m23.74s real 0m50.95s user 0m9.50s system 0m24.62s real 0m50.61s user 0m10.07s system 0m24.22s real 0m51.44s user 0m10.09s system 0m23.70s real 0m51.05s user 0m9.97s system 0m23.50s real 0m50.74s user 0m10.63s system After (alloats host): real 1m5.705s user 4m44.030s sys 1m29.990s Thinkfree.apk (target mako): 0m23.32s real 0m51.38s user 0m10.00s system 0m23.49s real 0m51.20s user 0m9.80s system 0m23.18s real 0m50.80s user 0m9.77s system 0m23.52s real 0m51.22s user 0m10.02s system 0m23.50s real 0m51.55s user 0m9.46s system Bug: 10552630 Change-Id: Ia6d06a747b86b0bfc4473b3cd68f8ce1a1c7eb22
2013-08-29Revert "Update ART for LLVM merge up to r187914." Brian Carlstrom
This reverts commit 70814f7746793934a29e010211ef6e652ad75cd2.
2013-08-29Update ART for LLVM merge up to r187914. Stephen Hines
Removed NoFramePointerElimNonLeaf because this is now only specified via a function attribute (and thus covered by existing cases). Switch to llvm::sys::fs::F_* enums. Remove unused DisableSimplifyLibCalls(). (cherry picked from commit 1961a2716cf02f597f06c27a0850daa2dc917586) Change-Id: I49e691b6771f7e3f77fe583841ea51b06ee7cfdf
2013-08-29Revert "Update ART for LLVM merge up to r187914." Ian Rogers
This reverts commit eaeab46304a139da495de941e853ce9acdace175. Change-Id: I854e09c9c988702de08a9ff642619761d1d57639 (cherry picked from commit 03feadd72f6205f0b88fe69aaa30c69d1b2e8c2d)
2013-08-28Update ART for LLVM merge up to r187914. Stephen Hines
Removed NoFramePointerElimNonLeaf because this is now only specified via a function attribute (and thus covered by existing cases). Switch to llvm::sys::fs::F_* enums. Remove unused DisableSimplifyLibCalls(). (cherry picked from commit 1961a2716cf02f597f06c27a0850daa2dc917586) Change-Id: I5ee58031e423838cdc8968675192f9b63a7d867d
2013-08-22Revert "Update ART for LLVM merge up to r187914." Brian Carlstrom
This reverts commit b8a874ca3b13007f4bf688963483ffb3c76e0d7d.
2013-08-22Update ART for LLVM merge up to r187914. Stephen Hines
Removed NoFramePointerElimNonLeaf because this is now only specified via a function attribute (and thus covered by existing cases). Switch to llvm::sys::fs::F_* enums. Remove unused DisableSimplifyLibCalls(). (cherry picked from commit 1961a2716cf02f597f06c27a0850daa2dc917586) Change-Id: I7403dca575104de2ceb5fc0619611366a8058e5d
2013-08-19Revert "Update ART for LLVM merge up to r187914." Brian Carlstrom
This reverts commit 6a94caa048121858ee8e71f84caf7b9ae1f940df.
2013-08-19Update ART for LLVM merge up to r187914. Stephen Hines
Removed NoFramePointerElimNonLeaf because this is now only specified via a function attribute (and thus covered by existing cases). Switch to llvm::sys::fs::F_* enums. Remove unused DisableSimplifyLibCalls(). (cherry picked from commit 1961a2716cf02f597f06c27a0850daa2dc917586) (cherry picked from commit 6e6819f7b8b4820ae2b1003a516fe9aa60fa478e) Change-Id: I4fb59f291bb58c7ed8575f71a44f7c59f653a5ec
2013-08-15am 3e78664f: am f8dc6489: am 7571e8b7: Add flock(2)ing on dex-cache files to ↵ Brian Carlstrom
prevent races * commit '3e78664ffa63f3a01b0769a57409933a82648b4a': Add flock(2)ing on dex-cache files to prevent races
2013-08-15Add flock(2)ing on dex-cache files to prevent races Brian Carlstrom
Bug: 9071417 Change-Id: I1ee9ff281867f90fba7a8ed8bbf06b33ac29d511
2013-08-14Revert "Update ART for LLVM merge up to r187914." Brian Carlstrom
This reverts commit 6e6819f7b8b4820ae2b1003a516fe9aa60fa478e.
2013-08-13Update ART for LLVM merge up to r187914. Stephen Hines
Removed NoFramePointerElimNonLeaf because this is now only specified via a function attribute (and thus covered by existing cases). Switch to llvm::sys::fs::F_* enums. Remove unused DisableSimplifyLibCalls(). (cherry picked from commit 1961a2716cf02f597f06c27a0850daa2dc917586) Change-Id: Idc2e3fb73d798a62b6ebf6f55aff5c715b2c62f7
2013-08-13Refactor java.lang.reflect implementation Brian Carlstrom
Cherry-picked from commit ed41d5c44299ec5d44b8514f6e17f802f48094d1. Move to ArtMethod/Field instead of AbstractMethod/Field and have java.lang.reflect APIs delegate to ArtMethod/ArtField. Bug: 10014286. Change-Id: Iafc1d8c5b62562c9af8fb9fd8c5e1d61270536e7
2013-08-13C++11 support for ART. Mathieu Chartier
We can now use auto, ranged based loops, etc.. This compiles, the phone boots, and the tests pass. Depends on: https://googleplex-android-review.googlesource.com/#/c/342487/ Change-Id: I8ba8ed47d2118e4711668c9c8f973a67beb261b2
2013-08-13Revert "Update ART for LLVM merge up to r187914." Stephen Hines
This reverts commit 1961a2716cf02f597f06c27a0850daa2dc917586.
2013-08-09Update ART for LLVM merge up to r187914. Stephen Hines
Removed NoFramePointerElimNonLeaf because this is now only specified via a function attribute (and thus covered by existing cases). Switch to llvm::sys::fs::F_* enums. Remove unused DisableSimplifyLibCalls(). Change-Id: I792e3a31f5dc289459aeacac995e7c828b6063d3
2013-07-29Move assembler out of runtime into compiler/utils. Ian Rogers
Other directory layout bits of clean up. There is still work to separate quick and portable in some files (e.g. argument visitor, proxy..). Change-Id: If8fecffda8ba5c4c47a035f0c622c538c6b58351
2013-07-26Fix cpplint whitespace/comments issues Brian Carlstrom
Change-Id: Iae286862c85fb8fd8901eae1204cd6d271d69496