aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/LangRef.html149
-rw-r--r--docs/ProgrammersManual.html196
-rw-r--r--include/llvm-c/Core.h23
-rw-r--r--include/llvm-c/Transforms/IPO.h3
-rw-r--r--include/llvm/AbstractTypeUser.h205
-rw-r--r--include/llvm/Bitcode/LLVMBitCodes.h57
-rw-r--r--include/llvm/Constants.h16
-rw-r--r--include/llvm/DefaultPasses.h1
-rw-r--r--include/llvm/DerivedTypes.h192
-rw-r--r--include/llvm/Function.h4
-rw-r--r--include/llvm/GlobalAlias.h10
-rw-r--r--include/llvm/GlobalValue.h4
-rw-r--r--include/llvm/InitializePasses.h1
-rw-r--r--include/llvm/Instructions.h82
-rw-r--r--include/llvm/LinkAllPasses.h1
-rw-r--r--include/llvm/Module.h76
-rw-r--r--include/llvm/Support/PassManagerBuilder.h2
-rw-r--r--include/llvm/Transforms/IPO.h7
-rw-r--r--include/llvm/Transforms/Utils/ValueMapper.h34
-rw-r--r--include/llvm/Type.h332
-rw-r--r--include/llvm/TypeSymbolTable.h152
-rw-r--r--include/llvm/Value.h23
-rw-r--r--lib/AsmParser/LLLexer.h4
-rw-r--r--lib/AsmParser/LLParser.cpp575
-rw-r--r--lib/AsmParser/LLParser.h87
-rw-r--r--lib/Bitcode/Reader/BitcodeReader.cpp390
-rw-r--r--lib/Bitcode/Reader/BitcodeReader.h10
-rw-r--r--lib/Bitcode/Writer/BitcodeWriter.cpp113
-rw-r--r--lib/Bitcode/Writer/ValueEnumerator.cpp114
-rw-r--r--lib/Bitcode/Writer/ValueEnumerator.h3
-rw-r--r--lib/CodeGen/ShadowStackGC.cpp49
-rw-r--r--lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp1
-rw-r--r--lib/Linker/LinkModules.cpp1816
-rw-r--r--lib/Target/CBackend/CBackend.cpp217
-rw-r--r--lib/Target/CppBackend/CPPBackend.cpp88
-rw-r--r--lib/Target/TargetData.cpp51
-rw-r--r--lib/Transforms/IPO/CMakeLists.txt1
-rw-r--r--lib/Transforms/IPO/DeadTypeElimination.cpp112
-rw-r--r--lib/Transforms/IPO/IPO.cpp5
-rw-r--r--lib/Transforms/IPO/MergeFunctions.cpp1
-rw-r--r--lib/Transforms/IPO/StripSymbols.cpp24
-rw-r--r--lib/Transforms/Utils/CloneModule.cpp24
-rw-r--r--lib/Transforms/Utils/LowerInvoke.cpp22
-rw-r--r--lib/Transforms/Utils/ValueMapper.cpp107
-rw-r--r--lib/VMCore/AsmWriter.cpp441
-rw-r--r--lib/VMCore/CMakeLists.txt1
-rw-r--r--lib/VMCore/ConstantFold.cpp2
-rw-r--r--lib/VMCore/Constants.cpp56
-rw-r--r--lib/VMCore/ConstantsContext.h142
-rw-r--r--lib/VMCore/Core.cpp49
-rw-r--r--lib/VMCore/Function.cpp6
-rw-r--r--lib/VMCore/Globals.cpp1
-rw-r--r--lib/VMCore/InlineAsm.cpp2
-rw-r--r--lib/VMCore/Instructions.cpp66
-rw-r--r--lib/VMCore/LLVMContextImpl.cpp18
-rw-r--r--lib/VMCore/LLVMContextImpl.h47
-rw-r--r--lib/VMCore/Metadata.cpp1
-rw-r--r--lib/VMCore/Module.cpp178
-rw-r--r--lib/VMCore/Type.cpp1205
-rw-r--r--lib/VMCore/TypeSymbolTable.cpp168
-rw-r--r--lib/VMCore/TypesContext.h426
-rw-r--r--lib/VMCore/Value.cpp15
-rw-r--r--lib/VMCore/Verifier.cpp130
-rw-r--r--test/Assembler/2002-07-25-ReturnPtrFunction.ll6
-rw-r--r--test/Assembler/2002-12-15-GlobalResolve.ll2
-rw-r--r--test/Assembler/2003-04-15-ConstantInitAssertion.ll2
-rw-r--r--test/Assembler/2003-05-21-MalformedStructCrash.ll2
-rw-r--r--test/Assembler/2004-11-28-InvalidTypeCrash.ll2
-rw-r--r--test/Assembler/getelementptr.ll6
-rw-r--r--test/CodeGen/Generic/crash.ll2
-rw-r--r--test/CodeGen/X86/2010-02-12-CoalescerBug-Impdef.ll4
-rw-r--r--test/CodeGen/X86/2010-11-09-MOVLPS.ll2
-rw-r--r--test/CodeGen/X86/fp-stack-2results.ll24
-rw-r--r--test/CodeGen/X86/pr3317.ll2
-rw-r--r--test/Feature/globalvars.ll4
-rw-r--r--test/Feature/testtype.ll4
-rw-r--r--test/FrontendC/mmx-inline-asm.c2
-rw-r--r--test/Linker/2003-01-30-LinkerTypeRename.ll3
-rw-r--r--test/Linker/2003-08-23-GlobalVarLinking.ll2
-rw-r--r--test/Linker/2003-08-23-RecursiveOpaqueTypeResolve.ll3
-rw-r--r--test/Linker/2003-08-28-TypeResolvesGlobal.ll2
-rw-r--r--test/Linker/testlink1.ll99
-rw-r--r--test/Linker/testlink2.ll48
-rw-r--r--test/Linker/unnamed-addr1-a.ll6
-rw-r--r--test/Other/constant-fold-gep.ll78
-rw-r--r--test/Transforms/ConstProp/extractvalue.ll7
-rw-r--r--test/Transforms/ConstProp/insertvalue.ll25
-rw-r--r--test/Transforms/ConstProp/overflow-ops.ll39
-rw-r--r--test/Transforms/DeadArgElim/keepalive.ll2
-rw-r--r--test/Transforms/GlobalOpt/2005-09-27-Crash.ll2
-rw-r--r--test/Transforms/InstCombine/2007-11-07-OpaqueAlignCrash.ll4
-rw-r--r--test/Transforms/InstCombine/getelementptr.ll19
-rw-r--r--test/Transforms/InstCombine/phi.ll2
-rw-r--r--test/Transforms/InstCombine/vec_narrow.ll12
-rw-r--r--test/Transforms/InstCombine/vec_shuffle.ll29
-rw-r--r--test/Transforms/LowerSetJmp/simpletest.ll1
-rw-r--r--test/Transforms/MemCpyOpt/memcpy.ll8
-rw-r--r--test/Transforms/Reassociate/2011-01-26-UseAfterFree.ll2
-rw-r--r--test/Transforms/SCCP/ipsccp-basic.ll8
-rw-r--r--test/Transforms/ScalarRepl/2003-10-29-ArrayProblem.ll6
-rw-r--r--test/Transforms/ScalarRepl/copy-aggregate.ll11
-rw-r--r--test/Transforms/ScalarRepl/phi-select.ll4
-rw-r--r--test/Verifier/2002-04-13-RetTypes.ll2
-rw-r--r--test/Verifier/2008-11-15-RetVoid.ll2
-rw-r--r--tools/bugpoint/ExtractFunction.cpp2
-rw-r--r--tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp45
-rw-r--r--tools/llvm-extract/llvm-extract.cpp1
-rw-r--r--unittests/CMakeLists.txt1
-rw-r--r--unittests/VMCore/DerivedTypesTest.cpp88
109 files changed, 3032 insertions, 5933 deletions
diff --git a/docs/LangRef.html b/docs/LangRef.html
index 08d84df4a8..5959b3d5dc 100644
--- a/docs/LangRef.html
+++ b/docs/LangRef.html
@@ -74,16 +74,14 @@
<ol>
<li><a href="#t_array">Array Type</a></li>
<li><a href="#t_struct">Structure Type</a></li>
- <li><a href="#t_pstruct">Packed Structure Type</a></li>
+ <li><a href="#t_opaque">Opaque Type</a></li>
<li><a href="#t_vector">Vector Type</a></li>
</ol>
</li>
<li><a href="#t_function">Function Type</a></li>
<li><a href="#t_pointer">Pointer Type</a></li>
- <li><a href="#t_opaque">Opaque Type</a></li>
</ol>
</li>
- <li><a href="#t_uprefs">Type Up-references</a></li>
</ol>
</li>
<li><a href="#constants">Constants</a>
@@ -1535,7 +1533,6 @@ synchronization behavior.</p>
<a href="#t_function">function</a>,
<a href="#t_pointer">pointer</a>,
<a href="#t_struct">structure</a>,
- <a href="#t_pstruct">packed structure</a>,
<a href="#t_vector">vector</a>,
<a href="#t_opaque">opaque</a>.
</td>
@@ -1703,7 +1700,9 @@ synchronization behavior.</p>
possible to have a two dimensional array, using an array as the element type
of another array.</p>
-
+</div>
+
+
<!-- _______________________________________________________________________ -->
<h4>
<a name="t_aggregate">Aggregate Types</a>
@@ -1842,9 +1841,7 @@ synchronization behavior.</p>
<h5>Overview:</h5>
<p>The structure type is used to represent a collection of data members together
- in memory. The packing of the field types is defined to match the ABI of the
- underlying processor. The elements of a structure may be any type that has a
- size.</p>
+ in memory. The elements of a structure may be any type that has a size.</p>
<p>Structures in memory are accessed using '<tt><a href="#i_load">load</a></tt>'
and '<tt><a href="#i_store">store</a></tt>' by getting a pointer to a field
@@ -1852,66 +1849,76 @@ synchronization behavior.</p>
Structures in registers are accessed using the
'<tt><a href="#i_extractvalue">extractvalue</a></tt>' and
'<tt><a href="#i_insertvalue">insertvalue</a></tt>' instructions.</p>
+
+<p>Structures may optionally be "packed" structures, which indicate that the
+ alignment of the struct is one byte, and that there is no padding between
+ the elements. In non-packed structs, padding between field types is defined
+ by the target data string to match the underlying processor.</p>
+
+<p>Structures can either be "anonymous" or "named". An anonymous structure is
+ defined inline with other types (e.g. <tt>{i32, i32}*</tt>) and a named types
+ are always defined at the top level with a name. Anonmyous types are uniqued
+ by their contents and can never be recursive since there is no way to write
+ one. Named types can be recursive.
+</p>
+
<h5>Syntax:</h5>
<pre>
- { &lt;type list&gt; }
+ %T1 = type { &lt;type list&gt; } <i>; Named normal struct type</i>
+ %T2 = type &lt;{ &lt;type list&gt; }&gt; <i>; Named packed struct type</i>
</pre>
-
+
<h5>Examples:</h5>
<table class="layout">
<tr class="layout">
<td class="left"><tt>{ i32, i32, i32 }</tt></td>
<td class="left">A triple of three <tt>i32</tt> values</td>
- </tr><tr class="layout">
+ </tr>
+ <tr class="layout">
<td class="left"><tt>{&nbsp;float,&nbsp;i32&nbsp;(i32)&nbsp;*&nbsp;}</tt>&