[clang] [lld] [llvm] [Windows] Add support for emitting PGO/LTO magic strings in the Windows PE debug directory (PR #114260)

Mikołaj Piróg via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 2 07:12:20 PST 2024


================
@@ -1206,6 +1245,19 @@ void Writer::createMiscChunks() {
                                   IMAGE_DLL_CHARACTERISTICS_EX_CET_COMPAT));
   }
 
+  if (writeLTO) {
+    debugRecords.emplace_back(COFF::IMAGE_DEBUG_TYPE_POGO,
+                              make<DebugDirStringChunk>(ltcg));
----------------
mikolaj-pirog wrote:

> I didn’t mean to discourage you @mikolaj-pirog. But if you could come up with a proper structure here for IMAGE_DEBUG_TYPE_POGO, I think the PR would be acceptable.

No worry, you didn't discourage me, I appreciate each piece of feedback :) Just to be clear, would this patch be accepted if I manage to make lld emit the appropriate structure (like MSVC does) for the PGO/PGU/LTCG? 

https://github.com/llvm/llvm-project/pull/114260


More information about the cfe-commits mailing list