diff options
author | Chris Lattner <sabre@nondot.org> | 2009-07-26 06:11:33 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-07-26 06:11:33 +0000 |
commit | 8ca520944e1924f487561be5cd8369da0a53d8ae (patch) | |
tree | 7e3781cf005482bc6daab4023dcc73d3387839f2 /include | |
parent | 7f88a20f676350676015c4b3fb52de656f473772 (diff) | |
download | external_llvm-8ca520944e1924f487561be5cd8369da0a53d8ae.zip external_llvm-8ca520944e1924f487561be5cd8369da0a53d8ae.tar.gz external_llvm-8ca520944e1924f487561be5cd8369da0a53d8ae.tar.bz2 |
introduce specialized mergable const sectionkinds for elements of size 4/8/16 to
simplify targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77132 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Target/TargetAsmInfo.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/include/llvm/Target/TargetAsmInfo.h b/include/llvm/Target/TargetAsmInfo.h index f9105dd..c5bfc4d 100644 --- a/include/llvm/Target/TargetAsmInfo.h +++ b/include/llvm/Target/TargetAsmInfo.h @@ -60,6 +60,17 @@ namespace llvm { /// constant pool entries etc. MergableConst, + /// MergableConst4 - This is a section used by 4-byte constants, + /// for example, floats. + MergableConst4, + + /// MergableConst8 - This is a section used by 8-byte constants, + /// for example, doubles. + MergableConst8, + + /// MergableConst16 - This is a section used by 16-byte constants, + /// for example, vectors. + MergableConst16, /// Writable - This is the base of all segments that need to be written /// to during program runtime. @@ -118,11 +129,18 @@ namespace llvm { } bool isReadOnly() const { - return K == ReadOnly || K == MergableCString || K == MergableConst; + return K == ReadOnly || K == MergableCString || isMergableConst(); } bool isMergableCString() const { return K == MergableCString; } - bool isMergableConst() const { return K == MergableConst; } + bool isMergableConst() const { + return K == MergableConst || K == MergableConst4 || + K == MergableConst8 || K == MergableConst16; + } + + bool isMergableConst4() const { return K == MergableConst4; } + bool isMergableConst8() const { return K == MergableConst8; } + bool isMergableConst16() const { return K == MergableConst16; } bool isWritable() const { return isThreadLocal() || isGlobalWritableData(); @@ -167,6 +185,9 @@ namespace llvm { static SectionKind getReadOnly() { return get(ReadOnly); } static SectionKind getMergableCString() { return get(MergableCString); } static SectionKind getMergableConst() { return get(MergableConst); } + static SectionKind getMergableConst4() { return get(MergableConst4); } + static SectionKind getMergableConst8() { return get(MergableConst8); } + static SectionKind getMergableConst16() { return get(MergableConst16); } static SectionKind getThreadBSS() { return get(ThreadBSS); } static SectionKind getThreadData() { return get(ThreadData); } static SectionKind getBSS() { return get(BSS); } |