[PATCH] D91632: [TableGen] [ISel Matcher Emitter] Rework with two passes: one to size, one to emit

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 14 05:48:48 PDT 2021


foad added inline comments.


================
Comment at: llvm/utils/TableGen/DAGISelMatcherEmitter.cpp:1124
+  raw_null_ostream NullOS;
+  unsigned TotalSize = MatcherEmitter.SizeMatcherList(TheMatcher, NullOS);
+  OmitComments = SaveOmitComments;
----------------
RKSimon wrote:
> @Paul-C-Anagnostopoulos scan-build is warning that TotalSize is initialized but never read - is there anything useful we can do with TotalSize here?
> 
> https://llvm.org/reports/scan-build/report-DAGISelMatcherEmitter.cpp-EmitMatcherTable-39-50bd0b.html#EndPath
In a debug build I think it would make sense to assert that it matches the size calculated on line 1134.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91632



More information about the llvm-commits mailing list