Skip to content

Commit f45a8a0

Browse files
kparzyszrlavaee
authored andcommitted
[flang][OpenMP] Move lowering of ATOMIC to separate file, NFC (llvm#146225)
Reinstate commits e5559ca and 925dbc7. Fix the issues with compilation hangs by including DenseMapInfo specialization where the corresponding instance of DenseMap was defined. Ref: llvm#144960
1 parent ad17fd8 commit f45a8a0

File tree

7 files changed

+557
-470
lines changed

7 files changed

+557
-470
lines changed

flang/include/flang/Lower/AbstractConverter.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
#include "flang/Lower/LoweringOptions.h"
1717
#include "flang/Lower/PFTDefs.h"
18+
#include "flang/Lower/Support/Utils.h"
1819
#include "flang/Optimizer/Builder/BoxValue.h"
1920
#include "flang/Optimizer/Dialect/FIRAttr.h"
2021
#include "flang/Semantics/symbol.h"
@@ -23,6 +24,7 @@
2324
#include "mlir/IR/BuiltinOps.h"
2425
#include "mlir/IR/Operation.h"
2526
#include "llvm/ADT/ArrayRef.h"
27+
#include "llvm/ADT/DenseMap.h"
2628

2729
namespace mlir {
2830
class SymbolTable;

flang/include/flang/Lower/SymbolMap.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ struct SymbolBox : public fir::details::matcher<SymbolBox> {
128128
const SymbolBox &symBox);
129129

130130
/// Dump the map. For debugging.
131-
LLVM_DUMP_METHOD void dump() const { llvm::errs() << *this << '\n'; }
131+
LLVM_DUMP_METHOD void dump() const;
132132

133133
private:
134134
VT box;
@@ -293,7 +293,7 @@ class SymMap {
293293
const SymMap &symMap);
294294

295295
/// Dump the map. For debugging.
296-
LLVM_DUMP_METHOD void dump() const { llvm::errs() << *this << '\n'; }
296+
LLVM_DUMP_METHOD void dump() const;
297297

298298
void addVariableDefinition(semantics::SymbolRef symRef,
299299
fir::FortranVariableOpInterface definingOp,

flang/lib/Lower/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ add_flang_library(FortranLower
2323
LoweringOptions.cpp
2424
Mangler.cpp
2525
OpenACC.cpp
26+
OpenMP/Atomic.cpp
2627
OpenMP/ClauseProcessor.cpp
2728
OpenMP/Clauses.cpp
2829
OpenMP/DataSharingProcessor.cpp

0 commit comments

Comments
 (0)