Skip to content

Commit b50855f

Browse files
author
Jenkins
committed
merge main into amd-staging
Change-Id: I9875c14e5134dd7285fa182619e4641bd7f42a0f
2 parents ac2f64c + aa22d44 commit b50855f

File tree

14 files changed

+250
-42
lines changed

14 files changed

+250
-42
lines changed

clang-tools-extra/docs/clang-tidy/checks/list.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,9 +341,9 @@ Clang-Tidy Checks
341341
:doc:`portability-std-allocator-const <portability/std-allocator-const>`,
342342
:doc:`readability-avoid-const-params-in-decls <readability/avoid-const-params-in-decls>`, "Yes"
343343
:doc:`readability-avoid-nested-conditional-operator <readability/avoid-nested-conditional-operator>`,
344-
:doc:`readability-avoid-return-with-void-value <readability/avoid-return-with-void-value>`,
344+
:doc:`readability-avoid-return-with-void-value <readability/avoid-return-with-void-value>`, "Yes"
345345
:doc:`readability-avoid-unconditional-preprocessor-if <readability/avoid-unconditional-preprocessor-if>`,
346-
:doc:`readability-braces-around-statements <readability/braces-around-statements>`, "Yes"
346+
:doc:`readability-braces-around-statements <readability/braces-around-statements>`,
347347
:doc:`readability-const-return-type <readability/const-return-type>`, "Yes"
348348
:doc:`readability-container-contains <readability/container-contains>`, "Yes"
349349
:doc:`readability-container-data-pointer <readability/container-data-pointer>`, "Yes"
@@ -529,12 +529,12 @@ Clang-Tidy Checks
529529
:doc:`cppcoreguidelines-non-private-member-variables-in-classes <cppcoreguidelines/non-private-member-variables-in-classes>`, :doc:`misc-non-private-member-variables-in-classes <misc/non-private-member-variables-in-classes>`,
530530
:doc:`cppcoreguidelines-use-default-member-init <cppcoreguidelines/use-default-member-init>`, :doc:`modernize-use-default-member-init <modernize/use-default-member-init>`, "Yes"
531531
:doc:`fuchsia-header-anon-namespaces <fuchsia/header-anon-namespaces>`, :doc:`google-build-namespaces <google/build-namespaces>`,
532-
:doc:`google-readability-braces-around-statements <google/readability-braces-around-statements>`, :doc:`readability-braces-around-statements <readability/braces-around-statements>`, "Yes"
532+
:doc:`google-readability-braces-around-statements <google/readability-braces-around-statements>`, :doc:`readability-braces-around-statements <readability/braces-around-statements>`,
533533
:doc:`google-readability-function-size <google/readability-function-size>`, :doc:`readability-function-size <readability/function-size>`,
534534
:doc:`google-readability-namespace-comments <google/readability-namespace-comments>`, :doc:`llvm-namespace-comment <llvm/namespace-comment>`,
535535
:doc:`hicpp-avoid-c-arrays <hicpp/avoid-c-arrays>`, :doc:`modernize-avoid-c-arrays <modernize/avoid-c-arrays>`,
536536
:doc:`hicpp-avoid-goto <hicpp/avoid-goto>`, :doc:`cppcoreguidelines-avoid-goto <cppcoreguidelines/avoid-goto>`,
537-
:doc:`hicpp-braces-around-statements <hicpp/braces-around-statements>`, :doc:`readability-braces-around-statements <readability/braces-around-statements>`, "Yes"
537+
:doc:`hicpp-braces-around-statements <hicpp/braces-around-statements>`, :doc:`readability-braces-around-statements <readability/braces-around-statements>`,
538538
:doc:`hicpp-deprecated-headers <hicpp/deprecated-headers>`, :doc:`modernize-deprecated-headers <modernize/deprecated-headers>`, "Yes"
539539
:doc:`hicpp-explicit-conversions <hicpp/explicit-conversions>`, :doc:`google-explicit-constructor <google/explicit-constructor>`, "Yes"
540540
:doc:`hicpp-function-size <hicpp/function-size>`, :doc:`readability-function-size <readability/function-size>`,

clang/lib/AST/Interp/Pointer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Pointer::Pointer(Block *Pointee)
2323
: Pointer(Pointee, Pointee->getDescriptor()->getMetadataSize(),
2424
Pointee->getDescriptor()->getMetadataSize()) {}
2525

