[Mlir-commits] [mlir] [mlir][LLVMIR] Handle missing functions in CGProfile module flags (PR #169517)
Tobias Gysi
llvmlistbot at llvm.org
Tue Nov 25 09:40:05 PST 2025
================
@@ -243,16 +243,17 @@ convertModuleFlagValue(StringRef key, ArrayAttr arrayAttr,
if (key == LLVMDialect::getModuleFlagKeyCGProfileName()) {
for (auto entry : arrayAttr.getAsRange<ModuleFlagCGProfileEntryAttr>()) {
- llvm::Metadata *fromMetadata =
- entry.getFrom()
- ? llvm::ValueAsMetadata::get(moduleTranslation.lookupFunction(
- entry.getFrom().getValue()))
- : nullptr;
- llvm::Metadata *toMetadata =
- entry.getTo()
- ? llvm::ValueAsMetadata::get(
- moduleTranslation.lookupFunction(entry.getTo().getValue()))
- : nullptr;
+ const auto getFuncMetadata =
----------------
gysit wrote:
```suggestion
auto getFuncMetadata =
```
nit: the const is not needed here.
https://github.com/llvm/llvm-project/pull/169517
More information about the Mlir-commits
mailing list