[SIFoldOperands] Small code cleanups, NFC.
authorPierre van Houtryve <pierre.vanhoutryve@amd.com>
Mon, 7 Nov 2022 11:32:44 +0000 (11:32 +0000)
committerPierre van Houtryve <pierre.vanhoutryve@amd.com>
Tue, 8 Nov 2022 07:51:48 +0000 (07:51 +0000)
commitb5f9972345f0305d6e71cc3cddbb1da65fd298d5
tree8946052f7e8d259da186b7979bb5cadfef82f6eb
parent13f83365cdb5bb752066ee8f4149ae24dfe46cf1
[SIFoldOperands] Small code cleanups, NFC.

I've been trying to understand the backend better and decided to read the code of this pass.
While doing so, I noticed parts that could be refactored to be a tiny bit clearer.
I tried to keep the changes minimal, a non-exhaustive list of changes is:
- Stylistic changes to better fit LLVM's coding style
- Removing dead/useless functions (e.g. FoldCandidate had getters, but it's a public struct!)
 - Saving regs/opcodes in variables if they're going to be used multiple times in the same condition

Reviewed By: arsenm, foad

Differential Revision: https://reviews.llvm.org/D137539
llvm/lib/Target/AMDGPU/SIFoldOperands.cpp