[PATCH] D143515: [AsmPrinter] Add hook to override constant folding for printing.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 7 10:01:41 PST 2023


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.h:105
+  /// values do not fit in MCExpr.
+  Constant *constantFoldForPrint(const Constant *CV) override;
+
----------------
arsenm wrote:
> I don't understand this hook. Why is printing special? I'd rather extend with an MCBigConstantExpr or similar implementation rather than hack around this
MCAPIntConstantExpr?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143515/new/

https://reviews.llvm.org/D143515



More information about the llvm-commits mailing list