[PATCH] D55527: Normalize GlobalDecls when used with CPUDispatch

2018-12-12 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 177853. erichkeane added a comment. As mentioned, the @rsmith comments that I thought were doable without feedback. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55527/new/ https://reviews.llvm.org/D55527 Files: include/clang/AST/GlobalDecl.h

[PATCH] D55527: Normalize GlobalDecls when used with CPUDispatch

2018-12-12 Thread Erich Keane via Phabricator via cfe-commits
erichkeane marked 7 inline comments as done. erichkeane added a comment. I got a couple of @rsmith's requests done. Most importantly I suspect is `MultiVersionFuncs`, though `NotForDefinition` vs `ForDefinition` is perhpas something you'll find important. Comment at: lib/Cod

[PATCH] D55527: Normalize GlobalDecls when used with CPUDispatch

2018-12-11 Thread Erich Keane via Phabricator via cfe-commits
erichkeane marked 4 inline comments as done. erichkeane added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:910 Out << ".resolver"; } rsmith wrote: > Hmm, it looks like we don't have a unique name for a `GlobalDecl` naming the > `CPUOrdinal

[PATCH] D55527: Normalize GlobalDecls when used with CPUDispatch

2018-12-11 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith marked an inline comment as done. rsmith added a comment. Thanks, this makes a lot of sense to me. Comment at: lib/CodeGen/CodeGenModule.cpp:907 +if (CGM.getTarget().supportsIFunc()) +Out << ".ifunc"; + } else if (CGM.getTarget().supportsIFunc()) ---

[PATCH] D55527: Normalize GlobalDecls when used with CPUDispatch

2018-12-11 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 177767. erichkeane marked 8 inline comments as done. erichkeane added a comment. Thanks @aaron.ballman . This should fix all of your complaints. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55527/new/ https://reviews.llvm.org/D55527 Files: i

[PATCH] D55527: Normalize GlobalDecls when used with CPUDispatch

2018-12-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/Attr.td:896 let AdditionalMembers = [{ -IdentifierInfo *getCPUName(unsigned Index) const { - return *(cpus_begin() + Index); +// gets the ordinal of the requested CPU name, or 0 if it isn't in th

[PATCH] D55527: Normalize GlobalDecls when used with CPUDispatch

2018-12-10 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. erichkeane added reviewers: rsmith, aaron.ballman. Previously, CPUDispatch functionality did some wacky things with GlobalDecls, which resulted in multiple GlobalDecls having the same mangled name. This patch corrects this in a few ways: First, it Moves the emiss