History log of /frameworks/compile/slang/slang_rs_context.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
8ee018bdb53fc5abdc430878e2bec0c0c0aa560f 02-Jun-2016 David Gross <dgross@google.com> Delete simple reduction implementation.

Bug: 27298560
Change-Id: I775dd782d658c7c720f57aa31a584deee98cdd17
40bac5d72af8fe32ab3d0bb38aafb5c65d8d9dfa 09-May-2016 Yang Ni <yangni@google.com> Disallow launching old-style kernels via rsForEach

Bug: 28666819

The "kernel" attribute should be the sole criterion for a kernel
function launchable via rsForEach() in single-source RS.
(The utility function isRSForEachFunc() considers a super set of such
functions as kernels, including old-style kernels or any function
that returns void and has a pointer type first parameter, which
don't have the "kernel" attribute.)

Launching an old-style kernel is forbidden via an rsForEach() or
rsForEachWithOptions() call. Old-style kernels can still co-exist in
the same script with such a call, and can be launched via Java or C++
reflected code.

To make this coexisting possible, old-style kernels are moved to
the end of the list for exported kernels in the metadata. This way,
the single-source RS frontend pass can agree with the metadata
on the slot assignment for "new-style" kernels.

Change-Id: I3d61c1c91b29043f3597ae622ef7c2ef972eb789
8f093e05e28046b6fc74175b66a06152f72e0c66 04-Mar-2016 Pirama Arumuga Nainar <pirama@google.com> Update slang for LLVM rebase to r256229

Bug: http://b/26987366

(cherry picked from commit 98cfae456bb1831336bce2b21979a04e2e31fed4)

Change-Id: Ic7f67da3fee0da075f11e3125132af7ea9c96457
5e306b944425a952fe744f59d828538137a59375 09-Feb-2016 David Gross <dgross@google.com> Change mechanism used to ensure #pragma rs reduce functions are not deleted.

Requires corresponding change in frameworks/compile/libbcc.

The functions referenced by "#pragma rs reduce" are static functions.
If the only references to such a function are from these pragmas, then
the function looks unreferenced, and hence without additional work
will be deleted by clang.

The old solution to this problem is to add all such functions to
the LLVM intrinsic variable @llvm.used. Unfortunately, this
doesn't just prevent clang from deleting these functions -- it
also prevents llvm from deleting these functions. This is
undesirable in the case of the combiner function (which is not
currently needed by the CPU reference driver) or the accumulator
function (because the CPU reference driver needs an "expanded"
form of the accumulator function, not the original accumulator

The new solution is that for each such function "f" we generate a
dummy variable initialized with a pointer to that function:

void *.rs.reduce_fn.f = (void*)&f;

This prevents clang from deleting "f", but does not automatically
prevent llvm from deleting "f" (e.g., the backend could use some
other mechanism to retain "f" if necessary, while
deleting ".rs.reduce_fn.f").

Bug: 23535724
(cherry picked from commit 633f2980e148775887f0d416f8dd663a6d3b48df)

Change-Id: I272445d2bf706cde8d81ed65aa32df59c3ba0e47
65f23ed862e1a1e16477ba740f295ff4a83ac822 08-Jan-2016 David Gross <dgross@google.com> Add semantic analysis of "#pragma rs reduce" script functions.

- Make initializer() optional.
- Swap initializer and accumulator in metadata.
- Expose new slang::HasRSObjectType() interface from reference counting engine.

Bug: 23535724
Change-Id: If042e227a1af87c231c867ef20ed4c2082bb1871
40a0911e5cbdf600bce5a390148865626ac7086c 05-Dec-2015 Stephen Hines <srhines@google.com> Merge changes I5b11fd14,I85f4e6db

* changes:
Void pointers can't be exported.
Fix a set of inverted conditionals for kernel validation.
13fad85b3c99a37c17d8acfec72f46b8ee64e912 24-Nov-2015 Stephen Hines <srhines@google.com> Void pointers can't be exported.

Bug: http://b/25853842

Change-Id: I5b11fd14b6cd57a06522e921c62ed033488aa08e
2615f383dfc1542a05f19aee23b03a09bd018f4e 03-Dec-2015 Yang Ni <yangni@google.com> Tidy up AST nodes for rsForEach

Bug: 23535985

Slang asserts in debug build, for the following reasons:
1) A mistake using void type instead of the function type for
2) rsForEachInternal() was declared with the second parameter being
void*, but should be rs_script_call_t*; and
3) Integer 0 for launch option is used for rsForEach without an
launch option, where a rs_script_call_t* is expected.

