History log of /external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
cd81d94322a39503e4a3e87b6ee03d4fcb3465fb 21-Jul-2014 Stephen Hines <srhines@google.com> Update LLVM for rebase to r212749.

Includes a cherry-pick of:
r212948 - fixes a small issue with atomic calls

Change-Id: Ib97bd980b59f18142a69506400911a6009d9df18
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
dce4a407a24b04eebc6a376f8e62b41aaa7b071f 29-May-2014 Stephen Hines <srhines@google.com> Update LLVM for 3.5 rebase (r209712).

Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
36b56886974eae4f9c5ebc96befd3e7bfe5de338 24-Apr-2014 Stephen Hines <srhines@google.com> Update to LLVM 3.5a.

Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
1572ba716bad4944a83040adef76c186c4841e95 18-Nov-2013 Matt Arsenault <Matthew.Arsenault@amd.com> Fix spacing, forward declare order.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194985 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
59d3ae6cdc4316ad338cd848251f33a236ccb36c 15-Nov-2013 Matt Arsenault <Matthew.Arsenault@amd.com> Add addrspacecast instruction.

Patch by Michele Scandale!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194760 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
19794da02cc48a772ae6f4756b14b111a627170e 01-Nov-2013 Rafael Espindola <rafael.espindola@gmail.com> Remove linkonce_odr_auto_hide.

linkonce_odr_auto_hide was in incomplete attempt to implement a way
for the linker to hide symbols that are known to be available in every
TU and whose addresses are not relevant for a particular DSO.

It was redundant in that it all its uses are equivalent to
linkonce_odr+unnamed_addr. Unlike those, it has never been connected
to clang or llvm's optimizers, so it was effectively dead.

Given that nothing produces it, this patch just nukes it
(other than the llvm-c enum value).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193865 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
69bd41dfe33f24414be281ba5e2204b7348c33ae 27-Oct-2013 Shuxin Yang <shuxin.llvm@gmail.com> Revert r193251 : Use address-taken to disambiguate global variable and indirect memops.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193489 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
8e3851a6eb9fe5fc30094c3a00d2b89c7cd68cbd 23-Oct-2013 Shuxin Yang <shuxin.llvm@gmail.com> Use address-taken to disambiguate global variable and indirect memops.

Major steps include:
1). introduces a not-addr-taken bit-field in GlobalVariable
2). GlobalOpt pass sets "not-address-taken" if it proves a global varirable
dosen't have its address taken.
3). AA use this info for disambiguation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193251 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
611ee2ace99d6ce6d450ce90d91b0e4d1ace74df 15-Oct-2013 Michael Gottesman <mgottesman@apple.com> Update comment list of GLOBALVAR modifiers in BitcodeWriter to include externally_initialized.

Thanks to Shuxin Yang for catching this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192637 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
1e3037f0be430ef2339838bbdede11f45658bd82 16-Sep-2013 Peter Collingbourne <peter@pcc.me.uk> Implement function prefix data as an IR feature.

Previous discussion:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-July/063909.html

Differential Revision: http://llvm-reviews.chandlerc.com/D1191

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190773 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
db3a9e64f856e3a233a427da1f3969fd3a65a438 09-Sep-2013 Bob Wilson <bob.wilson@apple.com> Revert patches to add case-range support for PR1255.

The work on this project was left in an unfinished and inconsistent state.
Hopefully someone will eventually get a chance to implement this feature, but
in the meantime, it is better to put things back the way the were. I have
left support in the bitcode reader to handle the case-range bitcode format,
so that we do not lose bitcode compatibility with the llvm 3.3 release.

This reverts the following commits: 155464, 156374, 156377, 156613, 156704,
156757, 156804 156808, 156985, 157046, 157112, 157183, 157315, 157384, 157575,
157576, 157586, 157612, 157810, 157814, 157815, 157880, 157881, 157882, 157884,
157887, 157901, 158979, 157987, 157989, 158986, 158997, 159076, 159101, 159100,
159200, 159201, 159207, 159527, 159532, 159540, 159583, 159618, 159658, 159659,
159660, 159661, 159703, 159704, 160076, 167356, 172025, 186736

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190328 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
5768bb8d77892926dff0d078b1fb08c14ea791f3 23-Aug-2013 Andrea Di Biagio <Andrea_DiBiagio@sn.scee.net> Add function attribute 'optnone'.

This function attribute indicates that the function is not optimized
by any optimization or code generator passes with the
exception of interprocedural optimization passes.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189101 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
e7bc5bb8622123b4a1507e7d219ab570a43e5bdf 26-Jul-2013 Tobias Grosser <tobias@grosser.es> Make .bc en/decoding of AttrKind stable

The bitcode representation attribute kinds are encoded into / decoded from
should be independent of the current set of LLVM attributes and their position
in the AttrKind enum. This patch explicitly encodes attributes to fixed bitcode
values.

With this patch applied, LLVM does not silently misread attributes written by
LLVM 3.3. We also enhance the decoding slightly such that an error message is
printed if an unknown AttrKind encoding was dected.

Bonus: Dropping bitcode attributes from AttrKind is now easy, as old AttrKinds
do not need to be kept to support the Bitcode reader.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187186 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
9e639e8fd95488cb4c8ef2f7f3a41919acb29ac4 11-Jul-2013 Craig Topper <craig.topper@gmail.com> Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186098 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
48fbcfe6b959df628a6455e00ac8d94fa6ade87a 12-Feb-2013 Bill Wendling <isanbard@gmail.com> Have the bitcode writer and reader handle the new attribute references.

The bitcode writer emits a reference to the attribute group that the object at
the given index refers to. The bitcode reader is modified to read this in and
map it back to the attribute group.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174952 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
e9229a6a9614cbde1bff2bd6ffae3b7336db5702 11-Feb-2013 Bill Wendling <isanbard@gmail.com> Rename AttributeSets to AttributeGroups so that it's more meaningful.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174911 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
ab39afa9d9b99c61842c8e3d0eb706bd16efdcf3 11-Feb-2013 Kostya Serebryany <kcc@google.com> [tsan/msan] adding thread_safety and uninitialized_checks attributes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174864 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
f12b379448a9f2131feba15c01714e44bedda120 11-Feb-2013 David Blaikie <dblaikie@gmail.com> Fix unnecessary removal of const through cast machinery

I have some uncommitted changes to the cast code that catch this sort of thing
at compile-time but I still need to do some other cleanup before I can enable
it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174853 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
0f715c26bd65516f616df94124679bad03084652 11-Feb-2013 Bill Wendling <isanbard@gmail.com> Add code for emitting the attribute groups.

This is some initial code for emitting the attribute groups into the bitcode.

NOTE: This format *may* change! Do not rely upon the attribute groups' bitcode
not changing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174845 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
a2de37c897556fbd1f94a3ed84ad27accd8f8deb 05-Feb-2013 Michael Gottesman <mgottesman@apple.com> Added LLVM Asm/Bitcode Reader/Writer support for new IR keyword externally_initialized.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174340 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
f9271ea159b97e2febedcf095c3c4122cb24d077 05-Feb-2013 Bill Wendling <isanbard@gmail.com> Initial cleanups of the param-attribute code in the bitcode reader/writer.

Rename the PARAMATTR_CODE_ENTRY to PARAMATTR_CODE_ENTRY_OLD. It will be replaced
by another encoding. Keep around the current LLVM attribute encoder/decoder
code, but move it to the bitcode directories so that no one's tempted to use
them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174335 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
8e47daf2858e980210f3e1f007036b24da342c29 26-Jan-2013 Bill Wendling <isanbard@gmail.com> Remove some introspection functions.

The 'getSlot' function and its ilk allow introspection into the AttributeSet
class. However, that class should be opaque. Allow access through accessor
methods instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173522 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
85875647d6f85cbcbe506809640b9857eaaa26a4 25-Jan-2013 Bill Wendling <isanbard@gmail.com> Use the new 'getSlotIndex' method to retrieve the attribute's slot index.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173499 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
0b8c9a80f20772c3793201ab5b251d3520b9cea3 02-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Move all of the header files which are involved in modelling the LLVM IR
into their new header subdirectory: include/llvm/IR. This matches the
directory structure of lib, and begins to correct a long standing point
of file layout clutter in LLVM.

There are still more header files to move here, but I wanted to handle
them in separate commits to make tracking what files make sense at each
layer easier.

The only really questionable files here are the target intrinsic
tablegen files. But that's a battle I'd rather not fight today.

I've updated both CMake and Makefile build systems (I think, and my
tests think, but I may have missed something).

I've also re-sorted the includes throughout the project. I'll be
committing updates to Clang, DragonEgg, and Polly momentarily.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
034b94b17006f51722886b0f2283fb6fb19aca1f 19-Dec-2012 Bill Wendling <isanbard@gmail.com> Rename the 'Attributes' class to 'Attribute'. It's going to represent a single attribute in the future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170502 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
1638b839090a35adcd5a4b4cc0a649352276e703 09-Dec-2012 Michael Ilseman <milseman@apple.com> Reorganize FastMathFlags to be a wrapper around unsigned, and streamline some interfaces.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169712 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
855d0255d0bc388da7554d05f8cf184e26f5a00d 09-Dec-2012 Michael Ilseman <milseman@apple.com> Have the bitcode reader/writer just use FPMathOperator's fast math enum directly

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169710 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
99faa3b4ec6d03ac7808fe4ff3fbf3d04e375502 08-Dec-2012 Bill Wendling <isanbard@gmail.com> s/AttrListPtr/AttributeSet/g to better label what this class is going to be in the near future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169651 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
cb66b5dd7a19ac68e5ff56b484b3f5a9b877ecb3 03-Dec-2012 Michael Ilseman <milseman@apple.com> Minor tweaking to SmallVector static size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169176 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
dbd7b95ed415a7d9fd5f53d9f811906c58912c60 03-Dec-2012 Michael Ilseman <milseman@apple.com> Since this SmallVector immediately grows on the next line, don't waste stack space. SmallVector is still needed due to existing APIs growing their arguments

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169157 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
d04a8d4b33ff316ca4cf961e06c9e312eff8e64f 03-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Use the new script to sort the includes of every file under lib.

Sooooo many of these had incorrect or strange main module includes.
I have manually inspected all of these, and fixed the main module
include to be the nearest plausible thing I could find. If you own or
care about any of these source files, I encourage you to take some time
and check that these edits were sensible. I can't have broken anything
(I strictly added headers, and reordered them, never removed), but they
may not be the headers you'd really like to identify as containing the
API being implemented.

Many forward declarations and missing includes were added to a header
files to allow them to parse cleanly when included first. The main
module rule does in fact have its merits. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169131 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
efd08d413c077956478fbde90fd65aa6f179bb39 27-Nov-2012 Bill Wendling <isanbard@gmail.com> Remove the dependent libraries feature.

The dependent libraries feature was never used and has bit-rotted. Remove it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168694 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
495d10ad56d1113ba33e0589e7c4f96f3c16fa52 27-Nov-2012 Michael Ilseman <milseman@apple.com> Fast-math flags for the bitcode

Added in bitcode enum for the serializing of fast-math flags. Added in the reading/writing of fast-math flags from the OptimizationFlags record for BinaryOps.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168646 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
170a15e98dc6900df1ae40d03c5f0622d792fb45 25-Nov-2012 Joe Abbey <jabbey@arxan.com> Code Custodian:
- Widespread trailing space removal
- A dash of OCD spacing to block align enums
- joined a line that probably needed 80 cols a while back



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168566 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
407a6169b729c72c3a7ddb01b8454ab0b4f6897c 15-Nov-2012 Michael Ilseman <milseman@apple.com> Remove trailing whitespace

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168103 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
7b8d94933d6c04ae11bc4607cab61b7d712c5c10 11-Oct-2012 Jan Wen Voung <jvoung@google.com> Fix some typos 165739, spotted by Duncan.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165753 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
d9a3bad4487dee0b9ed1a0f5555dffe605826158 11-Oct-2012 Jan Wen Voung <jvoung@google.com> Change encoding of instruction operands in bitcode binaries to be relative
to the instruction position. The old encoding would give an absolute
ID which counts up within a function, and only resets at the next function.

I.e., Instead of having:

... = icmp eq i32 n-1, n-2
br i1 ..., label %bb1, label %bb2

it will now be roughly:

... = icmp eq i32 1, 2
br i1 1, label %bb1, label %bb2

This makes it so that ids remain relatively small and can be encoded
in fewer bits.

With this encoding, forward reference operands will be given
negative-valued IDs. Use signed VBRs for the most common case
of forward references, which is phi instructions.

To retain backward compatibility we bump the bitcode version
from 0 to 1 to distinguish between the different encodings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165739 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
2039a8f83464e900a71f3e846c7749b2d0d8cde2 25-Sep-2012 Bill Wendling <isanbard@gmail.com> Move remaining methods inside the Attributes class. Merge the 'Attribute' namespaces.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164631 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
f16ae5889140e42aa9092016e99aa706221e11ed 05-Sep-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add support for the nsdialect keyword in the Bitcode
Reader/Writer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163185 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
32811bef956e0fae4329e6515420d85f7e510660 17-Aug-2012 Bill Wendling <isanbard@gmail.com> Change the `linker_private_weak_def_auto' linkage to `linkonce_odr_auto_hide' to
make it more consistent with its intended semantics.

The `linker_private_weak_def_auto' linkage type was meant to automatically hide
globals which never had their addresses taken. It has nothing to do with the
`linker_private' linkage type, which outputs the symbols with a `l' (ell) prefix
among other things.

The intended semantic is more like the `linkonce_odr' linkage type.

Change the name of the linkage type to `linkonce_odr_auto_hide'. And therefore
changing the semantics so that it produces the correct output for the linker.

