88cd94d5165bf8a266d3f3095946fc25bc4809af |
|
17-May-2017 |
David Gross <dgross@google.com> |
Refactor attribute stripping for libbcc and llvm-rs-as. There is an existing StripUnknownAttributes pass we use to remove attributes unknown to old versions of LLVM before writing out bitcode. This is needed to avoid errors when writing or reading the bitcode. This change does three things: - Refactors code so that we can strip unknown attributes without depending on the pass infrastructure, and so that we have a library to strip unknown attributes. This is needed so that we can use this functionality in places where we're not using the pass manager and so that we can use it outside of slang (specifically, in libbcc). - Strips unknown attributes in llvm-rs-as, in order to satisfy frameworks/compile/libbcc/tests/run-lit-tests.sh (test_reduce_general_metadata.ll). See details below. - Updates some stale comments. Why do we need to strip unknown attributes in llvm-rs-as, even if the input .ll does not contain those attributes? Because the LLVM parser calls llvm::UpgradeCallsToIntrinsic() to canonicalize the attributes of intrinsic functions. For example, test_reduce_general_metadata.ll contains a call to @llvm.memcpy.p0i8.p0i8.i64, which gets 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: I481f9a9d9ea5a0bd164ac4eeb68dd479eba5a187
/frameworks/compile/slang/llvm-rs-as.cpp
|
b6a143562bda2117824a0515c208504e9a2830f1 |
|
26-Jul-2016 |
Pirama Arumuga Nainar <pirama@google.com> |
Fix slang to compile with LLVM r275480 Bug: http://b/31320715 In addition to fixing compilation with the new LLVM sources, this change also switches to using LLVM's RenderScript triples. Clang also uses this triple to set the size and alignment of 'long' data type to 64-bits. We no longer need/have the '+long64' CPU feature. Test: Run RenderScript tests (host tests for slang and libbcc, RsTest, CTS) Change-Id: I3d2795bc0253a10d6fb36bfb0c28eb0c2e9a2922
/frameworks/compile/slang/llvm-rs-as.cpp
|
b130e157d3a5c2256e7aa0005d7134f3ac060c56 |
|
23-Jul-2015 |
Stephen McGroarty <stephen@codeplay.com> |
Added in fix to allow generation of valid debug info Changed the bitcode writer of the llvm-rs-cc compiler to use the current version of llvm when generating debug metadata. If the debug info is generated with the current fixed version writers the resulting bitcode is invalid and will fail verification in the bcc compiler. However, this means that, currently, only revisions which have compatible versions of llvm will work. The incompatibility is in the debug info generation in slang and the verification/backend in bcc. If bcc is expecting the debug info to be in a different format that slang outputs the verification stage will fail. As things stand only the newest revision will work, as the debug info in AOSP LLVM was updated a few weeks ago. If the debug bitcode is ahead of the reader on the device it will fail the bitcode verification stage in bcc. Change-Id: Iddb7adfe6639900f9917cb05941378019ecc37ba Signed-off-by: Stephen McGroarty <stephen@codeplay.com>
/frameworks/compile/slang/llvm-rs-as.cpp
|
dabd246c169fe8bc7d80a31779311bfc583b2ea0 |
|
16-Jul-2015 |
Matt Wala <wala@google.com> |
llvm-rs-as: Wrap bitcode with the RS bitcode wrapper. Change llvm-rs-as and llvm-rs-cc to use the same code path when it comes to writing bitcode. As a result llvm-rs-as can take a *.ll file and output a *.bc file containing the RenderScript bitcode wrapper, so that code produced by llvm-rs-as can be read by bcinfo. Change-Id: I3f9aed3764cbafddb219a21abd89490ca8019bc1
/frameworks/compile/slang/llvm-rs-as.cpp
|
3eb819ad8beec566a73b288204f9b75c2bb1d4e6 |
|
25-Nov-2014 |
Stephen Hines <srhines@google.com> |
Update slang for LLVM rebase to r222494. Change-Id: I19e441e193637ddb39b3afb3bc95579755ac0a90
/frameworks/compile/slang/llvm-rs-as.cpp
|
2eb9a3f7c48fe54eb4e813d80e3363bc79553a1e |
|
16-Jul-2014 |
Stephen Hines <srhines@google.com> |
Update slang for LLVM rebase to r212749. Change-Id: I5819f9df3212ffcfa8f34c11d3cea29f1fd04878
/frameworks/compile/slang/llvm-rs-as.cpp
|
75d471819f1810e0e65224d6e57fe1106af0d340 |
|
28-May-2014 |
Stephen Hines <srhines@google.com> |
Update slang for LLVM 3.5 rebase (r209713). Change-Id: If0f510085358d2e48c865257851d9ff7f5846eb8
/frameworks/compile/slang/llvm-rs-as.cpp
|
ee4016d1247d3fbe50822de279d3da273d8aef4c |
|
11-Apr-2014 |
Tim Murray <timmurray@google.com> |
Update Slang for Clang/LLVM 3.5a. Change-Id: Icd59efa1197098076555c505c31939866e504a83
/frameworks/compile/slang/llvm-rs-as.cpp
|
a1f95ee8df425089100148a42954cf61dc285015 |
|
09-Aug-2013 |
Stephen Hines <srhines@google.com> |
Update slang for LLVM merge up to r187914. Move OptParser.td dependency to use LLVM's version. Switch to llvm::sys::fs::F_* enums. Switch to LLVM Option handling library (not in Clang any more). Add new ALIASARGS field to OPTION macro. Switch to clang::getLastArgIntValue() helper function. Use llvm::sys::fs::OpenFlags as enum and not unsigned int. Remove unused DisableSimplifyLibCalls(). Switch to llvm::sys::fs::create_directories(). Change-Id: I9b12e18b759536c762ea0dd43356907ee53dbddb
/frameworks/compile/slang/llvm-rs-as.cpp
|
c908b90b45448af6c39ce407b607f46b0e0461d6 |
|
21-Jun-2013 |
Tobias Grosser <grosser@google.com> |
Add llvm-rs-as tool. This tool takes an .ll file as input and generates bitcode from it. The -bitcode-version flags allows to specify the version of the bitcode that should be emitted. Change-Id: I08b4f1fd0d7b218613e217249e648c9ca4393e38
/frameworks/compile/slang/llvm-rs-as.cpp
|