[all-commits] [llvm/llvm-project] d826b0: [LLVM] Add HasFakeUses to MachineFunction (#110097)
Stephen Tozer via All-commits
all-commits at lists.llvm.org
Fri Oct 4 05:13:52 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d826b0c90f0b0ebebd2b7ed37bf6ff71b34360c8
https://github.com/llvm/llvm-project/commit/d826b0c90f0b0ebebd2b7ed37bf6ff71b34360c8
Author: Stephen Tozer <stephen.tozer at sony.com>
Date: 2024-10-04 (Fri, 04 Oct 2024)
Changed paths:
M llvm/include/llvm/CodeGen/MIRYamlMapping.h
M llvm/include/llvm/CodeGen/MachineFunction.h
M llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
M llvm/lib/CodeGen/MIRParser/MIRParser.cpp
M llvm/lib/CodeGen/MIRPrinter.cpp
M llvm/lib/CodeGen/RemoveLoadsIntoFakeUses.cpp
M llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
A llvm/test/CodeGen/MIR/Generic/machine-function-hasfakeuses-conflict.mir
M llvm/test/CodeGen/MIR/Generic/machine-function-optionally-computed-properties.mir
M llvm/test/tools/llvm-reduce/mir/preserve-func-info.mir
M llvm/tools/llvm-reduce/ReducerWorkItem.cpp
Log Message:
-----------
[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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list