[PATCH] D108482: [Clang] Fixes instantiation of OpaqueValueExprs (Bug #45964)

2021-08-21 Thread Raul Tambre via Phabricator via cfe-commits
tambre requested changes to this revision.
tambre added a comment.
This revision now requires changes to proceed.

Please:

- Add a test case based on the one in the bug. Hopefully you'll be able to 
reduce it further now that you understand the bug.
- Use imperative style for the commit message, i.e. "Fix instantiation of 
OpaqueValueExprs".


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108482/new/

https://reviews.llvm.org/D108482

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D108421: Mark openmp internal global dso_local

2021-08-21 Thread kamlesh kumar via Phabricator via cfe-commits
kamleshbhalui updated this revision to Diff 367953.
kamleshbhalui added a comment.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

updated test and make changes local to auto generated global vars for lock.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108421/new/

https://reviews.llvm.org/D108421

Files:
  clang/lib/CodeGen/CGOpenMPRuntime.cpp
  clang/test/OpenMP/critical_codegen.cpp
  clang/test/OpenMP/critical_codegen_attr.cpp
  llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp


Index: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
===
--- llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+++ llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
@@ -2487,7 +2487,12 @@
 Value *OpenMPIRBuilder::getOMPCriticalRegionLock(StringRef CriticalName) {
   std::string Prefix = Twine("gomp_critical_user_", CriticalName).str();
   std::string Name = getNameWithSeparators({Prefix, "var"}, ".", ".");
-  return getOrCreateOMPInternalVariable(KmpCriticalNameTy, Name);
+  llvm::GlobalVariable *GV = cast(
+  getOrCreateOMPInternalVariable(KmpCriticalNameTy, Name));
+  if (!GV->isDSOLocal())
+GV->setDSOLocal(true);
+
+  return cast(GV);
 }
 
 GlobalVariable *
Index: clang/test/OpenMP/critical_codegen_attr.cpp
===
--- clang/test/OpenMP/critical_codegen_attr.cpp
+++ clang/test/OpenMP/critical_codegen_attr.cpp
@@ -16,9 +16,9 @@
 #define HEADER
 
 // ALL:   [[IDENT_T_TY:%.+]] = type { i32, i32, i32, i32, i8* }
-// ALL:   [[UNNAMED_LOCK:@.+]] = common global [8 x i32] zeroinitializer
-// ALL:   [[THE_NAME_LOCK:@.+]] = common global [8 x i32] zeroinitializer
-// ALL:   [[THE_NAME_LOCK1:@.+]] = common global [8 x i32] zeroinitializer
+// ALL:   [[UNNAMED_LOCK:@.+]] = common dso_local global [8 x i32] 
zeroinitializer
+// ALL:   [[THE_NAME_LOCK:@.+]] = common dso_local global [8 x i32] 
zeroinitializer
+// ALL:   [[THE_NAME_LOCK1:@.+]] = common dso_local global [8 x i32] 
zeroinitializer
 
 // ALL:   define {{.*}}void [[FOO:@.+]]()
 
Index: clang/test/OpenMP/critical_codegen.cpp
===
--- clang/test/OpenMP/critical_codegen.cpp
+++ clang/test/OpenMP/critical_codegen.cpp
@@ -16,9 +16,9 @@
 #define HEADER
 
 // ALL:   [[IDENT_T_TY:%.+]] = type { i32, i32, i32, i32, i8* }
-// ALL:   [[UNNAMED_LOCK:@.+]] = common global [8 x i32] zeroinitializer
-// ALL:   [[THE_NAME_LOCK:@.+]] = common global [8 x i32] zeroinitializer
-// ALL:   [[THE_NAME_LOCK1:@.+]] = common global [8 x i32] zeroinitializer
+// ALL:   [[UNNAMED_LOCK:@.+]] = common dso_local global [8 x i32] 
zeroinitializer
+// ALL:   [[THE_NAME_LOCK:@.+]] = common dso_local global [8 x i32] 
zeroinitializer
+// ALL:   [[THE_NAME_LOCK1:@.+]] = common dso_local global [8 x i32] 
zeroinitializer
 
 // ALL:   define {{.*}}void [[FOO:@.+]]()
 
Index: clang/lib/CodeGen/CGOpenMPRuntime.cpp
===
--- clang/lib/CodeGen/CGOpenMPRuntime.cpp
+++ clang/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -2189,7 +2189,12 @@
 llvm::Value *CGOpenMPRuntime::getCriticalRegionLock(StringRef CriticalName) {
   std::string Prefix = Twine("gomp_critical_user_", CriticalName).str();
   std::string Name = getName({Prefix, "var"});
-  return getOrCreateInternalVariable(KmpCriticalNameTy, Name);
+  llvm::GlobalVariable *GV = cast(
+  getOrCreateInternalVariable(KmpCriticalNameTy, Name));
+  if (!GV->isDSOLocal())
+GV->setDSOLocal(true);
+
+  return cast(GV);
 }
 
 namespace {


Index: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
===
--- llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+++ llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
@@ -2487,7 +2487,12 @@
 Value *OpenMPIRBuilder::getOMPCriticalRegionLock(StringRef CriticalName) {
   std::string Prefix = Twine("gomp_critical_user_", CriticalName).str();
   std::string Name = getNameWithSeparators({Prefix, "var"}, ".", ".");
-  return getOrCreateOMPInternalVariable(KmpCriticalNameTy, Name);
+  llvm::GlobalVariable *GV = cast(
+  getOrCreateOMPInternalVariable(KmpCriticalNameTy, Name));
+  if (!GV->isDSOLocal())
+GV->setDSOLocal(true);
+
+  return cast(GV);
 }
 
 GlobalVariable *
Index: clang/test/OpenMP/critical_codegen_attr.cpp
===
--- clang/test/OpenMP/critical_codegen_attr.cpp
+++ clang/test/OpenMP/critical_codegen_attr.cpp
@@ -16,9 +16,9 @@
 #define HEADER
 
 // ALL:   [[IDENT_T_TY:%.+]] = type { i32, i32, i32, i32, i8* }
-// ALL:   [[UNNAMED_LOCK:@.+]] = common global [8 x i32] zeroinitializer
-// ALL:   [[THE_NAME_LOCK:@.+]] = common global [8 x i32] zeroinitializer
-// ALL:   [[THE_NAME_LOCK1:@.+]] = common global [8 x i32] zeroinitializer
+// ALL:   [[

[PATCH] D108421: Mark openmp internal global dso_local

2021-08-21 Thread kamlesh kumar via Phabricator via cfe-commits
kamleshbhalui updated this revision to Diff 367954.
kamleshbhalui added a comment.

assume dso local if relocation model static


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108421/new/

https://reviews.llvm.org/D108421

Files:
  llvm/lib/Target/TargetMachine.cpp


Index: llvm/lib/Target/TargetMachine.cpp
===
--- llvm/lib/Target/TargetMachine.cpp
+++ llvm/lib/Target/TargetMachine.cpp
@@ -149,6 +149,11 @@
 return GV->isStrongDefinitionForLinker();
   }
 
+  if (TT.isOSBinFormatELF()) {
+if (RM == Reloc::Static)
+  return true;
+  }
+
   // Due to the AIX linkage model, any global with default visibility is
   // considered non-local.
   if (TT.isOSBinFormatXCOFF())


Index: llvm/lib/Target/TargetMachine.cpp
===
--- llvm/lib/Target/TargetMachine.cpp
+++ llvm/lib/Target/TargetMachine.cpp
@@ -149,6 +149,11 @@
 return GV->isStrongDefinitionForLinker();
   }
 
