Skip to content

Commit 2bde7a1

Browse files
authored
[mlir][OpenMP][NFC] Remove dead uses of OpenMPVarMappingStackFrame (#125061)
This is left over from the old way reductions were implemented. OpenMPVarMappingStackFrame doesn't actually do anything anymore so these uses can go away.
1 parent 0caba6c commit 2bde7a1

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp

-33
Original file line numberDiff line numberDiff line change
@@ -75,21 +75,6 @@ class OpenMPAllocaStackFrame
7575
llvm::OpenMPIRBuilder::InsertPointTy allocaInsertPoint;
7676
};
7777

78-
/// ModuleTranslation stack frame containing the partial mapping between MLIR
79-
/// values and their LLVM IR equivalents.
80-
class OpenMPVarMappingStackFrame
81-
: public LLVM::ModuleTranslation::StackFrameBase<
82-
OpenMPVarMappingStackFrame> {
83-
public:
84-
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(OpenMPVarMappingStackFrame)
85-
86-
explicit OpenMPVarMappingStackFrame(
87-
const DenseMap<Value, llvm::Value *> &mapping)
88-
: mapping(mapping) {}
89-
90-
DenseMap<Value, llvm::Value *> mapping;
91-
};
92-
9378
/// Custom error class to signal translation errors that don't need reporting,
9479
/// since encountering them will have already triggered relevant error messages.
9580
///
@@ -1541,12 +1526,6 @@ convertOmpSections(Operation &opInst, llvm::IRBuilderBase &builder,
15411526
isByRef)))
15421527
return failure();
15431528

1544-
// Store the mapping between reduction variables and their private copies on
1545-
// ModuleTranslation stack. It can be then recovered when translating
1546-
// omp.reduce operations in a separate call.
1547-
LLVM::ModuleTranslation::SaveStack<OpenMPVarMappingStackFrame> mappingGuard(
1548-
moduleTranslation, reductionVariableMap);
1549-
15501529
SmallVector<StorableBodyGenCallbackTy> sectionCBs;
15511530

15521531
for (Operation &op : *sectionsOp.getRegion().begin()) {
@@ -1940,12 +1919,6 @@ convertOmpWsloop(Operation &opInst, llvm::IRBuilderBase &builder,
19401919
if (failed(convertIgnoredWrappers(loopOp, wsloopOp, moduleTranslation)))
19411920
return failure();
19421921

1943-
// Store the mapping between reduction variables and their private copies on
1944-
// ModuleTranslation stack. It can be then recovered when translating
1945-
// omp.reduce operations in a separate call.
1946-
LLVM::ModuleTranslation::SaveStack<OpenMPVarMappingStackFrame> mappingGuard(
1947-
moduleTranslation, reductionVariableMap);
1948-
19491922
// Set up the source location value for OpenMP runtime.
19501923
llvm::OpenMPIRBuilder::LocationDescription ompLoc(builder);
19511924

@@ -2116,12 +2089,6 @@ convertOmpParallel(omp::ParallelOp opInst, llvm::IRBuilderBase &builder,
21162089
reductionVariableMap, isByRef, deferredStores)))
21172090
return llvm::make_error<PreviouslyReportedError>();
21182091

2119-
// Store the mapping between reduction variables and their private copies on
2120-
// ModuleTranslation stack. It can be then recovered when translating
2121-
// omp.reduce operations in a separate call.
2122-
LLVM::ModuleTranslation::SaveStack<OpenMPVarMappingStackFrame> mappingGuard(
2123-
moduleTranslation, reductionVariableMap);
2124-
21252092
// Save the alloca insertion point on ModuleTranslation stack for use in
21262093
// nested regions.
21272094
LLVM::ModuleTranslation::SaveStack<OpenMPAllocaStackFrame> frame(

0 commit comments

Comments
 (0)