aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/IR/DataLayout.h
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2013-03-20 04:35:40 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2013-03-20 04:35:40 +0000
commit6cb1cc8a104c032246b2473cd31741450fcaf846 (patch)
tree90c0395880593bf195fb818c2af1139cb7e846df /include/llvm/IR/DataLayout.h
parente316ed5b5b1ea97934302f6f53c37c0a3334a974 (diff)
parent3dd51ae3a043f2edf9dd2bc7c906c3f602967e5a (diff)
downloadexternal_llvm-6cb1cc8a104c032246b2473cd31741450fcaf846.zip
external_llvm-6cb1cc8a104c032246b2473cd31741450fcaf846.tar.gz
external_llvm-6cb1cc8a104c032246b2473cd31741450fcaf846.tar.bz2
am 3dd51ae3: am 2d4629c5: Merge branch \'upstream\' into merge_2013_03_18
* commit '3dd51ae3a043f2edf9dd2bc7c906c3f602967e5a': (424 commits) Change NULL to 0. Register the flush function for each compile unit. Remove trailing spaces. Fix PPC unaligned 64-bit loads and stores ARM cost model: Make some vector integer to float casts cheaper ARM cost model: Correct cost for some cheap float to integer conversions Extend global merge pass to optionally consider global constant variables. Also add some checks to not merge globals used within landing pad instructions or marked as "used". Change test cases to handle unaligned references. Remove unnecessary leading comment characters in lit-only file Add SchedRW annotations to most of X86InstrSSE.td. Annotate X86 arithmetic instructions with SchedRW lists. Check whether a pointer is non-null (isKnownNonNull) in isKnownNonZero. TableGen fix for the new machine model. Include '.test' suffix in target specific lit configs that need it Make the fields in the diagram match the descriptive text above them. Update Fix 80-col. violations in PPCCTRLoops Fix large count and negative constant count handling in PPCCTRLoops Cleanup initial-value constants in PPCCTRLoops Fix integer comparison in DIEInteger::BestForm. ...
Diffstat (limited to 'include/llvm/IR/DataLayout.h')
-rw-r--r--include/llvm/IR/DataLayout.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/llvm/IR/DataLayout.h b/include/llvm/IR/DataLayout.h
index bfdb057..4d3016c 100644
--- a/include/llvm/IR/DataLayout.h
+++ b/include/llvm/IR/DataLayout.h
@@ -172,6 +172,7 @@ public:
DataLayout(const DataLayout &TD) :
ImmutablePass(ID),
LittleEndian(TD.isLittleEndian()),
+ StackNaturalAlign(TD.StackNaturalAlign),
LegalIntWidths(TD.LegalIntWidths),
Alignments(TD.Alignments),
Pointers(TD.Pointers),
@@ -180,6 +181,10 @@ public:
~DataLayout(); // Not virtual, do not subclass this class
+ /// DataLayout is an immutable pass, but holds state. This allows the pass
+ /// manager to clear its mutable state.
+ bool doFinalization(Module &M);
+
/// Parse a data layout string (with fallback to default values). Ensure that
/// the data layout pass is registered.
void init(StringRef LayoutDescription);
@@ -283,7 +288,7 @@ public:
/// getTypeSizeInBits - Return the number of bits necessary to hold the
/// specified type. For example, returns 36 for i36 and 80 for x86_fp80.
/// The type passed must have a size (Type::isSized() must return true).
- uint64_t getTypeSizeInBits(Type* Ty) const;
+ uint64_t getTypeSizeInBits(Type *Ty) const;
/// getTypeStoreSize - Return the maximum number of bytes that may be
/// overwritten by storing the specified type. For example, returns 5
@@ -303,7 +308,7 @@ public:
/// of the specified type, including alignment padding. This is the amount
/// that alloca reserves for this type. For example, returns 12 or 16 for
/// x86_fp80, depending on alignment.
- uint64_t getTypeAllocSize(Type* Ty) const {
+ uint64_t getTypeAllocSize(Type *Ty) const {
// Round up to the next alignment boundary.
return RoundUpAlignment(getTypeStoreSize(Ty), getABITypeAlignment(Ty));
}
@@ -312,7 +317,7 @@ public:
/// objects of the specified type, including alignment padding; always a
/// multiple of 8. This is the amount that alloca reserves for this type.
/// For example, returns 96 or 128 for x86_fp80, depending on alignment.
- uint64_t getTypeAllocSizeInBits(Type* Ty) const {
+ uint64_t getTypeAllocSizeInBits(Type *Ty) const {
return 8*getTypeAllocSize(Ty);
}