Derive the bcc optimization level from the input bitcode.

This patch derives the optimization level of the slang bitcode
and passes that to bcc. This patch replaces the old method, where
a flag was passed to the RenderScript context and the context
would set the optimization level accordingly.

Change-Id: Ie64a2d0125ca30da4ae7522961dca144d0457f03
Signed-off-by: Stephen McGroarty <stephen@codeplay.com>
diff --git a/cpp/RenderScript.cpp b/cpp/RenderScript.cpp
index 66a7421..a0c5deb 100644
--- a/cpp/RenderScript.cpp
+++ b/cpp/RenderScript.cpp
@@ -165,8 +165,7 @@
     }
 
     if (flags & ~(RS_CONTEXT_SYNCHRONOUS | RS_CONTEXT_LOW_LATENCY |
-                  RS_CONTEXT_LOW_POWER | RS_CONTEXT_WAIT_FOR_ATTACH |
-                  RS_CONTEXT_OPT_LEVEL_0)) {
+                  RS_CONTEXT_LOW_POWER | RS_CONTEXT_WAIT_FOR_ATTACH)) {
         ALOGE("Invalid flags passed");
         return false;
     }
diff --git a/cpp/rsCppStructs.h b/cpp/rsCppStructs.h
index fd531f1..d136ece 100644
--- a/cpp/rsCppStructs.h
+++ b/cpp/rsCppStructs.h
@@ -82,8 +82,7 @@
      RS_INIT_LOW_LATENCY = 2, ///< Prefer low latency devices over potentially higher throughput devices.
      // Bitflag 4 is reserved for the context flag low power
      RS_INIT_WAIT_FOR_ATTACH = 8,   ///< Kernel execution will hold to give time for a debugger to be attached
-     RS_INIT_OPT_LEVEL_0 = 16, ///< Use the -O0 option to set the optimization level to zero when calling the bcc compiler.
-     RS_INIT_MAX = 32
+     RS_INIT_MAX = 16
  };
 
  /**