History log of /frameworks/compile/slang/slang.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
43730fe3c839af391efe6bdf56b0479860121924 03-Aug-2012 Shih-wei Liao <sliao@google.com> Apply changes to migrate to CLANG-160673-20120724.

Change-Id: I666df2ff91532318883dd48ea1249178b2ebda81
/frameworks/compile/slang/slang.cpp
52d132c53a57c3bb4b517f87ec4f0148ef8a4216 02-Aug-2012 Stephen Hines <srhines@google.com> Set LangOpts.Renderscript = 1.

Change-Id: I7f80d124d11eeed776ce3acd520297fc0c3f08f6
/frameworks/compile/slang/slang.cpp
0444de0c0e7cfc8d8f8fed6f64cd97812bdd6a41 03-Mar-2012 Stephen Hines <srhines@google.com> Adapt to upstream Clang/LLVM changes.

Change-Id: Ib81ad97246dbee060341e2690fb7f27e9e0298f4
/frameworks/compile/slang/slang.cpp
e3cb21bc8654181da174ac441acec7726b5a78ec 02-Mar-2012 Jean-Baptiste Queru <jbq@google.com> am fa5209a2: am 9c459f0c: Merge "Enable emission of debugger-friendly bitcode"

* commit 'fa5209a2bd1e10f675a889c60d8d5a589e860d18':
Enable emission of debugger-friendly bitcode
c460b37ffb50819a32c2a8967754b6f784b28263 09-Jan-2012 mkopec1 <mkopec1@intel.com> Enable emission of debugger-friendly bitcode

- Add "-g" flag to llvm-rs-cc in order to emit debug metadata
- Add optimization level parameter -O and tests
- Add lit based tests (use llvm-lit from libbcc/tests/debuginfo)
-- Add README file for lit-tests directory

Change-Id: I5e2f6f9b6f536fa7a10de008b54ac0878cf352a9
/frameworks/compile/slang/slang.cpp
194d4039a37861368d0774682b6d104f10bcc262 28-Feb-2012 Stephen Hines <srhines@google.com> Force LangOpts.CharIsSigned=1 (although it is currently the default).

BUG=6080056

Change-Id: Ie3bbcd7f0536c432531c88ad5dff5b76bd2a8ab6
/frameworks/compile/slang/slang.cpp
e67239de8d94975e7e2216ee6860ae2e6cb8b15a 25-Feb-2012 Stephen Hines <srhines@google.com> Style violation cleanup.

Change-Id: Idb127f2fd6e637039454f47299360aec5a4edfe8
/frameworks/compile/slang/slang.cpp
ac4e18584b8768b3f68535fa5f16232e03974323 16-Dec-2011 Logan Chien <loganchien@google.com> Apply changes to migrate to upstream (Dec 16th 2011)

- clang::ModuleLoader has changed the interface of loadModule.

- 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

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

Change-Id: I75e51da9d2265207060a449735342b426cedf243
/frameworks/compile/slang/slang.cpp
8f4d972ef6c6796ffdde603e456979a7004d1e20 05-Dec-2011 Stephen Hines <srhines@google.com> Add support for warning flag processing.

BUG=5714569

Change-Id: I96567325df605c5eb0f0bf2f2371a1cea9718a5b
/frameworks/compile/slang/slang.cpp
4c622e0953afe3dca4da0aee364a811f3ccb61d9 11-Nov-2011 Stephen Hines <srhines@google.com> Adapt to upstream changes.

Change-Id: I9ab7bad890eb78621c5fc6dd516dbcacdad88471
/frameworks/compile/slang/slang.cpp
9207a2e495c8363606861e4f034504ec5c153dab 21-Oct-2011 Logan Chien <loganchien@google.com> Apply changes to migrate to LLVM upstream Oct 20th 2011.

- StructType::isAnonymous is renamed to StructType::isLiteral.

