This is an archive of the discontinued LLVM Phabricator instance.

Add MV-index to GlobalDecl, spread GlobalDecl through CodeGen (CPU-Dispatch cleanup)
ClosedPublic

Authored by erichkeane on Oct 16 2018, 2:14 PM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

erichkeane created this revision.Oct 16 2018, 2:14 PM
nhaehnle removed a subscriber: nhaehnle.Oct 17 2018, 3:20 AM
This revision was not accepted when it landed; it landed in state Needs Review.Nov 13 2018, 7:50 AM
This revision was automatically updated to reflect the committed changes.