Commit Graph

26 Commits

Author SHA1 Message Date
Reid Spencer
3e59546352 Add a flag to identify bytecode files that have intrinsic functions that
need to be upgraded.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25445 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-19 06:57:58 +00:00
Chris Lattner
eebac5fee6 Use a map to cache the ModuleType information, so we can do logarithmic
lookups instead of linear time lookups.  This speeds up bc parsing of a
large file from

137.834u 118.256s 4:27.96
to
132.611u 114.436s 4:08.53

with a release build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23611 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-03 21:26:53 +00:00
Chris Lattner
fea493030b This is a dummy, it doesn't matter what the ValueType is
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22809 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-16 21:59:52 +00:00
Chris Lattner
3f6948d686 remove some dead (always dynamically false) flags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21752 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-06 22:35:09 +00:00
Misha Brukman
8a96c53d36 Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21417 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 21:44:41 +00:00
Chris Lattner
cad28bd3a0 Adjust to changes in User class and minor changes in instruction ctors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19894 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-29 00:36:19 +00:00
Chris Lattner
389bd04b96 Remove a dead field, make the map go to integer type ID to hash better and
avoid a getType.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18691 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-09 06:19:44 +00:00
Chris Lattner
1992522abd Cleanups. Null out pointer after freeing it for paranoia
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17855 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-15 21:55:06 +00:00
Reid Spencer
d3539b8a5e Simplify handling of decompression
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17769 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:00:09 +00:00
Reid Spencer
36eea80616 Add comments per CL code review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17578 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-07 18:19:00 +00:00
Reid Spencer
17f52c5c46 Add support for compressed bytecode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17535 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-06 23:17:23 +00:00
Chris Lattner
a79e7cca0d Add support for undef, unreachable, and function flags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17054 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-16 18:18:16 +00:00
Chris Lattner
1c765b0037 Fit to 80 cols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16964 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-14 01:49:34 +00:00
Reid Spencer
572c256519 Add boolean file format flags in preparation for version 5 bytecode.
Remove the "processFunctions" boolean from ParseBytecode as it is no
longer needed. This is part of avoiding double reading of functions
when analyzing bytecode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15982 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-21 20:50:49 +00:00
Reid Spencer
38d54be85b Bytecode File Format Changes:
- File format version number bumped to 4
- Writer will now align nothing
- Reader now only expects alignment for version 3 or earlier


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15875 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-17 07:45:14 +00:00
Chris Lattner
2c6c14d1a5 Make getGlobalTableValue not use getTypeSlot, this speeds up the bc reader
by 5% on eon


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15452 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 00:19:23 +00:00
Chris Lattner
45b5dd2918 Do not do a linear std::find to reconstruct information we had, but later threw
away.  This speeds up by .bc reader by 30% in a profile build on 252.eon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15450 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-03 23:41:28 +00:00
Reid Spencer
7d146e1107 Don't create a backwards compatibility flag for something that was a
regression bug introduced in release 1.2


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15219 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-25 21:32:51 +00:00
Reid Spencer
ad89bd6a1a bug 263:
- encode/decode target triple and dependent libraries
bug 401:
- fix encoding/decoding of FP values to be little-endian only
bug 402:
- initial (compatible) cut at 24-bit types instead of 32-bit
- reduce size of block headers by 50%
Other:
- cleanup Writer by consolidating to one compilation unit, rem. other files
- use a std::vector instead of std::deque so the buffer can be allocated
  in multiples of 64KByte chunks rather than in multiples of some smaller
  (default) number.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15210 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-25 18:07:36 +00:00
Reid Spencer
89fc0e3ce0 User ValueListTy as the type of the ValueList. This avoides the ValueList
from being treated like a Function which can cause the contents of the list
to be come invalidated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14940 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-18 00:13:12 +00:00
Reid Spencer
66906518ed - Rename two methods to give them more meaning
- Add read_float and read_double in preparation for a correct
  implementation of bytecode floating point support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14764 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-11 17:24:05 +00:00
Reid Spencer
2439972a61 Error Handling Cleanup:
- get rid of PARSE_ERROR macro
- add error(std::string) function
- use error(std::string) for all errors
- make input dependent asserts call error(std::string) instead
- ensure asserts are only for logic bugs, not input discrepancies.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14729 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-09 22:21:33 +00:00
Reid Spencer
ba466362c4 Remove definition and use of OtherVal enumerator. This just fixes a thinko.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14634 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-06 01:30:36 +00:00
Reid Spencer
5c15fe5cf8 Finalize bytecode dumping. The "handleFinish" method was getting called
too soon so the function data was not getting dumped (it was generated
after the call handleFinish). Also cleaned up the output format for
proper indentation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14627 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-05 00:57:50 +00:00
Reid Spencer
a86159cd4b - Make ValueList an "OtherVal" user of Values to ensure it doesn't get
mistaken for anything else.
- Move function descriptions to Reader.cpp file per Chris.
- Remove tabs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14602 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 11:04:56 +00:00
Reid Spencer
f89143c7de This is a slimming down of the previous ReaderInternals.h that just
declares the BytecodeReader class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14495 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-29 23:31:01 +00:00