LLVM  14.0.0git
OpenMPOpt.h
Go to the documentation of this file.
1 //===- IPO/OpenMPOpt.h - Collection of OpenMP optimizations -----*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_TRANSFORMS_IPO_OPENMPOPT_H
10 #define LLVM_TRANSFORMS_IPO_OPENMPOPT_H
11 
14 #include "llvm/IR/PassManager.h"
15 
16 namespace llvm {
17 
18 namespace omp {
19 
20 /// Summary of a kernel (=entry point for target offloading).
21 using Kernel = Function *;
22 
23 /// Set of kernels in the module
25 
26 /// Helper to determine if \p M contains OpenMP.
27 bool containsOpenMP(Module &M);
28 
29 /// Helper to determine if \p M is a OpenMP target offloading device module.
30 bool isOpenMPDevice(Module &M);
31 
32 /// Get OpenMP device kernels in \p M.
34 
35 } // namespace omp
36 
37 /// OpenMP optimizations pass.
38 class OpenMPOptPass : public PassInfoMixin<OpenMPOptPass> {
39 public:
41 };
42 
43 class OpenMPOptCGSCCPass : public PassInfoMixin<OpenMPOptCGSCCPass> {
44 public:
47 };
48 
49 } // end namespace llvm
50 
51 #endif // LLVM_TRANSFORMS_IPO_OPENMPOPT_H
llvm::PreservedAnalyses
A set of analyses that are preserved following a run of a transformation pass.
Definition: PassManager.h:155
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AllocatorList.h:23
M
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
Definition: README.txt:252
llvm::PassInfoMixin
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition: PassManager.h:374
llvm::Function
Definition: Function.h:62
llvm::OpenMPOptCGSCCPass::run
PreservedAnalyses run(LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM, LazyCallGraph &CG, CGSCCUpdateResult &UR)
Definition: OpenMPOpt.cpp:4717
llvm::SmallPtrSet
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.
Definition: SmallPtrSet.h:449
llvm::LazyCallGraph::SCC
An SCC of the call graph.
Definition: LazyCallGraph.h:422
C
(vector float) vec_cmpeq(*A, *B) C
Definition: README_ALTIVEC.txt:86
llvm::OpenMPOptCGSCCPass
Definition: OpenMPOpt.h:43
LazyCallGraph.h
llvm::omp::isOpenMPDevice
bool isOpenMPDevice(Module &M)
Helper to determine if M is a OpenMP target offloading device module.
Definition: OpenMPOpt.cpp:4883
CGSCCPassManager.h
llvm::Module
A Module instance is used to store all the information related to an LLVM module.
Definition: Module.h:67
llvm::omp::getDeviceKernels
KernelSet getDeviceKernels(Module &M)
Get OpenMP device kernels in M.
Definition: OpenMPOpt.cpp:4847
llvm::omp::containsOpenMP
bool containsOpenMP(Module &M)
Helper to determine if M contains OpenMP.
Definition: OpenMPOpt.cpp:4875
llvm::CGSCCUpdateResult
Support structure for SCC passes to communicate updates the call graph back to the CGSCC pass manager...
Definition: CGSCCPassManager.h:238
llvm::OpenMPOptPass::run
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
Definition: OpenMPOpt.cpp:4626
PassManager.h
llvm::OpenMPOptPass
OpenMP optimizations pass.
Definition: OpenMPOpt.h:38
llvm::AnalysisManager
A container for analyses that lazily runs them and caches their results.
Definition: InstructionSimplify.h:44
llvm::LazyCallGraph
A lazily constructed view of the call graph of a module.
Definition: LazyCallGraph.h:113