diff options
author | Craig Topper <craig.topper@sifive.com> | 2025-02-08 15:58:12 -0800 |
---|---|---|
committer | Craig Topper <craig.topper@sifive.com> | 2025-02-08 15:58:12 -0800 |
commit | f9250401ef120a4605ad67bb43d3b25500900498 (patch) | |
tree | 84f5ec06a092a70022762b9a7bf4d729f2bf97a4 /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | fec6d168bbdf5116d2f7aaa52f0f429916af4f2d (diff) | |
download | llvm-f9250401ef120a4605ad67bb43d3b25500900498.zip llvm-f9250401ef120a4605ad67bb43d3b25500900498.tar.gz llvm-f9250401ef120a4605ad67bb43d3b25500900498.tar.bz2 |
[TableGen] Move formation of MoveSiblingMatcher earlier in ContractNodes. NFC
ContractNodes recursively walks forward through a linked list. During
this recursion, Matchers are combined into other Matchers.
Previously the formation of MoveSiblingMatcher was after the
recursive call so it occurred as we were unwinding. If a
MoveSiblingMatcher was formed, we would recursively walk forward
to the end of the linked list again which isn't efficient.
To make this more efficient, move the formation of MoveSiblingMatcher
to the forward pass. Add additional rules to unfold MoveSiblingMatcher
if it would be more efficient to use CheckChildType, CheckChildInteger,
CheckChildSame, etc.
As an added benefit, this makes the function tail recursive which
the compiler can better optimize.
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
0 files changed, 0 insertions, 0 deletions