- PassManagerBuilder has been moved from
llvm/Support/PassManagerBuilder.h to
llvm/Transforms/IPO/PassManagerBuilder.h

- Include llvm/Transforms/IPO.h for llvm::createInternalizePass.

- clang::DiagClient has be renamed to clang::DiagnosticConsumer.
Besides, we have to implement one additional pure virtual method
'clone' for create a clone of slang::DiagnosticBuffer.

- llvm::Linker::LinkModules comes with one additional parameter.
Passing llvm::Linker::DestroySource should be equivalent to
the old code we were using.

- slang::Slang is now derived from clang::ModuleLoader and implemented
loadModule pure virtual method (though we will always return NULL.)

- clang::Preprocessor is taking one additional parameter for
clang::ModuleLoader.

- clang::Diagnostic has been changed. A lot of the method has been
moved to clang::DiagnosticsEngine, and we can no longer 'Report' a
diagnostic from clang::Diagnostic. We have to use
clang::DiagnosticEngine instead.

- llvm::setCodeModel has been removed.

Change-Id: I1f2a4cbeaf61a8ed1d0d635a5a0e1baa90d99d07
/frameworks/compile/slang/slang.cpp
c632be206ac4fe49a5db05cfa54942d774329dbe 24-Sep-2011 Stephen Hines <srhines@google.com> Generate warnings properly for multi-file compiles.

BUG=5367019

Slang (llvm-rs-cc) was clobbering warnings during multi-file compilation
because they are not part of the error count. When the diagnostics get reset,
we should be dumping whichever non-error (i.e. warning) diagnostics we have
accumulated. During investigation, I also found then that our dependency
generation path can cause duplicate warnings to be added to the diagnostic
client. Thus, to fix this bug, the change need dumps relevant diagnostics, but
then suppresses warnings if we are compiling the same file multiple times
(once for code generation and once for dependencies).

Change-Id: I4b94e962f93b96f31ff7e7d6cce45418fe39e1d1
/frameworks/compile/slang/slang.cpp
fcc654a1f4034978f7534479f9c5c33a92ca8546 22-Jun-2011 Shih-wei Liao <sliao@google.com> Fix llvm API changes to migrate to upstream r131807.

Now, llvm doesn't provide create*Passes() interface and removes StandardPasses.h.
Instead, we use PassManagerBuilder to replace StandardPasses.

Change-Id: I0979afd0ecb9bf2df6634aaff0a8c9a32d405f71
/frameworks/compile/slang/slang.cpp
6f4e0a9955a53a6f715af7e674e68ed15270a47c 09-Mar-2011 Logan Chien <tzuhsiang.chien@gmail.com> Migrate to newer API.

Following function (left) is deprecated, use the right version
instead:

llvm::sys::Path::getLast -> llvm::sys::path::filename
llvm::sys::Path::getBasename -> llvm::sys::path::stem
llvm::sys::Path::getDirname -> llvm::sys::path::parent_path
/frameworks/compile/slang/slang.cpp
be27482cdeaf08576bc39b72a15d35d13014a636 16-Feb-2011 Logan <tzuhsiang.chien@gmail.com> Apply changes to migrate to LLVM Mar 6th 2011.

- API for name mangling. (Changing from non-public APIs to the
public one)

- API changes for clang::Diagnostic::getNumErrors ->
clang::Diagnostic::hasErrorOccurred

- API changes for clang::CharUnits and Quantity type.

- API changes libLLVMSystem -> libLLVMSupport.

- Change clang::Token::eom -> clang::Token::eod.

- Remove SourceRange parameter for DeclRefExpr::Create and
MemberExpr::Create.

- Add const qualifier for several unsafe type cast.
/frameworks/compile/slang/slang.cpp
df5bcce1582d839eead432a5e24435236c90fb05 01-Mar-2011 Shih-wei Liao <sliao@google.com> NOTICE file and logn:
Apply changes to migrate to LLVM 2010 Nov 10th:

