History log of /frameworks/compile/libbcc/lib/Renderscript/RSForEachExpand.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4839c9acf4e935dab0b3de3fac0e315d00c3a369 30-Oct-2014 Tim Murray <timmurray@google.com> Disable step opt for 12-byte structs on 64-bit.

bug 17663411

Change-Id: I21c67f95704e8aeb63f72bd371b1b5a5cc6e569d
/frameworks/compile/libbcc/lib/Renderscript/RSForEachExpand.cpp
c43e1ba9cf40277dd496fe503e777906d2755251 01-Aug-2014 Chris Wailes <chriswailes@google.com> Fixes AArch64 struct calling convention issue.

Change-Id: I9a760c1238ff8b30e0a29a2cd11a030b17b283e2
/frameworks/compile/libbcc/lib/Renderscript/RSForEachExpand.cpp
881cda4f5b793a1e7f7d33cf4a31efc3fdbba4fd 23-Jun-2014 Chris Wailes <chriswailes@google.com> Adds support for multi-input kernels to libbcc.

This patch modifies libbcc in the following ways:
* Adjusted the data-layout of the LLVM version of RsForEachStubParamStruct to
accommodate a pointer to an array of input allocations and a pointer to an
array of stride sizes for each of these allocations.
* Changed how some LLVM values are stored in ExpandKernel.
* Causes expanded multi-input kernels to extract input allocation base pointers
from a field in the param strcut and load values from these allocations
appropriately.
* Causes expanded multi-input kernels to use the provided dynamic input stride
sizes if no appropriate static type information is present.
* Modified bitinfo to support a new development API target which is used to
version gate support for multi-input kernels.

Change-Id: I46d2834c37075b2a2407fd8b010546818a4540d1
/frameworks/compile/libbcc/lib/Renderscript/RSForEachExpand.cpp
bdbff6e600b0d834e4770f65c7d2df93d7ef305c 13-Jun-2014 Chris Wailes <chriswailes@google.com> Simple cleanups in RSForEachExpand.cpp

Re-named single character variable names.
Re-named some variables for clarity.
Factored out type construction code to only occur once every time the pass is
run on a module.
Removed unnecessary temporary vectors.
Removed a check for an invariant guaranteed by another function.
Added some assertions.

Change-Id: I0debcc301ed28f4ecaf7dadcaada604e3eff9830
/frameworks/compile/libbcc/lib/Renderscript/RSForEachExpand.cpp
25eb586bb055ae07c7e82a2b1bdbd6936641580c 09-May-2014 Stephen Hines <srhines@google.com> Switch RSForEachExpandPass to use MetadataExtractor.

Change-Id: I442054e7aa2329b369f578052bd41c7a973cc822
/frameworks/compile/libbcc/lib/Renderscript/RSForEachExpand.cpp
14588cf0babf4596f1bcf4ea05ddd2ceb458a916 19-Feb-2014 Logan Chien <logan.chien@mediatek.com> Fix TBAA: Set path tag metadata to instruction.

This commit replace the old createTBAANode() with the
struct-path TBAA introduced after LLVM 3.3.

This should fix the possible regression after merging LLVM 3.4.

Change-Id: Ie21fe4616784bad467b0f20226fce48da3afb2bd
/frameworks/compile/libbcc/lib/Renderscript/RSForEachExpand.cpp
9c5263e00d89dfdd25d3a1706eb319e8529ec604 12-Feb-2014 Stephen Hines <srhines@google.com> Provide a flag to disable TBAA for RS (and disable TBAA temporarily).

Bug: 12977065

This is currently blocking the LLVM 3.4 rebase, since our TBAA pass is causing
NULL pointers to be dereferenced.

Change-Id: I51cd9d0efc331150970c3054a9cd26f55aa2eb0d
/frameworks/compile/libbcc/lib/Renderscript/RSForEachExpand.cpp
d88177580db4ddedf680854c51db333c97eabc59 03-Aug-2013 Stephen Hines <srhines@google.com> Decode RenderScript kernel signatures using bcinfo::MetadataExtractor.

Change-Id: I9472d0c36e23a1e0d583fc823c986ee7a1bb05ed
/frameworks/compile/libbcc/lib/Renderscript/RSForEachExpand.cpp
18a38a3fc6fad8355891b771dd3c6537fa8699ec 27-Jul-2013 Tobias Grosser <grosser@google.com> Annotate allocations with Renderscript TBAA metadata

We extend the RSForEachExpand pass to emit Renderscript TBAA metadata.
This allows us to prove the absence of aliasing between accesses to to
allocations and other data accesses. This is especially useful as it enables
the compiler often to hoist loop invariant globals out of the compute loop.