Note: The old linkage name `linker_private_weak_def_auto' will still parse but
is not a synonym for `linkonce_odr_auto_hide'. This should be removed in 4.0.
<rdar://problem/11754934>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162114 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
ce718ff9f42c7da092eaa01dd0242e8d5ba84713 23-Jun-2012 Hans Wennborg <hans@hanshq.net> Extend the IL for selecting TLS models (PR9788)

This allows the user/front-end to specify a model that is better
than what LLVM would choose by default. For example, a variable
might be declared as

@x = thread_local(initialexec) global i32 42

if it will not be used in a shared library that is dlopen'ed.

If the specified model isn't supported by the target, or if LLVM can
make a better choice, a different model may be used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159077 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
47cbc4e0ee6098b7be3c60108000a979f1809949 23-Jun-2012 Stepan Dyatkovskiy <stpworld@narod.ru> Optimized usage of new SwitchInst case values (IntegersSubset type) in Local.cpp, Execution.cpp and BitcodeWriter.cpp.
I got about 1% of compile-time improvement on my machines (Ubuntu 11.10 i386 and Ubuntu 12.04 x64).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159076 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
43eb31bfae470b33bab9a6764b98b5e8a0beeda5 02-Jun-2012 Stepan Dyatkovskiy <stpworld@narod.ru> PR1255: case ranges.
IntRange converted from struct to class. So main change everywhere is replacement of ".Low/High" with ".getLow/getHigh()"



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157884 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
0aa32d5d0ff6cd65b6cff957858a79e2d2a614bd 29-May-2012 Stepan Dyatkovskiy <stpworld@narod.ru> ConstantRangesSet renamed to IntegersSubset. CRSBuilder renamed to IntegersSubsetMapping.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157612 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
e99f8be067b6f2c19058d0f6307e96287a94f55d 28-May-2012 Meador Inge <meadori@gmail.com> PR12696: Attribute bits above 1<<30 are not encoded in bitcode

Attribute bits above 1<<30 are now encoded correctly. Additionally,
the encoding/decoding functionality has been hoisted to helper functions
in Attributes.h in an effort to help the encoding/decoding to stay in
sync with the Attribute bitcode definitions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157581 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
484fc93eff0295b1aa52b9a64d22346580e4b0e2 28-May-2012 Stepan Dyatkovskiy <stpworld@narod.ru> PR1255: Case Ranges
Implemented IntItem - the wrapper around APInt. Why not to use APInt item directly right now?
1. It will very difficult to implement case ranges as series of small patches. We got several large and heavy patches. Each patch will about 90-120 kb. If you replace ConstantInt with APInt in SwitchInst you will need to changes at the same time all Readers,Writers and absolutely all passes that uses SwitchInst.
2. We can implement APInt pool inside and save memory space. E.g. we use several switches that works with 256 bit items (switch on signatures, or strings). We can avoid value duplicates in this case.
3. IntItem can be easyly easily replaced with APInt.
4. Currenly we can interpret IntItem both as ConstantInt and as APInt. It allows to provide SwitchInst methods that works with ConstantInt for non-updated passes.

Why I need it right now? Currently I need to update SimplifyCFG pass (EqualityComparisons). I need to work with APInts directly a lot, so peaces of code
ConstantInt *V = ...;
if (V->getValue().ugt(AnotherV->getValue()) {
...
}
will look awful. Much more better this way:
IntItem V = ConstantIntVal->getValue();
if (AnotherV < V) {
}

Of course any reviews are welcome.

P.S.: I'm also going to rename ConstantRangesSet to IntegersSubset, and CRSBuilder to IntegersSubsetMapping (allows to map individual subsets of integers to the BasicBlocks).
Since in future these classes will founded on APInt, it will possible to use them in more generic ways.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157576 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
734dde8e051d34ac34cc58eb31cf2e6fa3ac3f37 14-May-2012 Stepan Dyatkovskiy <stpworld@narod.ru> SwitchInst cosmetics: renamed "Hash" method to "hash"



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156757 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
1cce5bf8ef9ee3dc157ae5d8778f84a7a0d1d8b9 12-May-2012 Stepan Dyatkovskiy <stpworld@narod.ru> Recommited r156374 with critical fixes in BitcodeReader/Writer:
Ordinary patch for PR1255.
Added new case-ranges orientated methods for adding/removing cases in SwitchInst. After this patch cases will internally representated as ConstantArray-s instead of ConstantInt, externally cases wrapped within the ConstantRangesSet object.
Old methods of SwitchInst are also works well, but marked as deprecated. So on this stage we have no side effects except that I added support for case ranges in BitcodeReader/Writer, of course test for Bitcode is also added. Old "switch" format is also supported.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156704 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
1f9838347fdcc75cead228ec1758063074b89c6a 08-May-2012 Stepan Dyatkovskiy <stpworld@narod.ru> Rejected r156374: Ordinary PR1255 patch. Due to clang-x86_64-debian-fnt buildbot failure.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156377 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
85a4406959fe7794062d62d2f17226235630eee1 08-May-2012 Stepan Dyatkovskiy <stpworld@narod.ru> Ordinary patch for PR1255.
Added new case-ranges orientated methods for adding/removing cases in SwitchInst. After this patch cases will internally representated as ConstantArray-s instead of ConstantInt, externally cases wrapped within the ConstantRangesSet object.
Old methods of SwitchInst are also works well, but marked as deprecated. So on this stage we have no side effects except that I added support for case ranges in BitcodeReader/Writer, of course test for Bitcode is also added. Old "switch" format is also supported.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156374 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
3d3abe0852d5f499bed7ab014519dd582a0a795d 11-Mar-2012 Stepan Dyatkovskiy <stpworld@narod.ru> llvm::SwitchInst
Renamed methods caseBegin, caseEnd and caseDefault with case_begin, case_end, and case_default.
Added some notes relative to case iterators.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152532 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
c10fa6c801e48771b5eade50afc2fe6abaf08227 08-Mar-2012 Stepan Dyatkovskiy <stpworld@narod.ru> Taken into account Duncan's comments for r149481 dated by 2nd Feb 2012:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120130/136146.html

Implemented CaseIterator and it solves almost all described issues: we don't need to mix operand/case/successor indexing anymore. Base iterator class is implemented as a template since it may be initialized either from "const SwitchInst*" or from "SwitchInst*".

ConstCaseIt is just a read-only iterator.
CaseIt is read-write iterator; it allows to change case successor and case value.

Usage of iterator allows totally remove resolveXXXX methods. All indexing convertions done automatically inside the iterator's getters.

Main way of iterator usage looks like this:
SwitchInst *SI = ... // intialize it somehow

for (SwitchInst::CaseIt i = SI->caseBegin(), e = SI->caseEnd(); i != e; ++i) {
BasicBlock *BB = i.getCaseSuccessor();
ConstantInt *V = i.getCaseValue();
// Do something.
}

If you want to convert case number to TerminatorInst successor index, just use getSuccessorIndex iterator's method.
If you want initialize iterator from TerminatorInst successor index, use CaseIt::fromSuccessorIndex(...) method.

There are also related changes in llvm-clients: klee and clang.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152297 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
acbceeae4d7bdfbbc3437c60a5a3e26449888a15 29-Feb-2012 Daniel Dunbar <daniel@zuster.org> BitstreamWriter: Change primary output buffer to be a SmallVector instead of an
std::vector.
- Good for 1-2% speedup on writing PCH for Cocoa.h.
- Clang side API match to follow shortly, there wasn't an easy way to make this
non-breaking.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151750 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
02a248afe310c86aea682302fc587f22bb999fa7 29-Feb-2012 Daniel Dunbar <daniel@zuster.org> BitcodeWriter: Expose less implementation details -- make BackpatchWord private
and remove getBuffer().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151748 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
fdc8f785cd52a4438d5bf914594253b7787ab80e 29-Feb-2012 Daniel Dunbar <daniel@zuster.org> Bitcode: Don't expose WriteBitcodeToStream to clients.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151747 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
2ea93875b2f2900b9d244dfd7649c9ed02a34cd7 06-Feb-2012 Derek Schuff <dschuff@google.com> Enable streaming of bitcode

This CL delays reading of function bodies from initial parse until
materialization, allowing overlap of compilation with bitcode download.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149918 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
3e9719e1f3a7ba41abacb6e4155cfd71a7d9788f 06-Feb-2012 Bill Wendling <isanbard@gmail.com> [unwind removal] Don't write out the dead 'unwind' instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149905 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
18c7f80b3e83ab584bd8572695a3cde8bafd9d3c 05-Feb-2012 Chris Lattner <sabre@nondot.org> reapply the patches reverted in r149470 that reenable ConstantDataArray,
but with a critical fix to the SelectionDAG code that optimizes copies
from strings into immediate stores: the previous code was stopping reading
string data at the first nul. Address this by adding a new argument to
llvm::getConstantStringInfo, preserving the behavior before the patch.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
24473120a253a05f3601cd3373403b47e6d03d41 01-Feb-2012 Stepan Dyatkovskiy <stpworld@narod.ru> SwitchInst refactoring.
The purpose of refactoring is to hide operand roles from SwitchInst user (programmer). If you want to play with operands directly, probably you will need lower level methods than SwitchInst ones (TerminatorInst or may be User). After this patch we can reorganize SwitchInst operands and successors as we want.

What was done:

1. Changed semantics of index inside the getCaseValue method:
getCaseValue(0) means "get first case", not a condition. Use getCondition() if you want to resolve the condition. I propose don't mix SwitchInst case indexing with low level indexing (TI successors indexing, User's operands indexing), since it may be dangerous.
2. By the same reason findCaseValue(ConstantInt*) returns actual number of case value. 0 means first case, not default. If there is no case with given value, ErrorIndex will returned.
3. Added getCaseSuccessor method. I propose to avoid usage of TerminatorInst::getSuccessor if you want to resolve case successor BB. Use getCaseSuccessor instead, since internal SwitchInst organization of operands/successors is hidden and may be changed in any moment.
4. Added resolveSuccessorIndex and resolveCaseIndex. The main purpose of these methods is to see how case successors are really mapped in TerminatorInst.
4.1 "resolveSuccessorIndex" was created if you need to level down from SwitchInst to TerminatorInst. It returns TerminatorInst's successor index for given case successor.
4.2 "resolveCaseIndex" converts low level successors index to case index that curresponds to the given successor.

Note: There are also related compatability fix patches for dragonegg, klee, llvm-gcc-4.0, llvm-gcc-4.2, safecode, clang.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149481 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
91766fe066efe6e0969ba805a2e3726a70ed34a3 01-Feb-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert Chris' commits up to r149348 that started causing VMCoreTests unit test to fail.

These are:

r149348
r149351
r149352
r149354
r149356
r149357
r149361
r149362
r149364
r149365

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149470 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
1b2f643753a2974540934ac0f1e3ffd182b0571c 31-Jan-2012 Chris Lattner <sabre@nondot.org> with recent changes, ConstantArray is never a "string". Remove the associated
methods and constant fold the clients to false.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149362 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
41b9920a1332eeeeda0ed03218d9efad641f5adf 30-Jan-2012 Chris Lattner <sabre@nondot.org> fix a major oversight that is breaking some llvm-test tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149230 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
d408f06048797a43b17a7740acb766cc5f0adfbb 30-Jan-2012 Chris Lattner <sabre@nondot.org> Add bitcode reader and writer support for ConstantDataAggregate, which
should be feature complete now. Lets see if it works.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149215 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
164b86b4399559e45fab7846f1e3e09119cab4e2 20-Jan-2012 Kostya Serebryany <kcc@google.com> Extend Attributes to 64 bits

Problem: LLVM needs more function attributes than currently available (32 bits).
One such proposed attribute is "address_safety", which shows that a function is being checked for address safety (by AddressSanitizer, SAFECode, etc).

Solution:
- extend the Attributes from 32 bits to 64-bits
- wrap the object into a class so that unsigned is never erroneously used instead
- change "unsigned" to "Attributes" throughout the code, including one place in clang.
- the class has no "operator uint64 ()", but it has "uint64_t Raw() " to support packing/unpacking.
- the class has "safe operator bool()" to support the common idiom: if (Attributes attr = getAttrs()) useAttrs(attr);
- The CTOR from uint64_t is marked explicit, so I had to add a few explicit CTOR calls
- Add the new attribute "address_safety". Doing it in the same commit to check that attributes beyond first 32 bits actually work.
- Some of the functions from the Attribute namespace are worth moving inside the class, but I'd prefer to have it as a separate commit.

Tested:
"make check" on Linux (32-bit and 64-bit) and Mac (10.6)
built/run spec CPU 2006 on Linux with clang -O2.


