@@ -90,6 +90,7 @@ void fir::setTuneCPU(mlir::ModuleOp mod, llvm::StringRef cpu) {
9090
9191static constexpr const char *atomicIgnoreDenormalModeName =
9292 " fir.atomic_ignore_denormal_mode" ;
93+
9394void fir::setAtomicIgnoreDenormalMode (mlir::ModuleOp mod, bool value) {
9495 if (value) {
9596 auto *ctx = mod.getContext ();
@@ -101,11 +102,12 @@ void fir::setAtomicIgnoreDenormalMode(mlir::ModuleOp mod, bool value) {
101102}
102103
103104bool fir::getAtomicIgnoreDenormalMode (mlir::ModuleOp mod) {
104- return mod->hasAttrOfType <mlir::UnitAttr> (atomicIgnoreDenormalModeName);
105+ return mod->hasAttr (atomicIgnoreDenormalModeName);
105106}
106107
107108static constexpr const char *atomicFineGrainedMemoryName =
108109 " fir.atomic_fine_grained_memory" ;
110+
109111void fir::setAtomicFineGrainedMemory (mlir::ModuleOp mod, bool value) {
110112 if (value) {
111113 auto *ctx = mod.getContext ();
@@ -117,10 +119,12 @@ void fir::setAtomicFineGrainedMemory(mlir::ModuleOp mod, bool value) {
117119}
118120
119121bool fir::getAtomicFineGrainedMemory (mlir::ModuleOp mod) {
120- return mod->hasAttrOfType <mlir::UnitAttr> (atomicFineGrainedMemoryName);
122+ return mod->hasAttr (atomicFineGrainedMemoryName);
121123}
124+
122125static constexpr const char *atomicRemoteMemoryName =
123126 " fir.atomic_remote_memory" ;
127+
124128void fir::setAtomicRemoteMemory (mlir::ModuleOp mod, bool value) {
125129 if (value) {
126130 auto *ctx = mod.getContext ();
@@ -132,7 +136,7 @@ void fir::setAtomicRemoteMemory(mlir::ModuleOp mod, bool value) {
132136}
133137
134138bool fir::getAtomicRemoteMemory (mlir::ModuleOp mod) {
135- return mod->hasAttrOfType <mlir::UnitAttr> (atomicRemoteMemoryName);
139+ return mod->hasAttr (atomicRemoteMemoryName);
136140}
137141
138142llvm::StringRef fir::getTuneCPU (mlir::ModuleOp mod) {
0 commit comments