[PATCH] D67787: Add 8548 CPU definition and attributes

2019-10-23 Thread Vitaly Cheptsov via Phabricator via cfe-commits
vit9696 added a comment.

@jhibbits Should not the test in test/Preprocessor/init.c also ensure that 
`__SPE__` and `__NO_FPRS__` macros are defined with CPU 8548? The rest looks 
good to me, thank you.


Repository:
  rC Clang

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

https://reviews.llvm.org/D67787



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


[PATCH] D67787: Add 8548 CPU definition and attributes

2019-10-23 Thread Vitaly Cheptsov via Phabricator via cfe-commits
vit9696 added a comment.

Yes, that's the point, since 8548 is an alias.

A side note regarding SPE support. I am currently upgrading to LLVM 9.0 and I 
discovered that this patch was not committed anyhow at all:
https://reviews.llvm.org/D54583#1444288


Repository:
  rC Clang

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

https://reviews.llvm.org/D67787



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


[PATCH] D67787: Add 8548 CPU definition and attributes

2019-10-26 Thread Vitaly Cheptsov via Phabricator via cfe-commits
vit9696 added a comment.

I noticed a typo in the file, but the rest looks good now.




Comment at: clang/lib/Driver/ToolChains/Arch/PPC.cpp:61
 .Case("a2q", "a2q")
+.Case("8548", "e500")
+.Case("e500", "e500")

That looks like a typo to me. There is one more 8548 case above.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67787



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


[PATCH] D67787: Add 8548 CPU definition and attributes

2019-10-28 Thread Vitaly Cheptsov via Phabricator via cfe-commits
vit9696 accepted this revision.
vit9696 added a comment.
This revision is now accepted and ready to land.

Thanks.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67787



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


[PATCH] D124767: [Clang] Map .gcda paths according to -fcoverage-prefix-map

2022-05-02 Thread Vitaly Cheptsov via Phabricator via cfe-commits
vit9696 created this revision.
vit9696 added reviewers: keith, phosek.
Herald added a project: All.
vit9696 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

https://github.com/llvm/llvm-project/issues/54670


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D124767

Files:
  clang/lib/CodeGen/CodeGenModule.cpp


Index: clang/lib/CodeGen/CodeGenModule.cpp
===
--- clang/lib/CodeGen/CodeGenModule.cpp
+++ clang/lib/CodeGen/CodeGenModule.cpp
@@ -6550,8 +6550,20 @@
 
   llvm::NamedMDNode *GCov = TheModule.getOrInsertNamedMetadata("llvm.gcov");
   llvm::LLVMContext &Ctx = TheModule.getContext();
