Skip to content

Commit a7c17ca

Browse files
authored
[LLVM Pulldown] LLVM version bump (#1066)
1 parent d2e405e commit a7c17ca

File tree

23 files changed

+157
-195
lines changed

23 files changed

+157
-195
lines changed

build_tools/llvm_version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
e24c9e7a0c61ed49e79433d405cb5157483ce691
1+
bc1198719e206b2b6928ac437cb59107b45662d6

include/imex/Utils/XeCommon.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#include <mlir/IR/BuiltinOps.h>
2727
#include <mlir/IR/Value.h>
2828
#include <mlir/Transforms/DialectConversion.h>
29-
#include <mlir/Transforms/OneToNTypeConversion.h>
3029

3130
using namespace mlir::xegpu;
3231

lib/Conversion/ArithToVC/ArithToVC.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ struct ArithToVCPass : public imex::impl::ConvertArithToVCBase<ArithToVCPass> {
156156
return builder.create<mlir::vector::ShapeCastOp>(loc, type,
157157
inputs.front());
158158
};
159-
typeConverter.addArgumentMaterialization(materializeCast);
160159
typeConverter.addSourceMaterialization(materializeCast);
161160
typeConverter.addTargetMaterialization(materializeCast);
162161

lib/Conversion/MathToVC/MathToVC.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,6 @@ struct MathToVCPass : public imex::impl::ConvertMathToVCBase<MathToVCPass> {
315315
return builder.create<mlir::vector::ShapeCastOp>(loc, type,
316316
inputs.front());
317317
};
318-
typeConverter.addArgumentMaterialization(materializeCast);
319318
typeConverter.addSourceMaterialization(materializeCast);
320319
typeConverter.addTargetMaterialization(materializeCast);
321320

lib/Conversion/XeGPUToVC/XeGPUToVC.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,6 @@ struct XeGPUToVCPass : public imex::impl::ConvertXeGPUToVCBase<XeGPUToVCPass> {
743743

744744
return nullptr;
745745
};
746-
typeConverter.addArgumentMaterialization(materializeCast);
747746
typeConverter.addSourceMaterialization(materializeCast);
748747
typeConverter.addTargetMaterialization(materializeCast);
749748

lib/Conversion/XeTileToXeGPU/XeTileToXeGPU.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -648,9 +648,7 @@ class MMAOpPattern : public OpConversionPattern<xetile::TileMMAOp> {
648648
matchAndRewrite(xetile::TileMMAOp op, OpAdaptor adaptor,
649649
ConversionPatternRewriter &rewriter) const override {
650650
rewriter.replaceOpWithNewOp<xegpu::DpasOp>(op, op.getType(), adaptor.getA(),
651-
adaptor.getB(), adaptor.getC(),
652-
/*SGMapA, SGMapB, SGMapC*/
653-
nullptr, nullptr, nullptr);
651+
adaptor.getB(), adaptor.getC());
654652
return success();
655653
}
656654
};
@@ -1061,7 +1059,6 @@ struct ConvertXeTileToXeGPUPass // convert XeTile to XeGPU
10611059
.getResult(0);
10621060
};
10631061

1064-
typeConverter.addArgumentMaterialization(materializeWithCast);
10651062
typeConverter.addTargetMaterialization(materializeWithCast);
10661063
typeConverter.addSourceMaterialization(materializeWithCast);
10671064

lib/Conversion/XeVMToLLVM/XeVMToLLVM.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ static LLVM::CallOp createDeviceFunctionCall(
150150
Location loc = UnknownLoc::get(ctx);
151151

152152
auto funcOpRes =
153-
LLVM::lookupOrCreateFn(moduleOp, funcName, argTypes, retType);
153+
LLVM::lookupOrCreateFn(rewriter, moduleOp, funcName, argTypes, retType);
154154
assert(!failed(funcOpRes));
155155
LLVM::LLVMFuncOp funcOp = funcOpRes.value();
156156
funcOp.setCConv(LLVM::cconv::CConv::SPIR_FUNC);

lib/Dialect/XeTile/Transforms/Canonicalization.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,6 @@ struct XeTileCanonicalizationPass final
475475
return tileTy;
476476
});
477477

478-
typeConverter.addArgumentMaterialization(addUnrealizedCast);
479478
typeConverter.addSourceMaterialization(addUnrealizedCast);
480479
typeConverter.addTargetMaterialization(addUnrealizedCast);
481480

lib/Dialect/XeTile/Transforms/WgToSg.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
///
1414
//===----------------------------------------------------------------------===//
1515

16-
#include "mlir/Transforms/OneToNTypeConversion.h"
1716
#include <mlir/Conversion/LLVMCommon/TypeConverter.h>
1817
#include <mlir/Dialect/Arith/IR/Arith.h>
1918
#include <mlir/Dialect/Func/IR/FuncOps.h>

lib/Target/LLVM/XeVM/Target.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "mlir/Target/LLVMIR/Dialect/GPU/GPUToLLVMIRTranslation.h"
2323
#include "mlir/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.h"
2424

25+
#include "llvm/Config/Targets.h"
2526
#include "llvm/IR/LegacyPassManager.h"
2627
#include "llvm/Support/MemoryBuffer.h"
2728
#include "llvm/Support/TargetSelect.h"
@@ -234,6 +235,11 @@ XeVMTargetAttrImpl::serializeToObject(Attribute attribute, Operation *module,
234235
*module, cast<imex::xevm::XeVMTargetAttr>(attribute), options);
235236
serializer.init();
236237

238+
#if !LLVM_HAS_SPIRV_TARGET
239+
module->emitError("Cannot run `TargetRegistry::lookupTarget()` for SPIRV "
240+
"without having the target built.");
241+
#endif
242+
237243
return serializer.run();
238244
}
239245

0 commit comments

Comments
 (0)