[llvm] r210431 - X86: simplify data layout calculation

Saleem Abdulrasool compnerd at compnerd.org
Sun Jun 8 12:08:36 PDT 2014


Author: compnerd
Date: Sun Jun  8 14:08:36 2014
New Revision: 210431

URL: http://llvm.org/viewvc/llvm-project?rev=210431&view=rev
Log:
X86: simplify data layout calculation

X86Subtarget::isTargetCygMing || X86Subtarget::isTargetKnownWindowsMSVC is
equivalent to all Windows environments.  Simplify the check to isOSWindows.
NFC.

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

Modified: llvm/trunk/lib/Target/X86/X86TargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetMachine.cpp?rev=210431&r1=210430&r2=210431&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86TargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86TargetMachine.cpp Sun Jun  8 14:08:36 2014
@@ -39,8 +39,7 @@ static std::string computeDataLayout(con
     Ret += "-p:32:32";
 
   // Some ABIs align 64 bit integers and doubles to 64 bits, others to 32.
-  if (ST.is64Bit() || ST.isTargetCygMing() || ST.isTargetKnownWindowsMSVC() ||
-      ST.isTargetNaCl())
+  if (ST.is64Bit() || ST.isOSWindows() || ST.isTargetNaCl())
     Ret += "-i64:64";
   else
     Ret += "-f64:32:64";
@@ -60,7 +59,7 @@ static std::string computeDataLayout(con
     Ret += "-n8:16:32";
 
   // The stack is aligned to 32 bits on some ABIs and 128 bits on others.
-  if (!ST.is64Bit() && (ST.isTargetCygMing() || ST.isTargetKnownWindowsMSVC()))
+  if (!ST.is64Bit() && ST.isOSWindows())
     Ret += "-S32";
   else
     Ret += "-S128";





More information about the llvm-commits mailing list