[all-commits] [llvm/llvm-project] b5f997: [SIFoldOperands] Small code cleanups, NFC.

Pierre van Houtryve via All-commits all-commits at lists.llvm.org
Mon Nov 7 23:52:03 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b5f9972345f0305d6e71cc3cddbb1da65fd298d5
      https://github.com/llvm/llvm-project/commit/b5f9972345f0305d6e71cc3cddbb1da65fd298d5
  Author: Pierre van Houtryve <pierre.vanhoutryve at amd.com>
  Date:   2022-11-08 (Tue, 08 Nov 2022)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIFoldOperands.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list