[PATCH] D53341: Add MV-index to GlobalDecl, spread GlobalDecl through CodeGen (CPU-Dispatch cleanup)

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 16 14:15:09 PDT 2018


erichkeane created this revision.
erichkeane added reviewers: rsmith, aaron.ballman, echristo.
Herald added subscribers: nhaehnle, arphaman.

As brought up by Richard Smith on https://reviews.llvm.org/D51650:

  Sorry, I don't think it's acceptable from a design perspective to have
  mutable state in an Attr object, even if you can ensure that only one
  client of the Attr will be using the state at a time. CodeGen is going
  to need to track its own index into the attribute's list of clones.

The proposed fix was to put it into GlobalDecl, which this patch does.
However, doing this also requires making GlobalDecl be passed around
more often instead of FunctionDecl, so this does that as well.


https://reviews.llvm.org/D53341

Files:
  include/clang/AST/GlobalDecl.h
  include/clang/Basic/Attr.td
  lib/CodeGen/CGBlocks.cpp
  lib/CodeGen/CGBuiltin.cpp
  lib/CodeGen/CGCXX.cpp
  lib/CodeGen/CGCall.cpp
  lib/CodeGen/CGCall.h
  lib/CodeGen/CGClass.cpp
  lib/CodeGen/CGException.cpp
  lib/CodeGen/CGExpr.cpp
  lib/CodeGen/CGExprCXX.cpp
  lib/CodeGen/CGNonTrivialStruct.cpp
  lib/CodeGen/CGVTables.cpp
  lib/CodeGen/CodeGenFunction.cpp
  lib/CodeGen/CodeGenFunction.h
  lib/CodeGen/CodeGenModule.cpp
  lib/CodeGen/CodeGenModule.h
  lib/CodeGen/ItaniumCXXABI.cpp
  lib/CodeGen/MicrosoftCXXABI.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53341.169892.patch
Type: text/x-patch
Size: 34310 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181016/be503c94/attachment-0001.bin>


More information about the cfe-commits mailing list