summaryrefslogtreecommitdiffstats
path: root/compiler/sea_ir
Commit message (Collapse)AuthorAgeFilesLines
* Now we have a proper C++ library, use std::unique_ptr.Ian Rogers2014-05-192-3/+3
| | | | | | | Also remove the Android.libcxx.mk and other bits of stlport compatibility mechanics. Change-Id: Icdf7188ba3c79cdf5617672c1cfd0a68ae596a61
* Split up CommonTest into CommonRuntimeTest and CommonCompilerTestBrian Carlstrom2014-02-263-9/+6
| | | | Change-Id: I8dcf6b29a5aecd445f1a3ddb06386cf81dbc9c70
* Rewrite the compiler interface for CompilerDriver.Nicolas Geoffray2014-02-181-14/+7
| | | | Change-Id: I15fa9afe7ffb7283ebda8d788a1e02793e3f75a6
* Move compiler code out of method verifier.Vladimir Marko2013-12-171-1/+1
| | | | | | | | | | | | 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
* Use class def index from java.lang.Class.Ian Rogers2013-09-213-8/+8
| | | | | | | | | | | Bug: 10244719 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. (cherry-picked from 8b2c0b9abc3f520495f4387ea040132ba85cae69) Change-Id: I20c73a3b17d86286428ab0fd21bc13f51f36c85c
* Multi threaded hashed deduplication during compilation.Mathieu Chartier2013-09-031-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add buffering to ELF file generationBrian Carlstrom2013-08-261-0/+1
| | | | | Bug: 10496017 Change-Id: I3cbad249e0fb33f726bd0a504b3b6bd9b4f759c8
* Build fix.Ian Rogers2013-08-161-1/+1
| | | | Change-Id: Ib9a98b74ed5cb06c2e53f28774de915c35c24108
* Merge "Get SEA fibonacci running in interpreter mode." into dalvik-devIan Rogers2013-08-1612-85/+225
|\
| * Get SEA fibonacci running in interpreter mode.Dragos Sbirlea2013-08-1612-85/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Android.mk: Added new file to build. compile_driver.cc: Moved SE_IR usage test in the block protected by bool compile, which is enabled by adding a sepatate test in IsCnadidateForCompilation. class_linker.cc: Added check in NeedsInterpreter to enable SEA_IR. art_method-inl.h: DIsabled check in SEA_IR mode. method_verifier.cc: Added check for SEA_IR mode. method_verifier.h: Chenged IsCandidateForCompilation signature to allow testing the function name (for SEA_IR selective compilation). dot_gen.h: Updated ART file API usage to altest version. sea_ir/frontend.cc: Passing function symbol name to CompileMethod. instruction_Nodes.h: Added accessor for method index for InvokeStatic IR node. sea.cc: Added additional IR SignatureNode for function calls (extra Method parameter). Fixed UnnamedConstant constant value. sea.h: Passing function_name to GenerateLLVM. type_inference_visitor.cc: Aded type for first (placeholder) method parameter. Change-Id: I295858ea0761a3dffb36f35748d8b93d4919d6a9
* | Merge "Fix up TODO: c++0x, update cpplint." into dalvik-devMathieu Chartier2013-08-165-6/+6
|\ \ | |/ |/|
| * Fix up TODO: c++0x, update cpplint.Mathieu Chartier2013-08-165-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | Needed to update cpplint to handle const auto. Fixed a few cpplint errors that were being missed before. Replaced most of the TODO c++0x with ranged based loops. Loops which do not have a descriptive container name have a concrete type instead of auto. Change-Id: Id7cc0f27030f56057c544e94277300b3f298c9c5
* | Get PORTABLE + SMALL on x86.Dragos Sbirlea2013-08-154-10/+42
|/ | | | | | | | | Implemented the portable resolution trampoline and the portable to interpreter bridge. Also work on integrating SEA_IR in the PORTABLE+SMALL framework. Refactor some naming and correct indenting. Change-Id: Ibd97da5e5b6f5148274c9bff368e3654b661ef51
* Add flock(2)ing on dex-cache files to prevent racesBrian Carlstrom2013-08-151-1/+1
| | | | | Bug: 9071417 Change-Id: I1ee9ff281867f90fba7a8ed8bbf06b33ac29d511
* Added tests for SEA IR intermediate representation.Dragos Sbirlea2013-08-082-6/+66
| | | | Change-Id: Ibc55fc3d1f6f753381a9d508d250944c2c45531d
* Add tests for SEA IR types infrastructure.Dragos Sbirlea2013-08-074-5/+177
| | | | | | | | | | | | | type_data_test.cc: Tests the type store used to record info on the types of results from instructions. type_inferecen_visitor_test.cc: Tests type merging and related operations. Android.gtest.mk: Included new tests. type_inference_visitor.h/.cc: Marked function as const and made public. scoped_hashtable_test.cc: Included full header path in #include. Change-Id: I868461dcaed1e7f75db15958b83a3db7e17f6a64
* Renamed SeaGraph::GetCurrentGraph to GetGraph for clarity.Dragos Sbirlea2013-08-073-3/+3
| | | | Change-Id: Iffd51660fd7ac01a1458375cea6c2ed8b44ffaaf
* Refactored SEA IR folder structure to be more logical.Dragos Sbirlea2013-08-0714-35/+35
| | | | Change-Id: I302c79af92c07cceb38dff36efe416bfa4869a91
* SEA IR type handling complete for fibonacci.Dragos Sbirlea2013-08-0711-33/+187
| | | | | | | | | | | | types.h: Encapsulated types map into separate class. code_gen.*, visitor.h: Added visitor function for unnamed constants to enable correct .dot display and type handling. type_inference_visitor.cc: Propagated types through phi functions, invoke, add-int instructions. Added SEA IR type merging functions. Change-Id: I0fb1c4d40e3af43dc295133a826ce125a787cc33
* Fixed SEA IR bugs.Dragos Sbirlea2013-08-056-9/+61
| | | | | | | | | | | | | | | Bug 1: The type inference visitor did not clear type between visits, so all instructions had types attached because of this. Bug 2: The .dot file genration was missing phi ssa edges because the GetSSAProducers map hasn't got the same semantics. (Phi Nodes use a single register which has multiple definitions, not multiple registers with a single definition each) Bug 3: Added the SE IR id in the textual representation of nodes in the .dot representation to ease debugging. Change-Id: Iccbce6f7a3ffba044677c2d548d26af62223be15
* Replaced .dot generation lock with ScopedObjectAccess.Dragos Sbirlea2013-08-052-15/+17
| | | | Change-Id: I70013a488a82d78a2cdfcbb77d3c582d6b97aedc
* Generation of dot files through visitor.Added type info to .dot.Dragos Sbirlea2013-08-0514-272/+448
| | | | | | | | | | | | | visitor.h: Fixed formatting. type_inference.cc: Changed GetSSAConsumers() to return pointer. sea_node.h, sea.cc: Removed ToDot classes functions. instruction_nodes.h: Added acessor for SSA producers. Marked GetUses() as const. sea.h: Marked fields as const. frontend.cc: Changed .dot generation code. code_gen.h: Fixed include to have full path. Change-Id: Ia84371c171c4537d9cf2f56644baa075f1706df1
* Added SEA IR type infrastructure (and a bit of cleanup).Dragos Sbirlea2013-08-019-41/+367
| | | | | | | | | | | | | | | | compiler/Android.mk: Added new files to compile. instruction_nodes.h, code_gen.cc: Renamed GetSSAUses to GetSSAProducers to avoid confusion (uses of what?). sea.cc: Added invoke of type inference framework. sea.h: Expose dex_file through GetDexFile(). Added GetPositionInSIgnature() for SignatureNodes. sea.cc: Cleanup of debug output. visitor.h: Removed dependence on LLVM (now only in code_gen.*). Corrected minor typo in comment. frontend.cc: Renamed access_flags for clarity. Change-Id: I211d2e9ff1e0c4f910de73a52a5ac2c50e4ca7df
* Fix build. (whitespace issues)Dragos Sbirlea2013-07-292-3/+3
| | | | Change-Id: I8453933a7ad4a5f2adcb29a9c746be843a743846
* Added SEA IR def -> use edges (along the use -> def).Dragos Sbirlea2013-07-293-31/+47
| | | | | | | The edges are stored in the "tail" object and will be used for type information propagation. The .dot generation nowhas a switch to enable or disable displaying these edges. Change-Id: Iaf3ce1d1efcda6f5d65c42c69bb1573786c90309
* Fixed 100 char limit in SEA IR files.Dragos Sbirlea2013-07-293-14/+24
| | | | Change-Id: I0fd6143ffdf50e3d2ac14901e9e75471a293df30
* Fix build (whitespace issues)Dragos Sbirlea2013-07-261-24/+0
| | | | Change-Id: I7c65c363d9bbc1033268500d0bb509649793247b
* Improvements and clustering for the .dot file generation.Dragos Sbirlea2013-07-265-37/+54
| | | | | | | | | | | | Dot clusters are used to show SEA IR regions. Passing around dex_file for improved instruction text representation. SeaGraph now stores the dex file. Removed all .dot edges except ssa edges and inter-region control flow. Changed color to gray for ssa edges and kept black for control flow. Consistently labeled SSA edges with virtual register number. Replaced stringstream with StringPrintf. Change-Id: I67d9d92e594d3f2de94eec1c78a64f3972ae60b1
* Fix cpplint whitespace/comments issuesBrian Carlstrom2013-07-2610-32/+32
| | | | Change-Id: Iae286862c85fb8fd8901eae1204cd6d271d69496
* Continued refactoring of strings & headers.Dragos Sbirlea2013-07-234-25/+13
| | | | Change-Id: I420ffc5d861af3dcea65942ce8823be834fdcdec
* Refactored string to int conversion.Dragos Sbirlea2013-07-235-33/+15
| | | | | | | I was using stringstream for int to std::string, but the StringPrintf utility is shorter and cleaner. Change-Id: I454488602459071abb8b846ff7ac8b9594e9d824
* Make Sea IR objects un-copyable.Dragos Sbirlea2013-07-231-1/+4
| | | | Change-Id: I6dfb2de28203223f21a0fbac1fc4b2bcb3fd8206
* Added code generation framework.Dragos Sbirlea2013-07-228-156/+1097
| | | | | | | | | | | | | | | | | | | | | | visitors.h: Contains only IR visitor declarations for now. code_gen.h: Code generation vistor declaration (needs llvm). code_gen.cc:Code generation visitor implementation (needs llvm). instruction_nodes.h: Classes for each type of instruction; this enables the visitor to visit each instruction differently and corresponds to the sea of nodes paper. sea_node.h : Moved base Sea IR Node to this separate header. Replaced NO_REGISTER with enum (including RETURN_REGISTER) sea.cc: Addded code generation call. Set parent region for SignatureNodes. Propagate method and class ids in IR generation routine. Create InstructionNode subclasses. *.mk: Updated to support the new files. Fixed some pre-existing formatting. instruction_tools.h: Fixed double-define of NO_REGISTER to refer to the new enum. dex_instruction.cc: Added support for one more instruction in HasRegXX and VRegXX functions. Change-Id: I7c78f603e41df7bf9da5b77951b8485dd1b49200
* am 751d4ed4: Fixing cpplint legal/copyright issuesBrian Carlstrom2013-07-191-0/+16
|\ | | | | | | | | * commit '751d4ed43e8118f145edf18db4d987daf7dabbae': Fixing cpplint legal/copyright issues
| * Fixing cpplint legal/copyright issuesBrian Carlstrom2013-07-181-0/+16
| | | | | | | | Change-Id: I9547b53bccb0e67079c5e9c6b26889316739dc64
* | am fc0e3219: Fix multiple inclusion guards to match new pathnamesBrian Carlstrom2013-07-172-6/+6
|\ \ | |/ | | | | | | * commit 'fc0e3219edc9a5bf81b166e82fd5db2796eb6a0d': Fix multiple inclusion guards to match new pathnames
| * Fix multiple inclusion guards to match new pathnamesBrian Carlstrom2013-07-172-6/+6
| | | | | | | | Change-Id: Id7735be1d75bc315733b1773fba45c1deb8ace43
* | resolved conflicts for merge of 7940e44f to dalvik-devBrian Carlstrom2013-07-122-86/+632
|/ | | | Change-Id: I6529b2fc27dfaedd2cb87b3697d049ccabed36ee
* Create separate Android.mk for main build targetsBrian Carlstrom2013-07-125-0/+1479
The runtime, compiler, dex2oat, and oatdump now are in seperate trees to prevent dependency creep. They can now be individually built without rebuilding the rest of the art projects. dalvikvm and jdwpspy were already this way. Builds in the art directory should behave as before, building everything including tests. Change-Id: Ic6b1151e5ed0f823c3dd301afd2b13eb2d8feb81