-  auto *CoverageDataFile =
+  auto &PrefixMap = getCodeGenOpts().CoveragePrefixMap;
+  llvm::SmallString<256> File;
+  if (!PrefixMap.empty()) {
+File = getCodeGenOpts().CoverageDataFile;
+llvm::sys::path::remove_dots(File, /*remove_dot_dot=*/true);
+for (const auto &Entry : PrefixMap) {
+  if (llvm::sys::path::replace_path_prefix(File, Entry.first, 
Entry.second))
+break;
+}
+CoverageDataFile = llvm::MDString::get(Ctx, File.c_str());
+  } else {
+CoverageDataFile =
   llvm::MDString::get(Ctx, getCodeGenOpts().CoverageDataFile);
+  }
   auto *CoverageNotesFile =
   llvm::MDString::get(Ctx, getCodeGenOpts().CoverageNotesFile);
   for (int i = 0, e = CUNode->getNumOperands(); i != e; ++i) {


Index: clang/lib/CodeGen/CodeGenModule.cpp
===
--- clang/lib/CodeGen/CodeGenModule.cpp
+++ clang/lib/CodeGen/CodeGenModule.cpp
@@ -6550,8 +6550,20 @@
 
   llvm::NamedMDNode *GCov = TheModule.getOrInsertNamedMetadata("llvm.gcov");
   llvm::LLVMContext &Ctx = TheModule.getContext();
-  auto *CoverageDataFile =
+  auto &PrefixMap = getCodeGenOpts().CoveragePrefixMap;
+  llvm::SmallString<256> File;
+  if (!PrefixMap.empty()) {
+File = getCodeGenOpts().CoverageDataFile;
+llvm::sys::path::remove_dots(File, /*remove_dot_dot=*/true);
+for (const auto &Entry : PrefixMap) {
+  if (llvm::sys::path::replace_path_prefix(File, Entry.first, Entry.second))
+break;
+}
+CoverageDataFile = llvm::MDString::get(Ctx, File.c_str());
+  } else {
+CoverageDataFile =
   llvm::MDString::get(Ctx, getCodeGenOpts().CoverageDataFile);
+  }
   auto *CoverageNotesFile =
   llvm::MDString::get(Ctx, getCodeGenOpts().CoverageNotesFile);
   for (int i = 0, e = CUNode->getNumOperands(); i != e; ++i) {
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D124767: [Clang] Map .gcda paths according to -fcoverage-prefix-map

2022-05-02 Thread Vitaly Cheptsov via Phabricator via cfe-commits
vit9696 updated this revision to Diff 426414.

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124767

Files:
  clang/lib/CodeGen/CodeGenModule.cpp


Index: clang/lib/CodeGen/CodeGenModule.cpp
===
--- clang/lib/CodeGen/CodeGenModule.cpp
+++ clang/lib/CodeGen/CodeGenModule.cpp
@@ -6550,8 +6550,21 @@
 
   llvm::NamedMDNode *GCov = TheModule.getOrInsertNamedMetadata("llvm.gcov");
   llvm::LLVMContext &Ctx = TheModule.getContext();
-  auto *CoverageDataFile =
+  llvm::MDString *CoverageDataFile = nullptr;
+  auto &PrefixMap = getCodeGenOpts().CoveragePrefixMap;
+  llvm::SmallString<256> File;
+  if (!PrefixMap.empty()) {
+File = getCodeGenOpts().CoverageDataFile;
+llvm::sys::path::remove_dots(File, /*remove_dot_dot=*/true);
+for (const auto &Entry : PrefixMap) {
+  if (llvm::sys::path::replace_path_prefix(File, Entry.first, 
Entry.second))
+break;
+}
+CoverageDataFile = llvm::MDString::get(Ctx, File.c_str());
+  } else {
+CoverageDataFile =
   llvm::MDString::get(Ctx, getCodeGenOpts().CoverageDataFile);
+  }
   auto *CoverageNotesFile =
   llvm::MDString::get(Ctx, getCodeGenOpts().CoverageNotesFile);
   for (int i = 0, e = CUNode->getNumOperands(); i != e; ++i) {


Index: clang/lib/CodeGen/CodeGenModule.cpp
===
--- clang/lib/CodeGen/CodeGenModule.cpp
+++ clang/lib/CodeGen/CodeGenModule.cpp
@@ -6550,8 +6550,21 @@
 
   llvm::NamedMDNode *GCov = TheModule.getOrInsertNamedMetadata("llvm.gcov");
   llvm::LLVMContext &Ctx = TheModule.getContext();
-  auto *CoverageDataFile =
+  llvm::MDString *CoverageDataFile = nullptr;
+  auto &PrefixMap = getCodeGenOpts().CoveragePrefixMap;
+  llvm::SmallString<256> File;
+  if (!PrefixMap.empty()) {
+File = getCodeGenOpts().CoverageDataFile;
+llvm::sys::path::remove_dots(File, /*remove_dot_dot=*/true);
+for (const auto &Entry : PrefixMap) {
+  if (llvm::sys::path::replace_path_prefix(File, Entry.first, Entry.second))
+break;
+}
+CoverageDataFile = llvm::MDString::get(Ctx, File.c_str());
+  } else {
+CoverageDataFile =
   llvm::MDString::get(Ctx, getCodeGenOpts().CoverageDataFile);
+  }
   auto *CoverageNotesFile =
   llvm::MDString::get(Ctx, getCodeGenOpts().CoverageNotesFile);
   for (int i = 0, e = CUNode->getNumOperands(); i != e; ++i) {
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D124767: [Clang] Map .gcda paths according to -fcoverage-prefix-map

2022-05-02 Thread Vitaly Cheptsov via Phabricator via cfe-commits
vit9696 added a comment.

In D124767#3486286 , @keith wrote:

> Based on the issue it sounds like this should be gated behind a new 
> `-fprofile-prefix-map` flag? I assume we'd also want `-ffile-prefix-map` to 
> apply to it as well, similar to the others. And we'll definitely want some 
> tests here!

For tests, sure. I will add some once there is general agreement on the option.

As for the new flag, I am confused. To me the timeline is as follows:

- LLVM implemented `-fprofile-prefix-map.
- GCC implemented `-fprofile-prefix-map`.
- LLVM renamed `-fprofile-prefix-map` to `-fcoverage-prefix-map`.
- GCC preliminary agreed to extend `-fprofile-prefix-map` with gcda path 
mapping.
- This patch implements this extension to LLVM `-fcoverage-prefix-map`, which 
remains being renamed `-fprofile-prefix-map`.

Do I misunderstand something? These flags are rather confusing in their 
semantics.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124767

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


[PATCH] D124767: [Clang] Map .gcda paths according to -fcoverage-prefix-map

2022-05-02 Thread Vitaly Cheptsov via Phabricator via cfe-commits
vit9696 added a comment.

Got it. To be honest, I cannot imagine a situation where one would prefer to 
keep separate behaviour, and with GCC it would be exactly just one. In my view, 
if we introduce -fprofile-prefix-map, it should rather mirror the entire 
-fcoverage-prefix-map behaviour, not some parts of it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124767

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


[PATCH] D67787: Add 8548 CPU definition and attributes

2019-11-12 Thread Vitaly Cheptsov via Phabricator via cfe-commits
vit9696 accepted this revision.
vit9696 added a comment.
This revision is now accepted and ready to land.

Actually thanks for adding C checks too. The new revision also looks good to me.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67787



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


[PATCH] D147834: [clang][driver] Pass `-femulated-tls` through to the linker in LTO mode

2023-04-08 Thread Vitaly Cheptsov via Phabricator via cfe-commits
vit9696 accepted this revision.
vit9696 added a comment.
This revision is now accepted and ready to land.

Looks good to me, thank you!




Comment at: clang/test/Driver/emulated-tls.cpp:57
+// LTO related checks
+//LTO_NOEMUTLS: plugin-opt=-emulated-tls=0
+//LTO_NOEMUTLS-NOT: plugin-opt=-emulated-tls=1

Maybe add a space before LTO here?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147834

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