Change-Id: Ib8d3675b4701957f299f249ac72e8a43c2a6bc4c
/frameworks/compile/slang/slang.cpp
6e6578a360497f78a181e63d7783422a9c9bfb15 08-Feb-2011 Stephen Hines <srhines@google.com> Add support for assertions in llvm-rs-cc.

Bug: 3430674
Change-Id: I3400238652449cde84275cc2a770f405332d9544
/frameworks/compile/slang/slang.cpp
4cc67fce91f43215d61b2695746eab102a3db516 01-Feb-2011 Stephen Hines <srhines@google.com> Support for generating .java dependencies for RS.

This updates the -MD option to also emit .java targets to the dependency
information placed in our foo.d file.

Change-Id: I189cf6302bc1cbd6201487743a37dced87b5c5eb
/frameworks/compile/slang/slang.cpp
245eba133628ef5b52c78d6f538c9268c9bc5828 19-Jan-2011 Shih-wei Liao <sliao@google.com> Enforce C99 checking.

Change-Id: Id5c2afa01fdf88170d7fafcb7d321aa127d02e27
/frameworks/compile/slang/slang.cpp
3fd0a94a5cf1656569b1aea07043cc63939dcb46 18-Jan-2011 Stephen Hines <srhines@google.com> Refactor pragma handling (pass everything to LLVM)

Change-Id: Id09d4934af06f0880cd867456218602ce9a9e2de
/frameworks/compile/slang/slang.cpp
e639eb5caa2c386b4a60659a4929e8a6141a2cbe 09-Nov-2010 Stephen Hines <srhines@google.com> Improve code style.

Change-Id: I26e043849bce2a4b41ae132fbe0c882f4a6f112f
/frameworks/compile/slang/slang.cpp
41ebf534161bb67f6207a070c1f6a895dc853408 13-Oct-2010 Zonr Chang <zonr@google.com> Remove Slang::TargetDescription.

Clang and LLVM never read outside target description to configure the
target-dependent information needed during compilation and codegen. They
always use their own data layout string for specific, known target.
/frameworks/compile/slang/slang.cpp
641558f02fe6ce0ee3ae5076eb366c25e2ad5903 12-Oct-2010 Zonr Chang <zonr@google.com> Implement one-definition-rule (ODR) feature.

When compiling multiple RS files, we say two RS files A and B break ODR
iff:

1. They have at least one common struct named [S] and [S] will be reflected
to ScriptField_[S].java, and
2. [S] defined in A is not *exactly the same* (number of fields, field
type and field name) as the one defined in B.

This CL detects such error.
/frameworks/compile/slang/slang.cpp
c383a500aa59423264811be3874461bf8adbfea0 11-Oct-2010 Zonr Chang <zonr@google.com> Prepend legal announcement in all files.

Release libslang/llvm-rs-cc/llvm-rs-link under Apache 2.0 license.
/frameworks/compile/slang/slang.cpp
e8c263a1c5df81594cf302ecadd813909c894487 11-Oct-2010 Zonr Chang <zonr@google.com> Refactor a bit & -M bug fixed.

1. Use llvm::tool_output_file instead of llvm::raw_stream. The former
can automatically deleted itself from filesystem once the compilation failed.
2. Fix -M bug which causes segfault previously.
/frameworks/compile/slang/slang.cpp
b81c6a4cbd9c08e0b20ea4fbc615b416ac1bc9ec 10-Oct-2010 Shih-wei Liao <sliao@google.com> Revert "Revert "New implementation of llvm-rs-cc (replacement of slang_driver).""

This reverts commit a6d60672695f1438a63acdbf85eae7f97ce2b50d.
/frameworks/compile/slang/slang.cpp
a6d60672695f1438a63acdbf85eae7f97ce2b50d 10-Oct-2010 Shih-wei Liao <sliao@google.com> Revert "New implementation of llvm-rs-cc (replacement of slang_driver)."

