This is an archive of the discontinued LLVM Phabricator instance.

[cpu-detection] Copy simplified version of get_cpuid_max to remove dependency to clang's implementation
ClosedPublic

Authored by asbirlea on Sep 14 2016, 7:33 PM.

Details

Summary

Attempting to fix PR30384.
Take the same approach as in compiler_rt and add a simplified version of __get_cpuid_max.
Including cpuid.h is no longer needed.

Event Timeline

asbirlea updated this revision to Diff 71471.Sep 14 2016, 7:33 PM
asbirlea retitled this revision from to [cpu-detection] Copy simplified version of get_cpuid_max to remove dependency to clang's implementation.
asbirlea updated this object.
asbirlea added reviewers: echristo, joerg.
asbirlea added a subscriber: llvm-commits.
echristo added inline comments.Sep 20 2016, 6:12 PM
lib/Support/Host.cpp
172

Once we have this here can we get rid of the bits in clang?

asbirlea added inline comments.Sep 22 2016, 11:21 AM
lib/Support/Host.cpp
172

There is no usage of this in llvm, clang, openmp or test-suite. However there are external tools using clang that do use the original method.
I don't think that "__get_cpuid_max" can be removed.

Pinging patch.

echristo accepted this revision.Oct 3 2016, 5:20 PM
echristo edited edge metadata.

OK, one inline comment.

Thanks!

-eric

lib/Support/Host.cpp
172

OK. Can you add a comment to that effect with what you found used externally?

This revision is now accepted and ready to land.Oct 3 2016, 5:20 PM
asbirlea updated this revision to Diff 73571.Oct 4 2016, 3:47 PM
asbirlea edited edge metadata.

Add comment.

This revision was automatically updated to reflect the committed changes.