This CL fixes those.

Change-Id: If6245ceca774ee38830aeddda156be55cde9a137
88f21e16250d2e52a75607b7f0c396e1c2a34201 19-Nov-2015 Yang Ni <yangni@google.com> Changed generated calls to rsForEachInternal

Bug: 23535985

Avoided using varargs in rsForEachInternal, since LLVM handles varargs
differently on x86 than on ARM.

Changed generated calls to rsForEachInternal to match the new
signature, in which the last argument is an allocation array.

Change-Id: I1b53861083b87c51c5bdaeaec2be469dc7af7a0a
15410146cdc2a354ade80ceb3cd134f8a792d92a 10-Nov-2015 Yang Ni <yangni@google.com> Fixed dummy root creation

There should be zero exported foreach functions in the metadata, if
there is no root function seen and there is no non-root kernel seen.

Create a dummy root only if there exists other non-root kernels.
Remove the nullptr placeholder in the exported for each function
vector if there is no kernel (root or not) seen in the script.

Also adjusted the lit test script to make it run on a setup where
the out directory is not under the source tree.

Change-Id: I4c4a5fe54a7fe926db9a432c9fca2ddc5f354ba8
1946749cebf4a64341d8210890688fef7d958c22 27-Oct-2015 Yang Ni <yangni@google.com> Launch options & multi inputs for single-source RS

Bug: 23535985

Also renamed rsParallelFor to rsForEach.
Added checks for number of allocations to rsForEach matching kernel function

Added slang tests.

Removed code from RSContext for remembering the rs_allocation AST subtree.

Change-Id: Ibc22bd5e9585a4471b15920ef60fe1fe2312de49
a5d846df579f3d60457f664a284afe2cc2b9f8db 09-Oct-2015 Stephen Hines <srhines@google.com> Don't allow user-defined uninitialized const variables to be exported.

Bug: 24607459

User-defined variables that are both uninitialized and const can never
be linked/initialized properly. We limit llvm-rs-cc to only accepting
extern const variables defined in its own headers (such that a proper
initialization value can be provided by the runtime library). This will
allow us to make constants that lldb can refer to from user commands,
since the extern const symbols will remain in the final shared object.

Change-Id: I44dbd680278af637c12868e93487745f78936ed0
fb40ee2a90f37967bf4a40a18dec7f60e5c580d8 13-Oct-2015 Yang Ni <yangni@google.com> Revert "Revert "Handle kernel launch calls""

Bug: 23535985

This reverts commit 5d9263d3a3a7457b9e5fe6e518c0d822dcdfcda6.

This also fixes issues in change list 172074, which caused some
slang tests to fail due to changed hehavior in error handling.

The fix was based on changes originally posted by srhines@.

To keep single-source functionality working, I separated kernel
name logging from the final export processing code. We would
build a map from kernel funciton names to slot numbers as we parse
the script. The map is used when translating a rsParallelFor call
to a call to the internal rsForEachInternal API, so that we can find
the proper slot numbers.

Here is Steve's original commit message.

Only call processExports() after a successful C99 compilation.

This refactoring fixes a bug in the previous single-source patch, where
exported functions/variables/kernels were being processed during the
regular compilation steps. This wastes compile time, since we don't need
to actually prepare for outputting reflected Java/C++ code if the
compile is going to fail for regular C99 reasons.

Change-Id: I81d88731188f4258f12f4c90ae8dd8abc8c2d641
5d9263d3a3a7457b9e5fe6e518c0d822dcdfcda6 13-Oct-2015 Stephen Hines <srhines@google.com> Revert "Handle kernel launch calls"

