Merge "General reduction initializer and outconverter functions must not be internalized."
diff --git a/Android.mk b/Android.mk
index b9ce1c9..4ed3ebd 100644
--- a/Android.mk
+++ b/Android.mk
@@ -59,7 +59,7 @@
 
 # Modules that need get installed if and only if the target libbcc.so is
 # installed.
-LOCAL_REQUIRED_MODULES := libclcore.bc libclcore_debug.bc libcompiler_rt
+LOCAL_REQUIRED_MODULES := libclcore.bc libclcore_debug.bc libclcore_g.bc libcompiler_rt
 
 LOCAL_REQUIRED_MODULES_x86 += libclcore_x86.bc
 LOCAL_REQUIRED_MODULES_x86_64 += libclcore_x86.bc
diff --git a/include/bcc/Renderscript/RSTransforms.h b/include/bcc/Renderscript/RSTransforms.h
index 3c81860..66353a3 100644
--- a/include/bcc/Renderscript/RSTransforms.h
+++ b/include/bcc/Renderscript/RSTransforms.h
@@ -24,6 +24,8 @@
 
 namespace bcc {
 
+extern const char BCC_INDEX_VAR_NAME[];
+
 llvm::ModulePass *
 createRSKernelExpandPass(bool pEnableStepOpt);
 
diff --git a/lib/Core/Compiler.cpp b/lib/Core/Compiler.cpp
index 6fede11..01933c7 100644
--- a/lib/Core/Compiler.cpp
+++ b/lib/Core/Compiler.cpp
@@ -161,8 +161,10 @@
   addExpandKernelPass(transformPasses);
   addDebugInfoPass(pScript, transformPasses);
   addInvariantPass(transformPasses);
-  if (!addInternalizeSymbolsPass(pScript, transformPasses))
-    return kErrCustomPasses;
+  if (mTarget->getOptLevel() != llvm::CodeGenOpt::None) {
+    if (!addInternalizeSymbolsPass(pScript, transformPasses))
+      return kErrCustomPasses;
+  }
   addGlobalInfoPass(pScript, transformPasses);
 
   if (mTarget->getOptLevel() == llvm::CodeGenOpt::None) {
@@ -383,6 +385,14 @@
     export_symbols.push_back(symbol_name.c_str());
   }
 
+  // http://b/26165616 - WAR for this bug defines the __truncxfhf2 function in
+  // frameworks/rs/driver/runtime.  Don't internalize this function for x86, so
+  // that a script can find and link against it.
+  llvm::Triple triple(getTargetMachine().getTargetTriple());
+  if (triple.getArch() == llvm::Triple::x86) {
+    export_symbols.push_back("__truncxfhf2");
+  }
+
   pPM.add(llvm::createInternalizePass(export_symbols));
 
   return true;
diff --git a/lib/Renderscript/RSAddDebugInfoPass.cpp b/lib/Renderscript/RSAddDebugInfoPass.cpp
index 03ad24a..2823fae 100644
--- a/lib/Renderscript/RSAddDebugInfoPass.cpp
+++ b/lib/Renderscript/RSAddDebugInfoPass.cpp
@@ -16,23 +16,23 @@
 
 #include "bcc/Assert.h"
 #include "bcc/Renderscript/RSTransforms.h"
+#include "bcc/Support/Log.h"
+#include "bcinfo/MetadataExtractor.h"
 
 #include <llvm/Pass.h>
-#include <llvm/IR/DataLayout.h>
 #include <llvm/IR/DIBuilder.h>
 #include <llvm/IR/Function.h>
-#include <llvm/IR/Function.h>
 #include <llvm/IR/InstIterator.h>
 #include <llvm/IR/Instructions.h>
-#include <llvm/IR/MDBuilder.h>
+#include <llvm/IR/IRBuilder.h>
 #include <llvm/IR/Module.h>
-#include <llvm/IR/Type.h>
-#include <llvm/Transforms/Utils/BasicBlockUtils.h>
 
 namespace {
 
 const char DEBUG_SOURCE_PATH[] = "/opt/renderscriptdebugger/1";
 const char DEBUG_GENERATED_FILE[] = "generated.rs";
+const char DEBUG_PROTOTYPE_VAR_NAME[] = "rsDebugOuterForeachT";
+const char DEBUG_COMPILE_UNIT_MDNAME[] = "llvm.dbg.cu";
 
 /*
  * LLVM pass to attach debug information to the bits of code
@@ -44,58 +44,220 @@
   // Pass ID
   static char ID;
 
-  RSAddDebugInfoPass() : ModulePass(ID) {
+  RSAddDebugInfoPass() : ModulePass(ID), kernelTypeMD(nullptr),
+      sourceFileName(nullptr), emptyExpr(nullptr), abiMetaCU(nullptr),
+      indexVarType(nullptr) {
   }
 
   virtual bool runOnModule(llvm::Module &Module) {
+    // Gather information about this bcc module.
+    bcinfo::MetadataExtractor me(&Module);
+    if (!me.extract()) {
+      ALOGE("Could not extract metadata from module!");
+      return false;
+    }
+
+    size_t nForEachKernels = me.getExportForEachSignatureCount();
+    const char **forEachKernels = me.getExportForEachNameList();
+
     // Set up the debug info builder.
     llvm::DIBuilder DebugInfo(Module);
-    DebugInfo.createCompileUnit(llvm::dwarf::DW_LANG_C99,
-                                DEBUG_GENERATED_FILE, DEBUG_SOURCE_PATH,
-                                "RS", false, "", 0);
+
+    initializeDebugInfo(DebugInfo, Module);
 
     // Attach DI metadata to each generated function.
-    for (llvm::Function &Func : Module)
-      if (Func.getName().endswith(".expand"))
-        attachDebugInfo(DebugInfo, Func);
+    for (size_t i = 0; i < nForEachKernels; ++i) {
+      std::string expandedName = forEachKernels[i];
+      expandedName += ".expand";
+
+      if (llvm::Function *kernelFunc = Module.getFunction(expandedName))
+        attachDebugInfo(DebugInfo, *kernelFunc);
+    }
 
     DebugInfo.finalize();
 
+    cleanupDebugInfo(Module);
+
     return true;
   }
 
 private:
 
+  // @brief Initialize the debug info generation.
+  //
+  // This method does a couple of things:
+  // * Look up debug metadata for kernel ABI and store it if present.
+  // * Store a couple of useful pieces of debug metadata in member
+  //   variables so they do not have to be created multiple times.
+  void initializeDebugInfo(llvm::DIBuilder &DebugInfo,
+                           const llvm::Module &Module) {
+    llvm::LLVMContext &ctx = Module.getContext();
+
+    // Start generating debug information for bcc-generated code.
+    DebugInfo.createCompileUnit(llvm::dwarf::DW_LANG_C99,
+                                DEBUG_GENERATED_FILE, DEBUG_SOURCE_PATH,
+                                "RS", false, "", 0);
+
+    // Pre-generate and save useful pieces of debug metadata.
+    sourceFileName = DebugInfo.createFile(DEBUG_GENERATED_FILE, DEBUG_SOURCE_PATH);
+    emptyExpr = DebugInfo.createExpression();
+
+    // Lookup compile unit with kernel ABI debug metadata.
+    llvm::NamedMDNode *mdCompileUnitList =
+        Module.getNamedMetadata(DEBUG_COMPILE_UNIT_MDNAME);
+    bccAssert(mdCompileUnitList != nullptr &&
+        "DebugInfo pass could not find any existing compile units.");
+
+    llvm::DIGlobalVariable *kernelPrototypeVarMD = nullptr;
+    for (llvm::MDNode* CUNode : mdCompileUnitList->operands()) {
+      if (auto *CU = llvm::dyn_cast<llvm::DICompileUnit>(CUNode)) {
+        for (llvm::DIGlobalVariable* GV : CU->getGlobalVariables()) {
+          if (GV->getDisplayName() == DEBUG_PROTOTYPE_VAR_NAME) {
+            kernelPrototypeVarMD = GV;
+            abiMetaCU = CU;
+            break;
+          }
+        }
+        if (kernelPrototypeVarMD != nullptr)
+          break;
+      }
+    }
+
+    // Lookup the expanded function interface type metadata.
+    llvm::MDTuple *kernelPrototypeMD = nullptr;
+    if (kernelPrototypeVarMD != nullptr) {
+      // Dig into the metadata to look for function prototype.
+      llvm::DIDerivedType *DT = nullptr;
+      DT = llvm::cast<llvm::DIDerivedType>(kernelPrototypeVarMD->getType());
+      DT = llvm::cast<llvm::DIDerivedType>(DT->getBaseType());
+      llvm::DISubroutineType *ST = llvm::cast<llvm::DISubroutineType>(DT->getBaseType());
+      kernelPrototypeMD = llvm::cast<llvm::MDTuple>(ST->getRawTypeArray());
+
+      indexVarType = llvm::dyn_cast_or_null<llvm::DIType>(
+          kernelPrototypeMD->getOperand(2));
+    }
+    // Fall back to the function type of void() if there is no proper debug info.
+    if (kernelPrototypeMD == nullptr)
+      kernelPrototypeMD = llvm::MDTuple::get(ctx, {nullptr});
+    // Fall back to unspecified type if we don't have a proper index type.
+    if (indexVarType == nullptr)
+      indexVarType = DebugInfo.createBasicType("uint32_t", 32, 32,
+          llvm::dwarf::DW_ATE_unsigned);
+
+    // Capture the expanded kernel type debug info.
+    kernelTypeMD = DebugInfo.createSubroutineType(sourceFileName, kernelPrototypeMD);
+  }
+
   /// @brief Add debug information to a generated function.
   ///
-  /// This function is used to attach source file and line information
-  /// to the generated function code.
+  /// This procedure adds the following pieces of debug information
+  /// to the function specified by Func:
+  /// * Entry for the function to the current compile unit.
+  /// * Adds debug info entries for each function argument.
+  /// * Adds debug info entry for the rsIndex local variable.
+  /// * File/line information to each instruction set to generates.rs:1.
   void attachDebugInfo(llvm::DIBuilder &DebugInfo, llvm::Function &Func) {
-    llvm::DIFile *sourceFileName =
-      DebugInfo.createFile(DEBUG_GENERATED_FILE, DEBUG_SOURCE_PATH);
-
-    // Fabricated function type
-    llvm::MDTuple *nullMD = llvm::MDTuple::get(Func.getParent()->getContext(),
-                        { DebugInfo.createUnspecifiedType("void") });
+    // Lookup the current thread coordinate variable.
+    llvm::AllocaInst* indexVar = nullptr;
+    for (llvm::Instruction &inst : llvm::inst_range(Func)) {
+      if (auto *allocaInst = llvm::dyn_cast<llvm::AllocaInst>(&inst)) {
+        if (allocaInst->getName() == bcc::BCC_INDEX_VAR_NAME) {
+          indexVar = allocaInst;
+          break;
+        }
+      }
+    }
 
     // Create function-level debug metadata.
-    llvm::DIScope *GeneratedScope = DebugInfo.createFunction(
+    llvm::DISubprogram *ExpandedFunc = DebugInfo.createFunction(
         sourceFileName, // scope
         Func.getName(), Func.getName(),
-        sourceFileName, 1,
-        DebugInfo.createSubroutineType(sourceFileName, nullMD),
+        sourceFileName, 1, kernelTypeMD,
         false, true, 1, 0, false, &Func
     );
 
-    // Attach location inforamtion to each instruction in the function
-    for (llvm::inst_iterator Inst    = llvm::inst_begin(Func),
-                             InstEnd = llvm::inst_end(Func);
-                             Inst != InstEnd;
-                             ++Inst) {
-      Inst->setDebugLoc(llvm::DebugLoc::get(1, 1, GeneratedScope));
+    // IRBuilder for allocating variables for arguments.
+    llvm::IRBuilder<> ir(Func.getEntryBlock().begin());
+
+    // Walk through the argument list and expanded function prototype
+    // debuginfo in lockstep to create debug entries for
+    // the expanded function arguments.
+    unsigned argIdx = 1;
+    llvm::MDTuple *argTypes = kernelTypeMD->getTypeArray().get();
+    for (llvm::Argument &arg : Func.getArgumentList()) {
+      // Stop processing arguments if we run out of debug info.
+      if (argIdx >= argTypes->getNumOperands())
+        break;
+
+      // Create debuginfo entry for the argument and advance.
+      llvm::DILocalVariable *argVarDI = DebugInfo.createLocalVariable(
+          llvm::dwarf::DW_TAG_arg_variable,
+          ExpandedFunc, arg.getName(), sourceFileName, 1,
+          llvm::cast<llvm::DIType>(argTypes->getOperand(argIdx).get()),
+          true, 0, argIdx);
+
+      // Annotate the argument variable in the IR.
+      llvm::AllocaInst *argVar =
+          ir.CreateAlloca(arg.getType(), nullptr, arg.getName() + ".var");
+      llvm::StoreInst *argStore = ir.CreateStore(&arg, argVar);
+      llvm::LoadInst *loadedVar = ir.CreateLoad(argVar, arg.getName() + ".l");
+      DebugInfo.insertDeclare(argVar, argVarDI, emptyExpr,
+          llvm::DebugLoc::get(1, 1, ExpandedFunc), loadedVar);
+      for (llvm::Use &u : arg.uses())
+        if (u.getUser() != argStore)
+          u.set(loadedVar);
+      argIdx++;
+    }
+
+    // Annotate the index variable with metadata.
+    if (indexVar) {
+      // Debug information for loop index variable.
+      llvm::DILocalVariable *indexVarDI = DebugInfo.createLocalVariable(
+          llvm::dwarf::DW_TAG_auto_variable, ExpandedFunc,
+          bcc::BCC_INDEX_VAR_NAME, sourceFileName, 1, indexVarType, true);
+
+      // Insert declaration annotation in the instruction stream.
+      llvm::Instruction *decl = DebugInfo.insertDeclare(
+          indexVar, indexVarDI, emptyExpr,
+          llvm::DebugLoc::get(1, 1, ExpandedFunc), indexVar);
+      indexVar->moveBefore(decl);
+    }
+
+    // Attach location information to each instruction in the function.
+    for (llvm::Instruction &inst : llvm::inst_range(Func)) {
+      inst.setDebugLoc(llvm::DebugLoc::get(1, 1, ExpandedFunc));
     }
   }
 
+  // @brief Clean up the debug info.
+  //
+  // At the moment, it only finds the compile unit for the expanded function
+  // metadata generated by clang and removes it.
+  void cleanupDebugInfo(llvm::Module& Module) {
+    if (abiMetaCU == nullptr)
+      return;
+
+    // Remove the compile unit with the runtime interface DI.
+    llvm::SmallVector<llvm::MDNode*, 4> unitsTmp;
+    llvm::NamedMDNode *debugMD =
+        Module.getNamedMetadata(DEBUG_COMPILE_UNIT_MDNAME);
+    for (llvm::MDNode *cu : debugMD->operands())
+      if (cu != abiMetaCU)
+        unitsTmp.push_back(cu);
+    debugMD->eraseFromParent();
+    debugMD = Module.getOrInsertNamedMetadata(DEBUG_COMPILE_UNIT_MDNAME);
+    for (llvm::MDNode *cu : unitsTmp)
+      debugMD->addOperand(cu);
+  }
+
+private:
+  // private attributes
+  llvm::DISubroutineType* kernelTypeMD;
+  llvm::DIFile *sourceFileName;
+  llvm::DIExpression *emptyExpr;
+  llvm::DICompileUnit *abiMetaCU;
+  llvm::DIType *indexVarType;
+
 }; // end class RSAddDebugInfoPass
 
 char RSAddDebugInfoPass::ID = 0;
diff --git a/lib/Renderscript/RSKernelExpand.cpp b/lib/Renderscript/RSKernelExpand.cpp
index d06cb5b..e5b9a5a 100644
--- a/lib/Renderscript/RSKernelExpand.cpp
+++ b/lib/Renderscript/RSKernelExpand.cpp
@@ -443,41 +443,51 @@
   llvm::BasicBlock *createLoop(llvm::IRBuilder<> &Builder,
                                llvm::Value *LowerBound,
                                llvm::Value *UpperBound,
-                               llvm::PHINode **LoopIV) {
+                               llvm::Value **LoopIV) {
     bccAssert(LowerBound->getType() == UpperBound->getType());
 
     llvm::BasicBlock *CondBB, *AfterBB, *HeaderBB;
-    llvm::Value *Cond, *IVNext;
-    llvm::PHINode *IV;
+    llvm::Value *Cond, *IVNext, *IV, *IVVar;
 
     CondBB = Builder.GetInsertBlock();
     AfterBB = llvm::SplitBlock(CondBB, Builder.GetInsertPoint(), nullptr, nullptr);
     HeaderBB = llvm::BasicBlock::Create(*Context, "Loop", CondBB->getParent());
 
+    CondBB->getTerminator()->eraseFromParent();
+    Builder.SetInsertPoint(CondBB);
+
+    // decltype(LowerBound) *ivvar = alloca(sizeof(int))
+    // *ivvar = LowerBound
+    IVVar = Builder.CreateAlloca(LowerBound->getType(), nullptr, BCC_INDEX_VAR_NAME);
+    Builder.CreateStore(LowerBound, IVVar);
+
     // if (LowerBound < Upperbound)
     //   goto LoopHeader
     // else
     //   goto AfterBB
-    CondBB->getTerminator()->eraseFromParent();
-    Builder.SetInsertPoint(CondBB);
     Cond = Builder.CreateICmpULT(LowerBound, UpperBound);
     Builder.CreateCondBr(Cond, HeaderBB, AfterBB);
 
-    // iv = PHI [CondBB -> LowerBound], [LoopHeader -> NextIV ]
-    // iv.next = iv + 1
-    // if (iv.next < Upperbound)
-    //   goto LoopHeader
-    // else
-    //   goto AfterBB
+    // LoopHeader:
+    //   iv = *ivvar
+    //   <insertion point here>
+    //   iv.next = iv + 1
+    //   *ivvar = iv.next
+    //   if (iv.next < Upperbound)
+    //     goto LoopHeader
+    //   else
+    //     goto AfterBB
+    // AfterBB:
     Builder.SetInsertPoint(HeaderBB);
-    IV = Builder.CreatePHI(LowerBound->getType(), 2, "X");
-    IV->addIncoming(LowerBound, CondBB);
+    IV = Builder.CreateLoad(IVVar, "X");
     IVNext = Builder.CreateNUWAdd(IV, Builder.getInt32(1));
-    IV->addIncoming(IVNext, HeaderBB);
+    Builder.CreateStore(IVNext, IVVar);
     Cond = Builder.CreateICmpULT(IVNext, UpperBound);
     Builder.CreateCondBr(Cond, HeaderBB, AfterBB);
     AfterBB->setName("Exit");
-    Builder.SetInsertPoint(HeaderBB->getFirstNonPHI());
+    Builder.SetInsertPoint(llvm::cast<llvm::Instruction>(IVNext));
+
+    // Record information about this loop.
     *LoopIV = IV;
     return AfterBB;
   }
@@ -828,7 +838,7 @@
     }
 
     llvm::BasicBlock *LoopHeader = Builder.GetInsertBlock();
-    llvm::PHINode *IV;
+    llvm::Value *IV;
     createLoop(Builder, Arg_x1, Arg_x2, &IV);
 
     llvm::SmallVector<llvm::Value*, 8> CalleeArgs;
@@ -983,7 +993,7 @@
 
     // Create the loop structure.
     llvm::BasicBlock *LoopHeader = Builder.GetInsertBlock();
-    llvm::PHINode *IV;
+    llvm::Value *IV;
     createLoop(Builder, Arg_x1, Arg_x2, &IV);
 
     llvm::SmallVector<llvm::Value*, 8> CalleeArgs;
@@ -1234,7 +1244,7 @@
 
     // Create the loop structure. Note that the first input in the input buffer
     // has already been accumulated, so that we start at index 1.
-    llvm::PHINode *IndVar;
+    llvm::Value *IndVar;
     llvm::Value *Start = llvm::ConstantInt::get(Arg_len->getType(), 1);
     llvm::BasicBlock *Exit = createLoop(Builder, Start, Arg_len, &IndVar);
 
@@ -1393,7 +1403,7 @@
 
     // Create the loop structure.
     llvm::BasicBlock *LoopHeader = Builder.GetInsertBlock();
-    llvm::PHINode *IndVar;
+    llvm::Value *IndVar;
     createLoop(Builder, Arg_x1, Arg_x2, &IndVar);
 
     llvm::SmallVector<llvm::Value*, 8> CalleeArgs;
@@ -1586,6 +1596,8 @@
 
 namespace bcc {
 
+const char BCC_INDEX_VAR_NAME[] = "rsIndex";
+
 llvm::ModulePass *
 createRSKernelExpandPass(bool pEnableStepOpt) {
   return new RSKernelExpandPass(pEnableStepOpt);
diff --git a/lib/Renderscript/RSStubsWhiteList.cpp b/lib/Renderscript/RSStubsWhiteList.cpp
index f26c254..10fd38b 100644
--- a/lib/Renderscript/RSStubsWhiteList.cpp
+++ b/lib/Renderscript/RSStubsWhiteList.cpp
@@ -817,6 +817,10 @@
 "_Z15rsCreateElementiibj",
 "_Z15rsGetAllocationPKv",
 "_Z15rsMatrixInverseP12rs_matrix4x4",
+"_Z15rsQuaternionAddPDv4_fPKS_",
+"_Z15rsQuaternionDotPKDv4_fS1_",
+"_Z15rsQuaternionSetPDv4_fPKS_",
+"_Z15rsQuaternionSetPDv4_fffff",
 "_Z15rsgBindConstant17rs_program_vertexj13rs_allocation",
 "_Z15rsgBindConstant19rs_program_fragmentj13rs_allocation",
 "_Z16native_normalizeDv2_f",
@@ -850,6 +854,7 @@
 "_Z17rsPackColorTo8888Dv4_f",
 "_Z17rsPackColorTo8888fff",
 "_Z17rsPackColorTo8888ffff",
+"_Z17rsQuaternionSlerpPDv4_fPKS_S2_f",
 "_Z17rsSamplerGetWrapS10rs_sampler",
 "_Z17rsSamplerGetWrapT10rs_sampler",
 "_Z18rsAllocationIoSend13rs_allocation",
@@ -975,6 +980,8 @@
 "_Z20rsMatrixLoadMultiplyP12rs_matrix2x2PKS_S2_",
 "_Z20rsMatrixLoadMultiplyP12rs_matrix3x3PKS_S2_",
 "_Z20rsMatrixLoadMultiplyP12rs_matrix4x4PKS_S2_",
+"_Z20rsQuaternionMultiplyPDv4_fPKS_",
+"_Z20rsQuaternionMultiplyPDv4_ff",
 "_Z20rsSetElementAt_char213rs_allocationDv2_cj",
 "_Z20rsSetElementAt_char213rs_allocationDv2_cjj",
 "_Z20rsSetElementAt_char213rs_allocationDv2_cjjj",
@@ -1078,6 +1085,8 @@
 "_Z21rsGetElementAt_ushort13rs_allocationjj",
 "_Z21rsGetElementAt_ushort13rs_allocationjjj",
 "_Z21rsMatrixLoadTranslateP12rs_matrix4x4fff",
+"_Z21rsQuaternionConjugatePDv4_f",
+"_Z21rsQuaternionNormalizePDv4_f",
 "_Z21rsSetElementAt_double13rs_allocationdj",
 "_Z21rsSetElementAt_double13rs_allocationdjj",
 "_Z21rsSetElementAt_double13rs_allocationdjjj",
@@ -1151,6 +1160,7 @@
 "_Z22rsGetElementAt_ushort413rs_allocationj",
 "_Z22rsGetElementAt_ushort413rs_allocationjj",
 "_Z22rsGetElementAt_ushort413rs_allocationjjj",
+"_Z22rsQuaternionLoadRotatePDv4_fffff",
 "_Z22rsSamplerGetAnisotropy10rs_sampler",
 "_Z22rsSendToClientBlockingi",
 "_Z22rsSendToClientBlockingiPKvj",
@@ -1293,6 +1303,7 @@
 "_Z25rsGetElementAtYuv_uchar_U13rs_allocationjj",
 "_Z25rsGetElementAtYuv_uchar_V13rs_allocationjj",
 "_Z25rsGetElementAtYuv_uchar_Y13rs_allocationjj",
+"_Z25rsQuaternionGetMatrixUnitP12rs_matrix4x4PKDv4_f",
 "_Z25rsSamplerGetMagnification10rs_sampler",
 "_Z25rsgMeshComputeBoundingBox7rs_meshPfS0_S0_S0_S0_S0_",
 "_Z25rsgMeshGetIndexAllocation7rs_meshj",
@@ -1351,6 +1362,7 @@
 "_Z26rsAllocationVStoreX_ulong413rs_allocationDv4_mjj",
 "_Z26rsAllocationVStoreX_ulong413rs_allocationDv4_mjjj",
 "_Z26rsElementGetSubElementName10rs_elementjPcj",
+"_Z26rsQuaternionLoadRotateUnitPDv4_fffff",
 "_Z26rsgMeshGetVertexAllocation7rs_meshj",
 "_Z27rsAllocationVStoreX_double213rs_allocationDv2_dj",
 "_Z27rsAllocationVStoreX_double213rs_allocationDv2_djj",
@@ -1746,8 +1758,12 @@
 "_Z4logbDv4_Dh",
 "_Z4logbDv4_f",
 "_Z4logbf",
+"_Z4modfDhPDh",
+"_Z4modfDv2_DhPS_",
 "_Z4modfDv2_fPS_",
+"_Z4modfDv3_DhPS_",
 "_Z4modfDv3_fPS_",
+"_Z4modfDv4_DhPS_",
 "_Z4modfDv4_fPS_",
 "_Z4modffPf",
 "_Z4pownDhi",
@@ -1971,16 +1987,28 @@
 "_Z5floorDv4_Dh",
 "_Z5floorDv4_f",
 "_Z5floorf",
+"_Z5fractDh",
+"_Z5fractDhPDh",
+"_Z5fractDv2_Dh",
+"_Z5fractDv2_DhPS_",
 "_Z5fractDv2_f",
 "_Z5fractDv2_fPS_",
+"_Z5fractDv3_Dh",
+"_Z5fractDv3_DhPS_",
 "_Z5fractDv3_f",
 "_Z5fractDv3_fPS_",
+"_Z5fractDv4_Dh",
+"_Z5fractDv4_DhPS_",
 "_Z5fractDv4_f",
 "_Z5fractDv4_fPS_",
 "_Z5fractf",
 "_Z5fractfPf",
+"_Z5frexpDhPi",
+"_Z5frexpDv2_DhPDv2_i",
 "_Z5frexpDv2_fPDv2_i",
+"_Z5frexpDv3_DhPDv3_i",
 "_Z5frexpDv3_fPDv3_i",
+"_Z5frexpDv4_DhPDv4_i",
 "_Z5frexpDv4_fPDv4_i",
 "_Z5frexpfPi",
 "_Z5hypotDhDh",
@@ -1991,8 +2019,12 @@
 "_Z5hypotDv4_DhS_",
 "_Z5hypotDv4_fS_",
 "_Z5hypotff",
+"_Z5ilogbDh",
+"_Z5ilogbDv2_Dh",
 "_Z5ilogbDv2_f",
+"_Z5ilogbDv3_Dh",
 "_Z5ilogbDv3_f",
+"_Z5ilogbDv4_Dh",
 "_Z5ilogbDv4_f",
 "_Z5ilogbf",
 "_Z5ldexpDhi",
@@ -2231,8 +2263,12 @@
 "_Z7rsDebugPKcx",
 "_Z7rsDebugPKcy",
 "_Z7rsGetDtv",
+"_Z8copysignDhDh",
+"_Z8copysignDv2_DhS_",
 "_Z8copysignDv2_fS_",
+"_Z8copysignDv3_DhS_",
 "_Z8copysignDv3_fS_",
+"_Z8copysignDv4_DhS_",
 "_Z8copysignDv4_fS_",
 "_Z8copysignff",
 "_Z8distanceDhDh",
@@ -2253,8 +2289,12 @@
 "_Z9half_sqrtDv3_f",
 "_Z9half_sqrtDv4_f",
 "_Z9half_sqrtf",
+"_Z9nextafterDhDh",
+"_Z9nextafterDv2_DhS_",
 "_Z9nextafterDv2_fS_",
+"_Z9nextafterDv3_DhS_",
 "_Z9nextafterDv3_fS_",
+"_Z9nextafterDv4_DhS_",
 "_Z9nextafterDv4_fS_",
 "_Z9nextafterff",
 "_Z9normalizeDv2_f",