+  if (TT.isOSBinFormatELF()) {
+if (RM == Reloc::Static)
+  return true;
+  }
+
   // Due to the AIX linkage model, any global with default visibility is
   // considered non-local.
   if (TT.isOSBinFormatXCOFF())
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D108421: Mark openmp internal global dso_local

2021-08-21 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment.

In D108421#2958742 , @kamleshbhalui 
wrote:

> assume dso local if relocation model static

I think these are two separate fixes. `TargetMachine::shouldAssumeDSOLocal()` 
change might make sense,
but as the comment there notes, this really should be fixed in in 
`CGOpenMPRuntime::getOrCreateInternalVariable()` itself (is that not the right 
default?),
and in it's every user that incorrectly unmarks said global as being `dso_local.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108421/new/

https://reviews.llvm.org/D108421

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D108422: [NFC][clang] Move remaining part of X86Target.def to llvm/Support/X86TargetParser.def

2021-08-21 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a comment.

In D108422#2958591 , @LuoYuanke wrote:

> In D108422#2957541 , @erichkeane 
> wrote:
>
>> In D108422#2957528 , @RKSimon 
>> wrote:
>>
>>> There's nothing later than CannonLake here - does Intel need to at least 
>>> reference up to Tiger/Rocketlake?
>>
>> @LuoYuanke ^^
>
> Thanks for reminding. We've supported -march=${CPU}, but forgot to update 
> this table. We will update it.

