diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-09-03 05:47:34 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-09-03 05:47:34 +0000 |
commit | 848113833fc51bdd170cdce17abe7783ca52a34a (patch) | |
tree | a4f650168d85a5730044bb01fd661dab6e7147bd | |
parent | 2b991bbd9918d7ae67d3f6d9ae69cf15d929698b (diff) | |
download | external_llvm-848113833fc51bdd170cdce17abe7783ca52a34a.zip external_llvm-848113833fc51bdd170cdce17abe7783ca52a34a.tar.gz external_llvm-848113833fc51bdd170cdce17abe7783ca52a34a.tar.bz2 |
Make these functions static and local.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80892 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/X86/X86Subtarget.cpp | 9 | ||||
-rw-r--r-- | lib/Target/X86/X86Subtarget.h | 8 |
2 files changed, 4 insertions, 13 deletions
diff --git a/lib/Target/X86/X86Subtarget.cpp b/lib/Target/X86/X86Subtarget.cpp index 8120895..5e4a6ba 100644 --- a/lib/Target/X86/X86Subtarget.cpp +++ b/lib/Target/X86/X86Subtarget.cpp @@ -158,9 +158,8 @@ unsigned X86Subtarget::getSpecialAddressLatency() const { /// GetCpuIDAndInfo - Execute the specified cpuid and return the 4 values in the /// specified arguments. If we can't run cpuid on the host, return true. -bool -X86Subtarget::GetCpuIDAndInfo(unsigned value, unsigned *rEAX, - unsigned *rEBX, unsigned *rECX, unsigned *rEDX) { +static bool GetCpuIDAndInfo(unsigned value, unsigned *rEAX, + unsigned *rEBX, unsigned *rECX, unsigned *rEDX) { #if defined(__x86_64__) || defined(_M_AMD64) || defined (_M_X64) #if defined(__GNUC__) // gcc doesn't know cpuid would clobber ebx/rbx. Preseve it manually. @@ -240,7 +239,7 @@ void X86Subtarget::AutoDetectSubtargetFeatures() { if ((EDX >> 23) & 1) X86SSELevel = MMX; if ((EDX >> 25) & 1) X86SSELevel = SSE1; if ((EDX >> 26) & 1) X86SSELevel = SSE2; - if (ECX & 0x1) X86SSELevel = SSE3; + if (ECX & 0x1) X86SSELevel = SSE3; if ((ECX >> 9) & 1) X86SSELevel = SSSE3; if ((ECX >> 19) & 1) X86SSELevel = SSE41; if ((ECX >> 20) & 1) X86SSELevel = SSE42; @@ -265,7 +264,7 @@ void X86Subtarget::AutoDetectSubtargetFeatures() { } } -const char *X86Subtarget::GetCurrentX86CPU() { +static const char *GetCurrentX86CPU() { unsigned EAX = 0, EBX = 0, ECX = 0, EDX = 0; if (GetCpuIDAndInfo(0x1, &EAX, &EBX, &ECX, &EDX)) return "generic"; diff --git a/lib/Target/X86/X86Subtarget.h b/lib/Target/X86/X86Subtarget.h index d049614..60c2745 100644 --- a/lib/Target/X86/X86Subtarget.h +++ b/lib/Target/X86/X86Subtarget.h @@ -214,14 +214,6 @@ public: /// indicating the number of scheduling cycles of backscheduling that /// should be attempted. unsigned getSpecialAddressLatency() const; - -private: - /// GetCpuIDAndInfo - Execute the specified cpuid and return the 4 values in - /// the specified arguments. If we can't run cpuid on the host, return true. - bool GetCpuIDAndInfo(unsigned value, unsigned *rEAX, unsigned *rEBX, - unsigned *rECX, unsigned *rEDX); - - const char *GetCurrentX86CPU(); }; } // End llvm namespace |