[PATCH] D159206: [Clang] Propagate target-features if compatible when using mlink-builtin-bitcode
Matt Arsenault via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 30 07:52:12 PDT 2023
arsenm added inline comments.
================
Comment at: clang/lib/CodeGen/CGCall.cpp:2034
+ }
+
+ FuncAttr.addAttribute("target-features", llvm::join(MergedFeatures, ","));
----------------
Really it would be less bad if the incompatible functions were not imported rather than the backend pass
================
Comment at: clang/test/CodeGen/link-builtin-bitcode.c:17
+int __attribute__((target("extended-image-insts"))) attr_not_in_target(void) { return 42; }
+int __attribute__((target("no-gfx9-insts"))) attr_uncompatible(void) { return 42; }
int x = 12;
----------------
This isn't a real target feature (do we not have a warning on this?)
s/uncompatible/incompatible
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D159206/new/
https://reviews.llvm.org/D159206
More information about the cfe-commits
mailing list