[flang-commits] [flang] 8dbc393 - [flang][cuda][NFC] Remove shared alloc addr space (#128535)

via flang-commits flang-commits at lists.llvm.org
Mon Feb 24 10:05:36 PST 2025


Author: Valentin Clement (バレンタイン クレメン)
Date: 2025-02-24T10:05:32-08:00
New Revision: 8dbc393e447299d1a4d35b96c6e66542a5928cff

URL: https://github.com/llvm/llvm-project/commit/8dbc393e447299d1a4d35b96c6e66542a5928cff
DIFF: https://github.com/llvm/llvm-project/commit/8dbc393e447299d1a4d35b96c6e66542a5928cff.diff

LOG: [flang][cuda][NFC] Remove shared alloc addr space (#128535)

Added: 
    

Modified: 
    flang/lib/Optimizer/Builder/IntrinsicCall.cpp
    flang/lib/Optimizer/CodeGen/CodeGen.cpp

Removed: 
    


################################################################################
diff  --git a/flang/lib/Optimizer/Builder/IntrinsicCall.cpp b/flang/lib/Optimizer/Builder/IntrinsicCall.cpp
index f31feda9f5953..3d98fa44ab7fc 100644
--- a/flang/lib/Optimizer/Builder/IntrinsicCall.cpp
+++ b/flang/lib/Optimizer/Builder/IntrinsicCall.cpp
@@ -2728,7 +2728,6 @@ mlir::Value IntrinsicLibrary::genAtomicOr(mlir::Type resultType,
 mlir::Value IntrinsicLibrary::genAtomicCas(mlir::Type resultType,
                                            llvm::ArrayRef<mlir::Value> args) {
   assert(args.size() == 3);
-  assert(args[1].getType() == args[2].getType());
   auto successOrdering = mlir::LLVM::AtomicOrdering::acq_rel;
   auto failureOrdering = mlir::LLVM::AtomicOrdering::monotonic;
   auto llvmPtrTy = mlir::LLVM::LLVMPointerType::get(resultType.getContext());

diff  --git a/flang/lib/Optimizer/CodeGen/CodeGen.cpp b/flang/lib/Optimizer/CodeGen/CodeGen.cpp
index e6050f93d5050..aaefe675730e1 100644
--- a/flang/lib/Optimizer/CodeGen/CodeGen.cpp
+++ b/flang/lib/Optimizer/CodeGen/CodeGen.cpp
@@ -293,12 +293,6 @@ struct AllocaOpConversion : public fir::FIROpConversion<fir::AllocaOp> {
       rewriter.setInsertionPointAfter(size.getDefiningOp());
     }
 
-    if (auto dataAttr = alloc->getAttrOfType<cuf::DataAttributeAttr>(
-            cuf::getDataAttrName())) {
-      if (dataAttr.getValue() == cuf::DataAttribute::Shared)
-        allocaAs = 3;
-    }
-
     // NOTE: we used to pass alloc->getAttrs() in the builder for non opaque
     // pointers! Only propagate pinned and bindc_name to help debugging, but
     // this should have no functional purpose (and passing the operand segment


        


More information about the flang-commits mailing list