This reverts commit 6791df284557f4173a9715b3634f4f4901a6bb8a.
/frameworks/compile/slang/slang.cpp
6791df284557f4173a9715b3634f4f4901a6bb8a 09-Oct-2010 Shih-wei Liao <sliao@google.com> New implementation of llvm-rs-cc (replacement of slang_driver).

Change-Id: I1b8b6cf3dad8ef8fe2f4d24d4df604099f45ff37
/frameworks/compile/slang/slang.cpp
b257301a1c711ba81458a4f8bf3c99c91c91a047 07-Oct-2010 Zonr Chang <zonr@google.com> Don't include rs_graphics.rsh by default.
Fix the Externalize in slang_driver.cpp.

Change-Id: Idce037b0150af3ea9968e39b7bce63a0e1b6d9a5
/frameworks/compile/slang/slang.cpp
08df36e5c0a990306d958c9f6d59a5de23b748f6 07-Oct-2010 Zonr Chang <zonr@google.com> Factor out shared library libslang.so from slang.

libslang.so can be regarded as a lightweight Clang compiler. Only C-like
language compilation is supported in libslang.so currently. Both llvm-rs-link
and slang now link to this library.

Change-Id: Ib8f8dc8568640bc36c2b1fe8dba1212c4c8a56c8
/frameworks/compile/slang/slang.cpp
8c6d9b2d36ed2d6d811279fd9bddc05fffe16803 07-Oct-2010 Zonr Chang <zonr@google.com> Use llvm::sys::Path to implement "mkdir -p".

Change-Id: I3bb36e1a8050bbd9744fd02935b6186d2f285015
/frameworks/compile/slang/slang.cpp
5457231d5201be02c3232ffc1c6d8bc408f276ab 08-Oct-2010 Ying Wang <wangying@google.com> Pass additional dep target to slang

By "slang -a out/foo/bar/RenderScript.stamp ...", additional dep target will be added to the .d file,
something like:
out/target/common/obj/APPS/Fountain_intermediates/src/RenderScript.stamp ./fountain.bc: \
frameworks/base/libs/rs/java/Fountain/src/com/android/fountain/fountain.rs \
...

Currently the .bc file is not used in the build system dependency graph, but the stamp file.

Change-Id: I1251dba0a4b003e4b6bc689f1064bddd4ffbccc1
/frameworks/compile/slang/slang.cpp
0b7ef1a176b9ddd1e0d437efdce20743373fd7db 08-Oct-2010 Stephen Hines <srhines@google.com> Add support to Slang for "-MD" option.

Change-Id: Ie01ccb3f07191f6de954b8094eec5ab47e703817
/frameworks/compile/slang/slang.cpp
f7de85223c8728d5dc147e8a19ddf039da72b431 06-Oct-2010 Stephen Hines <srhines@google.com> Fix a minor error checking bug.

Change-Id: I26c809d361071eba06efb734ea2b54c4dc560981
/frameworks/compile/slang/slang.cpp
cc0efad052e944f64bb71cfdaa8a825e30192e78 05-Oct-2010 Stephen Hines <srhines@google.com> Add "-M" dependency generation to Slang.

Change-Id: I26d1daf1005de7b3ad297fba5ad0d85a1aab1e45
/frameworks/compile/slang/slang.cpp
3a9ca1f0d6bd8f12c2bb2adea51f95c255996180 06-Oct-2010 Zonr Chang <zonr@google.com> Provide better abstraction of class Slang.

1. Remove the Slang C APIs support (not used by any other programs.)
2. All RS relatives are now in slang_rs_*.cpp.
/frameworks/compile/slang/slang.cpp
6315f76e3cc6ff2d012d1183a0b030d4ff0dc808 05-Oct-2010 zonr <zonr@google.com> More coding style fixing to improve the readability. No actual semantics
changed. This also makes cpplint happy.
/frameworks/compile/slang/slang.cpp
9ef2f785e0cc490af678dfd685995dec787321ff 01-Oct-2010 Shih-wei Liao <sliao@google.com> The Mother-of-All code review:
1. Fix AllowRSPrefix bug
2. Remove member mRS*Pragma in class RSContext
3. No longer only support 2x2, 3x3, 4x4 arrays
4. Fix Export All code for victorhsieh
5. Improve readability and maintainability
6. size_t -> int in calculating padding

Change-Id: I772aebd1440af66a89e2d2e688b193e500f38d69
/frameworks/compile/slang/slang.cpp
1ebc0ca6ffa7effb875883d18205ed4943ab8fc2 14-Sep-2010 Shih-wei Liao <sliao@google.com> Implement the ARM-specific struct layout ABI in exportable functions parameters for rs. Add the ABI-compliant #args when needed.
My old code inadvertently assumed x86 ABIs for structs, but ARM ABI/calling convention is tricky here, compared to x86's. Also, fixed the type promotion problem.
Note that the most portable fix is to add a shim layer in Clang which is a BIG undertaking like PNaCl. Let's put in the potential fix for b/2988615 now.

Change-Id: I1d9fe4d803485b55bb72112ea8e17c1f4a19dd32
/frameworks/compile/slang/slang.cpp
f52a620440fa62257dfdcf2583f0f9df5b855c76 11-Sep-2010 Shih-wei Liao <sliao@google.com> Apply changes on slang such that it can work with LLVM/Clang upstream r112364/r112367.

Change-Id: If38da28502a6111b855105c2fceb23fdb0caefa4
/frameworks/compile/slang/slang.cpp
3f8b44dba57685b437cecc208f2a20a4ed93ed36 04-Sep-2010 Ying Wang <wangying@google.com> Encode the bitcode binary files into Java source files.

So that the apps don't need to have the bc files as resources.
The bitcode java files will be put at the same dir as the reflected java files.
The bitcode java file name will be <ClassName>BitCode.java.
The bitcode is represented as byte array and you can reference it as:
byte[] bitcode = <ClassName>BitCode.getBitCode();

To enable this feature, pass "-s jc" to the command line.

The class name <ClassName> is converted from the .rs file name, for example:
foo.rs -> FooBitCode.java
foo_bar.rs -> FooBarBitCode.java
fooBar.rs -> FooBarBitCode.java
foobar.rs -> FoobarBitCode.java

i.e., any non-alnum characters in the rs file name are filtered
and the rest are converted to camel case.

The above method is also applied to the reflected java classes now.

Change-Id: Idf234d4c017e33740a13d6cd68bc3e14710ec149
/frameworks/compile/slang/slang.cpp
e2e522f0d23c074ecd1025f1f2ed161ed485d9c8 01-Sep-2010 Ying Wang <wangying@google.com> Customized header search paths

1. Use "-I <path>" (or "--include-path <path>") to add a header search path.
2. You can specify more than 1 search path and the preceding path takes precedence.
3. System include path is moved out of the code -- they are inserted in the build system instead.

Change-Id: Idfaee4763e8bf0cd71deeecdf1dc1ec515e44d0f
/frameworks/compile/slang/slang.cpp
4c9f742efa36b1037acc640184681d421aa0f6ba 05-Aug-2010 Shih-wei Liao <sliao@google.com> Right usage of linking. Enable the reuse of the same Slang object across multiple input files.

Change-Id: Id036c300ece9a245437ea2bdd0a9c0da436f558d
/frameworks/compile/slang/slang.cpp
f83d3c396d5d7eacd97cf0a5d3b6a01d75535b67 31-Jul-2010 Shih-wei Liao <sliao@google.com> Support multiple .rs files. Change "-o" to denote output path for .bc, NOT the output .bc file.

