[llvm] r210431 - X86: simplify data layout calculation
Eric Christopher
echristo at gmail.com
Sun Jun 8 13:49:48 PDT 2014
Cool. Thanks.
-eric
On Sun, Jun 8, 2014 at 12:08 PM, Saleem Abdulrasool
<compnerd at compnerd.org> wrote:
> 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";
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list