[PATCH] D110929: [fir][NFC] Move fir.global printer to cpp file

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 1 13:13:52 PDT 2021


mehdi_amini added a comment.

Can this be converted to declarative assembly instead?



================
Comment at: flang/lib/Optimizer/Dialect/FIROps.cpp:1186
+    p << '(' << val << ')';
+  if (op.getOperation()->getAttr(fir::GlobalOp::getConstantAttrName()))
+    p << " constant";
----------------
ODS generates already an accessor `constantAttrName` (same for all other attributes) which returns an Identifier (and so allows for pointer comparison instead of strcmp). 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110929



More information about the llvm-commits mailing list