Shall we get this patch committed first before making any changes?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108422/new/

https://reviews.llvm.org/D108422

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D108422: [NFC][clang] Move remaining part of X86Target.def to llvm/Support/X86TargetParser.def

2021-08-21 Thread LuoYuanke via Phabricator via cfe-commits
LuoYuanke added a comment.

>> Thanks for reminding. We've supported -march=${CPU}, but forgot to update 
>> this table. We will update it.
>
> Shall we get this patch committed first before making any changes?

Yes, committing the patch first looks good to me.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108422/new/

https://reviews.llvm.org/D108422

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D108422: [NFC][clang] Move remaining part of X86Target.def to llvm/Support/X86TargetParser.def

2021-08-21 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment.

This should be autogenerated from the main `X86.td`, otherwise this is, 
unfortunately only partially, duplicates that.
E.g. there isn't a single AMD CPU in there.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108422/new/

https://reviews.llvm.org/D108422

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D108422: [NFC][clang] Move remaining part of X86Target.def to llvm/Support/X86TargetParser.def

2021-08-21 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.

LGTM - cheers


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108422/new/

https://reviews.llvm.org/D108422

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D108509: [X86][AMX] Add missing inline attributes in AMX intrinsics. NFCI

2021-08-21 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei created this revision.
pengfei added reviewers: LuoYuanke, yubing, craig.topper.
pengfei requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

This should fix unused warning reported in 
https://lists.llvm.org/pipermail/llvm-dev/2021-August/152233.html


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D108509

Files:
  clang/lib/Headers/amxintrin.h

Index: clang/lib/Headers/amxintrin.h
===
--- clang/lib/Headers/amxintrin.h
+++ clang/lib/Headers/amxintrin.h
@@ -313,9 +313,8 @@
 ///A pointer to base address.
 /// \param stride
 ///The stride between the rows' data to be loaded in memory.