This reverts commit 45aa8c52c9400cef86efe4343f04e605a66f42af.

Change-Id: If33ad432e4381d1dc64ef884b51eb50f707807ff
45aa8c52c9400cef86efe4343f04e605a66f42af 14-Sep-2015 Yang Ni <yangni@google.com> Handle kernel launch calls

Bug: 23535985

Find rsParallelFor(void*, ...) calls in the .rs source code and
translate them into rsForEachInternal(int, rs_allocation, rs_allocation)

Semantic checks are pretty limited at this point. Will enhance them in followup CLs.

Change-Id: I6e2cf3db868f426aa8e0b9a77732b66c1e6b9f03
c0c5dd85f2d2df2bcf0cb284001f544d6c42eff9 24-Jul-2015 Matt Wala <wala@google.com> Add initial support for validating and exporting reduce kernels.

Bug: 22631253

This change adds support to slang to validate the reduce-style
kernels for errors, and also to create reduce metadata.

Change-Id: Ic9144402dff93a2a28687864637e67fca6808e2e
3f45a25c23fa0f2cca4070f4d8713dc1a83f5ff7 30-Jun-2015 Matt Wala <wala@google.com> slang: Improve handling of StringMapEntries.

In Slang::checkODR(), change a line that deletes an entry when it
fails to be inserted. There are two problems with this line:
(1) Calling delete is wrong, since the entry is malloc'ed.
(2) The line is unreachable.
Since the line is unreachable, replace it with an assert attesting to
this fact.

In RSContext::insertExportType(), the code properly cleans up an entry
that failed to be inserted with free(). However, given that malloc()
is not called anywhere in slang, this could be confusing. Use the
Destroy() member function instead.

Change-Id: Ifc0920a86bb010a89e93319a70a423d87fb97e3f
eae0b7ad0195360b0afc37d51553f2917f1aa365 16-Jun-2015 Matt Wala <wala@google.com> Extract special function handling functions into their own namespace.

This moves a bunch of static functions out of RSExportForEach.

Change-Id: Ibe022105cc03239990af8df3dd13d86a1d4836ec
f5b882cc561f656eb650d0fa6db7bac57989ab12 16-Jun-2015 Matt Wala <wala@google.com> Move kernel/static incompatibility check into AST validator.

The predicate RSExportForEach::isRSForEachFunc() was checking and
reporting an error if kernel attributes were paired with static
function declarations, which is an error in RenderScript. It makes
more sense to do the check in the AST validator. That way the work of
the predicate function doesn't involve validation.

Change-Id: I8a956f5e4ad72845ed759f9088cf8e3d543d2a0a
c706907a8041faaa882f9bd87f1d1c1669023a62 18-Mar-2015 Stephen Hines <srhines@google.com> Update slang for LLVM rebase to r230699.

Change-Id: I6fa2c59b1445735e2eb95deb4ac503cb9ed369ee
5abbe0e9ca2508260b627ffef2bf01e2554e8357 13-Aug-2014 Chris Wailes <chriswailes@google.com> Replace the NULL macro with nullptr literal.

Change-Id: I33609969cd0d7aa55eaa83fb2c65f5faa6d55fa0
a9186d31532c779257ae3a495034417dfa037e83 24-Jul-2014 Stephen Hines <srhines@google.com> Merge "Update slang for LLVM rebase to r212749."
2eb9a3f7c48fe54eb4e813d80e3363bc79553a1e 16-Jul-2014 Stephen Hines <srhines@google.com> Update slang for LLVM rebase to r212749.

Change-Id: I5819f9df3212ffcfa8f34c11d3cea29f1fd04878
109e90a854ac8d8f4df24ef27db636a641ba9913 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.

Also add a validation that two incompatible precision
pragmas have been specified.

Change-Id: Ib70430872b4a3058b36f8196cbcffba2e4beb322
9ae18b2bbee0b08afd400542e863dd665ff76059 11-Jun-2014 Stephen Hines <srhines@google.com> Add an option to emit 32-bit and 64-bit bitcode.

Bug: 16031597

