@@ -309,21 +309,6 @@ Scope getArgAsScope(CallInst *CI, unsigned I) {
309309 return static_cast <Scope>(getArgAsInt (CI, I));
310310}
311311
312- Decoration getArgAsDecoration (CallInst *CI, unsigned I) {
313- return static_cast <Decoration>(getArgAsInt (CI, I));
314- }
315-
316- std::string decorateSPIRVFunction (const std::string &S) {
317- return std::string (kSPIRVName ::Prefix) + S + kSPIRVName ::Postfix;
318- }
319-
320- StringRef undecorateSPIRVFunction (StringRef S) {
321- assert (S.find (kSPIRVName ::Prefix) == 0 );
322- const size_t Start = strlen (kSPIRVName ::Prefix);
323- auto End = S.rfind (kSPIRVName ::Postfix);
324- return S.substr (Start, End - Start);
325- }
326-
327312std::string prefixSPIRVName (const std::string &S) {
328313 return std::string (kSPIRVName ::Prefix) + S;
329314}
@@ -558,11 +543,6 @@ bool containsUnsignedAtomicType(StringRef Name) {
558543 Name[Loc + strlen (kMangledName ::AtomicPrefixIncoming)]);
559544}
560545
561- Constant *castToVoidFuncPtr (Function *F) {
562- auto *T = getVoidFuncPtrType (F->getParent ());
563- return ConstantExpr::getBitCast (F, T);
564- }
565-
566546bool hasArrayArg (Function *F) {
567547 for (auto I = F->arg_begin (), E = F->arg_end (); I != E; ++I) {
568548 LLVM_DEBUG (dbgs () << " [hasArrayArg] " << *I << ' \n ' );
@@ -1028,10 +1008,6 @@ void makeVector(Instruction *InsPos, std::vector<Value *> &Ops,
10281008 Ops.push_back (Vec);
10291009}
10301010
1031- Constant *castToInt8Ptr (Constant *V, unsigned Addr = 0 ) {
1032- return ConstantExpr::getBitCast (V, PointerType::get (V->getContext (), Addr));
1033- }
1034-
10351011PointerType *getInt8PtrTy (PointerType *T) {
10361012 return PointerType::get (T->getContext (), T->getAddressSpace ());
10371013}
@@ -1159,15 +1135,6 @@ std::tuple<unsigned, unsigned, std::string> getSPIRVSource(Module *M) {
11591135 return Tup;
11601136}
11611137
1162- ConstantInt *mapUInt (Module *M, ConstantInt *I,
1163- std::function<unsigned (unsigned )> F) {
1164- return ConstantInt::get (I->getIntegerType (), F (I->getZExtValue ()), false );
1165- }
1166-
1167- ConstantInt *mapSInt (Module *M, ConstantInt *I, std::function<int (int )> F) {
1168- return ConstantInt::get (I->getIntegerType (), F (I->getSExtValue ()), true );
1169- }
1170-
11711138bool isDecoratedSPIRVFunc (const Function *F, StringRef &UndecoratedName) {
11721139 if (!F->hasName () || !F->getName ().starts_with (kSPIRVName ::Prefix))
11731140 return false ;
0 commit comments