History log of /frameworks/compile/slang/slang_rs_check_ast.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
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
13fad85b3c99a37c17d8acfec72f46b8ee64e912 24-Nov-2015 Stephen Hines <srhines@google.com> Void pointers can't be exported.

Bug: http://b/25853842

Change-Id: I5b11fd14b6cd57a06522e921c62ed033488aa08e
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
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
ab94bccca64c9b126cbd1b732aa5e681d8639b99 12-Jun-2015 Stephen Hines <srhines@google.com> Move the error for pointers in structures earlier in the compile.

Bug: 21597073

This fixes an issue where a function argument is not checked for
compatibility until the reflected code generation (at which point the
message is far more cryptic). We do this by checking parameters for
externally-visible functions and externally-visible globals in our
ValidateType() routine.

Change-Id: I5ab9db1a11ed0e395c7623f1c9997632da057269
8024ed54c23c08534434da14d3be99c3efcc5754 05-May-2015 Jean-Luc Brouillet <jeanluc@google.com> Merge Slang with SlangRS, Backend with RSBackend.

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

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

Change-Id: Icd59efa1197098076555c505c31939866e504a83
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
48d893dc7794b3cfb74f35955ca763ee4170f9ad 07-Dec-2013 Stephen Hines <srhines@google.com> Support reflection of enums.

Prior versions would just crash when attempting to reflect an enum type.
This patch maps enums to integers for reflection in Java.

Change-Id: I5b278d670564ceb606a6b96804f76a798bedc89c
616854341745b958e0c409cdb6e21abb6225aa21 31-Jul-2013 Tobias Grosser <grosser@google.com> Add performance warning for rsSetElementAt

This warning proposes the use of typed rsSetElementAt calls in
case typed versions of this method are available.

Change-Id: I8d3b9bbd50b085d4e04db0008d7bf39733e0c663
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
dbb6dc37c377f8dd183f2069a6e27610d1202d98 08-May-2013 Stephen Hines <srhines@google.com> Disallow implicit and explicit casts of vector types in llvm-rs-cc.

Bug: 7342914

Vector types are aggregates (just like structs), and casting of any type
results in bitcasts being generated. This misbehaves when converting between
things like float and int. Even more troublesome than explicit casts are
implicit casts, which can arise from accidental arithmetic operations between
two different vector types.

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

Bug: 7688011
Change-Id: If03084a9ece76478e0ed0847b75f09c41b89a500
11274a7324b478ec13e1d10a1b81350b34a65ab1 27-Sep-2012 Stephen Hines <srhines@google.com> Validate FS (and RS) ASTs.

This change adds a new RSCheckAST class that is used to handle validation
of the final AST. The checks include existing RS checks (for accepted types)
and new checks for Filterscript (like disallowing pointers, unions and
> 32 bit types completely). The refactoring also fixes a subtle union bug
that existed in prior versions of llvm-rs-cc. We also add an implicit
pragma for "rs_fp_relaxed" by default on Filterscript.

Bug: 7166741

Change-Id: Ia077783b4caba0bbd89df2ab3827e9f4d1009eea