[PATCH] D35449: [X86] Implement __builtin_cpu_is

2017-08-10 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL310657: [X86] Implement __builtin_cpu_is (authored by ctopper). Changed prior to commit: https://reviews.llvm.org/D35449?vs=106751=110629#toc Repository: rL LLVM https://reviews.llvm.org/D35449

[PATCH] D35449: [X86] Implement __builtin_cpu_is

2017-08-10 Thread Eric Christopher via Phabricator via cfe-commits
echristo accepted this revision. echristo added a comment. This revision is now accepted and ready to land. SGTM. -eric https://reviews.llvm.org/D35449 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D35449: [X86] Implement __builtin_cpu_is

2017-08-09 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Ping https://reviews.llvm.org/D35449 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35449: [X86] Implement __builtin_cpu_is

2017-07-31 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In https://reviews.llvm.org/D35449#826381, @craig.topper wrote: > @erichkeane are you ok with this code for now? I think validateCPUIs gives > you what you need at least for Sema support for target attribute. You'll > probably need to refactor the CG code to make

[PATCH] D35449: [X86] Implement __builtin_cpu_is

2017-07-31 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. @erichkeane are you ok with this code for now? I think validateCPUIs gives you what you need at least for Sema support for target attribute. You'll probably need to refactor the CG code to make your ifunc resolver. But I think you need to do that for the existing

[PATCH] D35449: [X86] Implement __builtin_cpu_is

2017-07-18 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a comment. FWIW the duplication in CGCall.cpp of the enum set is painful if you can come up with anything else it'd be awesome. I don't have any good ideas, just a fond wish :) https://reviews.llvm.org/D35449 ___ cfe-commits

[PATCH] D35449: [X86] Implement __builtin_cpu_is

2017-07-18 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a comment. From my perspective here once you and Erich get some agreement on the checking between your two bits I'm fine :) -eric https://reviews.llvm.org/D35449 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D35449: [X86] Implement __builtin_cpu_is

2017-07-18 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a subscriber: erichkeane. echristo added a comment. Adding Erich Keane here on this since he's working on something similar for the target attribute. -eric https://reviews.llvm.org/D35449 ___ cfe-commits mailing list

[PATCH] D35449: [X86] Implement __builtin_cpu_is

2017-07-17 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. I'm considering making validateCpuIs return a std::pair with the appropriate value and a tag that indicates invalid/vendor/type/subtype. This way we can remove the target based string decoding from CodeGen by reusing the validate function(with a better name). Sema

[PATCH] D35449: [X86] Implement __builtin_cpu_is

2017-07-15 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. I think gcc supports __builtin_cpu_supports and __builtin_cpu_is for non-x86. We already have an x86 only implementation of __builtin_cpu_supports so I did the same here. https://reviews.llvm.org/D35449 ___

[PATCH] D35449: [X86] Implement __builtin_cpu_is

2017-07-15 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a comment. I don't have much experience with this builtin - does gcc use it for anything but x86? google didn't turn up much. https://reviews.llvm.org/D35449 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D35449: [X86] Implement __builtin_cpu_is

2017-07-14 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. This patch adds support for __builtin_cpu_is. I've tried to match the strings supported to the latest version of gcc. I've only tested this on my Macbook so far so I'd appreciate if others would test it. An AMD system would be great.