• Home
  • History
  • Annotate
  • only in /frameworks/compile/libbcc/bcinfo/
History log of /frameworks/compile/libbcc/bcinfo/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
bcb03e5437a811eeaf1dfa895bfe93d841e76660 11-May-2017 David Gross <dgross@google.com> Strip unknown attributes during bitcode translation.

We need to remove attributes unknown to old versions of LLVM before
writing out bitcode, to avoid errors when writing or reading the
bitcode.

Why do we need to strip unknown attributes during bitcode translation
(which always translates from an older version of bitcode to a newer
version of bitcode), even if the input .bc does not contain those
attributes? Because the LLVM bitcode reader calls
llvm::UpgradeCallsToIntrinsic() to canonicalize the attributes of
intrinsic functions. For example, rslist.bc from RsTest_11 contains
calls to @llvm.lifetime.start and @llvm.lifetime.end, which get
canonicalized to have the argmemonly attribute.

Remember that we're writing an old fixed version of bitcode, older
than the "native" LLVM IR we're using, so there may be attributes in
that IR that are not representible in that old fixed version of
bitcode. Furthermore, argmemonly is one of a set of attributes that
seem to be designed as "transient" -- they can appear in the IR
(possibly only on intrinsics, or as the result of some analysis?) but
can never appear in bitcode.

Bug: 37720701

Test: aosp_angler-eng FORCE_BUILD_LLVM_DISABLE_NDEBUG=true
1) slang/tests
2) slang/lit-tests
3) RsTest (32-bit, 64-bit)
4) RsTest_11
5) cts -m RenderscriptTest

Change-Id: I42374acb34029f7cf5a3dbf7d9a701250d53ecc8
ndroid.bp
itcodeTranslator.cpp
cf5afcb229806de1b62dee5a7cc0c7ba6a69f482 20-Mar-2017 David Gross <dgross@google.com> Make bitcode wrapper info available to MetadataExtractor.

Copy bitcode wrapper information (compiler version, optimization
level) from bitcode wrapper to Module metadata, where it can be found
by MetadataExtractor instantiated from Module. Previously, such a
MetadataExtractor ignored the information in the bitcode wrapper;
instead, it
- nonsensically set compiler version to RS_VERSION, which is an API
level rather than a slang version; and
- set optimization level to 3.

Remove unused MetadataExtractor::getTargetAPI():
- Old behavior:
- For user bitcode, got actual targetAPI.
- For libclcore, got 0.
- For linked bitcode (user bitcode + libclcore), got
uninitialized/garbage value.
- It's not clear what a sensible value would be for libclcore or for
linked bitcode (or perhaps it should be an error to query the
targetAPI in those cases). What a sensible value would be depends
on how we intend to use it.

This change enables a forthcoming libbcc change that needs to know the
slang version.

Bug: http://b/29154200
Bug: http://b/28070272

Test: full_fugu-eng
Tried ( modified slang, modified bcc) and
(unmodified slang, modified bcc):
- libbcc/tests/run_lit_tests.sh; RsTest; cts -m RenderscriptTest
- confirmed that our driver is loaded rather than libPVRRS.so
- By instrumenting modified bcc and running RsTest, confirmed
that:
- MetadataExtractor properly obtains slang version from Module.
"Modified slang" is a forthcoming slang change that changes
the slang version.

Change-Id: Ifc9c1348c96a88bf7ddb344721f67f89359a4fe6
etadataExtractor.cpp
nclude/bcinfo/MetadataExtractor.h
110b1c1e87fe4a6a25f9ddc89ac4685779329b9d 03-Mar-2017 Miao Wang <miaowang@google.com> Make libbcc, libbcinfo, bcc no longer depend on libcutils and libutils.

Bug: 34396220
Test: mm and CTS tests pass
Change-Id: I9a5e608dfc2a92e411da5c7cff2406209052715d
ndroid.bp
etadataExtractor.cpp
2a2fd29ef74aa644bc830d376cc30aa7095d0825 22-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Disable static analyzer warning for google-runtime-int."
b3a2a97e6fc1bdf3a82bdcddc58cae3470b8c9ad 22-Feb-2017 Luis A. Lozano <llozano@google.com> Disable static analyzer warning for google-runtime-int.

User code is doing the right thing by passing "long" when
that is what fseek expects.

This is the warning that will be disabled:

file_wrapper_input.cpp:63:24: warning: consider replacing 'long' with 'int64' [google-runtime-int]

Bug: 28220065
Test: verified warning is not emitted anymore.
Change-Id: I8dbaf8be481f8e10575e6e45d7d0977d04a17461
rap/file_wrapper_input.cpp
4abd7a526dd489b2649bdbe1f890b80fbbe1d90a 17-Feb-2017 Jean-Luc Brouillet <jeanluc@google.com> Remove needless include for bcinfo

bcinfo does not depend on libbcc

Bug: 34265954
Test: Compiled bcinfo
Change-Id: I5d3dd3dd0fd80e739689aacd61c66fa8291c05f8
ools/Android.bp
2d6f9f225f6d8d64fbbc7fbe28b4cc88c1855264 08-Feb-2017 Luis A. Lozano <llozano@google.com> Disable clang tidy checks under BitReader*.

We don't control those files. We cannot fix warnings in them.
No point in getting tidy warnings on them.

Bug: 26936282
Test: WITH_TIDY=1 WITH_STATIC_ANALYZER=1 mm has no more warnings.
Change-Id: I6bf3e5d266f19512b382bc39de9ce09946ec4e2d
itReader_2_7/Android.bp
itReader_3_0/Android.bp
45eda8d41e23a5d38196fcf814765010e8c93b66 24-Jan-2017 Pirama Arumuga Nainar <pirama@google.com> Export llvm_3_2::WriteBitcodeToFile from libbcinfo.so

This function is used by a vendor driver.

Test: Build libbcinfo.so and check that this symbol is exported.
Change-Id: If8087cd6546bffeedfc0bd3b14790a043affc0dd
ibbcinfo.map
6a07535c8fe039b509c0dbd164b2436f1a635c5a 10-Jan-2017 Mark Salyzyn <salyzyn@google.com> liblog: use log/log.h when utilizing ALOG macros

Test: compile
Bug: 34250038
Change-Id: I65a106104f30daad7fa19eefe0d6fef743824478
itcodeWrapper.cpp
d5c690148285e5c3a396ff0a48a3c20bdd833dd5 10-Jan-2017 Mark Salyzyn <salyzyn@google.com> liblog: use log/log.h when utilizing ALOG macros

Test: compile
Bug: 30465923
Change-Id: I5dcef0e7708f018d3dea2a8184115b7aeb941686
itcodeTranslator.cpp
etadataExtractor.cpp
rap/bitcode_wrapperer.cpp
d3a5bd09d9b79763d72b4c56075070c5e74e4755 17-Dec-2016 Colin Cross <ccross@android.com> Move bcinfo headers next to library

Move the bcinfo headers into bcinfo/include, and export the headers
to modules that depend on libbcinfo.

Test: m -j native
Change-Id: If50c88424055a754f5626201d8f05a9c404f24b9
ndroid.bp
rap/Android.bp
nclude/bcinfo/BitcodeTranslator.h
nclude/bcinfo/BitcodeWrapper.h
nclude/bcinfo/MetadataExtractor.h
nclude/bcinfo/Wrap/BCHeaderField.h
nclude/bcinfo/Wrap/bitcode_wrapperer.h
nclude/bcinfo/Wrap/file_wrapper_input.h
nclude/bcinfo/Wrap/file_wrapper_output.h
nclude/bcinfo/Wrap/in_memory_wrapper_input.h
nclude/bcinfo/Wrap/support_macros.h
nclude/bcinfo/Wrap/wrapper_input.h
nclude/bcinfo/Wrap/wrapper_output.h
d9758aaecf5093f2a506364f1bfc226b00aa72d0 13-Dec-2016 Colin Cross <ccross@android.com> Remove llvm-generated-headers

Generated headers are now part of llvm-defaults.

Test: mma -j
Change-Id: I23e5d93d8693d7dff99ae716e830d8712e752007
ndroid.bp
itReader_2_7/Android.bp
itReader_3_0/Android.bp
ools/Android.bp
1d3ac5662519c1864922c2edfba7a0f7a3de16b3 07-Dec-2016 Colin Cross <ccross@android.com> Convert libbcc to Android.bp

See build/soong/README.md for more information.

Includes one small code change to replace
FORCE_BUILD_LLVM_DISABLE_NDEBUG with _DEBUG, which is set already in
llvm-defaults in external/llvm/soong/llvm.go when the environment
variable is set.

