aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/TargetInfo.cpp
diff options
context:
space:
mode:
authorPengfei Wang <pengfei.wang@intel.com>2019-05-31 01:50:07 +0000
committerPengfei Wang <pengfei.wang@intel.com>2019-05-31 01:50:07 +0000
commit48387ec187266e2c4df9bc7016bb6e7267ea5cee (patch)
treed9f50cc51a595f9ee1890ba4cbe4d872ae59b5d9 /clang/lib/CodeGen/TargetInfo.cpp
parent2ab7af29c6cad5abac3b4da48df33d21b87fc216 (diff)
downloadllvm-48387ec187266e2c4df9bc7016bb6e7267ea5cee.zip
llvm-48387ec187266e2c4df9bc7016bb6e7267ea5cee.tar.gz
llvm-48387ec187266e2c4df9bc7016bb6e7267ea5cee.tar.bz2
Revert "[X86] Fix i386 struct and union parameter alignment"
This reverts commit d61cb749f4ac2c90244906d756e80a5c4a7ffa89 (SVN: 361934). According to James suggestion, revert this change. Please ref: https://reviews.llvm.org/D60748 llvm-svn: 362186
Diffstat (limited to 'clang/lib/CodeGen/TargetInfo.cpp')
-rw-r--r--clang/lib/CodeGen/TargetInfo.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp
index 4b96aa1..24b7b9f 100644
--- a/clang/lib/CodeGen/TargetInfo.cpp
+++ b/clang/lib/CodeGen/TargetInfo.cpp
@@ -1010,7 +1010,6 @@ class X86_32ABIInfo : public SwiftABIInfo {
bool IsWin32StructABI;
bool IsSoftFloatABI;
bool IsMCUABI;
- bool IsLinuxABI;
unsigned DefaultNumRegisterParameters;
static bool isRegisterSize(unsigned Size) {
@@ -1077,7 +1076,6 @@ public:
IsWin32StructABI(Win32StructABI),
IsSoftFloatABI(SoftFloatABI),
IsMCUABI(CGT.getTarget().getTriple().isOSIAMCU()),
- IsLinuxABI(CGT.getTarget().getTriple().isOSLinux()),
DefaultNumRegisterParameters(NumRegisterParameters) {}
bool shouldPassIndirectlyForSwift(ArrayRef<llvm::Type*> scalars,
@@ -1494,15 +1492,8 @@ unsigned X86_32ABIInfo::getTypeStackAlignInBytes(QualType Ty,
if (Align <= MinABIStackAlignInBytes)
return 0; // Use default alignment.
- if (IsLinuxABI) {
- // i386 System V ABI 2.1: Structures and unions assume the alignment of their
- // most strictly aligned component.
- //
- // Exclude other System V OS (e.g Darwin, PS4 and FreeBSD) since we don't
- // want to spend any effort dealing with the ramifications of ABI breaks.
- return Align;
- } else if (!IsDarwinVectorABI) {
- // On non-Darwin and non-Linux, the stack type alignment is always 4.
+ // On non-Darwin, the stack type alignment is always 4.
+ if (!IsDarwinVectorABI) {
// Set explicit alignment, since we may need to realign the top.
return MinABIStackAlignInBytes;
}