This change will break clang build in lib/CodeGen/CGCall.cpp.
The following patch will fix it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148553 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
732f05c41f177a0bc4d47e93a5d02120f146cb4c 10-Jan-2012 Chandler Carruth <chandlerc@gmail.com> Add 'llvm_unreachable' to passify GCC's understanding of the constraints
of several newly un-defaulted switches. This also helps optimizers
(including LLVM's) recognize that every case is covered, and we should
assume as much.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147861 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
2bd335470f8939782f3df7f6180282d3825d4f09 10-Jan-2012 David Blaikie <dblaikie@gmail.com> Remove unnecessary default cases in switches that cover all enum values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147855 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
ce16339930a2b03e53b4e6399ef59c092a7f2cfa 17-Dec-2011 Dan Gohman <gohman@apple.com> The powers that be have decided that LLVM IR should now support 16-bit
"half precision" floating-point with a first-class type.

This patch adds basic IR support (but not codegen support).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146786 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
667f826622e36b8de34a9ba5e7c4718780b39247 08-Dec-2011 Chad Rosier <mcrosier@apple.com> Fix 80-column.
Simplify code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146112 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
14d622dce651481c15e652e1595a9df01717ddd7 08-Dec-2011 Chad Rosier <mcrosier@apple.com> Fix comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146109 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
0c89f7fda27140445fad2fb70f3d6e616792f262 08-Dec-2011 Chad Rosier <mcrosier@apple.com> Fix comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146107 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
32c598100518a531de31b6cc89ee995a05e3459d 07-Dec-2011 Chad Rosier <mcrosier@apple.com> Flesh out a bit more of the bitcode use-list ordering preservation code.
Nothing too interesting at this point, but comments are welcome.
Part of rdar://9860654 and PR5680.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146090 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
cbbb09687f563fad96fd815a3a89920f436373e4 07-Dec-2011 Chad Rosier <mcrosier@apple.com> Begin adding experimental support for preserving use-list ordering of bitcode
files. First, add a new block USELIST_BLOCK to the bitcode format. This is
where USELIST_CODE_ENTRYs will be stored. The format of the USELIST_CODE_ENTRYs
have not yet been defined. Add support in the BitcodeReader for parsing the
USELIST_BLOCK.
Part of rdar://9860654 and PR5680.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146078 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
cde546497067bf2ed40b9473582212df4ccd8141 03-Nov-2011 Chad Rosier <mcrosier@apple.com> Remove some cruft from the BitcodeWriter, while still maintaining backward
compatibility in the BitcodeReader.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143598 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
e6e8826870bee3facb04f950f0bd725f8a88623d 12-Aug-2011 Bill Wendling <isanbard@gmail.com> Initial commit of the 'landingpad' instruction.

This implements the 'landingpad' instruction. It's used to indicate that a basic
block is a landing pad. There are several restrictions on its use (see
LangRef.html for more detail). These restrictions allow the exception handling
code to gather the information it needs in a much more sane way.

This patch has the definition, implementation, C interface, parsing, and bitcode
support in it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
3ebb64946bc8e7c8feba1b2044e7a47f80b3a83f 12-Aug-2011 Chris Lattner <sabre@nondot.org> switch to use the new api for structtypes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137480 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
0871221c250fdec054219b0c1fd8053471e93022 12-Aug-2011 Chad Rosier <mcrosier@apple.com> Whitespace and formatting. No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
21006d40ac9ec7715bca2095451075a83773dc52 10-Aug-2011 Eli Friedman <eli.friedman@gmail.com> Representation of 'atomic load' and 'atomic store' in IR.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137170 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
dccc03b2423fe65efb5963ae816b99c24fc53374 31-Jul-2011 Bill Wendling <isanbard@gmail.com> Add the 'resume' instruction for the new EH rewrite.

This adds the 'resume' instruction class, IR parsing, and bitcode reading and
writing. The 'resume' instruction resumes propagation of an existing (in-flight)
exception whose unwinding was interrupted with a 'landingpad' instruction (to be
added later).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136589 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
10c6d12a9fd4dab411091f64db4db69670b88850 30-Jul-2011 Bill Wendling <isanbard@gmail.com> Revert r136253, r136263, r136269, r136313, r136325, r136326, r136329, r136338,
r136339, r136341, r136369, r136387, r136392, r136396, r136429, r136430, r136444,
r136445, r136446, r136253 pending review.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136556 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
ff03048c1350fcc4fda1ef6d6c57252f3a950854 28-Jul-2011 Eli Friedman <eli.friedman@gmail.com> LangRef and basic memory-representation/reading/writing for 'cmpxchg' and
'atomicrmw' instructions, which allow representing all the current atomic
rmw intrinsics.

The allowed operands for these instructions are heavily restricted at the
moment; we can probably loosen it a bit, but supporting general
first-class types (where it makes sense) might get a bit complicated,
given how SelectionDAG works.

As an initial cut, these operations do not support specifying an alignment,
but it would be possible to add if we think it's useful. Specifying an
alignment lower than the natural alignment would be essentially
impossible to support on anything other than x86, but specifying a greater
alignment would be possible. I can't think of any useful optimizations which
would use that information, but maybe someone else has ideas.

Optimizer/codegen support coming soon.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136404 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
772fe17a6d07304ae2e6b3052bbb24ebb751f0f3 27-Jul-2011 Bill Wendling <isanbard@gmail.com> Merge the contents from exception-handling-rewrite to the mainline.

This adds the new instructions 'landingpad' and 'resume'.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136253 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
47f3513dd574535aeb40c9eb11134f0899e92269 26-Jul-2011 Eli Friedman <eli.friedman@gmail.com> Initial implementation of 'fence' instruction, the new C++0x-style replacement for llvm.memory.barrier.

This is just a LangRef entry and reading/writing/memory representation; optimizer+codegen support coming soon.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136009 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
db125cfaf57cc83e7dd7453de2d509bc8efd0e5e 18-Jul-2011 Chris Lattner <sabre@nondot.org> land David Blaikie's patch to de-constify Type, with a few tweaks.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135375 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
1afcace3a3a138b1b18e5c6270caa8dae2261ae2 09-Jul-2011 Chris Lattner <sabre@nondot.org> Land the long talked about "type system rewrite" patch. This
patch brings numerous advantages to LLVM. One way to look at it
is through diffstat:
109 files changed, 3005 insertions(+), 5906 deletions(-)

Removing almost 3K lines of code is a good thing. Other advantages
include:

1. Value::getType() is a simple load that can be CSE'd, not a mutating
union-find operation.
2. Types a uniqued and never move once created, defining away PATypeHolder.
3. Structs can be "named" now, and their name is part of the identity that
uniques them. This means that the compiler doesn't merge them structurally
which makes the IR much less confusing.
4. Now that there is no way to get a cycle in a type graph without a named
struct type, "upreferences" go away.
5. Type refinement is completely gone, which should make LTO much MUCH faster
in some common cases with C++ code.
6. Types are now generally immutable, so we can use "Type *" instead
"const Type *" everywhere.

Downsides of this patch are that it removes some functions from the C API,
so people using those will have to upgrade to (not yet added) new API.
"LLVM 3.0" is the right time to do this.

There are still some cleanups pending after this, this patch is large enough
as-is.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134829 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
c137120bb047a7017cbab21f5f9c9e6f65e2b84f 20-Jun-2011 Jay Foad <jay.foad@gmail.com> Make better use of the PHINode API.

Change various bits of code to make better use of the existing PHINode
API, to insulate them from forthcoming changes in how PHINodes store
their operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
4f6bab98c54a93276b8370d3f61f63bf765f7e1f 17-Jun-2011 Chris Lattner <sabre@nondot.org> Drop the "2" suffix on some enums.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133274 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
799a58a55e91c2d0154daf85f8150c6bf17012ac 17-Jun-2011 Chris Lattner <sabre@nondot.org> missed a file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133270 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
e889c694d870048502640ab60d6dbda830cdc463 14-Jun-2011 Evan Cheng <evan.cheng@apple.com> Update BitcodeWriter to match recent Triple changes. rdar://9603399

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132959 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
6a0c04dff288b7eaa0459cc7419159765bb5a0b9 03-Jun-2011 Chad Rosier <mcrosier@apple.com> Revert name change from r132533. Lower case naming was intended per style guidelines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132555 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
3d26f2333b320e04d405a4418f640f8b7e358a99 03-Jun-2011 Chad Rosier <mcrosier@apple.com> Whitespace and other cleanup. Functionallity unchanged.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132533 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
308fba5fe2714f28984d973d79f948dc24ba23b4 06-May-2011 Nick Lewycky <nicholas@mxc.ca> It's valid to take the blockaddress of a different function, so remove this
assert in the bitcode writer. No change needed because the ValueEnumerator holds
a whole-module numbering anyhow. Fixes PR9857!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131016 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
5d7a5a4f53304869ae5b76771ab67213447b65a5 11-Apr-2011 Bill Wendling <isanbard@gmail.com> Revert r129235 pending a vetting of the EH rewrite.
--- Reverse-merging r129235 into '.':
D test/Feature/bb_attrs.ll
U include/llvm/BasicBlock.h
U include/llvm/Bitcode/LLVMBitCodes.h
U lib/VMCore/AsmWriter.cpp
U lib/VMCore/BasicBlock.cpp
U lib/AsmParser/LLParser.cpp
U lib/AsmParser/LLLexer.cpp
U lib/AsmParser/LLToken.h
U lib/Bitcode/Reader/BitcodeReader.cpp
U lib/Bitcode/Writer/BitcodeWriter.cpp



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129259 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
d7bb295d223e028aa9ba7fbeafc8928db4a74972 10-Apr-2011 Bill Wendling <isanbard@gmail.com> Beginning of the Great Exception Handling Rewrite.

* Add a "landing pad" attribute to the BasicBlock.
* Modify the bitcode reader and writer to handle said attribute.

Later: The verifier will ensure that the landing pad attribute is used in the
appropriate manner. I.e., not applied to the entry block, and applied only to
basic blocks that are branched to via a `dispatch' instruction.

(This is a work-in-progress.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129235 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
f5a90561b033428bd2c5b365ca09ed9e688dce6e 06-Apr-2011 Rafael Espindola <rafael.espindola@gmail.com> Do a topological sort of the types before writing them out.

This takes the linking of libxul on linux from 6m54.931s to 5m39.840s.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129009 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
35bda8914c0d1c02a6f90f42e7810c83150737e1 06-Feb-2011 Chris Lattner <sabre@nondot.org> enhance vmcore to know that udiv's can be exact, and add a trivial
instcombine xform to exercise this.

Nothing forms exact udivs yet though. This is progress on PR8862



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124992 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
bea4626f93c830e31f82cc947df28fdae583cd09 08-Jan-2011 Rafael Espindola <rafael.espindola@gmail.com> First step in fixing PR8927:

Add a unnamed_addr bit to global variables and functions. This will be used
to indicate that the address is not significant and therefore the constant
or function can be merged with others.

If an optimization pass can show that an address is not used, it can set this.

Examples of things that can have this set by the FE are globals created to
hold string literals and C++ constructors.

Adding unnamed_addr to a non-const global should have no effect unless
an optimization can transform that global into a constant.

Aliases are not allowed to have unnamed_addr since I couldn't figure
out any use for it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123063 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
476b242fe7a61e5f9ac6214b0bc5c680d24f152e 19-Dec-2010 Nick Lewycky <nicholas@mxc.ca> Add missing standard headers. Patch by Joerg Sonnenberger!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122193 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
695b2811866125cef47915915cb014afa99cd732 30-Nov-2010 Chris Lattner <sabre@nondot.org> Generalize the darwin wrapper hack to work with generic macho triples as well as darwin ones.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
1f6efa3996dd1929fbc129203ce5009b620e6969 29-Nov-2010 Michael J. Spencer <bigcheesegs@gmail.com> Merge System into Support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
bb811a244567aa8a1522203f15588f4d001b7353 10-Sep-2010 Dale Johannesen <dalej@apple.com> Add X86 MMX type to bitcode and Type.
(The Ada bindings probably need it too, but all the
obvious places to change say "do not edit this file".)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113618 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
70c2fc0823bcc3970fdebf18ba69449d7822af86 10-Sep-2010 Dan Gohman <gohman@apple.com> Discard metadata produced by LLVM 2.7. The value enumeration it used
is different from what the code now uses in a two ways: NamedMDNodes
were considered Values and included in the numbering, and the
function-local metadata counter wasn't reset between functions.

The later problem breaks lazy deserialization, so instead of trying
to emulate the old numbering, just drop the old metadata. The only
in-tree use case is debug info with LTO, where the QOI loss is
considered acceptable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113557 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
61c70e98ac3c7504d31dd9bc81c4e9cb998e9984 28-Aug-2010 Chris Lattner <sabre@nondot.org> remove unions from LLVM IR. They are severely buggy and not
being actively maintained, improved, or extended.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112356 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
55ae515f9db484125a23429d4906c5edaf9f10d2 21-Aug-2010 Bill Wendling <isanbard@gmail.com> Create the new linker type "linker_private_weak_def_auto".

It's similar to "linker_private_weak", but it's known that the address of the
object is not taken. For instance, functions that had an inline definition, but
the compiler decided not to inline it. Note, unlike linker_private and
linker_private_weak, linker_private_weak_def_auto may have only default
visibility. The symbols are removed by the linker from the final linked image
(executable or dynamic library).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111684 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
2359e5193aa9fff9e005e99074ed40ea5d08f838 03-Aug-2010 Chris Lattner <sabre@nondot.org> avoid undefined behavior negating minint.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110117 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
17aa92c92a925b4a674440c7ef088c223990e854 22-Jul-2010 Dan Gohman <gohman@apple.com> Make NamedMDNode not be a subclass of Value, and simplify the interface
for creating and populating NamedMDNodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109061 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
29d27167663f289837d71c56b331579583002e97 21-Jul-2010 Dan Gohman <gohman@apple.com> Add some debug output to help diagnose PR7689.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109036 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
872814ae048df032bddf9299c850f5bda08299a9 21-Jul-2010 Dan Gohman <gohman@apple.com> Disallow null as a named metadata operand.
Make MDNode::destroy private.
Fix the one thing that used MDNode::destroy, outside of MDNode itself.

One should never delete or destroy an MDNode explicitly. MDNodes
implicitly go away when there are no references to them (implementation
details aside).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109028 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
19538d1e9fb4f8198b94f8450c6fc43528d8b868 20-Jul-2010 Dan Gohman <gohman@apple.com> Add support for remapping metadata kind IDs when reading in a
bitcode file, so that two bitcode files where the same metadata kind
name happens to have been assigned a different ID can still be
linked together.

Eliminate the restriction that metadata kind IDs can't be 0.

Change MD_dbg from 1 to 0, because we can now, and because it's
less mysterious that way.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108939 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
5e721d768254a920b78b9129d79a84c0163cb3f4 01-Jul-2010 Bill Wendling <isanbard@gmail.com> Implement the "linker_private_weak" linkage type. This will be used for
Objective-C metadata types which should be marked as "weak", but which the
linker will remove upon final linkage. However, this linkage isn't specific to
Objective-C.

For example, the "objc_msgSend_fixup_alloc" symbol is defined like this:

.globl l_objc_msgSend_fixup_alloc
.weak_definition l_objc_msgSend_fixup_alloc
.section __DATA, __objc_msgrefs, coalesced
.align 3
l_objc_msgSend_fixup_alloc:
.quad _objc_msgSend_fixup
.quad L_OBJC_METH_VAR_NAME_1

This is different from the "linker_private" linkage type, because it can't have
the metadata defined with ".weak_definition".

Currently only supported on Darwin platforms.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107433 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
07d317711781d8c9268f7d6afcf1ba7eadf1d127 30-Jun-2010 Bill Wendling <isanbard@gmail.com> Revert r107205 and r107207.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107215 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
207855cff9b4811004b9720f28a5bd0adf3784b7 29-Jun-2010 Bill Wendling <isanbard@gmail.com> Introducing the "linker_weak" linkage type. This will be used for Objective-C
metadata types which should be marked as "weak", but which the linker will
remove upon final linkage. For example, the "objc_msgSend_fixup_alloc" symbol is
defined like this:

.globl l_objc_msgSend_fixup_alloc
.weak_definition l_objc_msgSend_fixup_alloc
.section __DATA, __objc_msgrefs, coalesced
.align 3
l_objc_msgSend_fixup_alloc:
.quad _objc_msgSend_fixup
.quad L_OBJC_METH_VAR_NAME_1

This is different from the "linker_private" linkage type, because it can't have
the metadata defined with ".weak_definition".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107205 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
fc91e7d9cba5343ab70382b95255826c78013fdf 26-Jun-2010 Gabor Greif <ggreif@gmail.com> resort to ArgOperand API

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106942 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
6209869f83979319e2e5791382f09b83e54191e0 03-Jun-2010 Devang Patel <dpatel@apple.com> Speedup bitcode writer. Do not walk all values for all functions to emit function local metadata. In one testcase, probably worst case scenario, the 70x speed up is seen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105360 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
a37dd3e6a5b0d2081bcd83a85183c33d3aba7cda 28-May-2010 Dan Gohman <gohman@apple.com> Bitcode support for allocas with arbitrary array size types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104915 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
c2f500aaed8b509f4b7bb73e299e524d9d06cb18 27-May-2010 Dan Gohman <gohman@apple.com> Don't flush the raw_ostream in llvm::WriteBitcodeToFile; it's at
the wrong level. Clients which need to leave the stream open but
which still require the bitcode bits to be on disk should call
flush themselves.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104885 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
d928fb670fb3b0818fc23738e9c2418980bb141e 27-May-2010 Dan Gohman <gohman@apple.com> Don't special-case stdout in llvm::WriteBitcodeToFile; just consider
it to be the caller's responsibility to provide a stream in binary
mode. This fixes a layering violation and avoids an outs() call.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
551754c4958086cc6910da7c950f2875e212f5cf 17-Apr-2010 Eric Christopher <echristo@apple.com> Revert 101465, it broke internal OpenGL testing.

Probably the best way to know that all getOperand() calls have been handled
is to replace that API instead of updating.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101579 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
4ec2258ffb495d7ce00177e447740ef1123a27db 16-Apr-2010 Gabor Greif <ggreif@gmail.com> reapply r101434
with a fix for self-hosting

rotate CallInst operands, i.e. move callee to the back
of the operand array

the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101465 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
607a7ab3da72a2eb53553a520507cbb8068dd1d8 16-Apr-2010 Gabor Greif <ggreif@gmail.com> back out r101423 and r101397, they break llvm-gcc self-host on darwin10

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
2ff961f66816daab8bbc58a19025161d969821c2 15-Apr-2010 Gabor Greif <ggreif@gmail.com> reapply r101364, which has been backed out in r101368
with a fix

rotate CallInst operands, i.e. move callee to the back
of the operand array

the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101397 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
9ee17208115482441953127615231c59a2f4d052 15-Apr-2010 Gabor Greif <ggreif@gmail.com> back out r101364, as it trips the linux nightlybot on some clang C++ tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101368 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
165dac08d1bb8428b32a5f39cdd3dbee2888987f 15-Apr-2010 Gabor Greif <ggreif@gmail.com> rotate CallInst operands, i.e. move callee to the back
of the operand array

the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101364 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
a6245247e9d0c718fb14230ba6610ee939b030fa 03-Apr-2010 Chris Lattner <sabre@nondot.org> Add special case bitcode support for DebugLoc. This avoids
having the bitcode writer materialize mdnodes for all the
debug location tuples when writing out the bc file and
stores the information in a more compact form. For example,
the -O0 -g bc file for combine.c in 176.gcc shrinks from
739392 to 512096 bytes.

This concludes my planned short-term debug info work.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100261 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
c9f7500d1752feac7cece26d20007a99d21f677c 24-Mar-2010 Gabor Greif <ggreif@gmail.com> Finally land the InvokeInst operand reordering.
I have audited all getOperandNo calls now, fixing
hidden assumptions. CallSite related uglyness will
be eliminated successively.

Note this patch has a long and griveous history,
for all the back-and-forths have a look at
CallSite.h's log.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99399 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
1cde4af15712f6ccdb81ab540df800cda90d0d74 22-Mar-2010 Gabor Greif <ggreif@gmail.com> backing out r99170 because it still fails on clang-x86_64-darwin10-fnt

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99171 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
9b1061e2e3c3a463aa251e2e6631d5e4313a7ac6 22-Mar-2010 Gabor Greif <ggreif@gmail.com> Now that hopefully all direct accesses to InvokeInst operands are fixed
we can reapply the InvokeInst operand reordering patch. (see r98957).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99170 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
cc52ed0c4feec63e7a127462b78fd4a6b217f469 19-Mar-2010 Gabor Greif <ggreif@gmail.com> back out r98957, it broke http://smooshlab.apple.com:8010/builders/clang-x86_64-darwin10-fnt/builds/703 in the nightly test suite

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
f4f10e37791cef519a057d10d12f688333f554a7 19-Mar-2010 Gabor Greif <ggreif@gmail.com> Recommit r80858 again (which has been backed out in r80871).

This time I did a self-hosted bootstrap on Linux x86-64,
with no problems. Let's see how darwin 64-bit self-hosting
goes. At the first sign of failure I'll back this out.

Maybe the valgrind bots give me a hint of what may be wrong
(it at all).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98957 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
93b122d3c484a8451024d6947be0f4037f86def0 16-Mar-2010 Chris Lattner <sabre@nondot.org> reapply r98656 unmodified, which exposed the asmprinter not
handling constant unions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98680 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
b85c7100c5f1ef34bace56c6978eca429df798f6 16-Mar-2010 Daniel Dunbar <daniel@zuster.org> Revert r98656, its breaking all over the place.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98662 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
8b3b34f410f2bd05943e1c6f9b0514209731421d 16-Mar-2010 Chris Lattner <sabre@nondot.org> improve support for uniontype and ConstantUnion, patch by Tim Northover!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98656 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
fdfeb6976f07ad10d809b922ed7376ba2a3539be 12-Feb-2010 Chris Lattner <sabre@nondot.org> Add support for a union type in LLVM IR. Patch by Talin!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96011 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
3922a9ba84d91e67e6baa63fed3b0455d7de7b4a 12-Feb-2010 Evan Cheng <evan.cheng@apple.com> Also recognize armv6t2-* and armv5te-* triplets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96008 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
0f8868b17129acc81bd79f4a30d9390023ca5304 12-Feb-2010 Evan Cheng <evan.cheng@apple.com> Add ARM bitcode file magic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96006 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
2c482f4895f146cd5b61a42750c4070a8fff3a38 29-Jan-2010 Victor Hernandez <vhernandez@apple.com> We were not writing bitcode for function-local metadata whose operands have been erased (making it not have any more function-local operands)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94842 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
f0356fe140af1a30587b9a86bcfb1b2c51b8ce20 27-Jan-2010 Jeffrey Yasskin <jyasskin@google.com> Kill ModuleProvider and ghost linkage by inverting the relationship between
Modules and ModuleProviders. Because the "ModuleProvider" simply materializes
GlobalValues now, and doesn't provide modules, it's renamed to
"GVMaterializer". Code that used to need a ModuleProvider to materialize
Functions can now materialize the Functions directly. Functions no longer use a
magic linkage to record that they're materializable; they simply ask the
GVMaterializer.

Because the C ABI must never change, we can't remove LLVMModuleProviderRef or
the functions that refer to it. Instead, because Module now exposes the same
functionality ModuleProvider used to, we store a Module* in any
LLVMModuleProviderRef and translate in the wrapper methods. The bindings to
other languages still use the ModuleProvider concept. It would probably be
worth some time to update them to follow the C++ more closely, but I don't
intend to do it.

Fixes http://llvm.org/PR5737 and http://llvm.org/PR5735.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94686 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
3cd7c3db9926c1db3b55599c01c75e8ecc6bd096 14-Jan-2010 Victor Hernandez <vhernandez@apple.com> Avoid modifying ValueEnumerator's MD ValueList by choosing which function-local MD to write based on the function currently being written

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93441 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
8ea5d4c5294ec0c9a7635afa8fc470fa4a041838 14-Jan-2010 Victor Hernandez <vhernandez@apple.com> In WriteFunction(), write function-local metadata before we write the instructions, so instruction's references to metadata are fully resolved by the time they get written.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93403 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
2cd4244815a4562854bc9c9c806a9df059cb42b9 13-Jan-2010 Victor Hernandez <vhernandez@apple.com> Fix comment typo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93355 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
0c316416bdf6a915d084052e7e9c1ad943ff1353 13-Jan-2010 Victor Hernandez <vhernandez@apple.com> Write function-local metadata as a metadata subblock of a funciton block

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93339 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
3047384a0f584c06ff203f261d344cab3871e9dc 13-Jan-2010 Victor Hernandez <vhernandez@apple.com> Revert 93270 pending investigation of how stray non-constant values end up in ValueEnumerator's ValueList during WriteConstants()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93289 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
994a2045704601932467e5a773a589d8d3aee6f1 13-Jan-2010 Victor Hernandez <vhernandez@apple.com> Make WriteConstants() more robust against stray values in ValueEnumerator's ValueList

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93270 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
24e64df7ec25b55aa872c2ef33728dfbb8c353c4 10-Jan-2010 Victor Hernandez <vhernandez@apple.com> Compute isFunctionLocal in MDNode ctor or via argument in new function getWhenValsUnresolved().
Document PFS argument to ParseValID() and ConvertGlobalOrMetadataValIDToValue().



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93108 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
0386f01e061513094504bc11f8352a40173cada7 07-Jan-2010 Devang Patel <dpatel@apple.com> Use separate namespace for named metadata.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92931 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
69d02e0a174151e0f129731452e819b91d1ab90e 05-Jan-2010 Devang Patel <dpatel@apple.com> Allow null to be an element of NamedMDNode. e.g. !llvm.stuff = !{!0, !1, null}



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92783 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
5d0cacdbb6577f2449986f345858db17dc1bcf59 31-Dec-2009 Chris Lattner <sabre@nondot.org> rename "elements" of metadata to "operands". "Elements" are
things that occur in types. "operands" are things that occur
in values.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92322 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
081134741b40b342fb2f85722c9cea5d412489a8 29-Dec-2009 Chris Lattner <sabre@nondot.org> Final step in the metadata API restructuring: move the
getMDKindID/getMDKindNames methods to LLVMContext (and add
convenience methods to Module), eliminating MetadataContext.
Move the state that it maintains out to LLVMContext.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92259 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
3990b121cf4a0b280ed3e54cf13870cbf4259e78 29-Dec-2009 Chris Lattner <sabre@nondot.org> This is a major cleanup of the instruction metadata interfaces that
I asked Devang to do back on Sep 27. Instead of going through the
MetadataContext class with methods like getMD() and getMDs(), just
ask the instruction directly for its metadata with getMetadata()
and getAllMetadata().

This includes a variety of other fixes and improvements: previously
all Value*'s were bloated because the HasMetadata bit was thrown into
value, adding a 9th bit to a byte. Now this is properly sunk down to
the Instruction class (the only place where it makes sense) and it
will be folded away somewhere soon.

This also fixes some confusion in getMDs and its clients about
whether the returned list is indexed by the MDID or densely packed.
This is now returned sorted and densely packed and the comments make
this clear.

This introduces a number of fixme's which I'll follow up on.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92235 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
7d05c46d601cbb52be605019548c34286c02e3a3 28-Dec-2009 Chris Lattner <sabre@nondot.org> rename getHandlerNames to getMDKindNames, simplify its interface
and simplify all the clients that use it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92224 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
bcb18538c26fd6fef942d9da8156b30febae5d7e 28-Dec-2009 Chris Lattner <sabre@nondot.org> change the strange MetadataContext::getMDs function to expose less
irrelevant internal implementation details to clients.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
cdfc940912d56a63b6f12eaa7f3faf79cf74c693 01-Nov-2009 Chris Lattner <sabre@nondot.org> Revert 85678/85680. The decision is to stay with the current form of
indirectbr, thus we don't need "blockaddr(@func, null)". Eliminate it
for simplicity.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85699 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
7d83ebcadd725d050cc58962e9b7c4312d676e7f 31-Oct-2009 Chris Lattner <sabre@nondot.org> Make blockaddress(@func, null) be valid, and make 'deleting a basic
block with a blockaddress still referring to it' replace the invalid
blockaddress with a new blockaddress(@func, null) instead of a
inttoptr(1).

This changes the bitcode encoding format, and still needs codegen
support (this should produce a non-zero value, referring to the entry
block of the function would also be quite reasonable).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85678 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
837e04a8bf13712a4a8ae279daab65a048b21f7d 28-Oct-2009 Chris Lattner <sabre@nondot.org> bitcode writer support for blockaddress.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85376 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
0eeb913aa17a68b1f2963b02ca1d68f09dba0b78 28-Oct-2009 Chris Lattner <sabre@nondot.org> Previously, all operands to Constant were themselves constant.
In the new world order, BlockAddress can have a BasicBlock operand.
This doesn't permute much, because if you have a ConstantExpr (or
anything more specific than Constant) we still know the operand has
to be a Constant.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85375 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
ab21db79ef1d2530880ad11f21f0b87ffca02dd4 28-Oct-2009 Chris Lattner <sabre@nondot.org> rename indbr -> indirectbr to appease the residents of #llvm.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85351 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
f9be95f867745b6754b2402b9b72f9eaeabd637f 27-Oct-2009 Chris Lattner <sabre@nondot.org> add enough support for indirect branch for the feature test to pass
(assembler,asmprinter, bc reader+writer) and document it. Codegen
currently aborts on it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85274 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
f3523592b21af09a5a0032f8261f2f61c302fbd9 27-Oct-2009 Chris Lattner <sabre@nondot.org> Type.h doesn't need to #include LLVMContext.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85254 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
046e78ce55a7c3d82b7b6758d2d77f2d99f970bf 27-Oct-2009 Victor Hernandez <vhernandez@apple.com> Remove FreeInst.
Remove LowerAllocations pass.
Update some more passes to treate free calls just like they were treating FreeInst.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85176 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
f61b2371c8ec6e0ff2da8f2bd2a606ba755bb2fe 22-Oct-2009 Devang Patel <dpatel@apple.com> Fix getMDs() interface such that it does not expose implementation details.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84885 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
b5681b22937440dcb8007f4b125f3325d6341fe0 22-Oct-2009 Devang Patel <dpatel@apple.com> Using TrackingVH instead of WeakVH or WeakMetadataVH.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84884 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
ce6a1c97569ce65a60340b20e65abd0787969942 22-Oct-2009 Devang Patel <dpatel@apple.com> Fix getHandlerNames() interface. Now it populate clinet supplied small vector with handler names.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84820 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
8ba2d5befc05ca73d3bac8708819bbbe759e2cf9 22-Oct-2009 Dale Johannesen <dalej@apple.com> Rename msasm to alignstack per review.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84795 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
12f031d0058db993da506638228f16b10ec7912f 19-Oct-2009 Chris Lattner <sabre@nondot.org> simplify.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84465 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
a276c603b82a11b0bf0b59f0517a69e4b63adeab 17-Oct-2009 Victor Hernandez <vhernandez@apple.com> Remove MallocInst from LLVM Instructions.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84299 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
4360298d2bf3c1ba8595a415cfa235df0bc76335 13-Oct-2009 Dale Johannesen <dalej@apple.com> Add an "msasm" flag to inline asm as suggested in PR 5125.
A little ugliness is accepted to keep the binary file format
compatible. No functional change yet.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84020 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
5192e30a72b0f74f770cf4def00764f860c28045 13-Oct-2009 Devang Patel <dpatel@apple.com> Do not write empty METADATA_ATTACHMENT record.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84006 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
cf0fe8d813727383d630055bb9d1cde21b00b7e7 05-Oct-2009 Chris Lattner <sabre@nondot.org> strength reduce a ton of type equality tests to check the typeid (Through
the new predicates I added) instead of going through a context and doing a
pointer comparison. Besides being cheaper, this allows a smart compiler
to turn the if sequence into a switch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83297 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
e30e678865b8dc1b69ef1c26e7567ffd1300553c 28-Sep-2009 Devang Patel <dpatel@apple.com> s/class Metadata/class MetadataContext/g


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83019 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
a279bc3da55691784064cb47200a1c584408b8ab 20-Sep-2009 Daniel Dunbar <daniel@zuster.org> Tabs -> spaces, and remove trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82355 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
e8e0213cc3daa2d0457c22e4c12e6973f21fc942 18-Sep-2009 Devang Patel <dpatel@apple.com> Write and read metadata attachments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82259 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
03a5f139fb7d3e9c49fe95aea4c717fab2285d82 03-Sep-2009 Gabor Greif <ggreif@gmail.com> back out my recent commit (r80858), it seems to break self-hosting buildbot's stage 2 configure

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80871 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
190390b8d31af0a549827478911b322af4bc111a 03-Sep-2009 Gabor Greif <ggreif@gmail.com> re-commit r66920 (which has been backed out in r66953) I may have more luck this time. I'll back out if needed...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80858 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
b515d75856f58a8b3b71d782eb00916d686329ad 23-Aug-2009 Chris Lattner <sabre@nondot.org> eliminate the std::ostream forms of the bitcode writing APIs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79840 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
5078f84c82814e4d33846f9ef54281619d362f8a 20-Aug-2009 Dan Gohman <gohman@apple.com> Rename hasNoUnsignedOverflow and hasNoSignedOverflow to hasNoUnsignedWrap
and hasNoSignedWrap, for consistency with the nuw and nsw properties.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79539 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
1d0be15f89cb5056e20e2d24faa8d6afb1573bca 13-Aug-2009 Owen Anderson <resistor@mac.com> Push LLVMContexts through the IntegerType APIs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78948 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
4f95d2bda4235d36acd95688d0744d7363214706 05-Aug-2009 Chris Lattner <sabre@nondot.org> revert r78048, it isn't worth using assertingvh here.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78119 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
d5ac40457b62f37f0abfb1d61064f7c7300e91ee 04-Aug-2009 Devang Patel <dpatel@apple.com> Use separate ValueList for metadata.
This fixes PR4666.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78056 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
912538becad06468283fffcf99196faf067024b6 04-Aug-2009 Devang Patel <dpatel@apple.com> Revert recent bitcode writer patches.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78053 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
0a0193edf9152bdc47a49a1a513d6e9cbf723131 04-Aug-2009 Chris Lattner <sabre@nondot.org> switch ValueMap to using AssertingVH. This is an old patch I had laying
around in a tree I forgot about.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78048 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
13ed1e293611f51efb87d1d131cda23b39ed3fde 04-Aug-2009 Devang Patel <dpatel@apple.com> Remove dead code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78035 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
2453c401459c9febff32f902253ada6b17a69756 04-Aug-2009 Devang Patel <dpatel@apple.com> Fix MDString Abbrev setup.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78034 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
d701aa7bed07cad16e33594c59251c958df2c74d 04-Aug-2009 Devang Patel <dpatel@apple.com> Constants and Metadata share ValueList. This means they must be emitted interleaved (using appropriate BLOCK_IDs) otherwise ValuePtrs index gets out of sync.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78033 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
b3f7c61d9cdc62b230e0c67a358479f013dd5563 31-Jul-2009 Devang Patel <dpatel@apple.com> Do not use abbrev while writing NamedMDNode name.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77637 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
aa993142518648c1ffa61e7f52ff6d3a95d413fb 30-Jul-2009 Devang Patel <dpatel@apple.com> Read and write NamedMDNode.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77517 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
985fea2f1ae90eded83dac1006d93a8d2c9a4a62 29-Jul-2009 Devang Patel <dpatel@apple.com> Refactor. Fix indentation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77482 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
0a9f7b9c3ebe7d0ec033462e1a7c9101279956f9 28-Jul-2009 Devang Patel <dpatel@apple.com> Rename MDNode.h header. It defines MDnode and other metadata classes.
New name is Metadata.h.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77370 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
dd8004dc73d091ccb3927dbbc3b41639a3738ae3 27-Jul-2009 Dan Gohman <gohman@apple.com> Add a new keyword 'inbounds' for use with getelementptr. See the
LangRef.html changes for details.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77259 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
2f9c3b002d3cb465fefc5f4b2535ca994c5e9283 23-Jul-2009 Devang Patel <dpatel@apple.com> MDString
- Rename member function size(). New name is length().
- Store string beginning and length. Earlier it used to store string end.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76841 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
104cf9e02b0ed94d4173869a598af6c6972a8660 23-Jul-2009 Devang Patel <dpatel@apple.com> Derive MDNode from MetadataBase instead of Constant. Emit MDNodes into METADATA_BLOCK in bitcode file.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76834 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
70c9d17f27d1ef89ed80566aeb529f68d2ad9480 22-Jul-2009 Devang Patel <dpatel@apple.com> Fix indentation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76787 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
e54abc90fe9942ef3902040a7ac475ce0c369dc9 22-Jul-2009 Devang Patel <dpatel@apple.com> Introduce MetadataBase, a base class for MDString and MDNode.
Derive MDString directly from MetadataBase.
Introduce new bitcode block to hold metadata.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76759 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
1224c386981f7948f298ed9ad444c40609570f2e 20-Jul-2009 Dan Gohman <gohman@apple.com> Assembly and Bitcode support for unsigned/signed overflow flags and
exact sdiv flags.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
3d10a5a75794356a0a568ce283713adc3a963200 20-Jul-2009 Bill Wendling <isanbard@gmail.com> Add plumbing for the `linker_private' linkage type. This type is meant for
"private" symbols which the assember shouldn't strip, but which the linker may
remove after evaluation. This is mostly useful for Objective-C metadata.

This is plumbing, so we don't have a use of it yet. More to come, etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76385 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
c23197a26f34f559ea9797de51e187087c039c42 14-Jul-2009 Torok Edwin <edwintorok@gmail.com> llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.
This adds location info for all llvm_unreachable calls (which is a macro now) in
!NDEBUG builds.
In NDEBUG builds location info and the message is off (it only prints
"UREACHABLE executed").


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75640 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
c25e7581b9b8088910da31702d4ca21c4734c6d7 11-Jul-2009 Torok Edwin <edwintorok@gmail.com> assert(0) -> LLVM_UNREACHABLE.
Make llvm_unreachable take an optional string, thus moving the cerr<< out of
line.
LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for
NDEBUG builds.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75379 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
7f6aa2b162e5daaf7b9ccf05d749597d3d7cf460 08-Jul-2009 Nick Lewycky <nicholas@mxc.ca> Remove the vicmp and vfcmp instructions. Because we never had a release with
these instructions, no autoupgrade or backwards compatibility support is
provided.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74991 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
f7e498138f2f15b9391274d0c062fa62ab2e86fc 12-Jun-2009 Nick Lewycky <nicholas@mxc.ca> Don't remove aggregate-typed module level constants before encoding functions
since functions may contain aggregate constants too.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73220 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
ae3a0be92e33bc716722aa600983fc1535acb122 05-Jun-2009 Dan Gohman <gohman@apple.com> Split the Add, Sub, and Mul instruction opcodes into separate
integer and floating-point opcodes, introducing
FAdd, FSub, and FMul.

For now, the AsmParser, BitcodeReader, and IRBuilder all preserve
backwards compatability, and the Core LLVM APIs preserve backwards
compatibility for IR producers. Most front-ends won't need to change
immediately.

This implements the first step of the plan outlined here:
http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72897 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
7a0370f66ab5739f42ffe822f33494e0de9b182b 30-May-2009 Nick Lewycky <nicholas@mxc.ca> Give embedded metadata its own type instead of relying on EmptyStructTy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72610 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
cb33799b9f4e152e3460faa83e59b53ff604c87d 10-May-2009 Nick Lewycky <nicholas@mxc.ca> Make MDNode use CallbackVH. Also change MDNode to store Value* instead of
Constant* in preperation of a future change to support holding non-Constants
in an MDNode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
266c7bbbbcc4b326dea82e577de1a415d6acc23e 13-Apr-2009 Chris Lattner <sabre@nondot.org> Add a new "available_externally" linkage type. This is intended
to support C99 inline, GNU extern inline, etc. Related bugzilla's
include PR3517, PR3100, & PR2933. Nothing uses this yet, but it
appears to work.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68940 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
21cc4460efa104e8591b05a90f20130291614344 04-Apr-2009 Nick Lewycky <nicholas@mxc.ca> Add support for embedded metadata to LLVM. This introduces two new types of
Constant, MDString and MDNode which can only be used by globals with a name
that starts with "llvm." or as arguments to a function with the same naming
restriction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68420 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
1b25cb2416c46a6cebf2a6c52235e9fe46a10d11 23-Mar-2009 Dale Johannesen <dalej@apple.com> Fix internal representation of fp80 to be the
same as a normal i80 {low64, high16} rather
than its own {high64, low16}. A depressing number
of places know about this; I think I got them all.
Bitcode readers and writers convert back to the old
form to avoid breaking compatibility.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67562 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
9a507cd915e6460bc7dadee2185c53df326274c1 13-Mar-2009 Bill Wendling <isanbard@gmail.com> Revert r66920. It was causing failures in the self-hosting buildbot (in release
mode).

Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/dg.exp ...
FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/crash-narrowfunctiontest.ll
Failed with signal(SIGBUS) at line 1
while running: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/crash-narrowfunctiontest.ll -bugpoint-crashcalls -silence-passes > /dev/null
0 bugpoint 0x0035dd25 llvm::sys::SetInterruptFunction(void (*)()) + 85
1 bugpoint 0x0035e382 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 706
2 libSystem.B.dylib 0x92f112bb _sigtramp + 43
3 libSystem.B.dylib 0xffffffff _sigtramp + 1829694831
4 bugpoint 0x00021d1c main + 92
5 bugpoint 0x00002106 start + 54
6 bugpoint 0x00000004 start + 18446744073709543220
Stack dump:
0. Program arguments: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/crash-narrowfunctiontest.ll -bugpoint-crashcalls -silence-passes

FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/misopt-basictest.ll
Failed with signal(SIGBUS) at line 1
while running: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/misopt-basictest.ll -dce -bugpoint-deletecalls -simplifycfg -silence-passes
0 bugpoint 0x0035dd25 llvm::sys::SetInterruptFunction(void (*)()) + 85
1 bugpoint 0x0035e382 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 706
2 libSystem.B.dylib 0x92f112bb _sigtramp + 43
3 libSystem.B.dylib 0xffffffff _sigtramp + 1829694831
4 bugpoint 0x00021d1c main + 92
5 bugpoint 0x00002106 start + 54
6 bugpoint 0x00000006 start + 18446744073709543222
Stack dump:
0. Program arguments: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/misopt-basictest.ll -dce -bugpoint-deletecalls -simplifycfg -silence-passes

FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/remove_arguments_test.ll
Failed with signal(SIGBUS) at line 1
while running: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/remove_arguments_test.ll -bugpoint-crashcalls -silence-passes
0 bugpoint 0x0035dd25 llvm::sys::SetInterruptFunction(void (*)()) + 85
1 bugpoint 0x0035e382 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 706
2 libSystem.B.dylib 0x92f112bb _sigtramp + 43
3 libSystem.B.dylib 0xffffffff _sigtramp + 1829694831
4 bugpoint 0x00021d1c main + 92
5 bugpoint 0x00002106 start + 54
Stack dump:
0. Program arguments: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/remove_arguments_test.ll -bugpoint-crashcalls -silence-passes

--- Reverse-merging (from foreign repository) r66920 into '.':
U include/llvm/Support/CallSite.h
U include/llvm/Instructions.h
U lib/Analysis/IPA/GlobalsModRef.cpp
U lib/Analysis/IPA/Andersens.cpp
U lib/Bitcode/Writer/BitcodeWriter.cpp
U lib/VMCore/Instructions.cpp
U lib/VMCore/Verifier.cpp
U lib/VMCore/AsmWriter.cpp
U lib/Transforms/Utils/LowerInvoke.cpp
U lib/Transforms/Scalar/SimplifyCFGPass.cpp
U lib/Transforms/IPO/PruneEH.cpp
U lib/Transforms/IPO/DeadArgumentElimination.cpp



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66953 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
b14cda3c0dea98bdd44c2f209afaf4fb36d42a8a 13-Mar-2009 Gabor Greif <ggreif@gmail.com> Second installment of "BasicBlock operands to the back"
changes.

For InvokeInst now all arguments begin at op_begin().
The Callee, Cont and Fail are now faster to get by
access relative to op_end().

This patch introduces some temporary uglyness in CallSite.
Next I'll bring CallInst up to a similar scheme and then
the uglyness will magically vanish.

This patch also exposes all the reliance of the libraries
on InvokeInst's operand ordering. I am thinking of taking
care of that too.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66920 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
4dc2b39bf89d7c87868008ef8a0f807e0419aca6 11-Mar-2009 Duncan Sands <baldrick@free.fr> It makes no sense to have a ODR version of common
linkage, so remove it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66690 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
5f4ee1fc5d00ae55c30fa2ce450c69be4c6d6e63 11-Mar-2009 Duncan Sands <baldrick@free.fr> Remove the one-definition-rule version of extern_weak
linkage: this linkage type only applies to declarations,
but ODR is only relevant to globals with definitions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66650 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
667d4b8de6dea70195ff12ef39a4deebffa2f5c7 07-Mar-2009 Duncan Sands <baldrick@free.fr> Introduce new linkage types linkonce_odr, weak_odr, common_odr
and extern_weak_odr. These are the same as the non-odr versions,
except that they indicate that the global will only be overridden
by an *equivalent* global. In C, a function with weak linkage can
be overridden by a function which behaves completely differently.
This means that IP passes have to skip weak functions, since any
deductions made from the function definition might be wrong, since
the definition could be replaced by something completely different
at link time. This is not allowed in C++, thanks to the ODR
(One-Definition-Rule): if a function is replaced by another at
link-time, then the new function must be the same as the original
function. If a language knows that a function or other global can
only be overridden by an equivalent global, it can give it the
weak_odr linkage type, and the optimizers will understand that it
is alright to make deductions based on the function body. The
code generators on the other hand map weak and weak_odr linkage
to the same thing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66339 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
0f123cf732ad249117b7471e37bf819633b76a6e 12-Feb-2009 Nate Begeman <natebegeman@mac.com> Add suppport for ConstantExprs of shufflevectors whose result type is not equal to the
type of the vectors being shuffled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64401 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
ae6ab1e95022244129b262251c9fac821a5efa4d 30-Jan-2009 Gabor Greif <ggreif@gmail.com> use precise getters

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63403 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
75a46eb80005eeacf274c65e07a9fd295d55c6a2 16-Jan-2009 Gabor Greif <ggreif@gmail.com> use specialized accessor instead of plain getOperand(0)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
bb46f52027416598a662dc1c58f48d9d56b1a65b 15-Jan-2009 Rafael Espindola <rafael.espindola@gmail.com> Add the private linkage.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62279 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
fdede435b9795beb9308558040265e53424e919b 08-Jan-2009 Gabor Greif <ggreif@gmail.com> revert to functionally equivalent formulation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61895 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
8fe53b733b5a62c458d9b4d3b471ddaf43ef4b94 07-Jan-2009 Gabor Greif <ggreif@gmail.com> use the obvious getters

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61893 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
38e77214558f3a5f917896df575de1c01ee60f47 19-Dec-2008 Chris Lattner <sabre@nondot.org> Add support for writing LLVM IR to a specified BitstreamWriter.
Patch by Lukasz Janyst!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61251 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
73ddd4f00dd2a4b7b68a1500bc7e3322cab51270 19-Dec-2008 Nick Lewycky <nicholas@mxc.ca> Commit missed files from nocapture change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61240 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
6fa311c2338391b0f332c062b3140c6df139a949 16-Dec-2008 Bill Wendling <isanbard@gmail.com> Temporarily revert r61019, r61030, and r61040. These were breaking LLVM Release
builds.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61094 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
382da62ec274feead85e7be364ab5d4fd0281d98 15-Dec-2008 Nick Lewycky <nicholas@mxc.ca> It turns out that "align 1" and unaligned are different. Add a bias to the
alignment attribute such that 0 means unaligned.

This will probably require a rebuild of llvm-gcc because of the change to
Attributes.h. If you see many test failures on "make check", please rebuild
your llvm-gcc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61030 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
e642658480ed0c9cde023a165edca237ba90bd31 15-Dec-2008 Nick Lewycky <nicholas@mxc.ca> Introducing nocapture, a parameter attribute for pointers to indicate that the
callee will not introduce any new aliases of that pointer.

The attributes had all bits allocated already, so I decided to collapse
alignment. Alignment was previously stored as a 16-bit integer from bits 16 to
32 of the attribute, but it was required to be a power of 2. Now it's stored in
log2 encoded form in five bits from 16 to 21. That gives us 11 more bits of
space.

You may have already noticed that you only need four bits to encode a 16-bit
power of two, so why five bits? Because the AsmParser accepted 32-bit
alignments, even though we couldn't store them (they were silently discarded).
Now we can store them in memory, but not in the bitcode.

The bitcode format was already storing these as 64-bit VBR integers. So, the
bitcode format stays the same, keeping the alignment values stored as 16 bit
raw values. There's some hideous code in the reader and writer that deals with
this, waiting to be ripped out the moment we run out of bits again and have to
replace the parameter attributes table encoding.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61019 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
e2e9d8e6aa914b81d79ff496736165f3358c6f3a 23-Oct-2008 Daniel Dunbar <daniel@zuster.org> Make sure to set stdout to binary when writing bitcode files via
std::ostream API.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58042 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
d1ce3b48e24b9e7d78cac590d1e4590a68c2e2ce 22-Oct-2008 Daniel Dunbar <daniel@zuster.org> Add raw_ostream versions of WriteBitcodeToFile and BitcodeWriterPass.
- The old versions are still hanging around, but should be migrated
away from.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
7111b02c734c992b8c97d9918118768026dad79e 09-Oct-2008 Dale Johannesen <dalej@apple.com> Rename APFloat::convertToAPInt to bitcastToAPInt to
make it clearer what the function does. No functional
change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57325 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
0598866c052147c31b808391f58434ce3dbfb838 25-Sep-2008 Devang Patel <dpatel@apple.com> Large mechanical patch.

s/ParamAttr/Attribute/g
s/PAList/AttrList/g
s/FnAttributeWithIndex/AttributeWithIndex/g
s/FnAttr/Attribute/g

This sets the stage
- to implement function notes as function attributes and
- to distinguish between function attributes and return value attributes.

This requires corresponding changes in llvm-gcc and clang.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56622 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
e3d76d37e972d6f7b1335a3944ce31ae8f4cd3c9 24-Sep-2008 Devang Patel <dpatel@apple.com> s/ParamAttrsWithIndex/FnAttributeWithIndex/g


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56535 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
d9b4a5f859188cbb168c223071b413e58c53c925 24-Sep-2008 Devang Patel <dpatel@apple.com> Use parameter attribute store (soon to be renamed) for
Function Notes also. Function notes are stored at index ~0.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56511 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
fb2bbbe78674a34e5ec2ec6f8c566ac5cbb26154 16-Sep-2008 Dan Gohman <gohman@apple.com> Re-enables the new vector select in the bitcode reader, by modifying the
bitcode reader/writer as follows:

- add and use new bitcode FUNC_CODE_INST_VSELECT to handle the llvm
select opcode using either i1 or [N x i1] as the selector.
- retain old BITCODE FUNC_CODE_INST_SELECT in the bitcode reader to
handle select on i1 for backwards compatibility with existing bitcode
files.
- re-enable the vector-select.ll test program.

Also, rename the recently added bitcode opcode FUNC_CODE_INST_VCMP to
FUNC_CODE_INST_CMP2 and make the bitcode writer use it to handle
fcmp/icmp on scalars or vectors. In the bitcode writer, use
FUNC_CODE_INST_CMP for vfcmp/vicmp only. In the bitcode reader, have
FUNC_CODE_INST_CMP handle icmp/fcmp returning bool, for backwards
compatibility with existing bitcode files.

Patch by Preston Gurd!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56233 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
f72fb679eff7de84e3e18b75d63a18cb3510bcdd 09-Sep-2008 Dan Gohman <gohman@apple.com> Extend the vcmp/fcmp LLVM IR instructions to take vectors as arguments
and, if so, to return a vector of boolean as a result;

Extend the select LLVM IR instruction to allow you to specify a result
type which is a vector of boolean, in which case the result will be an
element-wise selection instead of choosing one vector or the other; and

Update LangRef.html to describe these changes.

This patch was contributed by Preston Gurd!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55969 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
7ad033c9e7a6b164fe971be82f6dc8ec9dc977b3 02-Sep-2008 Devang Patel <dpatel@apple.com> Read and write function notes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55657 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
e35f1cacc86ce5daea335986ed0da3f122edd7b7 23-Aug-2008 Chris Lattner <sabre@nondot.org> add #include


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55257 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
5eca075b74d62c621b160aa216b4cd50829a2cc7 17-Aug-2008 Gordon Henriksen <gordonhenriksen@mac.com> Rename some GC classes so that their roll will hopefully be clearer.

In particular, Collector was confusing to implementors. Several
thought that this compile-time class was the place to implement
their runtime GC heap. Of course, it doesn't even exist at runtime.
Specifically, the renames are:

Collector -> GCStrategy
CollectorMetadata -> GCFunctionInfo
CollectorModuleMetadata -> GCModuleInfo
CollectorRegistry -> GCRegistry
Function::getCollector -> getGC (setGC, hasGC, clearGC)

Several accessors and nested types have also been renamed to be
consistent. These changes should be obvious.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54899 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
fc74abfba5128544a750fce22fdf13eb0403e3ce 23-Jul-2008 Dan Gohman <gohman@apple.com> Enable first-class aggregates support.

Remove the GetResultInst instruction. It is still accepted in LLVM assembly
and bitcode, where it is now auto-upgraded to ExtractValueInst. Also, remove
support for return instructions with multiple values. These are auto-upgraded
to use InsertValueInst instructions.

The IRBuilder still accepts multiple-value returns, and auto-upgrades them
to InsertValueInst instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53941 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
e089160d1065d83986fd97fae7f0af08c03e7d47 22-Jul-2008 Dan Gohman <gohman@apple.com> InsertValue and ExtractValue constant expressions are always
folded. Remove code that handled the case where they aren't
folded, and remove bitcode reader/writer support for them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53887 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
6fa6a32e4e2fdbb77c82fd7f64a7232cdcac994e 09-Jul-2008 Chris Lattner <sabre@nondot.org> Add a little wrapper header that is put around bc files when emitting
bc files for modules with a target triple that indicates they are for
darwin. The reader unconditionally handles this, and the writer could
turn this on for more targets if we care.

This change has two benefits for darwin:

1) it allows us to encode the cpu type of the file in an easy to read
place that doesn't require decoding the bc file.
2) it works around a bug (IMO) in darwin's AR where it is incapable of
handling files that are not a multiple of 8 bytes long. BC files
are only guaranteed to be multiples of 4 bytes long.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53275 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
b0a882f540e015e35ab90d0b549f3d1c24acdb9c 06-Jun-2008 Anton Korobeynikov <asl@math.spbu.ru> Turn stdout into binary mode during bitcode emission.
This is necessary on windows targets, since stdout is in text mode there.
Patch by Julien Lerouge!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52038 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
0aab28bf4c3ec21c2a068733373e37c68c376171 31-May-2008 Dan Gohman <gohman@apple.com> Improved bitcode support for insertvalue/extractvalue.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51822 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
81a0c0b44e582baca8b68754a7fcabfc3aef2e7a 31-May-2008 Dan Gohman <gohman@apple.com> IR, bitcode reader, bitcode writer, and asmparser changes to
insertvalue and extractvalue to use constant indices instead of
Value* indices. And begin updating LangRef.html.

