diff options
author | Guozhi Wei <carrot@google.com> | 2023-10-27 19:47:23 +0000 |
---|---|---|
committer | Guozhi Wei <carrot@google.com> | 2023-10-27 19:47:23 +0000 |
commit | 9a091de7fe83af010e6ce38e2ed1227ef475bf49 (patch) | |
tree | 8943acfe0befe6cc7fee7a358503aecf4006ccbf /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | c18e78cfe3d3bd2982fe5964aff1df23be6b58ee (diff) | |
download | llvm-9a091de7fe83af010e6ce38e2ed1227ef475bf49.zip llvm-9a091de7fe83af010e6ce38e2ed1227ef475bf49.tar.gz llvm-9a091de7fe83af010e6ce38e2ed1227ef475bf49.tar.bz2 |
[X86, Peephole] Enable FoldImmediate for X86
Enable FoldImmediate for X86 by implementing X86InstrInfo::FoldImmediate.
Also enhanced peephole by deleting identical instructions after FoldImmediate.
Differential Revision: https://reviews.llvm.org/D151848
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineFunction.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index 1f14546..9e67dcb 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -178,6 +178,12 @@ void MachineFunction::handleRemoval(MachineInstr &MI) { TheDelegate->MF_HandleRemoval(MI); } +void MachineFunction::handleChangeDesc(MachineInstr &MI, + const MCInstrDesc &TID) { + if (TheDelegate) + TheDelegate->MF_HandleChangeDesc(MI, TID); +} + void MachineFunction::init() { // Assume the function starts in SSA form with correct liveness. Properties.set(MachineFunctionProperties::Property::IsSSA); |