[llvm] r203939 - x86: NFC: Make getCallPreservedMask() more similar to getCalleeSavedRegs()

Duncan P. N. Exon Smith dexonsmith at apple.com
Fri Mar 14 09:09:13 PDT 2014


Author: dexonsmith
Date: Fri Mar 14 11:09:13 2014
New Revision: 203939

URL: http://llvm.org/viewvc/llvm-project?rev=203939&view=rev
Log:
x86: NFC: Make getCallPreservedMask() more similar to getCalleeSavedRegs()

Changing order of checks in getCallPreservedMask() to match
getCalleeSavedRegs() so that the logic is easier to compare.

Modified:
    llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp

Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp?rev=203939&r1=203938&r2=203939&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp Fri Mar 14 11:09:13 2014
@@ -306,13 +306,13 @@ X86RegisterInfo::getCallPreservedMask(Ca
       return CSR_64_RT_AllRegs_AVX_RegMask;
     return CSR_64_RT_AllRegs_RegMask;
   case CallingConv::Intel_OCL_BI: {
-    if (IsWin64 && HasAVX512)
+    if (HasAVX512 && IsWin64)
       return CSR_Win64_Intel_OCL_BI_AVX512_RegMask;
-    if (Is64Bit && HasAVX512)
+    if (HasAVX512 && Is64Bit)
       return CSR_64_Intel_OCL_BI_AVX512_RegMask;
-    if (IsWin64 && HasAVX)
+    if (HasAVX && IsWin64)
       return CSR_Win64_Intel_OCL_BI_AVX_RegMask;
-    if (Is64Bit && HasAVX)
+    if (HasAVX && Is64Bit)
       return CSR_64_Intel_OCL_BI_AVX_RegMask;
     if (!HasAVX && !IsWin64 && Is64Bit)
       return CSR_64_Intel_OCL_BI_RegMask;
@@ -325,6 +325,8 @@ X86RegisterInfo::getCallPreservedMask(Ca
     break;
   }
 
+  // Unlike getCalleeSavedRegs(), we don't have MMI so we can't check
+  // callsEHReturn().
   if (Is64Bit) {
     if (IsWin64)
       return CSR_Win64_RegMask;





More information about the llvm-commits mailing list