Change-Id: Ic993c85b56ecf79b9cd5241fe3d961ace2b23935
/frameworks/compile/libbcc/lib/Renderscript/RSForEachExpand.cpp
acde6013e9c448547e59eed04afd2adbd9681a3a 02-Jul-2013 Tobias Grosser <grosser@google.com> ForEach: Not all kernels are expanded

Bug: 9674197

There may be some graphics root functions that are not expanded
and can consequently not be marked as internal linkage.

Change-Id: I643a2c82b91ba94fbd30598402698173ca2307ab
/frameworks/compile/libbcc/lib/Renderscript/RSForEachExpand.cpp
cd5b657c39a348bd7652a19c5be5035e9df44a42 02-Jul-2013 Tobias Grosser <grosser@google.com> ForEach: Set internal linkage for kernel functions

The expanded function is the external visible interface. Setting internal
linkage will influence the cost function of the inliner. Specifically, the
inliner knowns that no external users will use the unexpanded kernel function,
which means it will inline it and remove the original function.

This gives a 22% speedup on the colorcube 3D, 19% on convolve3x3
as well as minor speedups on fisheye.

Change-Id: I9770c92d24dfc7978145e694d1a35829c5432264
/frameworks/compile/libbcc/lib/Renderscript/RSForEachExpand.cpp
4102bec56151fb5d9c962fb298412f34a6eacaa8 27-Jun-2013 Tobias Grosser <grosser@google.com> ForEach: No IntToPtr casts for ptr kernel inputs

Instead we replace the calculation of the pointer offsets with an explicit
getElementPointer instruction.

Change-Id: I95bedfa1b17b839a122548f4d855d6ec40c7467b
/frameworks/compile/libbcc/lib/Renderscript/RSForEachExpand.cpp
ae937ec9658c219a38d9d631d2569f19e21b50c0 27-Jun-2013 Tobias Grosser <grosser@google.com> ForEach: No IntToPtr casts for byvalue kernel inputs

Instead we replace the calculation of the pointer offsets with an explicit
getElementPointer instruction.

Change-Id: I4e31fe42382cd0f37ed582d62795555482186d96
/frameworks/compile/libbcc/lib/Renderscript/RSForEachExpand.cpp
02f3cd69a4103f91a51a2f988f2179c885d734b5 27-Jun-2013 Tobias Grosser <grosser@google.com> ForEach: No IntToPtr casts for ptr outputs

Instead we replace the calculation of the pointer offsets with an explicit
getElementPointer instruction.

Change-Id: I350cacd132d97dc620fe3c1c3ca89d1028677965
/frameworks/compile/libbcc/lib/Renderscript/RSForEachExpand.cpp
7b6629024395bf085ca64fcd5c69d2ded95e8d18 22-Jun-2013 Tobias Grosser <grosser@google.com> ForEach: No IntToPtr casts for byvalue outputs

Instead we replace the calculation of the pointer offsets with
an explicit getElementPointer instruction.

Change-Id: I814a18d4d48e3e0bd13ca93697ad049fa0ed8c4c
/frameworks/compile/libbcc/lib/Renderscript/RSForEachExpand.cpp
e87a0518647d1f9c5249d6990c67737e0fb579e9 26-Jun-2013 Tobias Grosser <grosser@google.com> ForEachExpand: Use consistently unsigned integers in loop

Previously we used an signed compare in the loop exit condition, but claimed
the absence of unsigned integer wrapping. We now use an unsigned comparison
reflecting that our integers are interpreted as unsigned values.

Change-Id: I3d77402e93dac625b3688078d5a1a826a32a9dac
/frameworks/compile/libbcc/lib/Renderscript/RSForEachExpand.cpp
e4a73f68e1b338881adf682c458e0b4b92ecd91e 22-Jun-2013 Tobias Grosser <grosser@google.com> ForEachExpand: Construct loop in a separate function

When expanding the loading/unloading of parameter values as well as the
creation of the implicit loop where mangled together. We now separate
them. This reduces code duplication and makes the difference between
the two ways of expanding a kernel more clear.

We also add some documentation and a FIXME that highlights the
surprising use of NUW during code generation.

The only functional change included here is that we switch to using PHI-nodes
instead of loading/storing the loop iterator to memory.

Change-Id: I8c28f3054eb00a73b8b754057625e52140c04405
/frameworks/compile/libbcc/lib/Renderscript/RSForEachExpand.cpp
806075b3a54af826fea78490fb213d8a0784138e 21-Jun-2013 Tobias Grosser <grosser@google.com> ForEachExpand: Create a complete function

In createEmptyExpandedFunction() we now create a complete function containing a
single basic block that directly returns. The advantage of creating a complete
function is that it allows us to maintain valid LLVM-IR throughout the whole
expansion process. This makes testing easier as commenting out later code does
not yield invalid LLVM-IR.

No functional change intended.

