Skip to content

Commit 8f69c55

Browse files
author
chengjunp
committed
Merge branch 'main' of https://github.com/Chengjunp/llvm-project into chengjunp/SROA_tree_merge_of_stores
2 parents 68eea1e + f9cb95c commit 8f69c55

File tree

61 files changed

+1527
-1052
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1527
-1052
lines changed

clang/include/clang/AST/Expr.h

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3548,6 +3548,7 @@ class CompoundLiteralExpr : public Expr {
35483548
QualType T, ExprValueKind VK, Expr *init, bool fileScope)
35493549
: Expr(CompoundLiteralExprClass, T, VK, OK_Ordinary),
35503550
LParenLoc(lparenloc), TInfoAndScope(tinfo, fileScope), Init(init) {
3551+
assert(Init && "Init is a nullptr");
35513552
setDependence(computeDependence(this));
35523553
}
35533554

@@ -3577,19 +3578,11 @@ class CompoundLiteralExpr : public Expr {
35773578
APValue &getStaticValue() const;
35783579

35793580
SourceLocation getBeginLoc() const LLVM_READONLY {
3580-
// FIXME: Init should never be null.
3581-
if (!Init)
3582-
return SourceLocation();
35833581
if (LParenLoc.isInvalid())
35843582
return Init->getBeginLoc();
35853583
return LParenLoc;
35863584
}
3587-
SourceLocation getEndLoc() const LLVM_READONLY {
3588-
// FIXME: Init should never be null.
3589-
if (!Init)
3590-
return SourceLocation();
3591-
return Init->getEndLoc();
3592-
}
3585+
SourceLocation getEndLoc() const LLVM_READONLY { return Init->getEndLoc(); }
35933586

35943587
static bool classof(const Stmt *T) {
35953588
return T->getStmtClass() == CompoundLiteralExprClass;

libc/config/baremetal/aarch64/entrypoints.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,14 +757,30 @@ endif()
757757

758758
list(APPEND TARGET_LIBM_ENTRYPOINTS
759759
# bfloat16 entrypoints
760+
libc.src.math.bf16add
761+
libc.src.math.bf16addf
762+
libc.src.math.bf16addl
763+
libc.src.math.bf16sub
764+
libc.src.math.bf16subf
765+
libc.src.math.bf16subl
760766
libc.src.math.ceilbf16
761767
libc.src.math.fabsbf16
762768
libc.src.math.floorbf16
769+
libc.src.math.fmaxbf16
770+
libc.src.math.fminbf16
763771
libc.src.math.roundbf16
764772
libc.src.math.roundevenbf16
765773
libc.src.math.truncbf16
766774
)
767775

776+
if(LIBC_TYPES_HAS_FLOAT128)
777+
list(APPEND TARGET_LIBM_ENTRYPOINTS
778+
# math.h C++23 mixed bfloat16 and _Float128 entrypoints
779+
libc.src.math.bf16addf128
780+
libc.src.math.bf16subf128
781+
)
782+
endif()
783+
768784
if(LIBC_COMPILER_HAS_FIXED_POINT)
769785
list(APPEND TARGET_LIBM_ENTRYPOINTS
770786
# stdfix.h _Fract and _Accum entrypoints

libc/config/baremetal/arm/entrypoints.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,14 +760,30 @@ endif()
760760

761761
list(APPEND TARGET_LIBM_ENTRYPOINTS
762762
# bfloat16 entrypoints
763+
libc.src.math.bf16add
764+
libc.src.math.bf16addf
765+
libc.src.math.bf16addl
766+
libc.src.math.bf16sub
767+
libc.src.math.bf16subf
768+
libc.src.math.bf16subl
763769
libc.src.math.ceilbf16
764770
libc.src.math.fabsbf16
765771
libc.src.math.floorbf16
772+
libc.src.math.fmaxbf16
773+
libc.src.math.fminbf16
766774
libc.src.math.roundbf16
767775
libc.src.math.roundevenbf16
768776
libc.src.math.truncbf16
769777
)
770778

779+
if(LIBC_TYPES_HAS_FLOAT128)
780+
list(APPEND TARGET_LIBM_ENTRYPOINTS
781+
# math.h C++23 mixed bfloat16 and _Float128 entrypoints
782+
libc.src.math.bf16addf128
783+
libc.src.math.bf16subf128
784+
)
785+
endif()
786+
771787
if(LIBC_COMPILER_HAS_FIXED_POINT)
772788
list(APPEND TARGET_LIBM_ENTRYPOINTS
773789
# stdfix.h _Fract and _Accum entrypoints

libc/config/baremetal/riscv/entrypoints.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,14 +760,30 @@ endif()
760760

761761
list(APPEND TARGET_LIBM_ENTRYPOINTS
762762
# bfloat16 entrypoints
763+
libc.src.math.bf16add
764+
libc.src.math.bf16addf
765+
libc.src.math.bf16addl
766+
libc.src.math.bf16sub
767+
libc.src.math.bf16subf
768+
libc.src.math.bf16subl
763769
libc.src.math.ceilbf16
764770
libc.src.math.fabsbf16
765771
libc.src.math.floorbf16
772+
libc.src.math.fmaxbf16
773+
libc.src.math.fminbf16
766774
libc.src.math.roundbf16
767775
libc.src.math.roundevenbf16
768776
libc.src.math.truncbf16
769777
)
770778

779+
if(LIBC_TYPES_HAS_FLOAT128)
780+
list(APPEND TARGET_LIBM_ENTRYPOINTS
781+
# math.h C++23 mixed bfloat16 and _Float128 entrypoints
782+
libc.src.math.bf16addf128
783+
libc.src.math.bf16subf128
784+
)
785+
endif()
786+
771787
if(LIBC_COMPILER_HAS_FIXED_POINT)
772788
list(APPEND TARGET_LIBM_ENTRYPOINTS
773789
# stdfix.h _Fract and _Accum entrypoints

libc/config/darwin/aarch64/entrypoints.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,14 +590,30 @@ endif()
590590

591591
list(APPEND TARGET_LIBM_ENTRYPOINTS
592592
# bfloat16 entrypoints
593+
libc.src.math.bf16add
594+
libc.src.math.bf16addf
595+
libc.src.math.bf16addl
596+
libc.src.math.bf16sub
597+
libc.src.math.bf16subf
598+
libc.src.math.bf16subl
593599
libc.src.math.ceilbf16
594600
libc.src.math.fabsbf16
595601
libc.src.math.floorbf16
602+
libc.src.math.fmaxbf16
603+
libc.src.math.fminbf16
596604
libc.src.math.roundbf16
597605
libc.src.math.roundevenbf16
598606
libc.src.math.truncbf16
599607
)
600608

609+
if(LIBC_TYPES_HAS_FLOAT128)
610+
list(APPEND TARGET_LIBM_ENTRYPOINTS
611+
# math.h C++23 mixed bfloat16 and _Float128 entrypoints
612+
libc.src.math.bf16addf128
613+
libc.src.math.bf16subf128
614+
)
615+
endif()
616+
601617
if(LIBC_COMPILER_HAS_FIXED_POINT)
602618
list(APPEND TARGET_LIBM_ENTRYPOINTS
603619
# stdfix.h _Fract and _Accum entrypoints

libc/config/darwin/x86_64/entrypoints.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,17 @@ set(TARGET_LIBM_ENTRYPOINTS
233233

234234
list(APPEND TARGET_LIBM_ENTRYPOINTS
235235
# bfloat16 entrypoints
236+
libc.src.math.bf16add
237+
libc.src.math.bf16addf
238+
libc.src.math.bf16addl
239+
libc.src.math.bf16sub
240+
libc.src.math.bf16subf
241+
libc.src.math.bf16subl
236242
libc.src.math.ceilbf16
237243
libc.src.math.fabsbf16
238244
libc.src.math.floorbf16
245+
libc.src.math.fmaxbf16
246+
libc.src.math.fminbf16
239247
libc.src.math.roundbf16
240248
libc.src.math.roundevenbf16
241249
libc.src.math.truncbf16

libc/config/gpu/amdgpu/entrypoints.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,9 +616,17 @@ endif()
616616

617617
list(APPEND TARGET_LIBM_ENTRYPOINTS
618618
# bfloat16 entrypoints
619+
libc.src.math.bf16add
620+
libc.src.math.bf16addf
621+
libc.src.math.bf16addl
622+
libc.src.math.bf16sub
623+
libc.src.math.bf16subf
624+
libc.src.math.bf16subl
619625
libc.src.math.ceilbf16
620626
libc.src.math.fabsbf16
621627
libc.src.math.floorbf16
628+
libc.src.math.fmaxbf16
629+
libc.src.math.fminbf16
622630
libc.src.math.roundbf16
623631
libc.src.math.roundevenbf16
624632
libc.src.math.truncbf16

libc/config/gpu/nvptx/entrypoints.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,9 +617,17 @@ endif()
617617

618618
list(APPEND TARGET_LIBM_ENTRYPOINTS
619619
# bfloat16 entrypoints
620+
libc.src.math.bf16add
621+
libc.src.math.bf16addf
622+
libc.src.math.bf16addl
623+
libc.src.math.bf16sub
624+
libc.src.math.bf16subf
625+
libc.src.math.bf16subl
620626
libc.src.math.ceilbf16
621627
libc.src.math.fabsbf16
622628
libc.src.math.floorbf16
629+
libc.src.math.fmaxbf16
630+
libc.src.math.fminbf16
623631
libc.src.math.roundbf16
624632
libc.src.math.roundevenbf16
625633
libc.src.math.truncbf16

libc/config/linux/aarch64/entrypoints.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -844,14 +844,30 @@ endif()
844844

845845
list(APPEND TARGET_LIBM_ENTRYPOINTS
846846
# bfloat16 entrypoints
847+
libc.src.math.bf16add
848+
libc.src.math.bf16addf
849+
libc.src.math.bf16addl
850+
libc.src.math.bf16sub
851+
libc.src.math.bf16subf
852+
libc.src.math.bf16subl
847853
libc.src.math.ceilbf16
848854
libc.src.math.fabsbf16
849855
libc.src.math.floorbf16
856+
libc.src.math.fmaxbf16
857+
libc.src.math.fminbf16
850858
libc.src.math.roundbf16
851859
libc.src.math.roundevenbf16
852860
libc.src.math.truncbf16
853861
)
854862

863+
if(LIBC_TYPES_HAS_FLOAT128)
864+
list(APPEND TARGET_LIBM_ENTRYPOINTS
865+
# math.h C++23 mixed bfloat16 and _Float128 entrypoints
866+
libc.src.math.bf16addf128
867+
libc.src.math.bf16subf128
868+
)
869+
endif()
870+
855871
if(LLVM_LIBC_FULL_BUILD)
856872
list(APPEND TARGET_LIBC_ENTRYPOINTS
857873
# assert.h entrypoints

libc/config/linux/arm/entrypoints.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,9 +460,17 @@ set(TARGET_LIBM_ENTRYPOINTS
460460

461461
list(APPEND TARGET_LIBM_ENTRYPOINTS
462462
# bfloat16 entrypoints
463+
libc.src.math.bf16add
464+
libc.src.math.bf16addf
465+
libc.src.math.bf16addl
466+
libc.src.math.bf16sub
467+
libc.src.math.bf16subf
468+
libc.src.math.bf16subl
463469
libc.src.math.ceilbf16
464470
libc.src.math.fabsbf16
465471
libc.src.math.floorbf16
472+
libc.src.math.fmaxbf16
473+
libc.src.math.fminbf16
466474
libc.src.math.roundbf16
467475
libc.src.math.roundevenbf16
468476
libc.src.math.truncbf16

0 commit comments

Comments
 (0)