[PATCH] D111568: [clang] Omit most AttributedStatements from the CFG

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 11 12:21:56 PDT 2021


aaron.ballman added a comment.

Thank you for the fix to this!



================
Comment at: clang/lib/Analysis/CFG.cpp:2418-2420
+  // also no children, and omit the others. None of the other current StmtAttrs
+  // have semantic meaning for the CFG.
+  if (isFallthroughStatement(A) && asc.alwaysAdd(*this, A)) {
----------------
What about `OpenCLUnrollHintAttr`, `NoMergeAttr`, and `MustTailAttr`? These all have some semantic effect as statement attributes in terms of changing codegen, but perhaps they don't need modelling in the CFG?

(I'm trying to decide whether we may want to tablegen this functionality and so we might want something more general than `isFallthroughStatement()`.)


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

https://reviews.llvm.org/D111568



More information about the cfe-commits mailing list