-__DEFAULT_FN_ATTRS_TILE
-static void __tile_loadd(__tile1024i *dst, const void *base,
- __SIZE_TYPE__ stride) {
+static __inline__ void __DEFAULT_FN_ATTRS_TILE
+__tile_loadd(__tile1024i *dst, const void *base, __SIZE_TYPE__ stride) {
   dst->tile = _tile_loadd_internal(dst->row, dst->col, base, stride);
 }
 
@@ -334,9 +333,8 @@
 ///A pointer to base address.
 /// \param stride
 ///The stride between the rows' data to be loaded in memory.
-__DEFAULT_FN_ATTRS_TILE
-static void __tile_stream_loadd(__tile1024i *dst, const void *base,
-__SIZE_TYPE__ stride) {
+static __inline__ void __DEFAULT_FN_ATTRS_TILE
+__tile_stream_loadd(__tile1024i *dst, const void *base, __SIZE_TYPE__ stride) {
   dst->tile = _tile_loaddt1_internal(dst->row, dst->col, base, stride);
 }
 
@@ -356,9 +354,8 @@
 ///The 1st source tile. Max size is 1024 Bytes.
 /// \param src1
 ///The 2nd source tile. Max size is 1024 Bytes.
-__DEFAULT_FN_ATTRS_INT8
-static void __tile_dpbssd(__tile1024i *dst, __tile1024i src0,
-  __tile1024i src1) {
+static __inline__ void __DEFAULT_FN_ATTRS_INT8
+__tile_dpbssd(__tile1024i *dst, __tile1024i src0, __tile1024i src1) {
   dst->tile = _tile_dpbssd_internal(src0.row, src1.col, src0.col, dst->tile,
 src0.tile, src1.tile);
 }
@@ -379,9 +376,8 @@
 ///The 1st source tile. Max size is 1024 Bytes.
 /// \param src1
 ///The 2nd source tile. Max size is 1024 Bytes.
-__DEFAULT_FN_ATTRS_INT8
-static void __tile_dpbsud(__tile1024i *dst, __tile1024i src0,
-  __tile1024i src1) {
+static __inline__ void __DEFAULT_FN_ATTRS_INT8
+__tile_dpbsud(__tile1024i *dst, __tile1024i src0, __tile1024i src1) {
   dst->tile = _tile_dpbsud_internal(src0.row, src1.col, src0.col, dst->tile,
 src0.tile, src1.tile);
 }
@@ -402,9 +398,8 @@
 ///The 1st source tile. Max size is 1024 Bytes.
 /// \param src1
 ///The 2nd source tile. Max size is 1024 Bytes.
-__DEFAULT_FN_ATTRS_INT8
-static void __tile_dpbusd(__tile1024i *dst, __tile1024i src0,
-  __tile1024i src1) {
+static __inline__ void __DEFAULT_FN_ATTRS_INT8
+__tile_dpbusd(__tile1024i *dst, __tile1024i src0, __tile1024i src1) {
   dst->tile = _tile_dpbusd_internal(src0.row, src1.col, src0.col, dst->tile,
 src0.tile, src1.tile);
 }
@@ -425,9 +420,8 @@
 ///The 1st source tile. Max size is 1024 Bytes.
 /// \param src1
 ///The 2nd source tile. Max size is 1024 Bytes.
-__DEFAULT_FN_ATTRS_INT8
-static void __tile_dpbuud(__tile1024i *dst, __tile1024i src0,
-  __tile1024i src1) {
+static __inline__ void __DEFAULT_FN_ATTRS_INT8
+__tile_dpbuud(__tile1024i *dst, __tile1024i src0, __tile1024i src1) {
   dst->tile = _tile_dpbuud_internal(src0.row, src1.col, src0.col, dst->tile,
 src0.tile, src1.tile);
 }
@@ -445,8 +439,8 @@
 ///A pointer to base address.
 /// \param stride
 ///The stride between the rows' data to be stored in memory.
-__DEFAULT_FN_ATTRS_TILE
-static void __tile_stored(void *base, __SIZE_TYPE__ stride, __tile1024i src) {
+static __inline__ void __DEFAULT_FN_ATTRS_TILE
+__tile_stored(void *base, __SIZE_TYPE__ stride, __tile1024i src) {
   _tile_stored_internal(src.row, src.col, base, stride, src.tile);
 }
 
@@ -458,8 +452,8 @@
 ///
 /// \param dst
 ///The destination tile to be zero. Max size is 1024 Bytes.
-__DEFAULT_FN_ATTRS_TILE
-static void __tile_zero(__tile1024i *dst) {
+static __inline__ void __DEFAULT_FN_ATTRS_TILE
+__tile_zero(__tile1024i *dst) {
   dst->tile = __builtin_ia32_tilezero_internal(dst->row, dst->col);
 }
 
@@ -478,9 +472,8 @@
 ///The 1st source tile. Max size is 1024 Bytes.
 /// \param src1
 ///The 2nd source tile. Max size is 1024 Bytes.
-__DEFAULT_FN_ATTRS_BF16
-static void __tile_dpbf16ps(__tile1024i *dst, __tile1024i src0,
-__tile1024i src1) {
+static __inline__ void __DEFAULT_FN_ATTRS_BF16
+__tile_dpbf16ps(__tile1024i *dst, __tile1024i src0, __tile1024i src1) {
   dst->tile = _tile_dpbf16ps_internal(src0.row, src1.col, src0.col, dst->tile,

[PATCH] D108509: [X86][AMX] Add missing inline attributes in AMX intrinsics. NFCI

2021-08-21 Thread LuoYuanke via Phabricator via cfe-commits
LuoYuanke accepted this revision.
LuoYuanke added a comment.
This revision is now accepted and ready to land.

LGTM, thanks!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108509/new/

https://reviews.llvm.org/D108509

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D108421: Mark openmp internal global dso_local

2021-08-21 Thread kamlesh kumar via Phabricator via cfe-commits
kamleshbhalui added a comment.

In D108421#2958745 , @lebedev.ri 
wrote:

> In D108421#2958742 , @kamleshbhalui 
> wrote:
>
>> assume dso local if relocation model static
>
> I think these are two separate fixes. `TargetMachine::shouldAssumeDSOLocal()` 
> change might make sense,
> but as the comment there notes, this really should be fixed in in 
> `CGOpenMPRuntime::getOrCreateInternalVariable()` itself (is that not the 
> right default?),
> and in it's every user that incorrectly unmarks said global as being 
> `dso_local.

Please see this revision https://reviews.llvm.org/differential/diff/367953/
Should I get back to this?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108421/new/

https://reviews.llvm.org/D108421

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D105268: [X86] AVX512FP16 instructions enabling 5/6

2021-08-21 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 367957.
pengfei marked 8 inline comments as done.
pengfei added a comment.

Address Yuanke's comments. Thanks Yuanke and Craig.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105268/new/

https://reviews.llvm.org/D105268

Files:
  clang/include/clang/Basic/BuiltinsX86.def
  clang/lib/CodeGen/CGBuiltin.cpp
  clang/lib/Headers/avx512fp16intrin.h
  clang/lib/Headers/avx512vlfp16intrin.h
  clang/lib/Sema/SemaChecking.cpp
  clang/test/CodeGen/X86/avx512fp16-builtins.c
  clang/test/CodeGen/X86/avx512vlfp16-builtins.c
  llvm/include/llvm/IR/IntrinsicsX86.td
  llvm/lib/Target/X86/X86ISelLowering.cpp
  llvm/lib/Target/X86/X86InstrAVX512.td
  llvm/lib/Target/X86/X86InstrFMA3Info.cpp
  llvm/lib/Target/X86/X86InstrFoldTables.cpp
  llvm/lib/Target/X86/X86InstrFormats.td
  llvm/lib/Target/X86/X86InstrInfo.cpp
  llvm/lib/Target/X86/X86IntrinsicsInfo.h
  llvm/test/CodeGen/X86/avx512fp16-fma-commute.ll
  llvm/test/CodeGen/X86/avx512fp16-fma-intrinsics.ll
  llvm/test/CodeGen/X86/avx512fp16vl-fma-intrinsics.ll
  llvm/test/CodeGen/X86/fp-strict-scalar-fp16.ll
  llvm/test/CodeGen/X86/stack-folding-fp-avx512fp16-fma.ll
  llvm/test/CodeGen/X86/stack-folding-fp-avx512fp16vl-fma.ll
  llvm/test/CodeGen/X86/vec-strict-128-fp16.ll
  llvm/test/CodeGen/X86/vec-strict-256-fp16.ll
  llvm/test/CodeGen/X86/vec-strict-512-fp16.ll
  llvm/test/MC/Disassembler/X86/avx512fp16.txt
  llvm/test/MC/Disassembler/X86/avx512fp16vl.txt
  llvm/test/MC/X86/avx512fp16.s
  llvm/test/MC/X86/avx512fp16vl.s
  llvm/test/MC/X86/intel-syntax-avx512fp16.s
  llvm/test/MC/X86/intel-syntax-avx512fp16vl.s

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D105268: [X86] AVX512FP16 instructions enabling 5/6

2021-08-21 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments.



Comment at: clang/include/clang/Basic/BuiltinsX86.def:2010
+TARGET_BUILTIN(__builtin_ia32_vfmaddph, "V8xV8xV8xV8x", "ncV:128:", 
"avx512fp16,avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vfmaddph256, "V16xV16xV16xV16x", "ncV:256:", 
"avx512fp16,avx512vl")
+

LuoYuanke wrote:
> Can we arrange the vfmaddph variant together?  Move it to line 1997?
> Why there is no mask version for 128 and 256?
We followed what're ps/pd doing. As Craig explained, this is history's legacy. 
We should fix them in future.



Comment at: llvm/test/CodeGen/X86/vec-strict-128-fp16.ll:105
 
+define <8 x half> @f13(<8 x half> %a, <8 x half> %b, <8 x half> %c) #0 {
+; CHECK-LABEL: f13:

LuoYuanke wrote:
> Is it necessary to test 132, 231 version?
213 is the preferred version due to its order in `SelectCode` table. We can 
test others by using memory input, but they are covered in 
stack-folding-fp-avx512fp16vl-fma.ll. I don't think it's necessary to test here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105268/new/

https://reviews.llvm.org/D105268

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D108456: [CUDA] Fix static device variables with -fgpu-rdc

2021-08-21 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added inline comments.



Comment at: clang/lib/CodeGen/CodeGenModule.cpp:6450
 llvm::raw_ostream &OS) const {
-  OS << ".static." << getContext().getCUIDHash();
+  OS << "__static__" << getContext().getCUIDHash();
 }

tra wrote:
> I would expect  NVPTXAssignValidGlobalNames.cpp to deal with this ptx quirk. 
> I'm fine with the underscores, but it would be good we're not just covering 
> up an issue somewhere else.
> 
`NVPTXAssignValidGlobalNames` checks `hasLocalLinkage`, which the `static` 
variables here are not (see discussion in D85223). I think the reason is that 
we don't want variable and function names to differ between host and device, 
and this might even be important here for maintaining proper connection for 
`cudaMemcpy`s and so on.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108456/new/

https://reviews.llvm.org/D108456

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D108509: [X86][AMX] Add missing inline attributes in AMX intrinsics. NFCI

2021-08-21 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei abandoned this revision.
pengfei added a comment.

Didn't notice Craig fixed it. Thanks Craig.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108509/new/

https://reviews.llvm.org/D108509

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D108421: Mark openmp internal global dso_local

2021-08-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay requested changes to this revision.
MaskRay added a comment.
This revision now requires changes to proceed.

If you read the comment in TargetMachine::shouldAssumeDSOLocal: this is the 
wrong direction. dso_local is assumed to marked by the frontend.

Direct accesses and GOT accesses are trade-offs. Direct accesses are not always 
preferred. The MachO special case is an unfortunate case for their xnu kernel, 
not a good example here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108421/new/

https://reviews.llvm.org/D108421

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D107450: [clang-tidy] Fix wrong FIxIt in performance-move-const-arg

2021-08-21 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments.



Comment at: 
clang-tools-extra/test/clang-tidy/checkers/performance-move-const-arg.cpp:262-263
+  int a = 10;
+  forwardToShowInt(std::move(a));
+  // CHECK-MESSAGES: :[[@LINE-1]]:20: warning: std::move of the variable 'a' 
of the trivially-copyable type 'int' has no effect
+}

```
  forwardToShowInt(std::move(a));
  // CHECK-MESSAGES: :[[@LINE-1]]:20: warning: std::move of the variable 'a' of 
the trivially-copyable type 'int' has no effect
```
I continue to want-not-to-block this PR, since I think it's improving the 
situation. However, FWIW...
It's good that this message doesn't contain a fixit, since there's nothing the 
programmer can really do to "fix" this call. But then, should this message be 
emitted at all? If this were `clang -Wall`, then we definitely would //not// 
want to emit a "noisy" warning where there's basically nothing the programmer 
can do about it. Does clang-tidy have a similar philosophy? Or is it okay for 
clang-tidy to say "This code looks wonky" even when there's no obvious way to 
fix it?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107450/new/

https://reviews.llvm.org/D107450

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] 612048a - [clang] Fix typos in documentation (NFC)

2021-08-21 Thread Kazu Hirata via cfe-commits

Author: Kazu Hirata
Date: 2021-08-21T12:17:58-07:00
New Revision: 612048aec1b516d9b686d4c67ffcf047186d20d7

URL: 
https://github.com/llvm/llvm-project/commit/612048aec1b516d9b686d4c67ffcf047186d20d7
DIFF: 
https://github.com/llvm/llvm-project/commit/612048aec1b516d9b686d4c67ffcf047186d20d7.diff

LOG: [clang] Fix typos in documentation (NFC)

Added: 


Modified: 
clang/docs/AddressSanitizer.rst
clang/docs/ClangCommandLineReference.rst
clang/docs/ClangFormatStyleOptions.rst
clang/docs/DataFlowSanitizerDesign.rst
clang/docs/IntroductionToTheClangAST.rst
clang/docs/OpenMPSupport.rst

Removed: 




diff  --git a/clang/docs/AddressSanitizer.rst b/clang/docs/AddressSanitizer.rst
index 7befbc3173da..06b53e2e5da0 100644
--- a/clang/docs/AddressSanitizer.rst
+++ b/clang/docs/AddressSanitizer.rst
@@ -282,11 +282,11 @@ Code generation control
 Instrumentation code outlining
 --
 
-By default AddressSanitizer inlines the instumentation code to improve the
+By default AddressSanitizer inlines the instrumentation code to improve the
 run-time performance, which leads to increased binary size. Using the
 (clang flag ``-fsanitize-address-outline-instrumentation` default: ``false``)
-flag forces all code instumentation to be outlined, which reduces the size
-of the generated code, but also reduces the run-time performace.
+flag forces all code instrumentation to be outlined, which reduces the size
+of the generated code, but also reduces the run-time performance.
 
 Limitations
 ===

diff  --git a/clang/docs/ClangCommandLineReference.rst 
b/clang/docs/ClangCommandLineReference.rst
index 2770d28a9f3b..dcbfba3aa836 100644
--- a/clang/docs/ClangCommandLineReference.rst
+++ b/clang/docs/ClangCommandLineReference.rst
@@ -1705,7 +1705,7 @@ Enable support for int128\_t type
 
 .. option:: -ffp-contract=
 
-Form fused FP ops (e.g. FMAs): fast (fuses across statements disregarding 
pragmas) \| on (only fuses in the same statement unless dictated by pragmas) \| 
off (never fuses) \| fast-honor-pragmas (fuses across statements unless 
diectated by pragmas). Default is 'fast' for CUDA, 'fast-honor-pragmas' for 
HIP, and 'on' otherwise.
+Form fused FP ops (e.g. FMAs): fast (fuses across statements disregarding 
pragmas) \| on (only fuses in the same statement unless dictated by pragmas) \| 
off (never fuses) \| fast-honor-pragmas (fuses across statements unless 
dictated by pragmas). Default is 'fast' for CUDA, 'fast-honor-pragmas' for HIP, 
and 'on' otherwise.
 
 .. option:: -ffp-exception-behavior=
 
@@ -2543,7 +2543,7 @@ Give global types 'default' visibility and global 
functions and variables 'hidde
 
 .. option:: -fvisibility-nodllstorageclass=
 
-The visibility for defintiions without an explicit DLL export class 
\[-fvisibility-from-dllstorageclass\]
+The visibility for definitions without an explicit DLL export class 
\[-fvisibility-from-dllstorageclass\]
 
 .. option:: -fvisibility=
 

diff  --git a/clang/docs/ClangFormatStyleOptions.rst 
b/clang/docs/ClangFormatStyleOptions.rst
index 5bd5ae1f080e..d8ac58734dc4 100644
--- a/clang/docs/ClangFormatStyleOptions.rst
+++ b/clang/docs/ClangFormatStyleOptions.rst
@@ -3541,7 +3541,7 @@ the configuration (without a prefix: ``Auto``).
 ForEach and If macros. This is useful in projects where ForEach/If
 macros are treated as function calls instead of control statements.
 ``SBPO_ControlStatementsExceptForEachMacros`` remains an alias for
-backward compatability.
+backward compatibility.
 
 .. code-block:: c++
 

diff  --git a/clang/docs/DataFlowSanitizerDesign.rst 
b/clang/docs/DataFlowSanitizerDesign.rst
index bed4d2f38cba..4f028de2ed09 100644
--- a/clang/docs/DataFlowSanitizerDesign.rst
+++ b/clang/docs/DataFlowSanitizerDesign.rst
@@ -139,7 +139,7 @@ Origin tracking trace representation
 
 
 An origin tracking trace is a list of chains. Each chain has a stack trace
-where the DFSan runtime records a label propapation, and a pointer to its
+where the DFSan runtime records a label propagation, and a pointer to its
 previous chain. The very first chain does not point to any chain.
 
 Every four 4-bytes aligned application bytes share a 4-byte origin trace ID. A

diff  --git a/clang/docs/IntroductionToTheClangAST.rst 
b/clang/docs/IntroductionToTheClangAST.rst
index 286ab88d01ef..6fbb8f1d6440 100644
--- a/clang/docs/IntroductionToTheClangAST.rst
+++ b/clang/docs/IntroductionToTheClangAST.rst
@@ -32,7 +32,7 @@ clang ParenExpr).
 Examining the AST
 =
 
-A good way to familarize yourself with the Clang AST is to actually look
+A good way to familiarize yourself with the Clang AST is to actually look
 at it on some simple example code. Clang has a builtin AST-dump mode,
 which can be enabled with the flag ``-ast-dump``.
 

diff  --git a/clang/docs/OpenMPSupport.rst b/clang/

[PATCH] D107775: [Clang][AST] Resolve FIXME: Remove ObjCObjectPointer from isSpecifierType

2021-08-21 Thread Alf via Phabricator via cfe-commits
gAlfonso-bit added a comment.

Passed every test in check-all!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107775/new/

https://reviews.llvm.org/D107775

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D105268: [X86] AVX512FP16 instructions enabling 5/6

2021-08-21 Thread LuoYuanke via Phabricator via cfe-commits
LuoYuanke accepted this revision.
LuoYuanke added a comment.
This revision is now accepted and ready to land.

LGTM, may wait 1 or 2 days for comments from others.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105268/new/

https://reviews.llvm.org/D105268

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits