Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:43:34

0001 //===- ReplaceWithVeclib.h - Replace vector intrinsics with veclib calls --===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 // Replaces calls to LLVM vector intrinsics (i.e., calls to LLVM intrinsics
0010 // with vector operands) with matching calls to functions from a vector
0011 // library (e.g., libmvec, SVML) according to TargetLibraryInfo.
0012 //
0013 //===----------------------------------------------------------------------===//
0014 #ifndef LLVM_CODEGEN_REPLACEWITHVECLIB_H
0015 #define LLVM_CODEGEN_REPLACEWITHVECLIB_H
0016 
0017 #include "llvm/IR/PassManager.h"
0018 #include "llvm/InitializePasses.h"
0019 #include "llvm/Pass.h"
0020 #include "llvm/PassRegistry.h"
0021 
0022 namespace llvm {
0023 class Function;
0024 struct ReplaceWithVeclib : public PassInfoMixin<ReplaceWithVeclib> {
0025   PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
0026 };
0027 
0028 // Legacy pass
0029 struct ReplaceWithVeclibLegacy : public FunctionPass {
0030   static char ID;
0031   ReplaceWithVeclibLegacy() : FunctionPass(ID) {
0032     initializeReplaceWithVeclibLegacyPass(*PassRegistry::getPassRegistry());
0033   }
0034   void getAnalysisUsage(AnalysisUsage &AU) const override;
0035   bool runOnFunction(Function &F) override;
0036 };
0037 
0038 } // End namespace llvm
0039 #endif // LLVM_CODEGEN_REPLACEWITHVECLIB_H