[mlir] [llvm] [OpenMP][MLIR][OMPIRBuilder] Add a small optional constant alloca raise function pass to finalize, utilised in convertTarget (PR #78818)
Akash Banerjee via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 2 07:23:26 PST 2024
================
@@ -1495,13 +1495,25 @@ class OpenMPIRBuilder {
/// Collection of regions that need to be outlined during finalization.
SmallVector<OutlineInfo, 16> OutlineInfos;
+ /// A collection of candidate target functions that's constant allocas will
+ /// attempt to be raised on a call of finalize after all currently enqueued
+ /// outline info's have been processed.
+ SmallVector<llvm::Function *, 16> ConstantAllocaRaiseCandidates;
+
/// Collection of owned canonical loop objects that eventually need to be
/// free'd.
std::forward_list<CanonicalLoopInfo> LoopInfos;
/// Add a new region that will be outlined later.
void addOutlineInfo(OutlineInfo &&OI) { OutlineInfos.emplace_back(OI); }
+ /// Add a function that's constant allocas will attempt to be raised on a
+ /// call of finalize after all currently enqueued outline info's have been
+ /// processed.
+ void addConstantAllocaRaiseCandidates(Function *F) {
----------------
TIFitis wrote:
Does this really need to be a separate function?
https://github.com/llvm/llvm-project/pull/78818
More information about the llvm-commits
mailing list