26-
Pointer::Pointer(Block *Pointee, unsigned BaseAndOffset)
26+
Pointer::Pointer(Block *Pointee, uint64_t BaseAndOffset)
2727
: Pointer(Pointee, BaseAndOffset, BaseAndOffset) {}
2828

2929
Pointer::Pointer(const Pointer &P)
@@ -34,7 +34,7 @@ Pointer::Pointer(const Pointer &P)
3434
PointeeStorage.BS.Pointee->addPointer(this);
3535
}
3636

37-
Pointer::Pointer(Block *Pointee, unsigned Base, unsigned Offset)
37+
Pointer::Pointer(Block *Pointee, unsigned Base, uint64_t Offset)
3838
: Offset(Offset), StorageKind(Storage::Block) {
3939
assert((Base == RootPtrMark || Base % alignof(void *) == 0) && "wrong base");
4040

clang/lib/AST/Interp/Pointer.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ class Pointer {
8989
PointeeStorage.Int.Desc = nullptr;
9090
}
9191
Pointer(Block *B);
92-
Pointer(Block *B, unsigned BaseAndOffset);
92+
Pointer(Block *B, uint64_t BaseAndOffset);
9393
Pointer(const Pointer &P);
9494
Pointer(Pointer &&P);
95-
Pointer(uint64_t Address, const Descriptor *Desc, unsigned Offset = 0)
95+
Pointer(uint64_t Address, const Descriptor *Desc, uint64_t Offset = 0)
9696
: Offset(Offset), StorageKind(Storage::Int) {
9797
PointeeStorage.Int.Value = Address;
9898
PointeeStorage.Int.Desc = Desc;
@@ -134,14 +134,14 @@ class Pointer {
134134
std::optional<APValue> toRValue(const Context &Ctx) const;
135135

136136
/// Offsets a pointer inside an array.
137-
[[nodiscard]] Pointer atIndex(unsigned Idx) const {
137+
[[nodiscard]] Pointer atIndex(uint64_t Idx) const {
138138
if (isIntegralPointer())
139139
return Pointer(asIntPointer().Value, asIntPointer().Desc, Idx);
140140

141141
if (asBlockPointer().Base == RootPtrMark)
142142
return Pointer(asBlockPointer().Pointee, RootPtrMark,
143143
getDeclDesc()->getSize());
144-
unsigned Off = Idx * elemSize();
144+
uint64_t Off = Idx * elemSize();
145145
if (getFieldDesc()->ElemDesc)
146146
Off += sizeof(InlineDescriptor);
147147
else
@@ -630,7 +630,7 @@ class Pointer {
630630
friend class DeadBlock;
631631
friend struct InitMap;
632632

633-
Pointer(Block *Pointee, unsigned Base, unsigned Offset);
633+
Pointer(Block *Pointee, unsigned Base, uint64_t Offset);
634634

635635
/// Returns the embedded descriptor preceding a field.
636636
InlineDescriptor *getInlineDesc() const {
@@ -656,7 +656,7 @@ class Pointer {
656656
}
657657

658658
/// Offset into the storage.
659-
unsigned Offset = 0;
659+
uint64_t Offset = 0;
660660

661661
/// Previous link in the pointer chain.
662662
Pointer *Prev = nullptr;

clang/lib/Sema/SemaTemplateVariadic.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,9 +1085,11 @@ ExprResult Sema::ActOnPackIndexingExpr(Scope *S, Expr *PackExpression,
10851085
SourceLocation RSquareLoc) {
10861086
bool isParameterPack = ::isParameterPack(PackExpression);
10871087
if (!isParameterPack) {
1088-
CorrectDelayedTyposInExpr(IndexExpr);
1089-
Diag(PackExpression->getBeginLoc(), diag::err_expected_name_of_pack)
1090-
<< PackExpression;
1088+
if (!PackExpression->containsErrors()) {
1089+
CorrectDelayedTyposInExpr(IndexExpr);
1090+
Diag(PackExpression->getBeginLoc(), diag::err_expected_name_of_pack)
1091+
<< PackExpression;
1092+
}
10911093
return ExprError();
10921094
}
10931095
ExprResult Res =

clang/test/SemaCXX/cxx2c-pack-indexing.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,3 +154,9 @@ void f() {
154154
}
155155

156156
}
157+
158+
namespace GH88929 {
159+
bool b = a...[0]; // expected-error {{use of undeclared identifier 'a'}}
160+
using E = P...[0]; // expected-error {{unknown type name 'P'}} \
161+
// expected-error {{expected ';' after alias declaration}}
162+
}

llvm/include/llvm/ProfileData/MemProf.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -652,8 +652,8 @@ class CallStackWriterTrait {
652652
EmitKeyDataLength(raw_ostream &Out, key_type_ref K, data_type_ref V) {
653653
using namespace support;
654654
endian::Writer LE(Out, llvm::endianness::little);
655+
// We do not explicitly emit the key length because it is a constant.
655656
offset_type N = sizeof(K);
656-
LE.write<offset_type>(N);
657657
offset_type M = sizeof(FrameId) * V.size();
658658
LE.write<offset_type>(M);
659659
return std::make_pair(N, M);
@@ -697,8 +697,8 @@ class CallStackLookupTrait {
697697
ReadKeyDataLength(const unsigned char *&D) {
698698
using namespace support;
699699

700-
offset_type KeyLen =
701-
endian::readNext<offset_type, llvm::endianness::little>(D);
700+
// We do not explicitly read the key length because it is a constant.
701+
offset_type KeyLen = sizeof(external_key_type);
702702
offset_type DataLen =
703703
endian::readNext<offset_type, llvm::endianness::little>(D);
704704
return std::make_pair(KeyLen, DataLen);

llvm/lib/Target/RISCV/RISCVProcessors.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ class RISCVProcessorModel<string n,
4444
list<SubtargetFeature> f,
4545
list<SubtargetFeature> tunef = [],
4646
string default_march = "">
47-
: ProcessorModel<n, m, f, tunef> {
47+
: ProcessorModel<n, m, f, tunef> {
4848
string DefaultMarch = default_march;
4949
}
5050

5151
class RISCVTuneProcessorModel<string n,
5252
SchedMachineModel m,
5353
list<SubtargetFeature> tunef = [],
5454
list<SubtargetFeature> f = []>
55-
: ProcessorModel<n, m, f,tunef>;
55+
: ProcessorModel<n, m, f,tunef>;
5656

5757
def GENERIC_RV32 : RISCVProcessorModel<"generic-rv32",
5858
NoSchedModel,

llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp

Lines changed: 41 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -576,44 +576,67 @@ Instruction *InstCombinerImpl::foldPowiReassoc(BinaryOperator &I) {
576576
Value *Y, Value *Z) {
577577
InstCombiner::BuilderTy &Builder = IC.Builder;
578578
Value *YZ = Builder.CreateAdd(Y, Z);
579-
auto *NewPow = Builder.CreateIntrinsic(
579+
Instruction *NewPow = Builder.CreateIntrinsic(
580580
Intrinsic::powi, {X->getType(), YZ->getType()}, {X, YZ}, &I);
581-
return IC.replaceInstUsesWith(I, NewPow);
581+
582+
return NewPow;
582583
};
583584

584585
Value *X, *Y, *Z;
586+
unsigned Opcode = I.getOpcode();
587+
assert((Opcode == Instruction::FMul || Opcode == Instruction::FDiv) &&
588+
"Unexpected opcode");
585589

586590
// powi(X, Y) * X --> powi(X, Y+1)
587591
// X * powi(X, Y) --> powi(X, Y+1)
588592
if (match(&I, m_c_FMul(m_OneUse(m_AllowReassoc(m_Intrinsic<Intrinsic::powi>(
589593
m_Value(X), m_Value(Y)))),
590594
m_Deferred(X)))) {
591595
Constant *One = ConstantInt::get(Y->getType(), 1);
592-
if (willNotOverflowSignedAdd(Y, One, I))
593-
return createPowiExpr(I, *this, X, Y, One);
596+
if (willNotOverflowSignedAdd(Y, One, I)) {
597+
Instruction *NewPow = createPowiExpr(I, *this, X, Y, One);
598+
return replaceInstUsesWith(I, NewPow);
599+
}
594600
}
595601

596602
// powi(x, y) * powi(x, z) -> powi(x, y + z)
597603
Value *Op0 = I.getOperand(0);
598604
Value *Op1 = I.getOperand(1);
599-
if (I.isOnlyUserOfAnyOperand() &&
605+
if (Opcode == Instruction::FMul && I.isOnlyUserOfAnyOperand() &&
600606
match(Op0, m_AllowReassoc(
601607
m_Intrinsic<Intrinsic::powi>(m_Value(X), m_Value(Y)))) &&
602608
match(Op1, m_AllowReassoc(m_Intrinsic<Intrinsic::powi>(m_Specific(X),
603609
m_Value(Z)))) &&
604-
Y->getType() == Z->getType())
605-
return createPowiExpr(I, *this, X, Y, Z);
606-
607-
// powi(X, Y) / X --> powi(X, Y-1)
608-
// This is legal when (Y - 1) can't wraparound, in which case reassoc and nnan
609-
// are required.
610-
// TODO: Multi-use may be also better off creating Powi(x,y-1)
611-
if (I.hasAllowReassoc() && I.hasNoNaNs() &&
612-
match(Op0, m_OneUse(m_AllowReassoc(m_Intrinsic<Intrinsic::powi>(
613-
m_Specific(Op1), m_Value(Y))))) &&
614-
willNotOverflowSignedSub(Y, ConstantInt::get(Y->getType(), 1), I)) {
615-
Constant *NegOne = ConstantInt::getAllOnesValue(Y->getType());
616-
return createPowiExpr(I, *this, Op1, Y, NegOne);
610+
Y->getType() == Z->getType()) {
611+
Instruction *NewPow = createPowiExpr(I, *this, X, Y, Z);
612+
return replaceInstUsesWith(I, NewPow);
613+
}
614+
615+
if (Opcode == Instruction::FDiv && I.hasAllowReassoc() && I.hasNoNaNs()) {
616+
// powi(X, Y) / X --> powi(X, Y-1)
617+
// This is legal when (Y - 1) can't wraparound, in which case reassoc and
618+
// nnan are required.
619+
// TODO: Multi-use may be also better off creating Powi(x,y-1)
620+
if (match(Op0, m_OneUse(m_AllowReassoc(m_Intrinsic<Intrinsic::powi>(
621+
m_Specific(Op1), m_Value(Y))))) &&
622+
willNotOverflowSignedSub(Y, ConstantInt::get(Y->getType(), 1), I)) {
623+
Constant *NegOne = ConstantInt::getAllOnesValue(Y->getType());
624+
Instruction *NewPow = createPowiExpr(I, *this, Op1, Y, NegOne);
625+
return replaceInstUsesWith(I, NewPow);
626+
}
627+
628+
// powi(X, Y) / (X * Z) --> powi(X, Y-1) / Z
629+
// This is legal when (Y - 1) can't wraparound, in which case reassoc and
630+
// nnan are required.
631+
// TODO: Multi-use may be also better off creating Powi(x,y-1)
632+
if (match(Op0, m_OneUse(m_AllowReassoc(m_Intrinsic<Intrinsic::powi>(
633+
m_Value(X), m_Value(Y))))) &&
634+
match(Op1, m_AllowReassoc(m_c_FMul(m_Specific(X), m_Value(Z)))) &&
635+
willNotOverflowSignedSub(Y, ConstantInt::get(Y->getType(), 1), I)) {
636+
Constant *NegOne = ConstantInt::getAllOnesValue(Y->getType());
637+
auto *NewPow = createPowiExpr(I, *this, X, Y, NegOne);
638+
return BinaryOperator::CreateFDivFMF(NewPow, Z, &I);
639+
}
617640
}
618641

619642
return nullptr;

llvm/test/Transforms/InstCombine/powi.ll

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,121 @@ define double @fdiv_pow_powi_negative_variable(double %x, i32 %y) {
401401
ret double %div
402402
}
403403

404+
; powi(X,C1)/ (X * Z) --> powi(X,C1 - 1)/ Z
405+
define double @fdiv_fmul_powi(double %a, double %z) {
406+
; CHECK-LABEL: @fdiv_fmul_powi(
407+
; CHECK-NEXT: [[TMP1:%.*]] = call reassoc nnan double @llvm.powi.f64.i32(double [[A:%.*]], i32 4)
408+
; CHECK-NEXT: [[DIV:%.*]] = fdiv reassoc nnan double [[TMP1]], [[Z:%.*]]
409+
; CHECK-NEXT: ret double [[DIV]]
410+
;
411+
%pow = call reassoc double @llvm.powi.f64.i32(double %a, i32 5)
412+
%square = fmul reassoc double %z, %a
413+
%div = fdiv reassoc nnan double %pow, %square
414+
ret double %div
415+
}
416+
417+
; powi(X, 5)/ (X * X) --> powi(X, 4)/ X -> powi(X, 3)
418+
define double @fdiv_fmul_powi_2(double %a) {
419+
; CHECK-LABEL: @fdiv_fmul_powi_2(
420+
; CHECK-NEXT: [[DIV:%.*]] = call reassoc nnan double @llvm.powi.f64.i32(double [[A:%.*]], i32 3)
421+
; CHECK-NEXT: ret double [[DIV]]
422+
;
423+
%pow = call reassoc double @llvm.powi.f64.i32(double %a, i32 5)
424+
%square = fmul reassoc double %a, %a
425+
%div = fdiv reassoc nnan double %pow, %square
426+
ret double %div
427+
}
428+
429+
define <2 x float> @fdiv_fmul_powi_vector(<2 x float> %a) {
430+
; CHECK-LABEL: @fdiv_fmul_powi_vector(
431+
; CHECK-NEXT: [[DIV:%.*]] = call reassoc nnan <2 x float> @llvm.powi.v2f32.i32(<2 x float> [[A:%.*]], i32 3)
432+
; CHECK-NEXT: ret <2 x float> [[DIV]]
433+
;
434+
%pow = call reassoc <2 x float> @llvm.powi.v2f32.i32(<2 x float> %a, i32 5)
435+
%square = fmul reassoc <2 x float> %a, %a
436+
%div = fdiv reassoc nnan <2 x float> %pow, %square
437+
ret <2 x float> %div
438+
}
439+
440+
; Negative test
441+
define double @fdiv_fmul_powi_missing_reassoc1(double %a) {
442+
; CHECK-LABEL: @fdiv_fmul_powi_missing_reassoc1(
443+
; CHECK-NEXT: [[POW:%.*]] = call reassoc double @llvm.powi.f64.i32(double [[A:%.*]], i32 5)
444+
; CHECK-NEXT: [[SQUARE:%.*]] = fmul reassoc double [[A]], [[A]]
445+
; CHECK-NEXT: [[DIV:%.*]] = fdiv nnan double [[POW]], [[SQUARE]]
446+
; CHECK-NEXT: ret double [[DIV]]
447+
;
448+
%pow = call reassoc double @llvm.powi.f64.i32(double %a, i32 5)
449+
%square = fmul reassoc double %a, %a
450+
%div = fdiv nnan double %pow, %square
451+
ret double %div
452+
}
453+
454+
define double @fdiv_fmul_powi_missing_reassoc2(double %a) {
455+
; CHECK-LABEL: @fdiv_fmul_powi_missing_reassoc2(
456+
; CHECK-NEXT: [[POW:%.*]] = call reassoc double @llvm.powi.f64.i32(double [[A:%.*]], i32 5)
457+
; CHECK-NEXT: [[SQUARE:%.*]] = fmul double [[A]], [[A]]
458+
; CHECK-NEXT: [[DIV:%.*]] = fdiv reassoc nnan double [[POW]], [[SQUARE]]
459+
; CHECK-NEXT: ret double [[DIV]]
460+
;
461+
%pow = call reassoc double @llvm.powi.f64.i32(double %a, i32 5)
462+
%square = fmul double %a, %a
463+
%div = fdiv reassoc nnan double %pow, %square
464+
ret double %div
465+
}
466+
467+
define double @fdiv_fmul_powi_missing_reassoc3(double %a) {
468+
; CHECK-LABEL: @fdiv_fmul_powi_missing_reassoc3(
469+
; CHECK-NEXT: [[POW:%.*]] = call double @llvm.powi.f64.i32(double [[A:%.*]], i32 5)
470+
; CHECK-NEXT: [[SQUARE:%.*]] = fmul reassoc double [[A]], [[A]]
471+
; CHECK-NEXT: [[DIV:%.*]] = fdiv reassoc nnan double [[POW]], [[SQUARE]]
472+
; CHECK-NEXT: ret double [[DIV]]
473+
;
474+
%pow = call double @llvm.powi.f64.i32(double %a, i32 5)
475+
%square = fmul reassoc double %a, %a
476+
%div = fdiv reassoc nnan double %pow, %square
477+
ret double %div
478+
}
479+
480+
define double @fdiv_fmul_powi_missing_nnan(double %a) {
481+
; CHECK-LABEL: @fdiv_fmul_powi_missing_nnan(
482+
; CHECK-NEXT: [[POW:%.*]] = call reassoc double @llvm.powi.f64.i32(double [[A:%.*]], i32 5)
483+
; CHECK-NEXT: [[SQUARE:%.*]] = fmul reassoc double [[A]], [[A]]
484+
; CHECK-NEXT: [[DIV:%.*]] = fdiv reassoc double [[POW]], [[SQUARE]]
485+
; CHECK-NEXT: ret double [[DIV]]
486+
;
487+
%pow = call reassoc double @llvm.powi.f64.i32(double %a, i32 5)
488+
%square = fmul reassoc double %a, %a
489+
%div = fdiv reassoc double %pow, %square
490+
ret double %div
491+
}
492+
493+
define double @fdiv_fmul_powi_negative_wrap(double noundef %x) {
494+
; CHECK-LABEL: @fdiv_fmul_powi_negative_wrap(
495+
; CHECK-NEXT: [[P1:%.*]] = tail call double @llvm.powi.f64.i32(double [[X:%.*]], i32 -2147483648)
496+
; CHECK-NEXT: [[MUL:%.*]] = fmul reassoc double [[P1]], [[X]]
497+
; CHECK-NEXT: ret double [[MUL]]
498+
;
499+
%p1 = tail call double @llvm.powi.f64.i32(double %x, i32 -2147483648) ; INT_MIN
500+
%mul = fmul reassoc double %p1, %x
501+
ret double %mul
502+
}
503+
504+
define double @fdiv_fmul_powi_multi_use(double %a) {
505+
; CHECK-LABEL: @fdiv_fmul_powi_multi_use(
506+
; CHECK-NEXT: [[POW:%.*]] = call reassoc double @llvm.powi.f64.i32(double [[A:%.*]], i32 5)
507+
; CHECK-NEXT: tail call void @use(double [[POW]])
508+
; CHECK-NEXT: [[SQUARE:%.*]] = fmul reassoc double [[A]], [[A]]
509+
; CHECK-NEXT: [[DIV:%.*]] = fdiv reassoc nnan double [[POW]], [[SQUARE]]
510+
; CHECK-NEXT: ret double [[DIV]]
511+
;
512+
%pow = call reassoc double @llvm.powi.f64.i32(double %a, i32 5)
513+
tail call void @use(double %pow)
514+
%square = fmul reassoc double %a, %a
515+
%div = fdiv reassoc nnan double %pow, %square
516+
ret double %div
517+
}
518+
404519
; powi(X, Y) * X --> powi(X, Y+1)
405520
define double @powi_fmul_powi_x(double noundef %x) {
406521
; CHECK-LABEL: @powi_fmul_powi_x(
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
set(LLVM_TARGET_DEFINITIONS AsyncOps.td)
12
add_mlir_dialect(AsyncOps async)
23
add_mlir_doc(AsyncOps AsyncDialect Dialects/ -gen-dialect-doc)

mlir/python/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ declare_mlir_dialect_python_bindings(
7979
ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/mlir"
8080
TD_FILE dialects/AsyncOps.td
8181
SOURCES_GLOB dialects/async_dialect/*.py
82-
DIALECT_NAME async_dialect)
82+
DIALECT_NAME async)
8383

8484
declare_mlir_dialect_python_bindings(
8585
ADD_TO_PARENT MLIRPythonSources.Dialects
@@ -591,7 +591,7 @@ declare_mlir_python_extension(MLIRPythonExtension.Dialects.Transform.Pybind
591591

592592
declare_mlir_python_extension(MLIRPythonExtension.AsyncDialectPasses
593593
MODULE_NAME _mlirAsyncPasses
594-
ADD_TO_PARENT MLIRPythonSources.Dialects.async_dialect
594+
ADD_TO_PARENT MLIRPythonSources.Dialects.async
595595
ROOT_DIR "${PYTHON_SOURCE_DIR}"
596596
SOURCES
597597
AsyncPasses.cpp

mlir/python/mlir/dialects/async_dialect/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# See https://llvm.org/LICENSE.txt for license information.
33
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44

5-
from .._async_dialect_ops_gen import *
5+
from .._async_ops_gen import *

0 commit comments

Comments
 (0)