libbcc-targets.mk remains, it is still used by frameworks/rs/cpu_ref.

Reapplies Iec37d2c33020bb5702c27497ae343a8312601202 with libbcinfo's
version_script only applied on device builds, and only building 64-bit
for host.

Test: mma -j
Test: mma -j FORCE_BUILD_LLVM_COMPONENTS=true
Change-Id: I6a024929bf90368f81f47c72f0c48866efc0e635
ndroid.bp
ndroid.mk
itReader_2_7/Android.bp
itReader_2_7/Android.mk
itReader_3_0/Android.bp
itReader_3_0/Android.mk
rap/Android.bp
rap/Android.mk
ools/Android.bp
ools/Android.mk
7e4c6d72d977de3e3635bc7280f52ab737c1ad34 13-Dec-2016 Colin Cross <ccross@android.com> Revert "Convert libbcc to Android.bp"

This reverts commit 5a2d24e315d79f735eeb8b6560118f10edbd6b05.

Reason for revert: breaks mac build

Change-Id: I6429aaddea2c2cc1e71c5ab66d656392a112bd8f
ndroid.bp
ndroid.mk
itReader_2_7/Android.bp
itReader_2_7/Android.mk
itReader_3_0/Android.bp
itReader_3_0/Android.mk
rap/Android.bp
rap/Android.mk
ools/Android.bp
ools/Android.mk
5a2d24e315d79f735eeb8b6560118f10edbd6b05 07-Dec-2016 Colin Cross <ccross@android.com> Convert libbcc to Android.bp

See build/soong/README.md for more information.

Includes one small code change to replace
FORCE_BUILD_LLVM_DISABLE_NDEBUG with _DEBUG, which is set already in
llvm-defaults in external/llvm/soong/llvm.go when the environment
variable is set.

libbcc-targets.mk remains, it is still used by frameworks/rs/cpu_ref.

Test: mma -j
Test: mma -j FORCE_BUILD_LLVM_COMPONENTS=true
Change-Id: Iec37d2c33020bb5702c27497ae343a8312601202
ndroid.bp
ndroid.mk
itReader_2_7/Android.bp
itReader_2_7/Android.mk
itReader_3_0/Android.bp
itReader_3_0/Android.mk
rap/Android.bp
rap/Android.mk
ools/Android.bp
ools/Android.mk
cc4781e8ffe338af23419c264b3640a1e755851c 28-Nov-2016 Stephen Hines <srhines@google.com> Merge "libbcc: fix memory leak warnings."
50e1658b7b53a005eaaa71d80ba8f8f232915342 11-Nov-2016 Pirama Arumuga Nainar <pirama@google.com> Do not link libLLVM.so into libbcinfo.so

Bug: http://b/28866258

For the on-device libbcinfo.so, statically link required LLVM static
libraries into libbcinfo.so and export just the symbols in the bcinfo
namespace.

After this change, libLLVM.so should no longer get loaded during zygote
initialization. libbcinfo.so increases by roughly 700K for 32-bit and
900K for 64-bit.

Test: RenderScript CTS tests on Angler and libbcc lit tests pass (except
for 1 known failure)

Change-Id: If2f07336b09028b113086987f3ff02520b6aef92
ndroid.mk
ibbcinfo.map
d389fdd75cab6b3ad25a499599761726e3840bcb 19-Oct-2016 Luis Lozano <llozano@google.com> libbcc: fix memory leak warnings.

Found by clang-tidy.

Test: RS CTS + libbcc/tests/run-lit-tests.sh
Change-Id: I552a0dd0a4bb37423ca0190027fa48a7cf2fc6f0
etadataExtractor.cpp
91ba4090d438e91d9b0f3d6bb777685418bf79e6 27-Oct-2016 Stephen Hines <srhines@google.com> Re-enable libbcc as a loadable plugin.

Bug: http://b/32448087

There is no OS-specific suffix support for
LOCAL_ALLOW_UNDEFINED_SYMBOLS, so I specify this now for all host
builds, rather than just Linux (which is the only consumer of the plugin
today).

Test: Built successfully and was able to run the loadable plugin tests
from tests/run-lit-tests.sh successfully.

Change-Id: I1090ab569e76579707456c65071717f7c94d46f7
ndroid.mk
1cc8b4e81a483ad23b685ebfda4f8daec8744493 25-Oct-2016 Stephen Hines <srhines@google.com> Allow undefined symbols if we are loading libbcc dynamically.

Bug: http://b/31320715
Bug: http://b/32305815

Test: Run RenderScript tests (host tests for slang and libbcc, RsTest,
CTS)

Change-Id: I0c5d9f8b6c7d9c59893f5adb1da748b280c99f82
ndroid.mk
f5b49a0ca149b09c8306b86db9f3aca703c4acd5 16-Sep-2016 Pirama Arumuga Nainar <pirama@google.com> Fix libbcc to compile with LLVM r275480

Bug: http://b/31320715

Test: Run RenderScript tests (host tests for slang and libbcc, RsTest,
CTS)

Change-Id: Id3f0d03ef019f9315216e7f7ac4cf60883719ad7
itReader_2_7/BitcodeReader.cpp
itReader_3_0/BitcodeReader.cpp
ools/main.cpp
b5517abca2dc8bbc49a4bebeb618c7c657ba8cd7 29-Sep-2016 Mark Salyzyn <salyzyn@google.com> libbcc: Replace cutils/log.h with android/log.h

Should use android/log.h instead.

Test: compile
Bug: 26552300
Bug: 31289077
Change-Id: I932dcd8b71d0e2d3a4c908ee96e00afdda7713c6
itcodeTranslator.cpp
itcodeWrapper.cpp
etadataExtractor.cpp
rap/bitcode_wrapperer.cpp
8a019dd0040bedf5078e4d18e06a244a675b80e8 13-Aug-2016 Chih-Hung Hsieh <chh@google.com> Fix clang-tidy warnings in libbcc.

These are proposed changes, looking for upstream changes.
* Add explicit keyword to conversion constructors.
Bug: 28341362
* Use const reference type for read-only parameters.
Bug: 30407689
* Use const reference type for loop index variables to avoid unnecessary copy.
Bug: 30413223
* Use faster overloaded string find function.
Bug: 30411878
Test: build with WITH_TIDY=1

Change-Id: I2a083651ba7aa7cb1b88fb84738d7caf37b4f511
itReader_2_7/BitReader_2_7.h
itReader_2_7/BitcodeReader.cpp
itReader_3_0/BitReader_3_0.h
itReader_3_0/BitcodeReader.cpp
9fa4d4480252ecfe08c97bc35888360b1e19ec99 02-Jun-2016 David Gross <dgross@google.com> Delete simple reduction implementation.

Bug: 27298560
Change-Id: Id826426fc81458ad66118bf7b2059a7a6f02a047
(cherry picked from commit a48ea364652efcf947dd33c8a6ba893e9c00dd6a)
etadataExtractor.cpp
ools/main.cpp
7e920a716693033edf32a6fedd03798bbfbd85eb 29-Apr-2016 Chih-Hung Hsieh <chh@google.com> Fix google-explicit-constructor warnings.

Bug: 28341362
Change-Id: Ic1bb4f0eb47fa4f1b2118d0ed5bb668ba555c801
itReader_2_7/BitcodeReader.cpp
itReader_3_0/BitcodeReader.cpp
f229c40f0d2da19985e68955aef1a06ce4121e63 07-Mar-2016 Pirama Arumuga Nainar <pirama@google.com> Update libbcc for LLVM rebase to r256229

http://b/26987366

Change-Id: Ib5459acda9c4e612948290d0f68456dd4dc414af
ndroid.mk
itReader_2_7/Android.mk
itReader_2_7/BitcodeReader.cpp
itReader_3_0/Android.mk
itReader_3_0/BitcodeReader.cpp
etadataExtractor.cpp
ools/Android.mk
ools/main.cpp
34383a2fcec623b8696308d36e9522afb0c5b23d 18-Feb-2016 David Gross <dgross@google.com> Metadata extractor must tolerate missing accumulator function.

Looking up a general reduction accumulator function by name can fail,
just as looking up a foreach kernel function by name can fail: One of
the uses of MetadataExtractor is as part of the RSEmbedInfoPass, which
bcc_compat runs sufficiently late in the phase order that
RSKernelExpandPass has already run and the original (UNexpanded)
accumulator function may have been deleted as having no references (if
it has been inlined into the expanded accumulator function and is
otherwise unreferenced).

Bug: 23535724
Change-Id: I41b1fc9cc5c780174ddf9b85af71cb3381928bcf
etadataExtractor.cpp
9197d612935852c05a641bc3418f79edaf402932 03-Feb-2016 David Gross <dgross@google.com> Rename #rs_export_reduce_new to #rs_export_reduce.