There's definately more to come here, but I'm checking this
basic support in now to make it available to people who are
interested.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51806 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
e4977cf750eaff28275429191821420c20b0c64f 23-May-2008 Dan Gohman <gohman@apple.com> Make structs and arrays first-class types, and add assembly
and bitcode support for the extractvalue and insertvalue
instructions and constant expressions.

Note that this does not yet include CodeGen support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51468 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
6667646a568295f4cae79cf0aa32547c8558188f 15-May-2008 Dale Johannesen <dalej@apple.com> Allow an extra bit for CommonLinkage.

This changes the .bc file format, but if I understand
how it works correctly, old .bc files continue to
be readable.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51161 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
aafce77b17d340aace52bcd49d1944109d82f14a 14-May-2008 Dale Johannesen <dalej@apple.com> Add CommonLinkage; currently tentative definitions
are represented as "weak", but there are subtle differences
in some cases on Darwin, so we need both. The intent
is that "common" will behave identically to "weak" unless
somebody changes their target to do something else.
No functional change as yet.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51118 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
ac80ade1580378e484e24c9f66d2fa5b058e5891 12-May-2008 Nate Begeman <natebegeman@mac.com> Add two new instructions to the llvm IR, vicmp and vfcmp. see updated LangRef
for details. CodeGen support coming in a follow up patch


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50985 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
280a6e607d8eb7401749a92db624a82de47da777 25-Apr-2008 Nick Lewycky <nicholas@mxc.ca> Remove 'unwinds to' support from mainline. This patch undoes r47802 r47989
r48047 r48084 r48085 r48086 r48088 r48096 r48099 r48109 and r48123.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50265 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
58d74910c6b82e622ecbb57d6644d48fec5a5c0f 12-Mar-2008 Chris Lattner <sabre@nondot.org> Reimplement the parameter attributes support, phase #1. hilights:

