[MLIR][OpenMP] Lowering nontemporal clause to LLVM IR for SIMD directive (#118751)
This patch, - Added a new attribute `nontemporal` to fir.load and fir.store operation in the FIR dialect. - Added a pass `lower-nontemporal` which is called before FIRToLLVM conversion pass and adds the nontemporal attribute to loads and stores on the list items specified in the nontemporal clause of the SIMD directive. - Set the `UnitAttr:$nontemporal` to llvm.load and llvm.store operations during FIR to LLVM dialect conversion, if the corresponding fir.load or fir.store operations have the nontemporal attribute. - Attached the `nontemporal metadata` to load and store instructions that have the nontemporal attribute, during LLVM dialect to LLVM IR translation.
This commit is contained in:
committed by
GitHub
parent
e4332e4706
commit
857ac4c229
@@ -3569,8 +3569,13 @@ struct StoreOpConversion : public fir::FIROpConversion<fir::StoreOp> {
|
||||
} else {
|
||||
mlir::LLVM::StoreOp storeOp =
|
||||
rewriter.create<mlir::LLVM::StoreOp>(loc, llvmValue, llvmMemref);
|
||||
|
||||
if (isVolatile)
|
||||
storeOp.setVolatile_(true);
|
||||
|
||||
if (store.getNontemporal())
|
||||
storeOp.setNontemporal(true);
|
||||
|
||||
newOp = storeOp;
|
||||
}
|
||||
if (std::optional<mlir::ArrayAttr> optionalTag = store.getTbaa())
|
||||
|
||||
Reference in New Issue
Block a user