================
@@ -1165,6 +1188,23 @@ void Writer::createMiscChunks() {
   llvm::TimeTraceScope timeScope("Misc chunks");
   Configuration *config = &ctx.config;
 
+  auto searchForPgoMagicSection = [this](char sectionName[]) {
----------------
mikolaj-pirog wrote:

I haven't measured that yet. I was thinking of other solutions to this, but 
this is the best I came up with. The fundamental problem is that the lld linker 
has to know about pgu/pgi -- to do that I pass this info by creating special 
sections in the COFF object files, and later look for them in the linking 
phase. The other option is creating a new flag and pass it down to the linker, 
but that is also far from ideal. I was hoping to maybe put some flag in some 
header in the COFF file, I think COFF doesn't support that. As such, I opted 
for the creating-and-later-looking-for section approach 

https://github.com/llvm/llvm-project/pull/114260
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to