diff options
author | Stephen Tozer <stephen.tozer@sony.com> | 2024-10-04 13:13:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-04 13:13:30 +0100 |
commit | d826b0c90f0b0ebebd2b7ed37bf6ff71b34360c8 (patch) | |
tree | fa24aa06476e838c067d8862f60b1f2c0746dac4 /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | 6294679faa8ae57873b7fcdc00a4deb522d31c38 (diff) | |
download | llvm-d826b0c90f0b0ebebd2b7ed37bf6ff71b34360c8.zip llvm-d826b0c90f0b0ebebd2b7ed37bf6ff71b34360c8.tar.gz llvm-d826b0c90f0b0ebebd2b7ed37bf6ff71b34360c8.tar.bz2 |
[LLVM] Add HasFakeUses to MachineFunction (#110097)
Following the addition of the llvm.fake.use intrinsic and corresponding
MIR instruction, two further changes are planned: to add an
-fextend-lifetimes flag to Clang that emits these intrinsics, and to
have -Og enable this flag by default. Currently, some logic for handling
fake uses is gated by the optdebug attribute, which is intended to be
switched on by -fextend-lifetimes (and by extension -Og later on).
However, the decision was made that a general optdebug attribute should
be incompatible with other opt_ attributes (e.g. optsize, optnone),
since they all express different intents for how to optimize the
program. We would still like to allow -fextend-lifetimes with optsize
however (i.e. -Os -fextend-lifetimes should be legal), since it may be a
useful configuration and there is no technical reason to not allow it.
This patch resolves this by tracking MachineFunctions that have fake
uses, allowing us to run passes that interact with them and skip passes
that clash with them.
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
0 files changed, 0 insertions, 0 deletions