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
/frameworks/compile/libbcc/lib/Assert.h
|