1. There is now a "PAListPtr" class, which is a smart pointer around
the underlying uniqued parameter attribute list object, and manages
its refcount. It is now impossible to mess up the refcount.
2. PAListPtr is now the main interface to the underlying object, and
the underlying object is now completely opaque.
3. Implementation details like SmallVector and FoldingSet are now no
longer part of the interface.
4. You can create a PAListPtr with an arbitrary sequence of
ParamAttrsWithIndex's, no need to make a SmallVector of a specific
size (you can just use an array or scalar or vector if you wish).
5. All the client code that had to check for a null pointer before
dereferencing the pointer is simplified to just access the
PAListPtr directly.
6. The interfaces for adding attrs to a list and removing them is a
bit simpler.

Phase #2 will rename some stuff (e.g. PAListPtr) and do other less
invasive changes.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48289 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
f8342b98663096186c3a367f7d0fd5ebb7064a52 11-Mar-2008 Anton Korobeynikov <asl@math.spbu.ru> Honour aliases visibility when reading from/writing to bitcode


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48248 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
fc82fabe00b0b820e3c0d7fc9e289bace0295f11 02-Mar-2008 Nick Lewycky <nicholas@mxc.ca> Add an unwind_to field to basic blocks, making them Users instead of Values.
This is the first checkin for PR1269, the new EH infrastructure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47802 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
9a8a88b72d5713fb84aee2f39b1d084f8f579fd5 26-Feb-2008 Devang Patel <dpatel@apple.com> Remove debugging help.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47585 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
d9d99ff8e8fe2897a3d45609763aeb8088b63afa 26-Feb-2008 Devang Patel <dpatel@apple.com> Update bitcode reader and writer to handle multiple return values.
Take 2.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47583 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
1df439773cc771be634cc04cc6c5cbca2a8e5f38 23-Feb-2008 Evan Cheng <evan.cheng@apple.com> Backing out r47521 for now. This has broken a number of tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47533 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
e9fabd94ab9aaa5853c0c3d659e62b1a1f2cc27b 23-Feb-2008 Devang Patel <dpatel@apple.com> Properly read and write bitcodes for multiple return values.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47521 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
22c3979fcaa7ff19c44253eb9b0b0160dfef0aa4 22-Feb-2008 Dale Johannesen <dalej@apple.com> Split ParameterAttributes.h, putting the complicated
stuff into ParamAttrsList.h. Per feedback from
ParamAttrs changes.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
197be3de7f247e61c75d12dc1cb090c1c2c39f28 22-Feb-2008 Devang Patel <dpatel@apple.com> Read and write getresult.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47471 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
8d1433c6fca9b8f2d1429a0abcf4bfba1b3423ee 20-Feb-2008 Dale Johannesen <dalej@apple.com> Support alignment within ParamAttrs in the I/O handling.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47401 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
0d51e7ec0d2dcbea9e304fd58deb05f37eb75635 19-Feb-2008 Dale Johannesen <dalej@apple.com> Expand ParameterAttributes to 32 bits (in preparation
for adding alignment info, not there yet). Clean up
interfaces to reference ParameterAttributes consistently.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47342 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
4ee451de366474b9c228b4e5fa573795a715216d 29-Dec-2007 Chris Lattner <sabre@nondot.org> Remove attribution from file headers, per discussion on llvmdev.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45418 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
d49e18d29f3c5622cfd373fbfa0b954d1c256455 12-Dec-2007 Christopher Lamb <christopher.lamb@gmail.com> Implement part of review feedback for address spaces.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44933 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
216b74c20cfa627b77bc9d192ae387d74a8d41fe 11-Dec-2007 Duncan Sands <baldrick@free.fr> Fix compilation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44864 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
fe63fb986dc9510c5d68f2442edab9574e9e50d0 11-Dec-2007 Christopher Lamb <christopher.lamb@gmail.com> Implement address space attribute for LLVM pointer types. Address spaces are
regions of memory that have a target specific relationship, as described in the
Embedded C Technical Report.

