History log of /frameworks/compile/libbcc/lib/Renderscript/RSCompilerDriver.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
9e0f8f0c8965834de02d007bb30e1dc950cf9762 12-Apr-2016 Pirama Arumuga Nainar <pirama@google.com> Translate GEP instructions on structs to GEP on int8*


X86 data layout has 64-bit scalars aligned at 4-byte boundaries, while
ARM aligns these data at 8-byte boundaries. To bring frontend- and
backend-generated code into agreement, this patch adds a pass to
translate GEPs on structs to GEPs with int8* operands and byte offsets.
This pass runs only on X86 targets.

Change-Id: I961b2bc7db9f57f15126f27396db42c9deedfd43
(cherry picked from commit d2d5ee3893220cec256c829a4740a718232f84ac)
8e9089377848628813a697b972773e969b942c3b 07-Mar-2016 Pirama Arumuga Nainar <pirama@google.com> Update libbcc for LLVM rebase to r256229


(cherry picked from commit f229c40f0d2da19985e68955aef1a06ce4121e63)

Change-Id: I3d89bb15d0c3e7d64f74656365ed1d472e7de4c7
c31e101bed9d58be0388fead9c7344624978f580 26-Aug-2015 Stephen Hines <srhines@google.com> Fix invalid read of literal (anonymous) structure names on assertion builds.

Bug: 22926131

This change adds support for using libbcc with an assertion-enabled
build of LLVM via the FORCE_BUILD_LLVM_DISABLE_NDEBUG define. It also
restricts the use of getName() on literal structures. Although a
separate patch to frameworks/rs that makes our RS object types not just
typedefs of anonymous structs can fix this safely going forward, our
release builds will need to be able to read legacy bitcode that uses
anonymous literal structure types. Thus, we need the ability to call
getName() on all structures for release builds. In the case of assertion
builds, we will enforce that we are using the updated compiler + headers
so that the structures are not anonymous. If an older compiler + headers
are used in the host compile, the bcc compilation will fail with an
appropriate error message.

Change-Id: Ic2910aed069235b40a31c22b006a4db5c1b9e06c
fe0de789385f766e2dacbcfdb05fa57509db874e 13-Aug-2015 Elliott Hughes <enh@google.com> Lose HAVE_ANDROID_OS from frameworks/compile/libbcc.

Change-Id: I445c64c3a3e571380d2efff39829a8d6cf48b329
efb3af3ba00e8dc9a10130ec66727ebd8c11a2ed 29-Jul-2015 Stephen Hines <srhines@google.com> Fix missing call to setLinkRuntimeCallback() from compat path.

Bug: 22809453

This call was missing from the buildForCompatLib() path, leading to
potential problems with GPGPU drivers that depend on that callback.

Change-Id: I236cf9f6e067d243977fbcce154e79953c9e33aa
656325bdb4751d5606f9e53d8f417bd727032c31 17-Jul-2015 Stephen McGroarty <stephen@codeplay.com> Stopped bcc from ignoring optimization level

Added in a constructor for RSScript which takes in the compiler
config and derives the optimization level from that rather than
defaulting it to opt level 3. Also added in a statement to catch
a null pointer for the case where the llvm-rs-cc produced bitcode
fails verification.

Change-Id: I6efdab6280a9c389268b5a40dc4a50eb9bc24370
Signed-off-by: Stephen McGroarty <stephen@codeplay.com>
ebff2ead4ad622ff1bd3f3c108790cead62fe7c7 22-May-2015 Pirama Arumuga Nainar <pirama@google.com> Screen bitcode for non-RS functions before linking with runtime lib

Bug: 19425238
Bug: 20894432

Perform the screening of non-RenderScript functions in the script before
linking against the runtime lib. Previously, this used to be done after
linking with the runtime lib, LTO passes and just before code

This allows vendors to link against a different runtime library that may
not have all the functions as the CPU reference driver and add new
builtins specific to their driver.

Moreover, symbols introduced by LLVM optimizations no longer need any
special handling.

Change-Id: I5628aa15547a9d56ef7e6550fcb45e8ffa821ade
c2ca742d7d0197c52e49467862844463fb42280f 29-May-2015 David Gross <dgross@google.com> Replace assert() with project-specific version.

Our convention is to use our own form of assertion (bccAssert,
rsAssert, slangAssert) rather than C standard assertion (assert)
because the latter is disabled for the Android build process.
However, a few instances of assert() somehow made it through.

Bug 21444723

Change-Id: I6702268d452317bf0d78304f112fbfafefe3d5b9
750ee65e129a2baef2dc5bb9ad210b45c9184926 17-Apr-2015 Stephen Hines <srhines@google.com> Provide a pass that creates information about global variables in RS.