Change-Id: I168b3f96de37b0d6a787b3a83306ac84a0ebebb5
/frameworks/compile/slang/slang.cpp
60de5bd34649e3a0acfdbc881a07b16781fd2661 21-Jul-2010 Shih-wei Liao <sliao@google.com> Change the Preprocessor to automatically include rs_types.rsh and rs_math.rsh. They are part of the standard RenderScript APIs.

Change-Id: Ib79d624bec877869f420f7f4c2bc294b139db597
/frameworks/compile/slang/slang.cpp
9089828a995422a5ed3beeed0890b755c4abe188 20-Jul-2010 Shih-wei Liao <sliao@google.com> Add curr directory to include path.

Change-Id: I67eba0fd18a703d9349d58446fbafbcd32a08dfb
/frameworks/compile/slang/slang.cpp
8eac0940b8d13f8c4bad50942bf8527d64ccd12c 19-Jul-2010 Shih-wei Liao <sliao@google.com> Add frameworks/base/libs/rs/scriptc to system include path.

Change-Id: I5b28bdefb7ddc99b9861dc49bd088c813806f0f4
/frameworks/compile/slang/slang.cpp
66819a96bda9362f86e4f26ed8a9b1f73961b27a 19-Jul-2010 Shih-wei Liao <sliao@google.com> Clean up printing.

Change-Id: I0c335d1e8203fe412466b0e2b83ceda0ea33b56b
/frameworks/compile/slang/slang.cpp
68e8e9f98730b3672fb96d49e33b9db70a90ed3f 19-Jul-2010 Shih-wei Liao <sliao@google.com> Add include path and deal with the case that "-p" flag on path is unspecified.

Change-Id: I592b23ac1e08b62088a9a9e1bfc8109b56929386
/frameworks/compile/slang/slang.cpp
807a0eaf3c19dc067becdca46a10e8c703d1e871 17-Jul-2010 Che-Liang Chiou <clchiou@google.com> Handle corner case if file path is too long.

Change-Id: Idf6cd3530d45d21ae40d8d27265368619e70155f
/frameworks/compile/slang/slang.cpp
b55d7ef3333534fc6aad80f9a9133f2bf945faf1 16-Jul-2010 Shih-wei Liao <sliao@google.com> Change "-o" to create parent directories if it's needed.

Change-Id: I98de7f29d338c5849f5fcd7fb598c00150140d5a
/frameworks/compile/slang/slang.cpp
6de89272b00a31f2a73e2f56edf9cc511df46265 16-Jul-2010 Shih-wei Liao <sliao@google.com> Add --output-java-reflection-path | -p

Change-Id: I951a3540aa653060f81ff76b670ffb4b0029a3ca
/frameworks/compile/slang/slang.cpp
1fd8579fe65b13a26cfaad12d056d2fc9b46475a 07-Jul-2010 Kirk Stewart <kstewart@google.com> Add a command-line option to allow function names with the "rs" prefix (--allow-rs-prefix). When not specified, user-defined functions with that prefix will be treated as an error.

Change-Id: Ieefc8bb55d61980241d5392ffb32770a303ce6a7
/frameworks/compile/slang/slang.cpp
001fb6dddbf1cc794532eeb6a55f7b500eab1abc 21-Jun-2010 Shih-wei Liao <sliao@google.com> 1. Add comments to clarify (E.g., don't worry. "syntax error will be triggered by predecessor later")
2. Create ASTContext before RSContext creation and pass it to RSContext for using later

Change-Id: I6c11af70f1a13036c560aa34d311808548390864
/frameworks/compile/slang/slang.cpp
462aefd62cc646d2ff753c1d003ef3cd7bbea262 05-Jun-2010 Shih-wei Liao <sliao@google.com> Initialize slang and Android.mk.

Change-Id: If74da8e54d45511c8c9bb236bcfeec508f4f2439
/frameworks/compile/slang/slang.cpp