Change-Id: Ifb3c4eca5e7ae16106260c2b5f5da6854c021a3a
fc4f78b9c7941132fb048a83f0e4ba528c3b4fd0 11-Jun-2014 Stephen Hines <srhines@google.com> Add -v (-verbose/--verbose) option to llvm-rs-cc.

This change also suppresses the display of "Generating Script*." output by

Change-Id: I034a3ba20acf64e1eb9ecc02133edb03b643d559
12fc283f4108fd6f7f0164c121ff2f6fb5044225 04-Jun-2014 Jean-Luc Brouillet <jeanluc@google.com> Don't go through RSContext for the Java reflection (take 2)

Change-Id: I08e5be9c4e39501238a9f9c382f0c66b2caf5a8d
7fda9848f91fc5cca55f63423b35672128b6daab 04-Jun-2014 Jean-Luc Brouillet <jeanluc@google.com> Revert "Don't go through RSContext for the Java reflection."

This reverts commit cc1b9699446aea20773e4c3c6ff5759fedd8ab51.

Change-Id: I330f8beb02ba4868ce115848543c506d5dea46bf
cc1b9699446aea20773e4c3c6ff5759fedd8ab51 04-Jun-2014 Jean-Luc Brouillet <jeanluc@google.com> Don't go through RSContext for the Java reflection.

The C++ code does not do that. RSContext should just contain the

Change-Id: Idd9d4c00bdd27b51ba7fc0aee8c5e7cfdab6d0a0
602def74e8afa68b72a1f9391c31d6ff152add53 28-May-2014 Jean-Luc Brouillet <jeanluc@google.com> Rename RSReflection to RSReflectionJava.

Change made to make it more obvious the type of code created for this file. Reformatted the headers with clang-format, hence the slight changes in indentation style.

Change-Id: Ib2c748d84bd4eb8a188f95c0c60014ad4c60711f
796e7b1400d3f3f7c07496d88bb48129ea925bb9 27-May-2014 Jean-Luc Brouillet <jeanluc@google.com> Remove useless "return;" statements.

More cleanups to follow...

Change-Id: Ib8348255273771c1e9ff07e79bd7fbc8f2795a5b
44d495d2ad8c350a8f586502c9ee8e97a513646a 23-May-2014 Stephen Hines <srhines@google.com> Clean up embedded bitcode path for Java.

Change-Id: I79cc65778173c7eeab028dedfc4adcb59bef44c2
ee4016d1247d3fbe50822de279d3da273d8aef4c 11-Apr-2014 Tim Murray <timmurray@google.com> Update Slang for Clang/LLVM 3.5a.

Change-Id: Icd59efa1197098076555c505c31939866e504a83
50cab07b24f9d85899e697cac88a05cb8347fe74 25-Mar-2014 Narayan Kamath <narayan@google.com> Fix clang compile errors.

Clean up several unnecessary forward declarations
and private member variables.

Change-Id: I5cd27a82ae222b8ee589cd279d8778ef7061a531
d3f7527b105d21f1c69d3473eb88a762f2c3ab5a 17-Jan-2014 Jean-Luc Brouillet <jeanluc@google.com> Add ReportErrror/Warning to RSContext.

Remove a lot of boilerplate code by adding error reporting methods to RSContext. There are still a few additional files that could be cleaned. That will be for another CL someday.

Change-Id: I6a261735720227ac87d94dbdea5ce4a7b8ef6cca
925879fa622dda293806ed25b1ee63d2f4a8d65a 20-Jul-2013 Stephen Hines <srhines@google.com> Clean up handling of Java package name for llvm-rs-cc.

Adds support for C++ code generator to use this package name as well.

This change also resolves a small issue with an uninitialized mVerbose flag.

Change-Id: Ia3037a3f4dbe172ddc51af3064ac1708526a6df6
44f10063c2c08dab103a44cded0c3a288d65d43b 13-Jun-2013 Stephen Hines <srhines@google.com> Update slang for LLVM merge to r183849.

Path.h -> PathV1.h
Fix test output diagnostics related to pragma location

