[PATCH] D137539: [SIFoldOperands] Small code cleanups, NFC.

Pierre van Houtryve via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 7 03:38:12 PST 2022


Pierre-vh created this revision.
Pierre-vh added a reviewer: arsenm.
Herald added subscribers: kosarev, foad, kerbowa, hiraditya, jvesely.
Herald added a project: All.
Pierre-vh requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D137539

Files:
  llvm/lib/Target/AMDGPU/SIFoldOperands.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137539.473613.patch
Type: text/x-patch
Size: 10745 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221107/2eaebd66/attachment.bin>


More information about the llvm-commits mailing list