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

Nico Weber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 11 13:33:21 PDT 2021


thakis added inline comments.


================
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)) {
----------------
aaron.ballman wrote:
> 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()`.)
Right, I think they all have no interesting effect on the CFG.

It's hard to predict the future, so I'd say let's wait and see until there are more StmtAttrs :)


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

https://reviews.llvm.org/D111568



More information about the cfe-commits mailing list