Change-Id: I7ab5372e848494ac40f1284eb6f9accc18092ad7
4c7c95cab6a7baf46bbedaf6c2a67d93eafc3e66 22-Jan-2013 Stephen Hines <srhines@google.com> Merge "Skip reflection of resize() when building for the compatibility library."
23c4358f12bd9d0ba7166eceebd683db95a41b3f 10-Jan-2013 Stephen Hines <srhines@google.com> Updates for LLVM merge to r171906 on 20130108.

Change-Id: I4cf3718041d8876d4a23a412b6b4fa4226ec3b50
82754d87921c94e70562aa977cc92e28fc38b1d0 19-Jan-2013 Stephen Hines <srhines@google.com> Skip reflection of resize() when building for the compatibility library.

Change-Id: I2669914b3139756a8cf559ed99b845e77df87df0
089cde338148fbb75825aea4539ccdae8211ffef 08-Dec-2012 Stephen Hines <srhines@google.com> Forbid non-const static variables in kernels.

Bug: 7688011
Change-Id: If03084a9ece76478e0ed0847b75f09c41b89a500
cf9a73a4140402c0e9e4fbab27477f22cc7d8e3c 20-Sep-2012 Stephen Hines <srhines@google.com> Fix teardown bug for multiple files without pragma.

This previously caused a segmentation fault in llvm-rs-cc. We were
improperly using the DiagnosticsEngine after we had reset() everything.

Bug: 7202787

Change-Id: Ic8522566ef257e70f16caf34b89f6a8e012908c5
0a813a3ef2a82f19d7eab9e23ae8493197143803 04-Aug-2012 Stephen Hines <srhines@google.com> Add RS package name option + support.

llvm-rs-cc -rs-package-name=android.renderscript ...
llvm-rs-cc -rs-package-name android.renderscript ...

This allows us to reflect a different import path for our base RS classes.
The default value is "android.renderscript", resulting in a reflection that
produces "import android.renderscript.*;".

Change-Id: Icf7e83b963ba70c803899697f49b41fdfb9586e7
14a7e172a411372d4edd84ea791ab972598dfa17 24-Apr-2012 Shih-wei Liao <sliao@google.com> Apply changes to migrate to CLANG-155088-20120419.

Change-Id: I77fee87d511ce9d36c56b76c58b4a6caef888676
c17e198ffcd37bfc57e3add1f6eee952ae2a2eab 22-Feb-2012 Stephen Hines <srhines@google.com> Support dummy root() and re-ordering in presence of non-root kernels.


Change-Id: Ib3ed249916d36acf68ab32e9216804ae1da5e991
9999ec3aa0c4d7a6befd3a300dc07f0cea91cb6c 11-Feb-2012 Stephen Hines <srhines@google.com> Clean up graphics/compute root() distinction.


Change-Id: I29096556dff2072a8757e0dfd3321006cd60bb27
7aff4a0a124209fdf93ecbcd7aed701d39ba094b 09-Dec-2011 Stephen Hines <srhines@google.com> Update error diagnostics.

Change-Id: I8415450504f95cc3ad35866ed884fafc7ee24c90
f736d5a12269e7e74740b130cdca98d9839b31e6 27-Oct-2011 Stephen Hines <srhines@google.com> Add back pre-ICS support for "int root(int);".


Change-Id: Ic1f3c071562c687a98125c2151e306313c5405b8
4a4bf92a8add68629a7e6e59ef81c3c3fe603a75 19-Aug-2011 Stephen Hines <srhines@google.com> Don't generate forEach() on pre-ICS target SDK.

Change-Id: I794587d1f79a08aca8cc4f7f20f4012050ab0501
b5a89fbfcba6d8817c1c3700ed78bd6482cf1a5d 17-May-2011 Stephen Hines <srhines@google.com> Clean up forEach reflection code.


Change-Id: I8196608408fe333bd8e875d9517b8e875bdce17d
593a894650e81be54173106ec266f0311cebebd3 11-May-2011 Stephen Hines <srhines@google.com> Simple support for reflecting rsForEach().


