History log of /frameworks/compile/libbcc/lib/Renderscript/RSForEachExpand.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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