[llvm-commits] [dragonegg] r155194 - in /dragonegg/trunk/src: Constants.cpp DefaultABI.cpp Types.cpp
Duncan Sands
baldrick at free.fr
Fri Apr 20 03:54:51 PDT 2012
Author: baldrick
Date: Fri Apr 20 05:54:51 2012
New Revision: 155194
URL: http://llvm.org/viewvc/llvm-project?rev=155194&view=rev
Log:
Stop using DECL_QUALIFIER. Already in gcc-4.5 (unlike gcc-4.2) it wasn't useful
because fields for which the qualifier was known to be equal to 0 had been
removed by GCC already, like those following a field with a qualifier of 1. In
gcc-4.7 DECL_QUALIFIER is always null by the time it reaches us.
Modified:
dragonegg/trunk/src/Constants.cpp
dragonegg/trunk/src/DefaultABI.cpp
dragonegg/trunk/src/Types.cpp
Modified: dragonegg/trunk/src/Constants.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Constants.cpp?rev=155194&r1=155193&r2=155194&view=diff
==============================================================================
--- dragonegg/trunk/src/Constants.cpp (original)
+++ dragonegg/trunk/src/Constants.cpp Fri Apr 20 05:54:51 2012
@@ -1152,9 +1152,6 @@
// default initialized.
if (!OffsetIsLLVMCompatible(field))
continue;
- // Skip fields that are known not to be present.
- if (isa<QUAL_UNION_TYPE>(type) && integer_zerop(DECL_QUALIFIER(field)))
- continue;
Fields.push_back(field);
}
Modified: dragonegg/trunk/src/DefaultABI.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/DefaultABI.cpp?rev=155194&r1=155193&r2=155194&view=diff
==============================================================================
--- dragonegg/trunk/src/DefaultABI.cpp (original)
+++ dragonegg/trunk/src/DefaultABI.cpp Fri Apr 20 05:54:51 2012
@@ -320,22 +320,12 @@
tree MaxElt = 0;
for (tree Field = TYPE_FIELDS(type); Field; Field = TREE_CHAIN(Field)) {
if (isa<FIELD_DECL>(Field)) {
- // Skip fields that are known not to be present.
- if (isa<QUAL_UNION_TYPE>(type) &&
- integer_zerop(DECL_QUALIFIER(Field)))
- continue;
-
tree SizeTree = TYPE_SIZE(TREE_TYPE(Field));
unsigned Size = ((unsigned)TREE_INT_CST_LOW(SizeTree)+7)/8;
if (Size > MaxSize) {
MaxSize = Size;
MaxElt = Field;
}
-
- // Skip remaining fields if this one is known to be present.
- if (isa<QUAL_UNION_TYPE>(type) &&
- integer_onep(DECL_QUALIFIER(Field)))
- break;
}
}
Modified: dragonegg/trunk/src/Types.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Types.cpp?rev=155194&r1=155193&r2=155194&view=diff
==============================================================================
--- dragonegg/trunk/src/Types.cpp (original)
+++ dragonegg/trunk/src/Types.cpp Fri Apr 20 05:54:51 2012
@@ -1103,9 +1103,6 @@
// represented by the LLVM type system.
if (!OffsetIsLLVMCompatible(field))
continue;
- // Skip fields that are known not to be present.
- if (isa<QUAL_UNION_TYPE>(type) && integer_zerop(DECL_QUALIFIER(field)))
- continue;
Fields.push_back(field);
}
More information about the llvm-commits
mailing list