summaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2013-10-03Remove references/use of ARCH_X86_HAVE_*.Stephen Hines8-30/+20
Bug: 11048298 These SSE-related defines are unnecessary because all x86 Android devices have these features. We switch all the checks to __i386__ instead. This also fixes an issue where non-ARM bitcode files were being created with the ARM defines present. This is problematic when we then try to do things that would be arch-specific (i.e. the presence of SSE-enabled functions for clamp(), ...). This also cleans up the different target architecture specified in the x86 bitcode files so that they match the platform target (i686-unknown-linux). Change-Id: Ibbead4aecba2c90bdbe6ff362960079cb7a9e4dc
2013-09-26resolved conflicts for merge of b9a4701b to klp-devStephen Hines1-1/+2
Change-Id: I9f7924c489d36913e130fd5e7617e3a96e65f1a1
2013-09-26Fix windows line ending bug.Stephen Hines1-1/+1
http://code.google.com/p/android/issues/detail?id=60327 Change-Id: I578bab2f41347ac2e43b7d4dc1f206c5f91aeae5
2013-09-23DO NOT MERGE - x86_64/x32: Add targetsPavel Chupin1-1/+1
This change allows to continue other project builds and avoid early exit from make. This project is required real porting to x86_64/x32 and assemblies rewritten. Change-Id: I83e6cf8fe51ee24f0d6d090f7a97cd9314b02b03 Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
2013-08-26DO NOT MERGE - Only support EnableGlobalMerge on ARM architectures.Stephen Hines1-0/+5
Change-Id: I5c4c236c306e120c5aa24fbc91815cc27d7aab0f Conflicts: include/bcc/Renderscript/RSCompilerDriver.h
2013-08-26DO NOT MERGE - Provide a way to disable LLVM's global merge optimization.Stephen Hines1-2/+8
Change-Id: I92dff2a208c821722f057dd8c26bd12a1cb5a794 Conflicts: include/bcc/Renderscript/RSCompilerDriver.h lib/Renderscript/RSCompilerDriver.cpp
2013-08-20DO NOT MERGE: Refactor the libbcc runtime for x86 platformJun Tian11-936/+94
This patch refactors the libbcc runtime code to support x86 platform. It removed the redundant x86 code and added the missing functions in libclcore_x86.bc. It resolved the RenderScript failures on the x86 platform. Bug: 9961583 Change-Id: Ieed97e90c7c7691185a88dc425a2dd8c68aeb806 Signed-off-by: Yong Chen <yong.a.chen@intel.com>
2013-08-15resolved conflicts for merge of 8607272a to klp-devandroid-4.4_r0.7Stephen Hines1-0/+6
Change-Id: Ic9b996432bfcd228ae8a45f75bc9c564a3a66a31
2013-08-09Update libbcc for LLVM merge to r187914.Stephen Hines2-48/+8
Switch over to new llvm::sys::path implementation. Remove unused Source::CreateFromFd(). F_Binary is now in llvm::sys::fs. Change-Id: Ib0ebb8a1d8ea04e5cf36c8082cf31dab2e144554
2013-08-08Remove locking code on Windows builds.Stephen Hines1-0/+4
Change-Id: Ia5656cf4feec3206e73ecc3e3b504146b0c66707
2013-08-07Merge "Decode RenderScript kernel signatures using bcinfo::MetadataExtractor."Stephen Hines1-39/+19
2013-08-07am a08768d4: am 48cd7454: Fix Windows build issues for libbcc.Stephen Hines4-53/+40
* commit 'a08768d46fa5e3087d0fbd288366c53495ee2773': Fix Windows build issues for libbcc.
2013-08-02Decode RenderScript kernel signatures using bcinfo::MetadataExtractor.Stephen Hines1-39/+19
Change-Id: I9472d0c36e23a1e0d583fc823c986ee7a1bb05ed
2013-08-01Annotate allocations with Renderscript TBAA metadataTobias Grosser1-4/+103
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
2013-07-31Use BUILD instead of HOST for bcc_strip_attr.Stephen Hines1-1/+1
Change-Id: Ifeea47994e36d29f690bd77af812500f7e023db1
2013-07-31Fix Windows build issues for libbcc.Stephen Hines4-53/+40
Add unimplemented versions of dlfcn.h functions. Remove OutputFile::CreateTemporary(), since it is unused. Remove unnecessary includes to prevent issues with missing libraries. Change-Id: I74bea72c8f174843e61faa8cac8bd6ae429a1bc0
2013-07-30Remove libbcc's dependence on mclinker.Stephen Hines6-732/+5
These features are no longer being used by libbcc, and static initializers from mclinker are conflicting with tool development (i.e. positional argument specifiers for the new bcc executable). Change-Id: I0da427034c50015607a59d4193547868fa9eeabf
2013-07-30Remove ABCC and associated components.Stephen Hines13-1033/+0
Change-Id: I93f1c2918ca68268d09fac5249e8ba24d6d76dd8
2013-07-23Remove beforeExecuteLTOPasses callbackTobias Grosser2-23/+19
This callback had very unclear semantics and the current use was suprising. Specifically, it took a PassManager parameter, but adding anything to this pass manager would cause the passes to be executed after the other LTO passes The only way to execute passes before the LTO passes, was to create a new pass manager that executes a pass right before all LTO passes (that have already being queued in the pass manager passed in as a parameter) will be executed. The very same behavior can be achieved by just adding our passes to the normal pass manager using the "BeforeAddLTOPasses" callback. We used this callback to schedule the ForEachExpand pass. This pass is now moved to the beforeAddLTOPasses callback. Change-Id: I3916543a4ee282e403174b90dc7b7588baab9ea3
2013-07-23Improve error code to error string translationTobias Grosser1-49/+45
We now use an explicit switch to translate an error code to an error string as this allows the compiler to statically verify that we covered all cases. While at it we add a new error message for "kErrInvalidSource" which was missing previously. We also remove "kMaxErrorCode" as it was unused. Change-Id: I8ade465697c7fa6cc3e48c5c581e5a4dfcf15959
2013-07-12Only support EnableGlobalMerge on ARM architectures.Stephen Hines1-0/+5
Change-Id: I5c4c236c306e120c5aa24fbc91815cc27d7aab0f
2013-07-11Provide a way to disable LLVM's global merge optimization.Stephen Hines1-1/+5
Change-Id: I92dff2a208c821722f057dd8c26bd12a1cb5a794
2013-07-02ForEach: Not all kernels are expandedTobias Grosser1-6/+9
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
2013-07-01ForEach: Set internal linkage for kernel functionsTobias Grosser1-5/+10
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
2013-07-01Remove manually inlined populateLTOPassManager()Tobias Grosser1-77/+5
Instead of copying the content of llvm::PassManagerBuilder::populateLTOPassManager() we just call it. This does not only reduce code duplication, but also ensures that we do not miss anything. Specifically, the previous code did not run any alias analysis at all. After this change we now always run tbaa and basicaa. This does not give any benefits at the moment, but is a prerequisite for upcoming changes to our alias analysis. Change-Id: I01b352255e958cbc1c996d934a519f5ab71f9f24
2013-06-27ForEach: No IntToPtr casts for ptr kernel inputsTobias Grosser1-18/+12
Instead we replace the calculation of the pointer offsets with an explicit getElementPointer instruction. Change-Id: I95bedfa1b17b839a122548f4d855d6ec40c7467b
2013-06-27ForEach: No IntToPtr casts for byvalue kernel inputsTobias Grosser1-16/+11
Instead we replace the calculation of the pointer offsets with an explicit getElementPointer instruction. Change-Id: I4e31fe42382cd0f37ed582d62795555482186d96
2013-06-27ForEach: No IntToPtr casts for ptr outputsTobias Grosser1-13/+18
Instead we replace the calculation of the pointer offsets with an explicit getElementPointer instruction. Change-Id: I350cacd132d97dc620fe3c1c3ca89d1028677965
2013-06-27ForEach: No IntToPtr casts for byvalue outputsTobias Grosser1-14/+24
Instead we replace the calculation of the pointer offsets with an explicit getElementPointer instruction. Change-Id: I814a18d4d48e3e0bd13ca93697ad049fa0ed8c4c
2013-06-26Dump LLVM-IR before generating target codeTobias Grosser2-14/+24
Dumping the IR earlier prevents target specific passes to modify the IR before it is dumped. Change-Id: I8a61efb7140b0c2025381ea1ad1f4cf3522ec870
2013-06-26ForEachExpand: Use consistently unsigned integers in loopTobias Grosser1-2/+2
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
2013-06-25ForEachExpand: Construct loop in a separate functionTobias Grosser1-62/+67
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
2013-06-25ForEachExpand: Create a complete functionTobias Grosser1-16/+21
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
2013-06-25ForEachExpand: Name arguments at the time the ForEachStub is createdTobias Grosser1-14/+20
This also removes code duplication. No functional change intended. Change-Id: Ie01d0578a70219909cac3c77e3b184589c371845
2013-06-25ForEachExpand: Factor out creation of ForEachStub functionTobias Grosser1-38/+26
This also removes code duplication. No functional change intended. Change-Id: I60f2d1d7017db33303ae1bffaa54f578a2276585
2013-06-25ForEachExpand: Create ForEachStub type in separate functionTobias Grosser1-61/+37
This also removes code duplication. No functional change intended. Change-Id: If00fced7db10c37306879fa633aa4453e84d98f0
2013-06-20Merge "Switch to using full pathnames for cached information."Stephen Hines1-2/+4
2013-06-20bcc: Add option -emit-llvmTobias Grosser1-3/+17
Change-Id: I98470c6573b216518f77d338f4659d5b9fbcc3d3
2013-06-19Switch to using full pathnames for cached information.Stephen Hines1-2/+4
Bug: 7342767 Change-Id: I8997f4d2834fd607bcfc3bb7db81d8e90b4e4f37
2013-06-18Don't dlclose things that haven't been dlopen-ed.Stephen Hines1-1/+4
Change-Id: I48ee73f3ca48d4345b976bcdbb08733f60ecdcfe
2013-06-15Remove libbcc's dependence on mclinker.Stephen Hines6-737/+5
These features are no longer being used by libbcc, and static initializers from mclinker are conflicting with tool development (i.e. positional argument specifiers for the new bcc executable). Change-Id: I0da427034c50015607a59d4193547868fa9eeabf
2013-06-13Update libbcc for LLVM merge to r183849.Stephen Hines1-1/+1
Remove unused param to readBytes(). Path.h -> PathV1.h Remove ability to load/run files from bcc tool. Change-Id: I07d735fb86638412f01c4f8285d56f45ca35b672
2013-06-11Detect NEON availability at run-timeTobias Grosser1-6/+1
Change-Id: I75f408fc46be2f29c39d8c82e1c57ad4603b331b
2013-06-06Merge "Further separate build (compile) and load in libbcc."Stephen Hines1-91/+80
2013-06-06Allow rs to tune for specific ARM CPUsTobias Grosser1-0/+3
This feature can be disabled with by setting 'debug.rs.arm-no-tune-for-cpu'. Change-Id: I61f9a170edfc514347fc88f5f515d1ba5cb812d9
2013-06-06Detect and enable hardware divisionsTobias Grosser1-0/+15
To understand the performance impact of hardware division it can be disabled by setting 'debug.rs.arm-no-hwdiv'. Change-Id: Ib731f38ba56472c96f5fc0f2125fcf6a9f3998b9
2013-06-05Further separate build (compile) and load in libbcc.Stephen Hines1-91/+80
Bug: 7342767 Change-Id: Ia6000d6c3557280126c6bb7f945c922528adeedc
2013-06-04Remove ABCC and associated components.Stephen Hines13-1033/+0
Change-Id: I93f1c2918ca68268d09fac5249e8ba24d6d76dd8
2013-06-04Load scripts from cached files every time.Stephen Hines3-116/+84
Bug: 7342767 Having an separate in-memory (vs. file-based) loader makes little sense as we refactor libbcc (to separate it into its own process space). This change is a first step in cleanly separating the compile and link steps. Change-Id: Iad67527329171f18475ced0f0b2652a0aa060259
2013-05-29Move RS runtime to frameworks/rs.Stephen Hines27-7755/+0
Bug: 7342767 Change-Id: I2c5e75a7324d9b7c1a89c81f377bf0718e96b463