path: root/lib/ExecutionEngine
AgeCommit message (Collapse)AuthorFilesLines
2014-05-19Remove unused define from makefile.Stephen Hines1-4/+0
Change-Id: Ie8a17e90f058c85c19dc2bc5c5dff2b256de8c02
2014-05-05Remove Makefile->Header code generation from libbcc.Stephen Hines1-2/+0
These variables/defines are not often used and they complicate the use of target information in other Android libraries. Change-Id: I93dc71e17ae8ece1be46a3a609639ec8380cdaf9
2014-04-23Update libbcc for 64-bit support.Tim Murray1-1/+1
Change-Id: I369a82eb6730a33c46b6700408952fe34020ca51
2014-04-16Enable 64bit elf object handling.WeiTang2-2/+60
Change-Id: Ib952abf882fd9bd0d5cadaa3b204a100bd71aa1e
2014-04-07Add DISABLE_LLVM_DEVICE_BUILDS to libbcc.Tim Murray1-2/+2
Change-Id: Iaad7b2ea8eea6c89c1c1a3d0e145bbb7bf60c6b9
2014-01-29Fix a pointer cast for 64bit.Ian Rogers1-2/+3
Change-Id: I502f46e41a1089bd6f1cd84ddee8e92c35e6ef61
2013-08-07am a08768d4: am 48cd7454: Fix Windows build issues for libbcc.Stephen Hines1-0/+26
* commit 'a08768d46fa5e3087d0fbd288366c53495ee2773': Fix Windows build issues for libbcc.
2013-07-31Fix Windows build issues for libbcc.Stephen Hines1-0/+26
Add unimplemented versions of dlfcn.h functions. Remove OutputFile::CreateTemporary(), since it is unused. Remove unnecessary includes to prevent issues with missing libraries. Change-Id: I74bea72c8f174843e61faa8cac8bd6ae429a1bc0
2013-06-18Don't dlclose things that haven't been dlopen-ed.Stephen Hines1-1/+4
Change-Id: I48ee73f3ca48d4345b976bcdbb08733f60ecdcfe
2013-02-07Remove BCCRuntimeSymbolResolver.Shih-wei Liao5-488/+0
And remove libbcc's long outdated compiler-rt. Change-Id: I57ec4c0403ec8cbaeaedb2333d3e2d20c6e24718
2013-01-14Add HAS_HW_DIV to control the compilation of __udivsi3.Ben Cheng1-0/+4
libgcc.a will contain __udivsi3 if -mcpu=cortex-a15 is specified. Bug: 7961327 Change-Id: I1a06c564d6b345e76845f34b5d923637e40e7e1b
2012-07-22Add APIs to get symbol size and symbol name list. BUG=6841435.Shih-wei Liao4-1/+80
Change-Id: I4ed2af9fcfed1086f48830f9f041299fd037f436
2012-07-12Refine DebugHelper.h into Log.h.Zonr Chang2-2/+2
This removes USE_FUNC_LOGGER from Change-Id: Ia496d41388135706a501bd362075f53d1c0eb6aa
2012-07-12Make libbcc public.Zonr Chang59-6425/+27
This commit is not expected to change any functionality. Change-Id: I364e8bad32d946281b78b1ce36a1b26bf60e3055
2012-07-12Refine the makefiles.Zonr Chang1-17/+9
* Introduce which defines the path for makefiles and libbcc configuration. * Introduce libbcc-{device,host} which defines the build flags for building libbcc itself and/or for building module using libbcc. * Add header guard for generated ConfigFromMk.h. Change-Id: I892f6d3637f628ea6aa0116d92ebc54770ce3a47
2012-07-12Switch to use RSCompilerDriver.Zonr Chang19-3513/+790
This commit is large. It does: 1. Clean-up RSScript. ScriptCached and ScriptCompiled are removed. 2. Switch to use CompilerConfig. 3. Switch to use RSInfo. MCCacheReader and MCCacheWriter are removed. 4. Update C API implementation of libbcc (i.e., bcc.cpp). Note that it'll be completely removed once there's no clients relying on it. Change-Id: I9cbe9f9441f73b7c0b3b84793cb35810dd3a9f4c
2012-07-12Merge lib/Transforms into lib/ExecutionEngine.Shih-wei Liao6-14/+436
Rename BCCTransforms to RSTransforms and ForEachExpand.cpp to RSForEachExpand.cpp. These are RenderScript-specific stuffs. Type of parameter passed to RSForEachExpand pass was also modified to use "vector of pairs (function name, foreach signature)." bcc_assert.h is removed in this commit. This commit is not expected to change any sematics. Change-Id: I6663f66b25176cf970b6d10f742c15e2d302885e
2012-07-12Introduce RSCompilerDriver.Zonr Chang2-0/+366
RSCompilerDriver hosts a Compiler. It brings all things together. Given a RSScript and its output path, RSCompilerDriver::build() either loads the object file from the previous built or runs the compiler to get one. Change-Id: I9664ac6c91dc5c023d164956b889da9e89807b65
2012-07-12Introduce CompilerConfig.Zonr Chang7-1/+517
CompilerConfig defines the "attributes" of a Compiler. It contains target information, configuration, etc. to setup an instance of Compiler (more specifically, a instance of LLVM TargetMachine used by the compiler.) CompilerConfig together with bcc::init::Initialize() will replace current Compiler::GlobalInitialization(). Change-Id: I879b189632093de9bbef130eaa5e74502536951c
2012-07-12Introduce ObjectLoader and RSExecutable.Zonr Chang8-2/+712
ObjectLoader loads an object file into memory. ObjectLoaderImpl defines a set of format-independent interfaces that a object file format loader has to provide. ELFObjectLoaderImpl is a subclass of ObjectLoaderImpl and can be used to load an ELF relocatable object built based on librsloader. It directly uses the C++ APIs provided by librsloader instead of using wrapped C APIs defined in librsloader.h RSExecutable holds the build results of a RSScript. Change-Id: Ib73d3f567fce3dcfea8c9f2c9bc19fbc47ec78bc
2012-07-12Introduce RSInfo and its reader/extractor/writer.Zonr Chang13-48/+1554
This commit only adds files that implements RSInfo class and DOES NOT switch to use it. RSInfo defines the new file format to cache the metadata and RS-specific information from the source bitcode. It's the replacement of the old "MC cache" whose name is ambiguous and some fields within that are deprecated after legacy JIT was removed. Reader of RSInfo reads information from the file we called "RS info file." It will replace MCCacheReader. Extractor of RSInfo extracts information from the metadata section of the source bitcode. It will replace MetadataExtractor. Writer of RSInfo serializes a RSInfo object to a file such that we can load it quickly using RSInfo reader later. It will replace MCCacheWriter. RSInfo unifies the interfaces to get the RS-specific information such as #rs_export_var supplied by the developers either from file (RS info file) or from the source bitcode. Later commit will prove that. RSInfo uses signature ("\0rsinfo\n") which is different from the old MC cache ("\0bcc"). The version (MCO_VERSION in bcc_mccache.h) is increased by 1 in this commit since we remove res_type in MCO_Dependency. RSInfo inherits the version number comes from old MC cache therefore its version number starts with 3. Change-Id: Ie306d26599a3736ff80ccfb8fb6c1355b71872df
2012-07-12Introduce SymbolResolver and its subclasses.Zonr Chang16-127/+412
SymbolResolver provides a clean way to do the symbol lookup at runtime. LookupFunctionSymbolResolver searches a symbol through a given function with context supplied. BCCRuntimeSymbolResolver searches symbol from a predefined symbol-to- address array which replaces the FindRuntime() function defined in Runtime.c previously. SymbolResolverProxy chains the SymbolResolvers and searches the symbol one by one following the chain until it founds the definition of the symbol. Change-Id: I47a8557c0c4be6d0a7ae5c3ac4166fdd1fd26329
2012-06-25Fix mesh test.Shih-wei Liao1-1/+1
Module name can't be same as variable name. Change-Id: I061e64a8e7d4ce1c0ca2c63c6ec3ec9de269bc5e
2012-06-22Handle GCC 4.2 idiosyncracy on Mac.Shih-wei Liao2-2/+2
Change-Id: I722c14e1674bae802048a48e4c3c6a10d5052790
2012-06-22Introduce InputFile/OutputFile and FileMutex.Zonr Chang18-344/+977
FileHandle is replaced with InputFile/OutputFile and FileMutex. Use InputFile when you want to open a file in read-only. USe OutputFile when you open a file for writing. Both of them provide a reliable way to access the files and perform the I/O operations. Given a name "foo", FileMutex creates a file named "foo.lock" and tries to acquire an advisory lock (flock) on this file. FileHandle, which uses the file it's openning for locking, may corrupt the file contents when two or more processes are trying to gain the lock for reading/writing. For example: Process #2 creates foo Process #1 opens foo Process #2 opens foo Process #2 locks foo (exclusively) (success) Process #1 locks foo (failed, retry #1) Process #2 starts writing foo Process #1 opens and truncates foo (note there’s O_TRUNC in the flag) Process #2 writes foo continually (foo is corrupted from now on ...) Process #1 locks foo (failed, retry #2) ... Process #1 locks foo (reach the max retries and return) Process #2 gets done on writing foo (foo is corrupted ...) Process #2 unlocks and closes foo (foo is corrupted) Change-Id: If416383717cc692741e59ff1e387adf90546e36f
2012-06-22Introduce new Script class.Zonr Chang10-977/+1039
Script basically manages a source object to be compiled. Refactor Renderscript stuffs out from class Script to RSScript and extend RSScript from Script (IS-A relation.) No functionality changed. Change-Id: I2fe4b56bef4fd8dc941f98d8276def61e0d8da49
2012-06-19am ca1904d4: am 1957e34d: Merge "Add missed compiler support function for ↵Jean-Baptiste Queru2-19/+5
"/" and "%"" * commit 'ca1904d414062a381350f9081089f32ff12b7006': Add missed compiler support function for "/" and "%"
2012-06-19am 1957e34d: Merge "Add missed compiler support function for "/" and "%""Jean-Baptiste Queru2-19/+5
* commit '1957e34d4367bba5ab414ab8097044afcb3e591b': Add missed compiler support function for "/" and "%"
2012-06-18Add missed compiler support function for "/" and "%"xqian62-19/+5
i386 does not support div for 64bit integer. Thus llvm will generate intrinsic call (__udivdi3, __divdi3, __moddi3 and __umoddi3) for "/" and "%" of 64bit integer. These intrinsic functions are missed in libbcc intrinsic function table on i386 platform. It causes symbol missing failure in basic operator test. This change adds them into the table and fixes the problem. Change-Id: Iea58dced1776a2dc872ff399c41394bbeca4b04d
2012-06-11Refactor SourceInfo into Source.Shih-wei Liao16-508/+591
A Script object is associated with a Source object (HAS-A relation.) A Source object describes the source code (more specifically, the LLVM module) that is going to be compiled. BCCContext contains the context used in a Source object. BCCContext is now managed by the user not the libbcc itself. That is, user should supply the context object when they create a Source object. Change-Id: Icc5e2cab8a673a8e9d4ec1d2df9d612740151e27
2012-06-10Add BCCContext.Zonr Chang8-32/+159
BCCContext manages the global data across the libbcc infrastructure. This includes LLVMContext object required by materialize bitcode into llvm::Module and LLVM compilation infrastructure. Furthermore, BCCContext is escalated to be managed in Script instead of in the SourceInfo. Change-Id: I6b212a29d5144d40b6e9ca1e53b605ddc4d4541c
2012-06-07Remove USE_LOGGER and DebugHelper.c.Zonr Chang1-2/+0
USE_LOGGER is always enabled. DebugHelper.c is no longer required since liblog which containing these functions is statically linked into libbcc for the host build. Change-Id: I9919827b1f8c12c89ead107a546d7d1b9e12a076
2012-06-01Add a property for overriding FP precision.Stephen Hines1-0/+11
adb shell setprop rs_fp_full adb shell setprop rs_fp_relaxed adb shell setprop rs_fp_imprecise Change-Id: Ic7dcba631aeab1046ce928fe8b09122747939870
2012-05-10Properly handle turning off NEON on ARM devices.Stephen Hines1-10/+11
BUG=6127576 Change-Id: I82880a9ef92a3222b5a15e663104aad4bf508392
2012-05-03Update to new llvm::MemoryBuffer::getMemBuffer() interface.Stephen Hines1-1/+1
The latest version of this function checks whether the incoming buffer is NULL-terminated. In the case of bitcode, this is not true, so we need to pass additional arguments to the function to ensure that the assert doesn't trip. Change-Id: Iaab9bdea67387dfaa88dde1f408cfcf654a741af
2012-05-03Revert "Remove USE_LOGGER and DebugHelper.c."Stephen Hines1-0/+2
This reverts commit 57b933381b96bf9e5a80030aa9693dafabd66783.
2012-05-03Revert "Add BCCContext."Stephen Hines8-159/+32
This reverts commit c09dee62ae85df78e72f77900501a359f4a9fd99.
2012-05-03Revert "Refactor SourceInfo into Source."Stephen Hines16-591/+508
This reverts commit 4ce024bcff99bb154f44a73f4cf6201a0fe75917.
2012-05-03Revert "Introduce new Script class."Stephen Hines10-1043/+963
This reverts commit 19218c0731e8172bd0af476779a57da4c30ec77d.
2012-05-03Revert "Introduce InputFile/OutputFile and FileMutex."Stephen Hines18-975/+344
This reverts commit d670be7a08cb85329ff3b5e9039cda9ffa4a35a1. Conflicts: lib/ExecutionEngine/InputFile.cpp lib/ExecutionEngine/OutputFile.cpp Change-Id: I99d5ed4cbda7296a399d683dfa264ce68bc4ddf3
2012-05-03Revert "Introduce SymbolResolver and its subclasses."Stephen Hines16-412/+127
This reverts commit ee69009f3590748aac4db17c0f9774252326d6cb.
2012-05-03Revert "Introduce RSInfo and its reader/extractor/writer."Stephen Hines13-1554/+48
This reverts commit 255cbc8a78131fd828de0fac3ff70baeaa2f032f. Conflicts: lib/ExecutionEngine/RSInfoExtractor.cpp Change-Id: I533398c25cd7fde2a76418101d29374b6e1d2b27
2012-05-03Revert "Introduce ObjectLoader and RSExecutable."Stephen Hines8-712/+2
This reverts commit bf6498ed6b222694ee42c4adda14015d45ca2a3d.
2012-05-03Revert "Introduce CompilerConfig."Stephen Hines7-517/+1
This reverts commit 8b2c3e72f7652bd579bf0467b333090ff7730390.
2012-05-03Revert "Introduce RSCompilerDriver."Stephen Hines2-366/+0
This reverts commit 64a2af1546d6ec98eeb845833e626f87f53d2641.
2012-05-03Revert "Merge lib/Transforms into lib/ExecutionEngine."Stephen Hines6-436/+14
This reverts commit cd52b55716a2e4d78b0a6609b041c3aeb45b40f2.
2012-05-03Revert "Switch to use RSCompilerDriver."Stephen Hines19-795/+3518
This reverts commit fef9a1b0b772034b4f0894d1e2b29d1115617be0. Conflicts: lib/ExecutionEngine/RSCompiler.cpp Change-Id: Ic6f3a3643e286a20799e1c7f03dee5d6c3683fef
2012-05-03Revert "Refine the makefiles."Stephen Hines1-9/+17
This reverts commit fa52e2083927dd4ea543528c557d52ab578ad34c.
2012-05-03Revert "Make libbcc public."Stephen Hines59-27/+6429
This reverts commit 80232dd16c0affb2afae01cde6c94abf23ac1ba8.
2012-05-03Revert "Refine DebugHelper.h into Log.h."Stephen Hines2-2/+2
This reverts commit b519fe3f1d780873608f41d69316054e05c7e918.