[llvm] [LLVM] Add new attribute has_fake_use for llvm.fake.use-specific logic (PR #109997)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 25 08:40:55 PDT 2024
================
@@ -74,9 +74,9 @@ INITIALIZE_PASS_END(RemoveLoadsIntoFakeUses, DEBUG_TYPE,
"Remove Loads Into Fake Uses", false, false)
bool RemoveLoadsIntoFakeUses::runOnMachineFunction(MachineFunction &MF) {
- // Only `optdebug` functions should contain FAKE_USEs, so don't try to run
- // this for other functions.
- if (!MF.getFunction().hasFnAttribute(Attribute::OptimizeForDebugging) ||
+ // Only `has_fake_uses` functions should contain FAKE_USEs, so don't try to
+ // run this for other functions.
+ if (!MF.getFunction().hasFnAttribute(Attribute::HasFakeUses) ||
----------------
nikic wrote:
I think just adding a bool to MachineFunction would be fine? It already has a bunch of those.
https://github.com/llvm/llvm-project/pull/109997
More information about the llvm-commits
mailing list