Bug: 20306487

This change implements RSGlobalInfoPass, which is an optional LLVM pass that
adds several new global variables to a given Module. These variables contain
information about the other RenderScript global variables that are present.

Change-Id: I671013c11c7a528254edad5c66f2858953c0f5c4
186d2f34573eb20de197d8eb8e08bcadd031a9bd 07-Apr-2015 Yang Ni <yangni@google.com> Embed a real chesksum in script group .so

Change-Id: Icf2f37867692f94e344a292fa15f8b85e0fc30a5
a65fba6fd15b14d930809e64c84fb976a893d038 19-Feb-2015 Pirama Arumuga Nainar <pirama@google.com> Remove RSInfo

bug 19602994

RSInfo is no longer used. Script-specific information is now passed via
.rs.info variable in the object file. This patch removes RSInfo and the
old caching path which was closely tied to RSInfo.

Change-Id: Icb62ed848d1a262dd13d5c49652d034fcd0bb943
6da4e253a513feef3405759fef6d0760828808ca 11-Mar-2015 Yang Ni <yangni@google.com> Handle FP precision in kernel fusion


Added a bcc command-line option for the relaxed core lib path.
If the relaxed lib path is provided, it will be used if the merged
module has relaxed FP precision.

Change-Id: I2a641387f0990463887594729a935a5c3f0f856f
0ab50b835805c75ad164466767c2c212f48954cc 16-Feb-2015 Yang Ni <yangni@google.com> Create one single module for a script group

This changed the way we compile a script group. Instead of compiling
each batch into a seperate module, we now compile the whole script
group into one single module, with each batch as a function (of fused
kernels) in that module. This allows invoke to (fused) kernel
communication via globals variables.

Added commoand line options "-merge" and "-invoke". The former
accepts fused kernel names, input kernels, while the latter accepts
new invoke name, and the original invoke function.

Additional changes:

- Bail out on encountering any unexpected bits in the foreach
signature of any kernel to fuse
- Made kernel fusion handle kernels without inputs.
If a kernel only takes global allocations but no inputs, bcc
needs to use a different signature for the fused kernel.
- Included in rs info the exported variables for the fused kernel.
- Keep all metadata in merged module from the input modules. This
would help correctly handling FP precision. (b/19098612)
- Handles Z (b/19610223)

Change-Id: I5553f86b2e58325f85649078d48685a38f12d62f
51ee77bd31e7d8ca6c89e37b5806c8fc2afcf0dc 20-Feb-2015 Pirama Arumuga Nainar <pirama@google.com> Add a -build-checksum flag to bcc

bug 19216507

Add a flag to bcc to pass a build checksum. The checksum is passed to
RSEmbedInfo pass via LLVM metadata.

The old checksum path is tied to RSInfo. Removing this path can be done
along with RSInfo removal.

Change-Id: I3f21c96ddcfe42c16754fbb7749a72595f90964d
77c1d553e5799aef5add08667e71b62b6842ed2e 23-Jan-2015 Tim Murray <timmurray@google.com> Fix -emit-llvm with shared object compilation.

Change-Id: I696f3777a0981a875772d7340970a6cb49581cd7
a4ded1373d7ad3e503f186e65bccf94126a0f020 18-Nov-2014 Yang Ni <yangni@google.com> Compiler kernel fusion for RenderScript.

This was started by Tobias Grosser during his internship at Google in 2013.
This CL includes his original changes and generalization to make it work with
the new proposed ScriptGroup API and made the ImageProcessing processing work
with this.
An enabling CL is needed in the RenderScript runtime, which I will post

Change-Id: Ia73ea917a126a5055ec97f13d90a5feaafd6a2f5
107f50d54d9606e495187d0e89225d3d9fdc1fa9 20-Jan-2015 Stephen Hines <srhines@google.com> Remove linkloader from frameworks/compile/libbcc.

Bug: 18322681

Now that we have switched completely to the new shared library object
loading path, we can safely remove the legacy linkloader path.

