summaryrefslogtreecommitdiff
path: root/cpu_ref/rsd_cpu.h
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2013-04-29 19:13:09 -0700
committerStephen Hines <srhines@google.com>2013-04-29 19:13:09 -0700
commitb7d9c80c98fc96aa7c638e3124be24f13a6436b2 (patch)
tree8910248827ff290891edaccefd5025dfb2069bc3 /cpu_ref/rsd_cpu.h
parent6fe37d6bbbd7cecb4e049dd95ec9a308be30f679 (diff)
downloadrs-b7d9c80c98fc96aa7c638e3124be24f13a6436b2.tar.gz
Provide a mechanism for adjusting RSCompilerDriver after construction.
We add a simple callback to the reference implementation of libRSDriver.so, such that additional BCC flags can be toggled/adjusted before doing any actual CPU compilation. Change-Id: Iaf253b7d967d0382937369b1c5dae2d23a99e8be
Diffstat (limited to 'cpu_ref/rsd_cpu.h')
-rw-r--r--cpu_ref/rsd_cpu.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/cpu_ref/rsd_cpu.h b/cpu_ref/rsd_cpu.h
index d5642aa6..d81a1456 100644
--- a/cpu_ref/rsd_cpu.h
+++ b/cpu_ref/rsd_cpu.h
@@ -28,12 +28,16 @@ class Module;
namespace bcc {
+class RSCompilerDriver;
class RSScript;
-typedef llvm::Module* (*RSLinkRuntimeCallback) (bcc::RSScript *, llvm::Module *, llvm::Module *);
+typedef llvm::Module* (*RSLinkRuntimeCallback)
+ (bcc::RSScript *, llvm::Module *, llvm::Module *);
} // end namespace bcc;
typedef const char* (*RSSelectRTCallback) (const char*, size_t);
+
+typedef void (*RSSetupCompilerCallback) (bcc::RSCompilerDriver *);
#endif
namespace android {
@@ -119,6 +123,11 @@ public:
virtual CpuScriptGroup * createScriptGroup(const ScriptGroup *sg) = 0;
virtual bool getInForEach() = 0;
+#ifndef RS_COMPATIBILITY_LIB
+ virtual void setSetupCompilerCallback(
+ RSSetupCompilerCallback pSetupCompilerCallback) = 0;
+ virtual RSSetupCompilerCallback getSetupCompilerCallback() const = 0;
+#endif
};