This brings general reduction metadata into conformance with the
specification and removes simple reduction metadata, thereby
disabling simple reduction. More work will be done later to
fully remove the simple reduction implementation.

Requires a corresponding change in frameworks/compile/slang.

Bug: 23535724
Change-Id: I7effa0ab1cd4ecd75f32e0c8509a737cfbb52dbd
etadataExtractor.cpp
fff398dc41bb579c7ad668387eebf9e3e972aeca 25-Nov-2015 Dean De Leo <dean@codeplay.com> Deduce whether the module contains debug info.

Add functionality to the MetadataExtractor to deduce whether the
module contains debug info. This method will be used to deduce
whether we should link with a special runtime library with debug
information.

Change-Id: I8ebe8c465c785adfb2b24864714e654f49c12c6d
etadataExtractor.cpp
79e1a05f704ada1bb12749fe3f8b9b69309be9e5 11-Jan-2016 David Gross <dgross@google.com> Metadata support for general reduction.

Needs corresponding change in frameworks/rs: The driver and bcinfo
need to remain precisely in sync with regard to metadata format in
order for RenderScript to work at all.

Also fixed memory leak in MetadataExtractor.

Bug: 23535724
Change-Id: I6857f605c79139bdce362a7aeef73c91fc502ff6
etadataExtractor.cpp
ools/main.cpp
6af50b75fc0132a9957f19a11357c446b4836b16 19-Aug-2015 Dan Willemsen <dwillemsen@google.com> Stop using HOST_OS, whitelist windows modules

Bug: 23566667
Change-Id: I7ef9d73b897788ed4c8a8d8ca9a582cc08af15f9
ndroid.mk
itReader_2_7/Android.mk
itReader_3_0/Android.mk
rap/Android.mk
7648c3864074dd3954bd7402a8de2c271dcee186 15-Aug-2015 Stephen Hines <srhines@google.com> Merge "Update libbcc for LLVM rebase to r239765"
fe0de789385f766e2dacbcfdb05fa57509db874e 13-Aug-2015 Elliott Hughes <enh@google.com> Lose HAVE_ANDROID_OS from frameworks/compile/libbcc.

Change-Id: I445c64c3a3e571380d2efff39829a8d6cf48b329
etadataExtractor.cpp
e56ba8b69613ff50e0b3321b58592d1cc19f54c5 07-Aug-2015 Dan Willemsen <dwillemsen@google.com> Merge "build: All paths are TOP-relative"
adfbff4a860c1ac71165332f40d23c5297d8d74d 07-Aug-2015 Dan Willemsen <dwillemsen@google.com> build: All paths are TOP-relative

No need to use $(LOCAL_PATH)/../../../../../external/llvm, just
external/llvm works.

Change-Id: Icfbd1eb3345b4b496d58c715970234537449c4c7
itReader_2_7/Android.mk
itReader_3_0/Android.mk
rap/Android.mk
999d924f58fb97cc7b888c51095a83cf74971e3d 04-Aug-2015 Matt Wala <wala@google.com> If the host supports it, build libbcc as an LLVM loadable module.

Change-Id: I5c34e596c4a81944e286b44cc10688a0187e30f4
ndroid.mk
a6485fc1b7a45c54846bf8bfbf04fc30e5acaf8f 24-Jul-2015 Stephen Hines <srhines@google.com> Revert "Change libbcc so that it compiles as an LLVM loadable module (try 2)."

This reverts commit b58df0c96e17a33741adc8116af77ba16882bbfc.

Revert "Add libLLVM to LOCAL_LDLIBS so that the mac build can link correctly."

This reverts commit 90d862c2ff39787cbe377131294d29b1965706c7.

