[PATCH] D120412: [NFC][RISCV] Reuse ISD::NodeType in float extension

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 23 11:34:59 PST 2022


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:321
 
+  constexpr ISD::NodeType FPLegalNodeTypes[] = {
+      ISD::FMINNUM,          ISD::FMAXNUM,       ISD::LRINT,
----------------
I think you should add `static` here. It will prevent `FPLegalNodeTypes` from being created as a local variable on the stack which requires initialization code. Making it static will put it in the .rodata section instead.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120412



More information about the llvm-commits mailing list