Change-Id: I0af12ec491f879be127461ff2a5a2c38543c8532
/frameworks/compile/libbcc/lib/Renderscript/RSForEachExpand.cpp
802f65931852d925bbe2e478bafe422b4002e7c4 20-Jun-2013 Tobias Grosser <grosser@google.com> ForEachExpand: Name arguments at the time the ForEachStub is created

This also removes code duplication.

No functional change intended.

Change-Id: Ie01d0578a70219909cac3c77e3b184589c371845
/frameworks/compile/libbcc/lib/Renderscript/RSForEachExpand.cpp
357b58691936bef425bd315c13a2d8019d7e9c7e 20-Jun-2013 Tobias Grosser <grosser@google.com> ForEachExpand: Factor out creation of ForEachStub function

This also removes code duplication.

No functional change intended.

Change-Id: I60f2d1d7017db33303ae1bffaa54f578a2276585
/frameworks/compile/libbcc/lib/Renderscript/RSForEachExpand.cpp
8ae4607d2dc5bc655d0c9225565d36ce2ebfc798 20-Jun-2013 Tobias Grosser <grosser@google.com> ForEachExpand: Create ForEachStub type in separate function

This also removes code duplication.

No functional change intended.

Change-Id: If00fced7db10c37306879fa633aa4453e84d98f0
/frameworks/compile/libbcc/lib/Renderscript/RSForEachExpand.cpp
b730e239619a546d93e5926ea92d698ab77ec7f6 10-Jan-2013 Stephen Hines <srhines@google.com> Updates for LLVM merge to r171906 on 20130108.

Change-Id: I096cb90103b19e3110ea562d60e5eb8ad48d9b67
/frameworks/compile/libbcc/lib/Renderscript/RSForEachExpand.cpp
ceb4c0f5fc5f63c6e494fc2fda25e4461d27abb5 25-Sep-2012 Stephen Hines <srhines@google.com> Switch to TargetData::getTypeAllocSize().

We were accidentally using 12 for float3 instead of 16, so our pointer
updates would get out of sync.

Bug: 7224526
Change-Id: I0e3f7f52ef3a862d7f60a46755bb22e533ff289d
/frameworks/compile/libbcc/lib/Renderscript/RSForEachExpand.cpp
74a4b08235990916911b8fe758d656c1171faf26 22-Sep-2012 Stephen Hines <srhines@google.com> Fix pass-by-value when the return type uses pass-by-reference.

Since we are using a baseline ARM ABI for Renderscript's portable bitcode,
we need to handle the case where a large return value gets passed as a
pointer (it becomes the first argument). This also fixes a small issue
where the first argument could be the return value (i.e. passed by
reference). I also have verified that coerced struct pass-by-value is
now working with this change.

Bug: 7166741

Change-Id: I7c00ff437ad862f9b8b244d87ccbca19e46c5775
/frameworks/compile/libbcc/lib/Renderscript/RSForEachExpand.cpp
7ae3a828fade4e30f7940415949f33ac1f15dc77 15-Sep-2012 Stephen Hines <srhines@google.com> Implement expandKernel() for pass-by-value.

This change implements the libbcc portion of pass-by-value in RS kernels.
The expandKernel() function creates the appropriate loop construct around
the kernel call (thus foo() -> foo.expand()).

Bug: 7166741

Change-Id: I2e4c85b8ac70372dc6d02671e8768381070e9721
/frameworks/compile/libbcc/lib/Renderscript/RSForEachExpand.cpp
8b5be8604307d0dd342235803dd45775830b84c6 03-Aug-2012 Shih-wei Liao <sliao@google.com> Apply changes to migrate to LLVM-160668-20120724.

Change-Id: I515f90ff6b7222f9e69481c21a10173e1b0b40d2
/frameworks/compile/libbcc/lib/Renderscript/RSForEachExpand.cpp
2b04086acbef6520ae2c54a868b1271abf053122 28-Jul-2012 Stephen Hines <srhines@google.com> Use known strides instead of input args when possible.

BUG=6892059

Change-Id: I15b3726624ff0eeca5e30aaa6de928f1c9912471
/frameworks/compile/libbcc/lib/Renderscript/RSForEachExpand.cpp
6e9e89d1ed049ec931bb1000948c12698e6c5484 28-Jul-2012 Stephen Hines <srhines@google.com> Add back support for bccAssert.

Change-Id: Ib8abe1c5c1bd8390fd3b9268f43f6de3c8803560
/frameworks/compile/libbcc/lib/Renderscript/RSForEachExpand.cpp
e198abec6c5e3eab380ccf6897b0a0b9c2dd92dd 28-Jul-2012 Stephen Hines <srhines@google.com> Rename RenderScript -> Renderscript.

Change-Id: I187928033b47f3e3f4cb811a0b3562f479cfe417
/frameworks/compile/libbcc/lib/Renderscript/RSForEachExpand.cpp