Both patches are reverted since this exposed a different Linux breakage
(when we aren't using FORCE_BUILD_LLVM_COMPONENTS).
ndroid.mk
90d862c2ff39787cbe377131294d29b1965706c7 24-Jul-2015 Stephen Hines <srhines@google.com> Add libLLVM to LOCAL_LDLIBS so that the mac build can link correctly.

Change-Id: Ic8bdf6b2978ba23064d4150742be857de02381fc
ndroid.mk
3950457e390cf6b81bd8807562b370293c6f52ce 24-Jul-2015 Stephen Hines <srhines@google.com> Merge "Change libbcc so that it compiles as an LLVM loadable module (try 2)."
b58df0c96e17a33741adc8116af77ba16882bbfc 21-Jul-2015 Stephen Hines <srhines@google.com> Change libbcc so that it compiles as an LLVM loadable module (try 2).

The main change is not requiring libLLVM in the makefile for libbcc.
With this change, libbcc can be used as an LLVM loadable module, for
instance as in "opt -load libbcc.so". This is helpful for debugging
individual bcc passes. Note that we still must link directly against
libLLVM on Windows due to the fact that DLLs can't access unresolved
symbols.

Revert "Revert "Change libbcc so that it compiles as an LLVM loadable module.""

This reverts commit a2bbdcdec92f076a38e75bbd81542fc49da19862.

Change-Id: I6729c2fed8542579ad76fcc533db091138f5575e
ndroid.mk
1895ac12bda8ebb1097dd3336e0919e2f08cbc4a 17-Jul-2015 Matt Wala <wala@google.com> libbcc: Add support for reduce kernel metadata.

Bug: 22631253

This change implements recognizing the #rs_export_reduce metadata
node for reduce-style kernels in libbcc and bcinfo.

Change-Id: I5323f607f7ac474d0f7b79486a2bbe900680e330
etadataExtractor.cpp
ools/main.cpp
a2bbdcdec92f076a38e75bbd81542fc49da19862 21-Jul-2015 Stephen Hines <srhines@google.com> Revert "Change libbcc so that it compiles as an LLVM loadable module."

This reverts commit 0eb3c42fedcd0a9770be27ae43f42f20b0fd7dea.
ndroid.mk
0eb3c42fedcd0a9770be27ae43f42f20b0fd7dea 21-Jul-2015 Matt Wala <wala@google.com> Change libbcc so that it compiles as an LLVM loadable module.

The main change is not requiring libLLVM in the makefile for libbcc.
With this change, libbcc can be used as an LLVM loadable module, for
instance as in "opt -load libbcc.so". This is helpful for debugging
individual bcc passes.

Change-Id: I6565694738c85baac7282a8dd24604f3d94cf783
ndroid.mk
933b5a904f7215c692b41a1c0481f4ea5f4abde1 01-Jul-2015 Pirama Arumuga Nainar <pirama@google.com> Update libbcc for LLVM rebase to r239765

Change-Id: I32e347ab622099adc0bb77f6da90c7f14fac4ef5
itReader_2_7/BitcodeReader.cpp
itReader_3_0/BitcodeReader.cpp
fb81ec1a875d13d9750006313b9123903336101d 19-May-2015 Stephen Hines <srhines@google.com> Provide additional information about global variables.

Bug: 20306487

This patch extends our global information pass to include details about the
type of a global variable, whether or not it is static, constant, or a
pointer. It also refactors code that deals with conversion between
RenderScript's internal data types and LLVM's type system. A subtle bug
has also been fixed with respect to the RSInvokeHelperPass. The previous
version could ignore an rs_* object that did not have a numeric suffix.
The new helper function properly addresses cases like this.

Change-Id: If9c933a885bf6a9063b7edec3f0873e1b144188d
ndroid.mk
etadataExtractor.cpp
e57fde54a4145a85439545f79bd8747682f86ded 15-May-2015 Pirama Arumuga Nainar <pirama@google.com> Merge "Update libbcc for rebase to LLVM r235153"
98137cca7eebca946b869b010fef2821c9bf4971 06-May-2015 Pirama Arumuga Nainar <pirama@google.com> Update libbcc for rebase to LLVM r235153

Some changes related to GEP may impact us in the future:
- GEP constructors take an additional argument - the pointee type of the
resulting pointer. Update bitcode readers accordingly. They take
nullptr for now. This behavior should be retained at least for 3.x.
- Likewise, CreateStructGEP and CreateConstInBoundsGEP2_32 need the
pointee type argument. Passing nullptr for the extra argument for
now. According to commit message in r233938, passing nullptr may not
work in the future. Unlike the BitcodeReaders, we can pass the right
pointee type here. b/20886457 is created to track this issue.

Change-Id: I2450da1c36470fb9defd387d74360480c3e4bd2f
itReader_2_7/BitcodeReader.cpp
itReader_3_0/BitcodeReader.cpp
578f35e6e76b1beb5bd252c876446b70afe5202c 13-May-2015 Stephen Hines <srhines@google.com> Remove stale TODOs from Android.mk files.

Change-Id: Ic2f07c5a62322be752a34c1bde8fc116d057bf1a
ndroid.mk
e1c7d298e3e38ffff294ce57c37ab43827a67ee5 15-Apr-2015 Stephen Hines <srhines@google.com> Make better use of getStringOperand() for MetadataExtractor.

This change also cleans up some of the code from a prior rebase.
It also captures two additional broken metadata cases (from corrupt
object slot and/or pragma metadata).

Change-Id: I61e161d2b0e211349683e36160d564493d802a12
etadataExtractor.cpp
5cb1f3949c5bdd43c84647920d147a6b8509e256 07-Apr-2015 Stephen Hines <srhines@google.com> Update libbcc for LLVM rebase to r233350.

- Remove direct calls/use of DataLayoutPass.
- Move BitcodeReader.h (declarations) into BitcodeReader.cpp files.
- Fix typed/untyped GEP.
- Add empty materializeMetadata(), since we don't defer it ever.
- Fix longstanding (but insconsequential) difference between
bitc::CST_CODE_INLINEASM and bitc::CST_CODE_INLINEASM_OLD.

Change-Id: I135e494beea2f5992db1cb5c038d52cced991e72
itReader_2_7/BitcodeReader.cpp
itReader_2_7/BitcodeReader.h
itReader_3_0/BitcodeReader.cpp
itReader_3_0/BitcodeReader.h
0947923cf0ae67d85e068877bd13aa4a6c9d6dd4 02-Apr-2015 Stephen Hines <srhines@google.com> Add MetadataExtractor::getTargetAPI().

This information was previously only available to the wrapper/translator,
but would also be useful to provide to the driver/runtime.

Change-Id: Ia3f1331730b526488632d05091917d1540be125d
etadataExtractor.cpp
1bd9f627fa0affb457507e86b0b6684c695fe726 18-Mar-2015 Stephen Hines <srhines@google.com> Update libbcc for LLVM rebase to r230699.

Change-Id: If6717d2df5cc74e7daa493a4be7ac891f8e4928f
itReader_2_7/Android.mk
itReader_2_7/BitReader_2_7.h
itReader_2_7/BitcodeReader.cpp
itReader_2_7/BitcodeReader.h
itReader_3_0/Android.mk
itReader_3_0/BitReader_3_0.h
itReader_3_0/BitcodeReader.cpp
itReader_3_0/BitcodeReader.h
etadataExtractor.cpp
3b43c366c17620e35c6a4395a13b41ca3e977596 10-Mar-2015 David Gross <dgross@google.com> Merge "Backend support for new special kernel params ctxt and z."
33cda5cf335afc6aa2dbe02062bc9e6649e1f87c 30-Jan-2015 David Gross <dgross@google.com> Backend support for new special kernel params ctxt and z.

Also:
- Modify bcinfo dump to show signature metadata in hex instead of dec.
- Teach LLVM pass manager about (existing) "foreachexp" pass.
- Create MetadataSignatureBitval symbolic names for use by libbcc and slang.

Bug: 18964628

Change-Id: I1737ee0476b2005ec87f30473bbfa35aed5ded38
etadataExtractor.cpp
ools/main.cpp
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
etadataExtractor.cpp
9fe081b8bae8a95d903f8fa8dc0a7590ae706606 27-Jan-2015 Pirama Arumuga Nainar <pirama@google.com> Mark whether a script is threadable

bug 19095896

Add a pass to check for calls to non-threadable functions. We add a
metadata flag to store the result. RSEmbedInfo also adds this
information to .rs.info.

Change-Id: Iba9a41b338d21a3529a1092656a51be985910fca
etadataExtractor.cpp
34edb8ad024934c13741550bc825c9b352453ad8 19-Dec-2014 Stephen Hines <srhines@google.com> Remember to mark functions as materializable (or they are only "declared").

Bug: 18761789

Several relevant changes were made to BitcodeReader that we failed to update
on the last rebase. This results in functions not being properly translated
to the latest bitcode revision (which then causes the compiler to fail).
BitcodeReader::isMaterializable() is dead code, so I removed it as part of
this change, along with a missed 0 -> nullptr update.

Change-Id: Ifa5dfe4b146e1469e937fda0a107bb2c21936071
itReader_2_7/BitcodeReader.cpp
itReader_2_7/BitcodeReader.h
itReader_3_0/BitcodeReader.cpp
itReader_3_0/BitcodeReader.h
dc31b1cf67e4997f511eb22d6589a45e3e57209d 18-Dec-2014 Stephen Hines <srhines@google.com> After translation, the bitcode version is now the most up-to-date.

Marking the version as something old just triggers retranslation, which
is bad in all sorts of ways with standalone bcc (and/or bcinfo).

Change-Id: If175f1860a0a035964cab7f1ae5a9abf9253bef5
itcodeTranslator.cpp
579361346abc6696c805e3904a18178ebce4e4a3 26-Nov-2014 Stephen Hines <srhines@google.com> Update libbcc for LLVM rebase to r222494.

Change-Id: Idebd60a98bbe62007086386e5497d1df7d901e3d
itReader_2_7/BitReader_2_7.h
itReader_2_7/BitcodeReader.cpp
itReader_2_7/BitcodeReader.h
itReader_3_0/BitReader_3_0.h
itReader_3_0/BitcodeReader.cpp
itReader_3_0/BitcodeReader.h
itcodeTranslator.cpp
etadataExtractor.cpp
ools/main.cpp
d426b8ad4fb4a37accf3625072a8bda55df9c0fa 08-Nov-2014 Stephen Hines <srhines@google.com> Merge "Fix format-string-related warnings for size of various types."
4cb4c555b4d339644fe9d13cdc45093721d0896e 07-Nov-2014 Stephen Hines <srhines@google.com> Fix format-string-related warnings for size of various types.
ools/main.cpp
b70f27af63b60e36b922dad19056103003bb3506 06-Nov-2014 Stephen Hines <srhines@google.com> am 4c94acac: Merge "Revert "Fix format-string-related warnings for size of various types.""

* commit '4c94acac3192ebaf86d1d3f6b650bb2c29255010':
Revert "Fix format-string-related warnings for size of various types."
741d9e1a0bc4bc1d8d4a5c25429c206428b134e8 06-Nov-2014 Stephen Hines <srhines@google.com> am 8b63df9e: Merge "Fix format-string-related warnings for size of various types."

* commit '8b63df9eed7c5a2bc8b05bb4d604739dde34a888':
Fix format-string-related warnings for size of various types.
288ad8e7a4e1ef9be741290af39eaeabec1ff21c 06-Nov-2014 Stephen Hines <srhines@google.com> Revert "Fix format-string-related warnings for size of various types."

This reverts commit 4418cf185eac9e82ba912e3f5ee3b80d518bf3da.

Change-Id: Iff80917cddc3a240d9fffa5d23cb2d67c1413da3
ools/main.cpp
4418cf185eac9e82ba912e3f5ee3b80d518bf3da 05-Nov-2014 Stephen Hines <srhines@google.com> Fix format-string-related warnings for size of various types.

Change-Id: Iac94c2925919c729810d842f4251fbe90304fb84
ools/main.cpp
e7c5289801f9a6341cc993abf70cf4ac559317e4 02-Oct-2014 Stephen Hines <srhines@google.com> am 8f5c2a1c: Switch from __do_message -> std::error_category.

* commit '8f5c2a1c1392a6d6bdb5700f73eeadd7b01ea0b7':
Switch from __do_message -> std::error_category.
8f5c2a1c1392a6d6bdb5700f73eeadd7b01ea0b7 30-Sep-2014 Stephen Hines <srhines@google.com> Switch from __do_message -> std::error_category.

Bug: 14416410

The original class is just an implementation detail of libc++, and not
something we can depend on for other C++11 implementations (like mingw).

Change-Id: Ief34ff97c3877fed428998aff9d42a3f0634a6aa
itReader_2_7/BitcodeReader.cpp
itReader_3_0/BitcodeReader.cpp
8cb6cc6baed0e2739b1dc23a62626484594b3069 22-Aug-2014 Stephen Hines <srhines@google.com> am ea6b1c5a: Merge "Replace NULL macros with nullptr literals."

* commit 'ea6b1c5af978698f266f352c8a6f00ec3677e7e5':
Replace NULL macros with nullptr literals.
900c6c1f08f7c572125d7d39abe0f0f9eafbfa14 14-Aug-2014 Chris Wailes <chriswailes@google.com> Replace NULL macros with nullptr literals.

Change-Id: Id2311cda59dd42c74b3ed54d3ff6cfd509012738
itReader_2_7/BitcodeReader.cpp
itReader_3_0/BitcodeReader.cpp
itcodeTranslator.cpp
itcodeWrapper.cpp
etadataExtractor.cpp
rap/bitcode_wrapperer.cpp
rap/file_wrapper_input.cpp
rap/file_wrapper_output.cpp
ools/main.cpp
2a8b0a7428c91fecc652c235ecd83aff3062cf39 09-Aug-2014 Ying Wang <wangying@google.co> am 8d01bd8b: Exclude only modules with prebuilt in prebuilts/sdk.

* commit '8d01bd8b61482f83539a7dbcec38df9a2e5a6c56':
Exclude only modules with prebuilt in prebuilts/sdk.
8d01bd8b61482f83539a7dbcec38df9a2e5a6c56 01-Aug-2014 Ying Wang <wangying@google.co> Exclude only modules with prebuilt in prebuilts/sdk.

So we can do tapas build in the full platform source tree.

Change-Id: I9bf8bcd61c9c9883a4ac7c94f2bc8db5025d59f0
(cherry picked from commit 1819690a18a6a122cd85dc8d0ef1004f08d3f3a0)
ndroid.mk
f21590eae009b4f596d7e448d0b8e142c46fc382 16-Jul-2014 Stephen Hines <srhines@google.com> Update libbcc for LLVM rebase to r212749.

Change-Id: I40304090ada740c2451d32e01c7deed4f4c8c409
itReader_2_7/BitcodeReader.cpp
itReader_2_7/BitcodeReader.h
itReader_3_0/BitcodeReader.cpp
itReader_3_0/BitcodeReader.h
itcodeTranslator.cpp
etadataExtractor.cpp
ools/main.cpp
dab475081c6e43342782980b87ab584d5412c1f1 25-Jul-2014 Stephen Hines <srhines@google.com> Merge "Add support for extracting input counts from bitcode files."
4566d155a7e7ae122986c8e11f40dd1c43fea312 24-Jul-2014 Stephen Hines <srhines@google.com> Merge "Update libbcc for LLVM rebase to r212749."
ef406964e2ba7e45d3a044d2fb459dce92569560 08-Jul-2014 Jean-Luc Brouillet <jeanluc@google.com> Deprecate rs_fp_imprecise.

If rs_fp_imprecise is specified, issue a warning and
use rs_fp_relaxed instead.

Change-Id: I054fa32128bda60a6d22a0a6a590cd9f3575a2ca
etadataExtractor.cpp
ools/main.cpp
d0993af5b1337f8186dd9aedea2e138a919e02e9 16-Jul-2014 Stephen Hines <srhines@google.com> Update libbcc for LLVM rebase to r212749.

Change-Id: I40304090ada740c2451d32e01c7deed4f4c8c409
itReader_2_7/BitcodeReader.cpp
itReader_2_7/BitcodeReader.h
itReader_3_0/BitcodeReader.cpp
itReader_3_0/BitcodeReader.h
itcodeTranslator.cpp
etadataExtractor.cpp
ools/main.cpp
a668182c61d2f3079416317b6c2914428a6a4c7a 12-Jul-2014 Chris Wailes <chriswailes@google.com> Add support for extracting input counts from bitcode files.

This patch adds functionality to the MetadataExtractor to calculate the number
of inputs that a kernel expects and store them in the
mExportForEachInputcountList member variable, accessable through
getExportForEachInputCountList().

Change-Id: I10516d15595cdc1f2301059619c29e62a05f3638
etadataExtractor.cpp
ools/main.cpp
5f2e6b9bc70956fc30a9a6d1679f587e4a729884 08-Jul-2014 Jean-Luc Brouillet <jeanluc@google.com> Deprecate rs_fp_imprecise.

If rs_fp_imprecise is specified, issue a warning and
use rs_fp_relaxed instead.

Change-Id: I054fa32128bda60a6d22a0a6a590cd9f3575a2ca
etadataExtractor.cpp
ools/main.cpp
881cda4f5b793a1e7f7d33cf4a31efc3fdbba4fd 23-Jun-2014 Chris Wailes <chriswailes@google.com> Adds support for multi-input kernels to libbcc.

This patch modifies libbcc in the following ways:
* Adjusted the data-layout of the LLVM version of RsForEachStubParamStruct to
accommodate a pointer to an array of input allocations and a pointer to an
array of stride sizes for each of these allocations.
* Changed how some LLVM values are stored in ExpandKernel.
* Causes expanded multi-input kernels to extract input allocation base pointers
from a field in the param strcut and load values from these allocations
appropriately.
* Causes expanded multi-input kernels to use the provided dynamic input stride
sizes if no appropriate static type information is present.
* Modified bitinfo to support a new development API target which is used to
version gate support for multi-input kernels.

Change-Id: I46d2834c37075b2a2407fd8b010546818a4540d1
itcodeTranslator.cpp
52031f202ce4598dd499938fe82db94032c10a53 05-Jun-2014 Stephen Hines <srhines@google.com> Remove unnecessary stlport dependency.

Change-Id: Ie0ae94c514ab63fae52d3c66a93fde9bdba30757
ndroid.mk
a630078b32eb37a8de91ae09e26babf235d4fc9f 29-May-2014 Stephen Hines <srhines@google.com> Update libbcc for LLVM 3.5 rebase (r209713).

Change-Id: I0e882c84176d462958db05e4c9c10bfe995b8ed1
itReader_2_7/BitcodeReader.cpp
itReader_3_0/BitcodeReader.cpp
ools/main.cpp
e109434cfd2bc24d324506238483c1ecd587e228 14-May-2014 Stephen Hines <srhines@google.com> Switch to use rs_version.mk for consistency.

Change-Id: Ia19bb2f56653b10741d8b508c3dc3f93ce1c1495
ndroid.mk
itcodeTranslator.cpp
etadataExtractor.cpp
c2074caf075818abb6d3689ad924ca09f4a5ba1f 09-Apr-2014 Tim Murray <timmurray@google.com> Update libbcc for 64-bit support.

Change-Id: I369a82eb6730a33c46b6700408952fe34020ca51
itReader_2_7/BitReader_2_7.h
itReader_2_7/BitcodeReader.cpp
itReader_2_7/BitcodeReader.h
itReader_3_0/BitReader_3_0.h
itReader_3_0/BitcodeReader.cpp
itReader_3_0/BitcodeReader.h
etadataExtractor.cpp
ools/main.cpp
c6e6ee4392390c0888f808220adf33334e1f64a4 07-Apr-2014 Tim Murray <timmurray@google.com> Add DISABLE_LLVM_DEVICE_BUILDS to libbcc.

Change-Id: Iaad7b2ea8eea6c89c1c1a3d0e145bbb7bf60c6b9
ndroid.mk
itReader_2_7/Android.mk
itReader_3_0/Android.mk
rap/Android.mk
3133a889e9e3e78ec2a80ed653c328d3f61fcf35 13-Mar-2014 Andrew Hsieh <andrewhsieh@google.com> Fix build with new host toolchain

bcinfo links -lbcinfo which needs libpthread.so.

HOST_TOOLCHAIN_PREFIX=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6/bin/x86_64-linux- mm

external/llvm/lib/Support/Mutex.cpp:53: error: undefined reference to 'pthread_mutexattr_init'
external/llvm/lib/Support/Mutex.cpp:59: error: undefined reference to 'pthread_mutexattr_settype'
...

Change-Id: Idd45ef3c28f9210d494bc0499a3934cf74a4220e
ools/Android.mk
d724d097437f40a5689464429f948ec41e4a2415 11-Feb-2014 Stephen Hines <srhines@google.com> Update libbcc for LLVM 3.4 rebase.

Convert all bitcode readers to use error_code instead of bool + char* for
status returns.

Remove LinkOnceODRAutoHideLinkage, since it is now just a special case of
LinkOnceODRLinkage.

Handle the PassManager -> legacy::PassManager transition.

Change-Id: I33f0fe1c95436d35d02bc3f1b19b268f25f149d1
itReader_2_7/BitcodeReader.cpp
itReader_2_7/BitcodeReader.h
itReader_3_0/BitcodeReader.cpp
itReader_3_0/BitcodeReader.h
71df05005d8cbc15b4c288ff643be243af0c7b88 05-Feb-2014 Colin Cross <ccross@android.com> libbcc: convert makefiles to support multilib build

Convert makefiles to allow for building two architectures at the
same time.

Change-Id: I13cba3766a658e332a5223ce357878b25ba8ecec
ndroid.mk
994e44d828d0082f54754daeb9da6230f979b5d6 21-Jan-2014 Duane Sand <duane.sand@imgtec.com> [MIPS64] Temporary placeholder build, to allow other projects to build

Change-Id: Ieec80cb2828eb3a95f08f67c0f62281ba5a891ec
ndroid.mk
b79cd56cdcf9e15730c5037d0c1fd33be52563d9 22-Jan-2014 Colin Cross <ccross@android.com> frameworks/compile/libbcc: rename aarch64 target to arm64

Rename aarch64 build targets to arm64. The gcc toolchain is still
aarch64.

Change-Id: Ia92d8a50824e5329cf00fd6f4f92eae112b7f3a3
ndroid.mk
ad7d4c3a3d412b406b1841ded077fdca91d49b84 22-Nov-2013 Ashok Bhat <ashok.bhat@arm.com> AArch64: Temporarily disable AArch64 build

This patch will disable AArch64 build of libbcc projects
and get us going with the build of other projects.

Needs to be reverted once proper AArch64 port is
integrated into the AOSP.

Change-Id: I5f66b6398465de4d4b27563f800ad08d48aa52fc
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
ndroid.mk
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
ools/main.cpp
1a36fcaac9255684fec371868c80ecab0b68c8c2 07-Aug-2013 Stephen Hines <srhines@google.com> am a08768d4: am 48cd7454: Fix Windows build issues for libbcc.

* commit 'a08768d46fa5e3087d0fbd288366c53495ee2773':
Fix Windows build issues for libbcc.
48cd745480738c026312931877ecb8ebecb1c64e 31-Jul-2013 Stephen Hines <srhines@google.com> Fix Windows build issues for libbcc.

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
ndroid.mk
8dbca8e957dab1db77dffbe10c14c54d4b439be6 22-Jun-2013 Stephen Hines <srhines@google.com> Switch BitcodeTranslator to emit LLVM 3.2-compatible bitcode.

This path uses the LLVM 3.2 BitcodeWriter present for the llvm-rs-cc frontend.

Change-Id: I5dcbc9cc33e72d84cbd0e477966d9b53f3515c99
ndroid.mk
itcodeTranslator.cpp
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
itReader_2_7/BitcodeReader.cpp
itReader_3_0/BitcodeReader.cpp
11de13e48f18daf77a64c3a627359e283b54cd15 07-Jun-2013 Stephen Hines <srhines@google.com> Only generate fake root signature for ancient compilers.

In the case where we actually have a non-zero compiler version, the metadata
provided will have the proper information about root(). The bug here is that
sometimes a graphics root() function will end up looking like a compute
root() function (specified with attribute kernel).

Change-Id: I49eb1d555a41552e1345badd5c2001807feeea9b
etadataExtractor.cpp
85d9571c9bd327aebd0cdd2255a1ef4fa4b27df1 22-May-2013 Nick Kralevich <nnk@google.com> bcinfo: 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: I41080ec330da4d7df632cd55d3eff0528bb5b58d
etadataExtractor.cpp
2edf6d63b4a99faab9644e42f28e85f23a98913b 10-Apr-2013 Ying Wang <wangying@google.com> Add liblog

Bug: 8580410
Change-Id: I07783cf4c8b5520e2f3db2e79a584f27b05b84b1
ndroid.mk
d9216ebb9c114242b713cd4dad33b3a83eb86761 02-Mar-2013 Stephen Hines <srhines@google.com> Updates for LLVM merge to r176139.

Change-Id: I360ca25d87eb0799ce39c7612acf34d0b02fb7c1
itReader_2_7/BitcodeReader.cpp
itReader_2_7/BitcodeReader.h
itReader_3_0/BitcodeReader.cpp
itReader_3_0/BitcodeReader.h
4b778721adc9789411c2f2911578dab4d1d7c7b6 28-Feb-2013 Stephen Hines <srhines@google.com> Build with libLLVM.so instead of static libraries.

Change-Id: I20f94f3930aea01fda96999b5b829b1a47f4bded
ndroid.mk
ba8d7ceb2f0f920ae82afc2c91db625534482e15 27-Feb-2013 Stephen Hines <srhines@google.com> Move host dependencies to libLLVM.so instead of static libs.

Change-Id: I8f43aa5aa42fe54979f26ed4d0fcb3f683ff2aa2
ndroid.mk
6297382734716a572100f5a395b3df1b2b98908d 07-Feb-2013 Tim Murray <timmurray@google.com> Don't build libbcc/libbcinfo in unbundled branches.

Change-Id: Ifd088e9d26b10cd75b219b623d1a027623b871c4
ndroid.mk
b730e239619a546d93e5926ea92d698ab77ec7f6 10-Jan-2013 Stephen Hines <srhines@google.com> Updates for LLVM merge to r171906 on 20130108.

Change-Id: I096cb90103b19e3110ea562d60e5eb8ad48d9b67
itReader_2_7/BitReader_2_7.h
itReader_2_7/BitcodeReader.cpp
itReader_2_7/BitcodeReader.h
itReader_3_0/BitReader_3_0.h
itReader_3_0/BitcodeReader.cpp
itReader_3_0/BitcodeReader.h
itcodeTranslator.cpp
etadataExtractor.cpp
ools/main.cpp
a565633ff50bdbb355bf3c1a9fed72a39d4514f7 06-Sep-2012 Stephen Hines <srhines@google.com> Merge "Fix up libbcc for LLVM upstream merge to r162314." into jb-mr1-dev
3ffc8330d765599e357197883f72c01bd43837c8 29-Aug-2012 Stephen Hines <srhines@google.com> Add support for generating .bcinfo files to bcinfo.

This allows us to use "bcinfo -i <foo.bc>" to create foo.bcinfo, which is a
simple text file containing relevant metadata for the RS support library to
parse.

Change-Id: Idf756fc9104b0998da31be6e383300fcd3f03cad
ools/main.cpp
dd9c0baa7efb4b31dc2360c78759ece6ca81073f 24-Aug-2012 Stephen Hines <srhines@google.com> Fix up libbcc for LLVM upstream merge to r162314.

Change-Id: I0779cc0d80aedf948fe31a1a5f581c9712350753
itReader_2_7/BitcodeReader.cpp
itReader_3_0/BitcodeReader.cpp
894a232da00ba58ce9b33fbd74f37b7e73b5ede4 23-Aug-2012 Stephen Hines <srhines@google.com> am 655dc2b8: am a5868783: Merge "Removed unused private member variable."

* commit '655dc2b88d8bbac6b276c0ae97b217c2bb87b944':
Removed unused private member variable.
0a04898a5ecb4a695e2365942e734038021d5e85 14-Aug-2012 Tareq A. Siraj <tareq.a.siraj@intel.com> Removed unused private member variable.

This was causing the build to fail because of -Werror.

Change-Id: I028342d9c566e0089b137a46ef6bb4f2d9e77c4d
Author: Tareq A. Siraj <tareq.a.siraj@intel.com>
Reviewed-by: Ariel Bernal <ariel.j.bernal@intel.com>
itcodeWrapper.cpp
fcd0ce39448343d9af1afb84744dd718bfe722a4 17-Aug-2012 Joe Onorato <joeo@google.com> resolved conflicts for merge of 5836d3b3 to jb-mr1-dev

Change-Id: I9e55eac53acf84e7fe5fddf860b4c5c267ef7b28
3e46aee7434b98996f796d2161188ea0eab70b85 19-May-2012 Joe Onorato <joeo@google.com> host modules don't need LOCAL_MODULE_TAGS

Change-Id: Ia060c80e3292b3746ac3baf38f04a7c5d92bae91
ools/Android.mk
8b5be8604307d0dd342235803dd45775830b84c6 03-Aug-2012 Shih-wei Liao <sliao@google.com> Apply changes to migrate to LLVM-160668-20120724.

Change-Id: I515f90ff6b7222f9e69481c21a10173e1b0b40d2
itReader_2_7/BitcodeReader.cpp
itReader_3_0/BitcodeReader.cpp
f200803f4a5fe4e3d0032cb24cbd9a5e982d55a3 21-Jul-2012 Stephen Hines <srhines@google.com> Merge "Add a property for overriding FP precision."
ae4e28552fe1b8e4277ded66622b831414a76ebe 01-Jun-2012 Stephen Hines <srhines@google.com> Emit translated bitcode directly from bcinfo.

Change-Id: I6ccbdef189898668f1e60cac429307d83c655463
ools/Android.mk
ools/main.cpp
1680fe132a911cadd3180ccc682deb4df1fe8e1e 02-Jun-2012 Stephen Hines <srhines@google.com> Add a property for overriding FP precision.

adb shell setprop debug.rs.precision rs_fp_full
adb shell setprop debug.rs.precision rs_fp_relaxed
adb shell setprop debug.rs.precision rs_fp_imprecise

Change-Id: Ic7dcba631aeab1046ce928fe8b09122747939870
etadataExtractor.cpp
ac2874efbe6df4cc7b67340c57410ea9369c8fc2 07-Jun-2012 Stephen Hines <srhines@google.com> am e52f0466: am 3e4cac48: Fix mac build breakage.

* commit 'e52f0466fddc264f14de64bf80003f2efffdac4f':
Fix mac build breakage.
3e4cac486bc5a48640c4e65596a0be1ad05192e1 07-Jun-2012 Stephen Hines <srhines@google.com> Fix mac build breakage.

Change-Id: Iea3d587d6975200c3680af2cc2ba53965ad249b3
etadataExtractor.cpp
6649e6b10d92f850e9a50c5fa639ad80a2b0d071 07-Jun-2012 Stephen Hines <srhines@google.com> Fix subtle bug with legacy bitcode files + forEach signatures.

BUG=6620727

Change-Id: Id0cae36722a71cb89126c0cc6009c772ea90df1e
etadataExtractor.cpp
109be674a4ad2042f58f486042dded8c954e5300 07-Jun-2012 Stephen Hines <srhines@google.com> Fix subtle bug with legacy bitcode files + forEach signatures.

BUG=6620727

Change-Id: Id0cae36722a71cb89126c0cc6009c772ea90df1e
etadataExtractor.cpp
32c56ecf42ad3d99d40e9bf1ac2a097d27f12744 02-Jun-2012 Stephen Hines <srhines@google.com> Add a property for overriding FP precision.

adb shell setprop debug.rs.precision rs_fp_full
adb shell setprop debug.rs.precision rs_fp_relaxed
adb shell setprop debug.rs.precision rs_fp_imprecise

Change-Id: Ic7dcba631aeab1046ce928fe8b09122747939870
etadataExtractor.cpp
e126b62760b4bf115cfed162f0234e4e722011df 01-Jun-2012 Stephen Hines <srhines@google.com> Emit translated bitcode directly from bcinfo.

Change-Id: I6ccbdef189898668f1e60cac429307d83c655463
ools/Android.mk
ools/main.cpp
e708ffe612f4566bea20334d2c9dac34db508e6e 04-May-2012 Stephen Hines <srhines@google.com> Update to new llvm::MemoryBuffer::getMemBuffer() interface.

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
itcodeTranslator.cpp
etadataExtractor.cpp
98abb2d77b6519a43c98427141ba1ded42441b8a 07-Apr-2012 Stephen Hines <srhines@google.com> Fix missing initializer in MetadataExtractor constructor.

BUG=4540719

Change-Id: I21472c51134b14c55b2408bb0ab3a4e9707a48e4
etadataExtractor.cpp
5f3417f80b84fb809f6be282455a9db76fceaa53 28-Mar-2012 Stephen Hines <srhines@google.com> am 44f4eb29: am 03cfe0e3: Merge "Check infile arguments for BitcodeWrapperer."

* commit '44f4eb292b2b9aebb50cceb7b42f7a77fb3808b3':
Check infile arguments for BitcodeWrapperer.
a7e5c8f85434e9b8cb0637da302135ba2e2976f5 28-Mar-2012 Stephen Hines <srhines@google.com> resolved conflicts for merge of f46fa664 to master

Change-Id: I073ac3c0f95b3da9567e54c1fc8e8b1b0d69e33f
03cfe0e30d65d6e2ecbe6282cec4b20d3be690cc 28-Mar-2012 Stephen Hines <srhines@google.com> Merge "Check infile arguments for BitcodeWrapperer."
e1fd804a58c0ed67c75566c784d0b20d81e97ada 27-Mar-2012 Stephen Hines <srhines@google.com> Parse pragmas for floating point precision requirements.

BUG=4540719

Change-Id: Ice57a87f2f2cce3a641a4183b5f0bd8dc1ac0585
etadataExtractor.cpp
ools/main.cpp
1ad35fbd78f6965bb59572e1cf6a2223ee767c57 26-Mar-2012 Stephen Hines <srhines@google.com> Check infile arguments for BitcodeWrapperer.

It would be better to use a const reference for infile, but unfortunately, we
must mutate it during the lifetime of BitcodeWrapperer - Seek() is the
primary issue here. Since we don't want to use a non-const reference, we
instead insert appropriate NULL checks into the various functions where
infile is used.

Change-Id: Ic408c9dba684b57237cc8e29fff61c103161f7b3
rap/bitcode_wrapperer.cpp
b67c9e7a28cb734c1d62d835c33dedbe45074356 22-Mar-2012 Stephen Hines <srhines@google.com> Switch optimization level from metadata to bitcode wrapper.

Change-Id: Ieb547d38f2ad1c84af30717da9172d0ac928e52d
itcodeWrapper.cpp
etadataExtractor.cpp
1ef61fc2476077ad4c4b94c36512340d970e9fd2 22-Mar-2012 Stephen Hines <srhines@google.com> am 236011e0: am d3ceda68: Merge "Add in missing NULL pointer checks."

* commit '236011e0a7cc050d23acf1317d78649fe7471cd6':
Add in missing NULL pointer checks.
3f782a74b1a44bdf6e13aa1ddd5aea11ece1f12c 22-Mar-2012 Stephen Hines <srhines@google.com> Add in missing NULL pointer checks.

Change-Id: Ib19c9dc4db7e09525ea42eed9086e6fdb94c3648
rap/file_wrapper_output.cpp
rap/in_memory_wrapper_input.cpp
e9c850f5d85f3aa31b6e841478ea52e82d76c261 21-Mar-2012 Stephen Hines <srhines@google.com> resolved conflicts for merge of 6ec896af to master

Change-Id: I2b179d8b637df5e71c3018df50b7a3cc1fd2367f
7cd4c49d575478b2380f129dcd376a4e5e37939c 14-Mar-2012 Stephen Hines <srhines@google.com> Update support for BitcodeWrapper using BitcodeWrapperer.

This change uses a common helper library created for PNaCl, and adapts it
for use with Android. We also add some new fields to the wrapper for the
offline compiler version used to generate the bitcode.

Change-Id: I04c4ee20b7b09a68a35cdda1891616ee482a0072
ndroid.mk
itcodeTranslator.cpp
itcodeWrapper.cpp
rap/Android.mk
rap/LLVMBuild.txt
rap/Makefile
rap/bitcode_wrapperer.cpp
rap/file_wrapper_input.cpp
rap/file_wrapper_output.cpp
rap/in_memory_wrapper_input.cpp
rap/wrapper_output.cpp
ools/main.cpp
569986da116ed602c752395f9563260db38f6945 10-Mar-2012 Stephen Hines <srhines@google.com> Switch libbcc to start using MetadataExtractor.

BUG=6051742

This reduces code duplication, and makes us a client of our own helper library.
It also helps to fix a potential issue that can come up with older bitcode
containing only ForEach signatures and not names (something that was fixed in
MetadataExtractor, but not libbcc). We no longer look at metadata nodes at all
from libbcc.

Change-Id: I5cdacec82e4cd164f1aec5aa28a5e82feb9cfc15
etadataExtractor.cpp
ools/main.cpp
c73b5214fa71ef6e3378fa121bb8b6312d2e6d3b 05-Mar-2012 Shih-wei Liao <sliao@google.com> Apply changes to migrate to upstream

- Following constants have been removed by the upstream,
so we have to define our version.

- bitc::FUNC_CODE_INST_UNWIND
- Intrinsic::eh_exception
- Intrinsic::eh_selector

- 'unwind' instruction has been removed by upstream.
Emitting 'landingpad' and 'resume' instead when readers
find 'unwind' instructions in bitcode.

- llvm::Attribute now is a class, not unsigned.
Adjust the way to use llvm::Attribute according to upstream.

Change-Id: Iecefbc17e29093e09ada60c928cc951de681ea98
itReader_2_7/BitcodeReader.cpp
itReader_3_0/BitcodeReader.cpp
itcodeTranslator.cpp
e0918ac3cd6070c084b76d737af055e88a7679db 02-Mar-2012 Stephen Hines <srhines@google.com> resolved conflicts for merge of 7c75d915 to master

Change-Id: I25c1dc90af679e2463abffd33ee8838b4727396f
094881f513ab366f7ffd0b2c7778ab50281ca59e 14-Dec-2011 Daniel Malea <daniel.malea@intel.com> Enable debugging of RS code under GDB

- Add/integrate GDBJITRegistrar support class for interfacing with GDB
-- Once the GDBJITRegistrar is merged into LLVM trunk (and AOSP upgrades LLVM)
all files GDB* should be removed, and replaced with appropriate includes

- Basic [host|target]-side integration tests
-- host-tests: use bcc driver and clang to verify gdb output
-- target-tests: run skeleton apk on target and verify gdb output

- Add support for optimization_level metadata in bcinfo, libbcc
-- Disabled some LTO passes when optimization_level = 0
-- move register allocator registration after metadata inspection

- Initial version of android-commands.py GDB plugin (for test infrastructure)
-- relevant commands: load-android-app, run-android-app, start-android-app
-- tested versions: gdb (7.2, 7.3), python (2.6, 2.7)

- build 'bcc' driver tool by default in eng builds

Change-Id: I99e0c11c8591c6d911632c1dcc82dd8fbe1244a8
etadataExtractor.cpp
ools/main.cpp
cc366e573e31f43a6101fd6e04b90c6afdc3b7a7 22-Feb-2012 Stephen Hines <srhines@google.com> Support ForEachExpand on non-root functions.

BUG=6000538

Change-Id: I36e78ced0715b060af0938f1480df240cf6ba707
etadataExtractor.cpp
ools/main.cpp
04261e0bf97b15033efd697bd0e4cfbae7107f4b 22-Jan-2012 Stephen Hines <srhines@google.com> Update bcinfo to do automatic translation.

Change-Id: Iab7ffc91a218f9842630456fd74ac4d756dbffd5
ools/main.cpp
10c1412e6cb35cfc90abb5e36ba1340a8c55f44e 08-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Ic34de235eb1cd094af555d7299da643a626ca092
itcodeTranslator.cpp
itcodeWrapper.cpp
etadataExtractor.cpp
c7d67a701663191bcdab2416c11b69fae16d49fb 16-Dec-2011 Logan Chien <loganchien@google.com> Translate API 14 and 15 with BitReader 3.0

Change-Id: I9390b1d6df3db8cf65e0165d5270c38879980a03
ndroid.mk
itReader_2_7/Android.mk
itReader_3_0/Android.mk
itReader_3_0/BitReader_3_0.h
itReader_3_0/BitcodeReader.cpp
itReader_3_0/BitcodeReader.h
itcodeTranslator.cpp
3bdc2a8fde18e9e82a1e6ccef1c7379ef57bca35 16-Dec-2011 Logan Chien <loganchien@google.com> Add bitcode reader 3.0 to libbcinfo.

Since LLVM 3.1 remove some auto upgrade code, the old bitcode
will become bitcode incompatible. So we have to add the
bitcode reader 3.0 to libbcinfo.

Change-Id: I3ac1a1132c361cb9251c0a4ac9782c8cc62df7ea
itReader_3_0/BitReader.cpp
itReader_3_0/BitcodeReader.cpp
itReader_3_0/BitcodeReader.h
itReader_3_0/CMakeLists.txt
itReader_3_0/LLVMBuild.txt
itReader_3_0/Makefile
be81e1078cd32c1c4a2b8f60e16e2c7760c2a353 16-Dec-2011 Logan Chien <loganchien@google.com> Apply changes to migrate to upstream (Dec 16th 2011)

- Following constants has been removed from llvm::bitc by the
upstream, so we have to define our version.

- TYPE_BLOCK_ID_OLD 10
- TYPE_SYMTAB_BLOCK_ID_OLD 13
- TYPE_CODE_STRUCT_OLD 10

- CheckDebugInfoIntrinsics has been removed by the upstream,
so we have to copy it from lib/VMCore/AutoUpgrade.cpp

- llvm::TargetMachine::createTargetMachine now takes a new
parameter for options, such as float ABI, soft float, and
no frame elimination, and etc.

Change-Id: Ied522748bf92956d23f41a6195916eda1c19c589
itReader_2_7/BitcodeReader.cpp
0164f4647511a71f5b495a3bef156e3ac4e6c6b3 23-Nov-2011 Stephen Hines <srhines@google.com> Add support for handling a bitcode wrapper to bcinfo.

BUG=5425905

Change-Id: I9902bc89bef221e86dfc904d6935ef2c2091de33
ndroid.mk
itcodeWrapper.cpp
825b9aed7c01b050b2ee474327458b8958a28f39 23-Nov-2011 Stephen Hines <srhines@google.com> Add support for handling a bitcode wrapper to bcinfo.

BUG=5425905

Change-Id: I9902bc89bef221e86dfc904d6935ef2c2091de33
ndroid.mk
itcodeWrapper.cpp
3e88bf7dfe2af63827099a7d5be0173cf4c74f4d 23-Nov-2011 Stephen Hines <srhines@google.com> Forgot to update the HC->ICS translator too.

BUG=5650262

Change-Id: Ie62a685684cd5ae32004598f92933541d8ecd268
itReader_2_7/BitcodeReader.cpp
998ec839672c0cf56945c860a7cf9e29864599af 21-Nov-2011 Andrew Hsieh <andrewhsieh@google.com> Enhance host bcc to allow cross-compilation (eg. debug arm codegen on host):
eg. bcc -C armv7-none-linux-gnueabi # generate ARMv7
bcc -C i686-unknown-linux # generate x86 (default on Goobuntu)
Other targets are not supported at this moment.

Change-Id: If2f1199656664327cf35cf6a3670136f48c42cad
itReader_2_7/Android.mk
ools/Android.mk
bc9eb8fa13ee44d7bb46285e4c30da1236aefddf 21-Oct-2011 Logan Chien <loganchien@google.com> Apply changes to migrate to LLVM upstream Oct 20th 2011.

- StructType::isAnonymous is renamed to isLiteral.

- StructType::createNamed is renamed to create.

- ConstantExpr::getGetElementPtr and
ConstantExpr::getInboundsGetElementPtr is adopting llvm::ArrayRef.

- TargetRegistry and TargetSelect is moved from Target to Support.

- LLVMInitialize<TARGET>MCInfo, LLVMInitialize<TARGET>MCCodeGenInfo, and
LLVMInitialize<TARGET>MCSubtargetInfo has been unified by
LLVMInitialize<TARGET>TargetMC.

- llvm::setCodeModel is no longer available. Now we should pass the code
model to createTargetMachine.

- llvm::Linker::LinkerModules come with one addtional parameter (3rd),
which indicate that rather the source module should be destroyed or
not. Passing llvm::Linker::DestroySource should result in same
semantics as the old code.

Change-Id: I863f804893e528c9e6c7bf73737c17176277b18b
itReader_2_7/BitcodeReader.cpp
0231bb069417690bb4f513b80a9c0238112744f7 11-Oct-2011 Stephen Hines <srhines@google.com> Handle legacy RS root functions.

We generate a fake signature for a potential root function in this case.

Change-Id: I685d7299d99eb6b5cb02a89d60c5b90e78009e07
etadataExtractor.cpp
33f8fe2bfafe00ad2c74e4590ffdd0bcfc5eb31d 17-Aug-2011 Stephen Hines <srhines@google.com> Support ForEach info in MetadataExtractor.

BUG=5076887

Change-Id: Icfe1aebbc620df750279af19d10a624c4c760430
etadataExtractor.cpp
ools/main.cpp
932bc6e35bcef7adff05d890a9dcc7212426fb6a 28-Jul-2011 Stephen Hines <srhines@google.com> Provide legacy bitcode translation mechanism.

BUG=4942491

Change-Id: I73e96ef7f27bbaa8740cad70a4b93a1e5137e87b
ndroid.mk
itReader_2_7/Android.mk
itReader_2_7/BitReader.cpp
itReader_2_7/BitReader_2_7.h
itReader_2_7/BitcodeReader.cpp
itReader_2_7/BitcodeReader.h
itReader_2_7/CMakeLists.txt
itReader_2_7/Makefile
itcodeTranslator.cpp
etadataExtractor.cpp
cinfo.cpp
ools/Android.mk
ools/main.cpp
16c9b3674960eef4fda4955694bf186af4cfd5c0 19-Jul-2011 Stephen Hines <srhines@google.com> Remove unused APIs from libbcc.

BUG=4278636

Change-Id: I457e59efc525ad492008e1199a2bb98849eb98fa
ndroid.mk
150a70be696f5a93446bb0c5da558699103520e6 19-Jul-2011 Stephen Hines <srhines@google.com> Extract BC metadata using a single call via bcinfo.

BUG=4278636

Change-Id: I0f60d134e5e9209996b6bcf5f541d5497d7f2665
ndroid.mk
cinfo.cpp