In frameworks/compile/libbcc, this removes all of libbccExecutionEngine,
since the loader is now self-contained in libRScpu_ref (similar to the
support library's shared object loader). We also remove support for
all symbol resolvers and the gdb JIT interface (which was already

Change-Id: Ie5cc152d93f5e75383f7c21a4523579cfae8823f
900c6c1f08f7c572125d7d39abe0f0f9eafbfa14 14-Aug-2014 Chris Wailes <chriswailes@google.com> Replace NULL macros with nullptr literals.

Change-Id: Id2311cda59dd42c74b3ed54d3ff6cfd509012738
35978e7a7e87b7147789ff3ca9c3a6bf7dd165b0 11-Aug-2014 Chris Wailes <chriswailes@google.com> Replace android::String8 with std::string in libbcc

Change-Id: Ic384d60f3e2af0ba02990c904212f77cb1493e90
f2ac3176c351cd80bce77fe1488f3de2d0789c1b 26-Jun-2014 Jean-Luc Brouillet <jeanluc@google.com> Use build fingerprint and compile command for caching.

If either of those have changed, we need to invalidate the
compiled bit code.

Change-Id: I9b5cdc19e29237dc7fb2ec1627a167f3f8987702
c5e607adff80a66bc5420baffd299862abdf368d 19-Jun-2014 Jean-Luc Brouillet <jeanluc@google.com> Change cache dependency tracking.

Remove the fix dependencies and make it depend only on the source
hash. More changes coming soon to add dependencies on the Android
build fingerprint and the command line used to compile.

Change-Id: I8964044affccf52326ce286f879307eca79d0b24
b39557ea3f72e1854581aa1f859b2323499389b1 22-May-2014 Stephen Hines <srhines@google.com> Separate out the symbol resolver from RSCompilerDriver.

This change makes compilation distinct from loading. The symbol resolvers
now need to be instantiated directly by the RS driver.

Change-Id: I37ce409f1b2e538d9091c025895e639a250d6466
bde1a2599780d6eaebbc284976ceb690492f6abd 16-May-2014 Stephen Hines <srhines@google.com> Remove unnecessary inheritance for CompilerConfig, as we switch to offline bcc.

Change-Id: Id4a5be7b2b4627bfa7ef6279eb3b5b8e75915a7d
c3437f05c638f8befda59170ae788873db24dc1c 31-Jan-2014 Stephen Hines <srhines@google.com> Improve standalone bcc for on-device compilation.

Bug: 7342767

This adds functionality for driver-writers to dynamically load plugins.
If such a plugin is loaded, we then execute any function called
rsCompilerDriverInit() from it. This function can initialize any other
state the driver-writer wants.

Change-Id: I733a6a3fc59c429a542cfcaf59a57ad231a19d01
045558bd401d0af58a0b57594d75d45ff3035dc9 18-Feb-2014 Stephen Hines <srhines@google.com> Fix disabling global merge option with standalone bcc.

mConfig will be set before entering setConfig so
EnableGlobalMerge needs to be refreshed every time.

Change-Id: Ia51e706e717636ea7a87f625256d21bb050da6db
acf9c9eeb5a07535dbed5b272c7f22cc1b050a40 27-Sep-2013 Stephen Hines <srhines@google.com> resolved conflicts for merge of b9a4701b to klp-dev

Change-Id: I9f7924c489d36913e130fd5e7617e3a96e65f1a1
c9cdca6e9d7c0e4973c7c5f4fcbf1483b06c674d 26-Sep-2013 Stephen Hines <srhines@google.com> Fix windows line ending bug.


Change-Id: I578bab2f41347ac2e43b7d4dc1f206c5f91aeae5
0784365a38fd5a9c08dd484f9ba549328d4dff97 16-Aug-2013 Stephen Hines <srhines@google.com> resolved conflicts for merge of 8607272a to klp-dev

Change-Id: Ic9b996432bfcd228ae8a45f75bc9c564a3a66a31
b10c3a7d91556ef31ce91ef018fee4722b783960 08-Aug-2013 Stephen Hines <srhines@google.com> Update libbcc for LLVM merge to r187914.

Switch over to new llvm::sys::path implementation.
Remove unused Source::CreateFromFd().
F_Binary is now in llvm::sys::fs.

Change-Id: Ib0ebb8a1d8ea04e5cf36c8082cf31dab2e144554
d7a95265621a788a6de8c0c3a27a588d7c466f79 09-Aug-2013 Stephen Hines <srhines@google.com> Remove locking code on Windows builds.

Change-Id: Ia5656cf4feec3206e73ecc3e3b504146b0c66707
c06cd06078a8c866d5cecbf897326092b55a8955 12-Jul-2013 Stephen Hines <srhines@google.com> Only support EnableGlobalMerge on ARM architectures.

Change-Id: I5c4c236c306e120c5aa24fbc91815cc27d7aab0f
ad69476ec040ba9ee07176ccb758aabb5ff6d51c 30-Apr-2013 Stephen Hines <srhines@google.com> Provide a way to disable LLVM's global merge optimization.

Change-Id: I92dff2a208c821722f057dd8c26bd12a1cb5a794
27fb7edfd3f53f52fba6ee81267c02f7896198a3 22-Jun-2013 Tobias Grosser <grosser@google.com> Dump LLVM-IR before generating target code

Dumping the IR earlier prevents target specific passes to modify
the IR before it is dumped.

Change-Id: I8a61efb7140b0c2025381ea1ad1f4cf3522ec870
d0304d59215f8b065332facf6db11d2aec0eb97c 20-Jun-2013 Stephen Hines <srhines@google.com> Merge "Switch to using full pathnames for cached information."
7b980e1717f3cf418f7bc4e40597004bc1139b8b 20-Jun-2013 Tobias Grosser <grosser@google.com> bcc: Add option -emit-llvm

Change-Id: I98470c6573b216518f77d338f4659d5b9fbcc3d3
5eea973c91f1d202c6ecc4f753aa65893a5773a6 20-Jun-2013 Stephen Hines <srhines@google.com> Switch to using full pathnames for cached information.

Bug: 7342767
Change-Id: I8997f4d2834fd607bcfc3bb7db81d8e90b4e4f37
88f8c52abea50f411c3774c935a6a1e04d17c182 13-Jun-2013 Stephen Hines <srhines@google.com> Update libbcc for LLVM merge to r183849.

Remove unused param to readBytes().
Path.h -> PathV1.h
Remove ability to load/run files from bcc tool.

Change-Id: I07d735fb86638412f01c4f8285d56f45ca35b672
47f0d5a8d9ed629a6d58d3e69891f2c7fdee44d9 05-Jun-2013 Stephen Hines <srhines@google.com> Further separate build (compile) and load in libbcc.

Bug: 7342767

Change-Id: Ia6000d6c3557280126c6bb7f945c922528adeedc
01f05d4b45cbde1e07d4707152908c1d843f1328 01-Jun-2013 Stephen Hines <srhines@google.com> Load scripts from cached files every time.

Bug: 7342767

Having an separate in-memory (vs. file-based) loader makes little sense as
we refactor libbcc (to separate it into its own process space). This change
is a first step in cleanly separating the compile and link steps.

Change-Id: Iad67527329171f18475ced0f0b2652a0aa060259
b81d697ec617be24494b622a3532f1c465264415 22-May-2013 Nick Kralevich <nnk@google.com> Renderscript: Don't call property_get on host

Accessing system properties only makes sense on the target, not
on the host.

This change is needed to remove host support for properties.

Change-Id: I41a34bdeae6a1e9a1481f2ecc80e69ead3bd0556
c89f78b40e7823eb2d08e7129794c9f6f1992c08 09-May-2013 Tim Murray <timmurray@google.com> Remove extraneous logging.

bug 8888887

Change-Id: Ief798e6e139fd4971ce53f090004478f4e036a03
1d4a9e4646e8786623daa6ac3917782be56a8fb2 18-Apr-2013 Stephen Hines <srhines@google.com> Improve caching for debug contexts.

Bug: 7343201

We now skip caching on debug contexts and destroy the cached script copy
when we are finished with it. This is a temporary fix until we can refactor
libbcc caching.

Change-Id: I356b67419dc246209c7b5e077264b0cf2e42578c
06731a6150ae8014d37258d5f32ef8bc14a3db63 13-Feb-2013 Stephen Hines <srhines@google.com> Add LinkRuntimeCallback() and supporting functions to RS compiler.

Change-Id: I7745406a94ba74896ee98752a3de106d2672159d
3ab9da1e1b3d7794994393af086d096397fb84db 02-Feb-2013 Stephen Hines <srhines@google.com> Fix bcc_compat symbol resolution with libcompiler_rt.so.

Change-Id: Id6177e53ec9647b560a73de566d2d8a95d860200
09ca95426a7ec66def02e47048bb25289759c6fb 26-Jan-2013 Shih-wei Liao <sliao@google.com> Switch to use libcompiler_rt for compiler runtimes.

Change-Id: I64b3d4ba80343bc592fa0df72242b33b2d2ae0ed
86a0b797c221d4c3373dc10c8229b75b6747f6e7 07-Nov-2012 Stephen Hines <srhines@google.com> Embed RS metadata info directly in emitted object code.

Bug: 7419958
Change-Id: Ibd82e503c006532aa74013a46dd13ec3e9473daa
331310e1f3f86a795f78e42b3f03558a43829f09 27-Oct-2012 Stephen Hines <srhines@google.com> bcc_compat - convert bitcode to shared object files.

BUG: 7419958

Change-Id: Ie81203b460d60425780657b51ba3aba2b2b77e05
e198abec6c5e3eab380ccf6897b0a0b9c2dd92dd 28-Jul-2012 Stephen Hines <srhines@google.com> Rename RenderScript -> Renderscript.

Change-Id: I187928033b47f3e3f4cb811a0b3562f479cfe417