Change-Id: Idf722ee3fb07c8e46ac0c4628e753ff2fa6840cf
b6809edd6ee8b90982425fb8ad24e867708b46fc 09-May-2011 Stephen Hines <srhines@google.com> Provide multiple diagnostics when we can.

Change-Id: I2e13baa20cb7dd39ae2e00cd011771b1b8574357
5baf6324a97430016026419deaef246ad75430fc 26-Apr-2011 Stephen Hines <srhines@google.com> Check RS functions (esp. init/root) for validity.

Change-Id: Ice65c8b691550e2d11caf621e0f88c822316601b
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 ->

- 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

- Add const qualifier for several unsafe type cast.
f2174cfd6a556b51aadf2b8765e50df080e8f18e 10-Feb-2011 Stephen Hines <srhines@google.com> Handle struct reference counting.

Bug: 3092382

Change-Id: I215bd8245324ec2b7752a7c40817e3e5cd1c0e00
3fa286b4c2f110c6be2bbfac9c715bb1ec880338 10-Feb-2011 Shih-wei Liao <sliao@google.com> Fix b/3427124. Adding the overloadable invokable feature. Reflect that type of invokables to Java.

1. Add __attribute__((overloadable)) support on the rs side for invokables. Requested by the Books team.
2. Add name mangling support and MangleContext.
3. Add the test P_overload.
4. This CL only affects Honeycomb SDK. It doesn't affect Final ROM.
5. This CL should go in at the same time with another CL on external/clang.git (to be done now.)

Change-Id: I9e743894a97626d8c27b0dd9c0a51cef1175d2ab
6e6578a360497f78a181e63d7783422a9c9bfb15 08-Feb-2011 Stephen Hines <srhines@google.com> Add support for assertions in llvm-rs-cc.

Bug: 3430674
Change-Id: I3400238652449cde84275cc2a770f405332d9544
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
3fd0a94a5cf1656569b1aea07043cc63939dcb46 18-Jan-2011 Stephen Hines <srhines@google.com> Refactor pragma handling (pass everything to LLVM)

Change-Id: Id09d4934af06f0880cd867456218602ce9a9e2de
96ab06cbe40b2d73c0eb614f814cd761d8962b6b 06-Jan-2011 Stephen Hines <srhines@google.com> Add support for the version pragma.

Change-Id: I62707dcb432093ba50db95e527d55ff781be22a9
2ef9bc0cfbca2152d972c0975005f8c897c2a42c 14-Dec-2010 Stephen Hines <srhines@google.com> Convert fprintf -> diagnostic messages.

Proper support/test for multi-level pointer types.
Proper diagnostics for bit fields, which are currently
not supported.

Bug: 2954471
Change-Id: I347f14f02fcf7fbef9f6e5dde5b4e948391a0691
c97a333bc84ce8c28c96d07734cbded75c914639 01-Dec-2010 Stephen Hines <srhines@google.com> Improve validation of AST before reflection.

Change-Id: If4b52f3a713ab97145bc31ef42b18d1cc144099a
c808a99831115928b4648f4c8b86dc682594217a 30-Nov-2010 Stephen Hines <srhines@google.com> Add prelim error check for pointers in structs.

Bug: 2954471
Change-Id: Icacf67dd3eeb3dda67e1eae3d54e11f7efa6c680
35f5b39f0490953f1fe13ef803b43e3ced9a01d9 23-Nov-2010 Stephen Hines <srhines@google.com> Missing pragma for java_package_name is an error.

Bug: 3122920

Change-Id: I88fcb07b95d47e1aba28fcf6e255d17ef957f285
2d2512c5703bb238b7935ab5228beff6563f2f94 19-Nov-2010 Stephen Hines <srhines@google.com> Remove legacy code for export func/var pragmas.

Change-Id: I62e0768b11e4192ffde8ed26c0160d62e8f09714
3fbe68a4ec20fec25f8a40191437bbc02d00f591 18-Nov-2010 Stephen Hines <srhines@google.com> Turn on support for exporting non-static funcs.