This also implements the 2007-12-11-AddressSpaces test,
which demonstrates how address space attributes can be used in LLVM IR.

In addition, this patch changes the bitcode signature for stores (in a backwards
compatible manner), such that the pointer type, rather than the pointee type, is
encoded. This permits type information in the pointer (e.g. address space) to be
preserved for stores.

LangRef updates are forthcoming.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44858 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
80a75bfae980df96f969f1c05b0c4a80ce975240 10-Dec-2007 Gordon Henriksen <gordonhenriksen@mac.com> Adding a collector name attribute to Function in the IR. These
methods are new to Function:

bool hasCollector() const;
const std::string &getCollector() const;
void setCollector(const std::string &);
void clearCollector();

The assembly representation is as such:

define void @f() gc "shadow-stack" { ...

The implementation uses an on-the-side table to map Functions to
collector names, such that there is no overhead. A StringPool is
further used to unique collector names, which are extremely
likely to be unique per process.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44769 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
a1afde77fa70ae0343ecbb6bc48388bb508d6c8f 27-Nov-2007 Chris Lattner <sabre@nondot.org> Unbreak backwards compatibility with bytecode format. Regression
introduced by this patch:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20071126/055824.html



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44364 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
dc024674ff96820d6020757b48d47f46d4c07db2 27-Nov-2007 Duncan Sands <baldrick@free.fr> Fix PR1146: parameter attributes are longer part of
the function type, instead they belong to functions
and function calls. This is an updated and slightly
corrected version of Reid Spencer's original patch.
The only known problem is that auto-upgrading of
bitcode files doesn't seem to work properly (see
test/Bitcode/AutoUpgradeIntrinsics.ll). Hopefully
a bitcode guru (who might that be? :) ) will fix it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44359 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
a471c2ecda37cd1bae0d94e832f002caa7b63216 11-Oct-2007 Dale Johannesen <dalej@apple.com> Next PPC long double bits. First cut at constants.
No compile-time support for constant operations yet,
just format transformations. Make readers and
writers work. Split constants into 2 doubles in
Legalize.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42865 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
693717fbe6d4e0f63bb9927229e26851e4744530 27-Sep-2007 Dale Johannesen <dalej@apple.com> Make temporaries explicit to avoid premature
destruction of compiler-created ones.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42383 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
9d5f45607793052bf5b4436d1b43013fab9999ac 12-Sep-2007 Dale Johannesen <dalej@apple.com> Revise previous patch per review comments.
Next round of x87 long double stuff.
Getting close now, basically works.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41875 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
3f6eb7419de437436265831fce92f62498556e08 11-Sep-2007 Dale Johannesen <dalej@apple.com> Add APInt interfaces to APFloat (allows directly
access to bits). Use them in place of float and
double interfaces where appropriate.
First bits of x86 long double constants handling
(untested, probably does not work).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41858 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
073d48da50a1b68ae2d1a69c44d5cc18fd9e41dc 07-Sep-2007 Dale Johannesen <dalej@apple.com> Revert previous change to IR.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41769 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
43421b3dd70af5b70e71816521f37502c397cc65 06-Sep-2007 Dale Johannesen <dalej@apple.com> Next round of APFloat changes.
Use APFloat in UpgradeParser and AsmParser.
Change all references to ConstantFP to use the
APFloat interface rather than double. Remove
the ConstantFP double interfaces.
Use APFloat functions for constant folding arithmetic
and comparisons.
(There are still way too many places APFloat is
just a wrapper around host float/double, but we're
getting there.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41747 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
ebbc95da49c6f4ae09947a9f4ab6a8616ea40e3b 10-Aug-2007 Dale Johannesen <dalej@apple.com> Patch 10 for long double. Doing constants right needs expanding ConstantFP
to handle values bigger than double. If we assume host==target and host
long double works correctly, this is not too bad, but we don't want to
have that limitation longterm. I could implement accepting double
constants as long double or something like that, which would lead to
incorrect codegen with no errors; the more I think about that the worse
it seems. Rather than do such a hack that would be backed out later,
I'm settling for giving reasonable error messages, for now.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40974 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
320fc8a39e17f5725f5711248e06bcb36f122687 03-Aug-2007 Dale Johannesen <dalej@apple.com> Long double, part 1 of N. Support in IR.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40774 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
3a08abfd3492b86b7305992a5e38b969aea5e9b8 05-Jul-2007 Chris Lattner <sabre@nondot.org> remove a dead case


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37916 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
384003d2c0d222fcfbf0d771cc43786a18119e3a 12-May-2007 Chris Lattner <sabre@nondot.org> allow partially materialized modules to be written out, which just strips out
the functions which haven't been read.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36999 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
a9bb713130b073276a53a38fe0c37d314a3f1fc1 08-May-2007 Chris Lattner <sabre@nondot.org> Make a preemptive bitcode format change to support PR1146. This lets us do
pr1146 in llvm 2.1 without ugly code to emulate old behavior. This should
be merged into the 2.0 release branch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36928 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
4eab2e57f90ee129a6eb4d6030989639beffa746 06-May-2007 Chris Lattner <sabre@nondot.org> Flush the file after writing bitcode so that clients who don't close their
ofstreams will be ok.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
332376bc601fcff8d8a4558c2834ddd0189c12d1 06-May-2007 Jeff Cohen <jeffc@jolt-lang.org> Unbreak VC++.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36831 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
f9f2e831709f05c0cacd643a908ba2862cb09a32 06-May-2007 Chris Lattner <sabre@nondot.org> add abbrevs for binops and casts. This shrinks a testcase from 725132->682500
bytes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36829 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
2bce93a2ae0b944e9e83b01c5c5bcbe5962a5a8d 06-May-2007 Chris Lattner <sabre@nondot.org> implement reading/writing of inlineasm objects


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36827 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
94687acd21209d4b9de72c42643d08a6f73e4050 06-May-2007 Chris Lattner <sabre@nondot.org> add some abbrevs for ret and unreachable, shrinking kc++ from 2717360->2705388


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36823 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
cb3d91b05b36a144dd0f3103ce4fda4cab356ad6 06-May-2007 Chris Lattner <sabre@nondot.org> add a denser encoding for null terminated strings, add a 6-bit abbrev as
well. This shrinks kc++ from 2724088 to 2717360 bytes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36821 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
817f08a0e5b4d5e697956b547a18968e62586479 06-May-2007 Chris Lattner <sabre@nondot.org> add an abbreviation for the string constants opzn, shrinking the constnats
block from:

Block ID #11 (CONSTANTS_BLOCK):
Num Instances: 1722
Total Size: 3.85976e+06b/482470B/120617W
% of file: 16.7609
Average Size: 2241.44b/280.18B/70.045W
Tot/Avg SubBlocks: 0/0
Tot/Avg Abbrevs: 1/0.00058072
Tot/Avg Records: 26423/15.3444
% Abbrev Recs: 69.1746

to:

Block ID #11 (CONSTANTS_BLOCK):
Num Instances: 1724
Total Size: 2.62406e+06b/328008B/82001.9W
% of file: 12.041
Average Size: 1522.08b/190.26B/47.5649W
Tot/Avg SubBlocks: 0/0
Tot/Avg Abbrevs: 2/0.00116009
Tot/Avg Records: 26280/15.2436
% Abbrev Recs: 68.9992

This shrinks kc++ from 2815788 to 2724088 bytes, which means the bitcode
file is now smaller than the bytecode file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36820 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
ff7fc5dabef6931e7d23ee0613aa60e1d09dfbb0 06-May-2007 Chris Lattner <sabre@nondot.org> implement the 'string constant' optimization. This shrinks kc.bit from
2878544 to 2815788


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36818 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
abfbf85004b2114ee33e05fc9efe3a7bd044e402 06-May-2007 Chris Lattner <sabre@nondot.org> further reduce the redundancy of types in the instruction encoding. This
shrinks function bodies in kc++ from 891913B to 884073B


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36817 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
7337ab9e929a4a787f90d37ee0ed8f4cc27170ab 06-May-2007 Chris Lattner <sabre@nondot.org> stop encoding type/value pairs when the type is implied by the value.
This shrinks the function block of kc++ from 1055K to 906K


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36816 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
440168b00e9739760ae7e1e49191bdfa0ffee4cf 05-May-2007 Chris Lattner <sabre@nondot.org> add an abbrev for loads. This shrinks the function block about 50K, from:

Block ID #12 (FUNCTION_BLOCK):
Num Instances: 2344
Total Size: 8.8434e+06b/1.10542e+06B/276356W
% of file: 35.6726
Average Size: 3772.78b/471.598B/117.899W
Tot/Avg SubBlocks: 4065/1.73422
Tot/Avg Abbrevs: 0/0
Tot/Avg Records: 128487/54.8153
% Abbrev Recs: 0

to:

Block ID #12 (FUNCTION_BLOCK):
Num Instances: 2344
Total Size: 8.44518e+06b/1.05565e+06B/263912W
% of file: 34.6203
Average Size: 3602.89b/450.362B/112.59W
Tot/Avg SubBlocks: 4065/1.73422
Tot/Avg Abbrevs: 0/0
Tot/Avg Records: 128487/54.8153
% Abbrev Recs: 22.2077


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
a0f1ecc45edd74adcdc7633b76b123e4735ec8e2 05-May-2007 Chris Lattner <sabre@nondot.org> add abbrevs for the constants tables. This shrinks it from 4.49755e6 bits
to 3.85972e6 bits in kc++


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36778 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
d092e0e18f9139bfb00acfae2444679b76bd9c59 05-May-2007 Chris Lattner <sabre@nondot.org> Add abbreviations to the TYPE_BLOCK for pointers, functions, structs and arrays.
This shrinks the type_block of kc++ from 139901 bits to 99389 bits (0.55% to 0.39%
of the file), a 40% reduction.

This shrink the record from:

Block ID #10 (TYPE_BLOCK):
Num Instances: 1
Total Size: 139901b/17487.6B/4371.91W
% of file: 0.549306
Num Abbrevs: 0
Num Records: 3203
% Abbrev Recs: 0

to:

Block ID #10 (TYPE_BLOCK):
Num Instances: 1
Total Size: 99389b/12423.6B/3105.91W
% of file: 0.390862
Num Abbrevs: 4
Num Records: 3203
% Abbrev Recs: 99.6566

With a common histogram of:

Code Histogram:
1613 POINTER
1100 FUNCTION
255 STRUCT
224 ARRAY
5 INTEGER
2 OPAQUE
1 LABEL
1 DOUBLE
1 VOID
1 NUMENTRY


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36776 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
ff294a4e1e734d9fc1d5798ff9e00db4d70b5856 05-May-2007 Chris Lattner <sabre@nondot.org> add a char6 abbrev for bbnames and value names. This represents each character
with 6 bits where possible. This shrinks kc++ from 3324164B to 3183584B. The
old VST was:

Block ID #14 (VALUE_SYMTAB):
Total Size: 1.26713e+07b/1.58391e+06B/395978W
Average Size: 5403.53b/675.442B/168.86W
% of file: 47.6484

The new one is:

Block ID #14 (VALUE_SYMTAB):
Total Size: 1.15467e+07b/1.44334e+06B/360834W
Average Size: 4923.96b/615.495B/153.874W
% of file: 45.3368

This is 11% smaller than the VST in the bytecode format.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36771 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
7a263ea8598c03c8522d66ea8db5113d6b4d640e 05-May-2007 Chris Lattner <sabre@nondot.org> add an abbreviation for the type symtab, this shrinks the TST from 175197 bits
to 103165 bits:

Old:
Block ID #13 (TYPE_SYMTAB):
Num Instances: 1
Total Size: 175197b/21899.6B/5474.91W
Average Size: 175197b/21899.6B/5474.91W
% of file: 0.657023
Tot/Avg SubBlocks: 0/0
Tot/Avg Abbrevs: 0/0
Tot/Avg Records: 255/255
% Abbrev Recs: 0

New:
Block ID #13 (TYPE_SYMTAB):
Num Instances: 1
Total Size: 103165b/12895.6B/3223.91W
Average Size: 103165b/12895.6B/3223.91W
% of file: 0.387937
Tot/Avg SubBlocks: 0/0
Tot/Avg Abbrevs: 1/1
Tot/Avg Records: 255/255
% Abbrev Recs: 100


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36769 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
e17b658c792abd4a1552144b8a8808e44970da76 05-May-2007 Chris Lattner <sabre@nondot.org> Implement support for globally associating abbrevs with block IDs, which
relieves us from having to emit the abbrevs into each instance of the block.
This shrinks kc.bit from 3368K to 3333K, but will be a more significant win
once instructions are abbreviated.

The VST went from:

Block ID #14 (VALUE_SYMTAB):
Num Instances: 2345
Total Size: 1.29508e+07b/1.61885e+06B/404713W
Average Size: 5522.73b/690.342B/172.585W
% of file: 48.0645
Tot/Avg SubBlocks: 0/0
Tot/Avg Abbrevs: 7035/3
Tot/Avg Records: 120924/51.5667
% Abbrev Recs: 100

to:

Block ID #14 (VALUE_SYMTAB):
Num Instances: 2345
Total Size: 1.26713e+07b/1.58391e+06B/395978W
Average Size: 5403.53b/675.442B/168.86W
% of file: 47.5198
Tot/Avg SubBlocks: 0/0
Tot/Avg Abbrevs: 0/0
Tot/Avg Records: 120924/51.5667
% Abbrev Recs: 100

because we didn't emit the same 3 abbrevs 2345 times :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36767 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
fd1ae95b8f72470b49c8618f9e40e5593071096c 04-May-2007 Chris Lattner <sabre@nondot.org> allow the 8-bit abbrev to be used for either bb or other values


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36761 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
2453f71ae1a8c465b0f594a7a5ee6c9ba7074035 04-May-2007 Chris Lattner <sabre@nondot.org> shave another 150K off of kc++, by using a 7-bit encoding for BB names
where we can. This shrinks kc++'s down to 3368K, with a VST record of:

Block ID #14 (VALUE_SYMTAB):
Num Instances: 2345
Total Size: 1.29508e+07b/1.61885e+06B/404713W
Average Size: 5522.73b/690.342B/172.585W
% of file: 48.0645
Tot/Avg SubBlocks: 0/0
Tot/Avg Abbrevs: 7035/3
Tot/Avg Records: 120924/51.5667
% Abbrev Recs: 100

Isn't it nice to be able to optimizer bc size without touching the reader? :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36759 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
596983036159583d259cde72486897f60a96fe09 04-May-2007 Chris Lattner <sabre@nondot.org> where possible, encode symtab names with 7 bits per char instead of 8. This
shaves 110K off kc++ to 3514K. Before:

Block ID #14 (VALUE_SYMTAB):
Num Instances: 2345
Total Size: 1.50425e+07b/1.88031e+06B/470077W
Average Size: 6414.69b/801.837B/200.459W
% of file: 51.8057
Tot/Avg SubBlocks: 0/0
Tot/Avg Abbrevs: 2345/1
Tot/Avg Records: 120924/51.5667
% Abbrev Recs: 85.1791

after:

Block ID #14 (VALUE_SYMTAB):
Num Instances: 2345
Total Size: 1.41229e+07b/1.76536e+06B/441341W
Average Size: 6022.56b/752.82B/188.205W
% of file: 50.2295
Tot/Avg SubBlocks: 0/0
Tot/Avg Abbrevs: 4690/2
Tot/Avg Records: 120924/51.5667
% Abbrev Recs: 85.1791


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36758 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
2e7899dae991e4c3c0b0e967402d1c7ee348c1be 04-May-2007 Chris Lattner <sabre@nondot.org> Encode all value symtab strings as arrays of 8-bit fixed width integers,
instead of the default inefficient encoding. This shrinks kc++ from 4134K
to 3629K


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36755 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
15e6d170e8d4b99937d34aef2c02078247f4cdf7 04-May-2007 Chris Lattner <sabre@nondot.org> eliminate internal length fields from record. Records already know their
total length


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36752 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
07faafc8f95918b53f68862de60997a1f9c2751b 04-May-2007 Chris Lattner <sabre@nondot.org> stub out creation of BLOCKINFO_BLOCK


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36749 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
1d1f9ade541e43c57725cc6f5898d4891288a376 04-May-2007 Chris Lattner <sabre@nondot.org> fix encoding of invoke instructions. kc++ now round trips


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36737 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
9113e73ecf72b0a94715b3e204211e2c7f55dda7 04-May-2007 Chris Lattner <sabre@nondot.org> encode and read param attrs along with function type. WE can now roundtrip Olden/voronoi loslessly


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36735 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
f6f9cd1bf2e50244273cfdaf10573f10a545cdd5 04-May-2007 Chris Lattner <sabre@nondot.org> fix a bug encoding param attrs


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36730 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
f0a653199798978b869a29bd776d9a3b06828484 04-May-2007 Chris Lattner <sabre@nondot.org> add writer support for param attrs


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36724 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
62bbeea8ea526ffe20226c82a17ab51b7efa4a7e 04-May-2007 Chris Lattner <sabre@nondot.org> trivial scaffolding for param attrs


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36720 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
76520191abf157dfa2bcb473406193ab362480b6 04-May-2007 Chris Lattner <sabre@nondot.org> Encoding calling conv info in call/invoke instrs, tree add now round trips completely


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36707 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
38b12ce1864a49e1c00b2d9fb5da83c69f77fcec 04-May-2007 Chris Lattner <sabre@nondot.org> don't bother encoding # varargs


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
e825ed5a031937ad27d83bca12acf5533d7e0fae 04-May-2007 Chris Lattner <sabre@nondot.org> fix encoding of BB names in the symtab


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36704 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
f4c8e5243376af58e52c4a0930d838509bbbea2f 02-May-2007 Chris Lattner <sabre@nondot.org> add reader logic for terminator instrs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36642 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
f639875cd73902a29bc222d520cc0c45d379d137 02-May-2007 Chris Lattner <sabre@nondot.org> use the correct code for binop instrs


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36639 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
60ce9b5a0153a950328818dbeb79f6b8b2cb703e 01-May-2007 Chris Lattner <sabre@nondot.org> fix build with non-buggy compilers


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36621 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
be1f993f2d1d064de4451cb6d049304a3314d5c6 01-May-2007 Chris Lattner <sabre@nondot.org> write the symbol table for function bodies


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36610 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
d309c75b7d9513e04824c6630328e0ace3e6446c 01-May-2007 Chris Lattner <sabre@nondot.org> encode all of the instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36609 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
9cd3ccf5065a8a139e458d016c88a8512471598b 29-Apr-2007 Anton Korobeynikov <asl@math.spbu.ru> Implement visibility checking during linking. Also implement protected
visibility support for bitcode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
01b27458a170fdad6ab2a8f214e160f64477c978 29-Apr-2007 Chris Lattner <sabre@nondot.org> Fix this to use the right block ID


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36550 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
1a9df8eee0ac8cbabd887e924ddb07658ef5a9cc 29-Apr-2007 Chris Lattner <sabre@nondot.org> moved Writer.cpp -> BitcodeWriter.cpp to make it more unique in the tree.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36549 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
b9d0c2a6a0ef5e19b2d30180ce7d6a10ffa1f5c5 26-Apr-2007 Chris Lattner <sabre@nondot.org> start code for writing out instructions. Separate BB#s from normal value
#'s.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36472 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
8d35c79f273b74df1e95b4472620e31e81342037 26-Apr-2007 Chris Lattner <sabre@nondot.org> add support for incorporating and purging functions to the value enumerator


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36465 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
51d5f29c3f4e30edd3a95a520a6c0720603948d5 26-Apr-2007 Chris Lattner <sabre@nondot.org> improve a comment


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36464 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
198f34ac359c48018c6e1f784cf3770ead63b253 26-Apr-2007 Chris Lattner <sabre@nondot.org> move some code around, fix a bug in the reader reading globalinits (which
I just introduced), stub out function reading, purge aggregate values from
the value table before reading functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
07d98b4afbdcbb4eed048400d9116de1ec83e866 26-Apr-2007 Chris Lattner <sabre@nondot.org> add bitcode alias support


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36461 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
f581c3b81ee793ce1dcce4b4755393e56148ea68 24-Apr-2007 Chris Lattner <sabre@nondot.org> implement reading and writing of constant exprs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36394 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
631a8ed3ff72a25c03c61319e85ff49aa601d464 24-Apr-2007 Chris Lattner <sabre@nondot.org> fix off-by-one computing size for section abbrevs


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36388 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
2edd22b959f0d8f897cce397730a881c708e474a 24-Apr-2007 Chris Lattner <sabre@nondot.org> Emit module-level constants.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36384 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
b992be14bb1a04fc222684dfe6ba75df168d15ec 23-Apr-2007 Chris Lattner <sabre@nondot.org> write out the symtab for globals.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36374 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
d127c1b5f3785a4a957ccf70b79a96adfc223259 23-Apr-2007 Chris Lattner <sabre@nondot.org> implement reading of abbrevs, and writing of abbreviated global varrs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
36d5e7d31be61f631ace0488f0d6cd71b8f31a16 23-Apr-2007 Chris Lattner <sabre@nondot.org> first part of implementation of abbrevs. The writer isn't fully there yet and the
reader doesn't handle them at all yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36363 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
47f96bf24687b5068aec7166cb8b3ac33ae964ae 23-Apr-2007 Chris Lattner <sabre@nondot.org> promote LLVMBitCodes to be a public header


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36358 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
fd57cecd2cb3ac726942e0101de6a82dc5a958a6 22-Apr-2007 Chris Lattner <sabre@nondot.org> Initial support for writing bitcode files. This currently only writes types,
the type symtab, and global/function protos, and is missing the important
size optimization, but it is a place to start.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36331 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp