kbelochapka wrote:

> I've cleaned up a number of the TargetOptions fields recently, but more work 
> is still necessary. Trying to encode raw flags into the bitcode is just 
> ossifying a bad system.
> 
> Many of these options are literally options to the ultimate tool that drives 
> codegen. e..g, it makes no sense to treat StackUsageFile, 
> EnableMachineOutliner, or EnableGlobalISel as properties of the program

Hi @arsenm ,  The problem this ticket aims to solve is much narrower in scope. 
The goal is to make DTLTO output binary-identical to ThinLTO output. To achieve 
this, we need to ensure that the code generation parameters used by Clang when 
compiling bitcode input are identical to those used by the linker during 
ThinLTO code generation.

Essentially, this ticket addresses that requirement by capturing the 
lto::Config parameters from the linker during a DTLTO job, serializing them, 
and passing them to Clang.

Importantly, this ticket does not permanently embed TargetOptions into any 
bitcode output. The original implementation used the bitcode format solely for 
serialization purposes, attaching the serialized lto::Config to the ThinLTO 
summary index as a module.

The latest implementation simplifies this approach further. It no longer uses 
bitcode for serialization. Instead, it serializes lto::Config into JSON and 
stores the resulting JSON text as a record in the ThinLTO summary index.

https://github.com/llvm/llvm-project/pull/219894
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to