================ @@ -1721,13 +1721,17 @@ mlir::LogicalResult CIRToLLVMLoadOpLowering::matchAndRewrite( // TODO: nontemporal. assert(!cir::MissingFeatures::opLoadStoreNontemporal()); - std::optional<llvm::StringRef> syncScope = - getLLVMSyncScope(op.getSyncScope()); + + std::optional<std::string> llvmSyncScope; + if (std::optional<cir::SyncScopeKind> syncScope = op.getSyncScope()) + llvmSyncScope = + lowerMod->getTargetLoweringInfo().getLLVMSyncScope(*syncScope); ---------------- Lancern wrote:
A simple idea would be something like a "TargetLoweringPass" that lowers CIR from a target-agnostic form to a target-specific form. This pass runs before CIR-to-LLVM lowering and CIR-to-MLIR lowering. I could also imagine that the ABI lowering pass (including calling convention lowering) could also be part of this pass. https://github.com/llvm/llvm-project/pull/173393 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
