13#ifndef POLLY_LOOP_GENERATORS_GOMP_H
14#define POLLY_LOOP_GENERATORS_GOMP_H
19#include "llvm/ADT/SetVector.h"
44 Value *UB, Value *Stride);
47 Value *UB, Value *Stride)
override;
51 std::tuple<Value *, Function *>
createSubFn(Value *Stride, AllocaInst *Struct,
52 SetVector<Value *> UsedValues,
polly dump Polly Dump Function
This ParallelLoopGenerator subclass handles the generation of parallelized code, utilizing the GNU Op...
void deployParallelExecution(Function *SubFn, Value *SubFnParam, Value *LB, Value *UB, Value *Stride) override
Create the runtime library calls for spawn and join of the worker threads.
Value * createCallGetWorkItem(Value *LBPtr, Value *UBPtr)
Create a runtime library call to get the next work item.
std::tuple< Value *, Function * > createSubFn(Value *Stride, AllocaInst *Struct, SetVector< Value * > UsedValues, ValueMapT &VMap) override
Create the parallel subfunction.
ParallelLoopGeneratorGOMP(PollyIRBuilder &Builder, const DataLayout &DL)
Create a parallel loop generator for the current function.
void createCallSpawnThreads(Value *SubFn, Value *SubFnParam, Value *LB, Value *UB, Value *Stride)
Create a runtime library call to spawn the worker threads.
void createCallJoinThreads()
Create a runtime library call to join the worker threads.
void createCallCleanupThread()
Create a runtime library call to allow cleanup of the thread.
Function * prepareSubFnDefinition(Function *F) const override
Prepare the definition of the parallel subfunction.
The ParallelLoopGenerator allows to create parallelized loops.
PollyIRBuilder & Builder
The IR builder we use to create instructions.
@ Value
MemoryKind::Value: Models an llvm::Value.
llvm::IRBuilder< llvm::ConstantFolder, IRInserter > PollyIRBuilder
llvm::DenseMap< llvm::AssertingVH< llvm::Value >, llvm::AssertingVH< llvm::Value > > ValueMapT
Type to remap values.