Bug: 2932253
Change-Id: Ice5422b4a3d78f8c2973e1af6c8abea30fa74bb6
e639eb5caa2c386b4a60659a4929e8a6141a2cbe 09-Nov-2010 Stephen Hines <srhines@google.com> Improve code style.

Change-Id: I26e043849bce2a4b41ae132fbe0c882f4a6f112f
9e5b503349719144f63ccb7c62ee9c291a7d83b8 03-Nov-2010 Stephen Hines <srhines@google.com> Use Clang object references instead of pointers.

Change-Id: Ief0e78859572761d880eaad9ae854f14e65da2c4
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.
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

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.
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.
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.
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.
6791df284557f4173a9715b3634f4f4901a6bb8a 09-Oct-2010 Shih-wei Liao <sliao@google.com> New implementation of llvm-rs-cc (replacement of slang_driver).

Change-Id: I1b8b6cf3dad8ef8fe2f4d24d4df604099f45ff37
2df25dbc3b09764b7bed9f02aee7cbd3d9720ef2 08-Oct-2010 Stephen Hines <srhines@google.com> Export all non-static globals in RS.

Change-Id: Ie021b603085c901fbaf83cb231ce2999ce28c791
a41ce1d98094da84643995d40d71c529905123fc 05-Oct-2010 Zonr Chang <zonr@google.com> Fix memory leak of RSExport* object create in processExport(). Now, they will
properly be freed after their associated RSContext was destroyed.
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.
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
cecd11d2af5d45d8ba322bed61fb48a99c305528 21-Sep-2010 Shih-wei Liao <sliao@google.com> Fix warnings. Bug fix.

Change-Id: I80934814ae64d11f0edebfa3b131164207f1aca0
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
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
28cf66d9a9f82dc4bd4708db905423d14e101ed6 29-Aug-2010 Shih-wei Liao <sliao@google.com> Check export pragma.

Change-Id: I467424b46fb63e4341165b04332c14850946e385
ac91815eb4918b9307ec876f34f2b60adf28c78b 29-Aug-2010 Shih-wei Liao <sliao@google.com> Check export pragmas in the rs file.

Change-Id: I6e934bfc166b85fffdd8d2897a823b651910d43f
c81dd70ab201ba13033004d36107ed96a6ad8036 20-Aug-2010 Shih-wei Liao <sliao@google.com> Memory errors: Fix mismatched free() / delete / delete [].

Change-Id: I6fcac252953a0c2bd48b3146b7e9f2d6861fc703
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
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
6de89272b00a31f2a73e2f56edf9cc511df46265 16-Jul-2010 Shih-wei Liao <sliao@google.com> Add --output-java-reflection-path | -p

Change-Id: I951a3540aa653060f81ff76b670ffb4b0029a3ca
e3756aa450b690cf5d18c0ea572ef7563de97bb3 12-Jul-2010 Victor Hsieh <victorhsieh@google.com> Usage Linkage for choosing vars/funcs which should be exported instead.

Change-Id: I7773bbfea721cc2c9423cf4e89e0d14c9539d14d
a50704238e06bc72a7ea3e8282fb5d350f88fd08 08-Jul-2010 Victor Hsieh <victorhsieh@google.com> Rename *ExportAllStatic* to *ExportAllNonStatic*.

Change-Id: I454a181e0081334e9e3dee99e80c2f875258d6ed
d8a0d186a362739f385f1a4af35360d5da69e47b 07-Jul-2010 Victor Hsieh <victorhsieh@google.com> Add pragma rs set_reflect_license

Change-Id: I9c3d9505c108a11b6c3fd85499fbac10da9f2532
c6718b312b793ea76ac6b61479090c33ba9f2ba6 23-Jun-2010 Victor Hsieh <victorhsieh@google.com> Add pragma rs export_var_all and export_func_all

Change-Id: Id9a90aeeb7cf74b3e9247cf8b998d5c5358ac73a
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
537446c9542fdda458920876ed8a020a97ddf7a4 12-Jun-2010 Shih-wei Liao <sliao@google.com> Add support to #pragma rs java_package_name.

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

Change-Id: If74da8e54d45511c8c9bb236bcfeec508f4f2439