asavonic wrote:

Updated the patch to address code review comments and fix the following issues:

- Added `M->materializeMetadata()` call to `ModuleSymbolTable::addModule`. If 
metadata is not materialized, `CollectAsmSymbols` falls back to asm parsing and 
we want to avoid this.

- Changed `EmitModuleFlags` to always emit both `global-asm-symbols` and 
`global-asm-symvers` flags if global inline asm is present. We need this to 
distinguish the following cases:
  1. Inline assembly is present, and it defines symbols (and symvers). Metadata 
contains a list of symbols.
  2. Inline assembly is present, but has no symbols. Metadata is set, but empty.
  3. Inline assembly is present, it defines symbols (and symvers), but the 
module does not have `global-asm-symbols` and `global-asm-symvers` metadata 
(legacy IR).

  For cases (1) and (2) we take symbols from metadata and skip parsing. For (3) 
we have to call asm parser. The patch is missing tests for (2), I'm going to 
add them tomorrow.

- Added RUN lines with `llvm-nm` to check that symbol information is available 
without any mattr flags.

- Added RUN lines with `llvm-lto2`.


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

Reply via email to