Commit Graph

317 Commits

Author SHA1 Message Date
Reid Spencer
61aaf2e0af Simplify decompression code by using the high level interface to the Compressor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17768 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 21:59:21 +00:00
Misha Brukman
a3e6ad62f3 Mark an unmaterialized function as having GhostLinkage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17748 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 21:02:55 +00:00
John Criswell
b5810282ee Recognize compressed LLVM bytecode files.
This should fix the problem of not being able to link compressed LLVM
bytecode files from LLVM libraries.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17648 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-09 19:37:07 +00:00
Reid Spencer
f0c977cbac * Comments & cleanup per CL code review.
* Accept 'llvc' as signature for compressed bytecode


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17579 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-07 18:20:55 +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
Reid Spencer
2bcfcbe795 Implement the GetBytecodeSymbols interface function to extract just the
externally visible defined symbols from a bytecode file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17503 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-06 08:56:40 +00:00
Reid Spencer
06aada9ebd Fix library name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17305 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-28 05:32:01 +00:00
Reid Spencer
cac731ecbe We won't use automake
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17155 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-22 03:35:04 +00:00
Reid Spencer
86d341b204 Initial automake generated Makefile template
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17136 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-18 23:55:41 +00:00
Chris Lattner
2e7ec128f9 Do not erroneously accept revision 6 bytecode files when the format hasn't
been defined yet!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17063 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-16 18:56:02 +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
4a8167fe5c Don't print a bunch of metrics that are meaningless for external functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17017 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-15 19:40:31 +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
Chris Lattner
4a242b32f6 Fit in 80 columns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16962 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-14 01:39:18 +00:00
Reid Spencer
d96cb6eaa0 Update to reflect changes in Makefile rules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16950 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-13 11:46:52 +00:00
Reid Spencer
9f41a5fe85 Initial version of automake Makefile.am file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16885 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-10 20:43:57 +00:00
Misha Brukman
44666b15b1 Fix doxygen comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16542 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-28 16:57:46 +00:00
Chris Lattner
56bc894d06 The system ranlib on darwin occasionally adds two extra newlines to the
end of files, breaking the CFE build.  As a gross hack around this,
ignore any trailing garbage on bytecode files.  Thanks to Brian for digging
in and identifying the problem.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16525 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-27 16:59:06 +00:00
Reid Spencer
2da5c3dda6 Convert code to compile with vc7.1.
Patch contributed by Paolo Invernizzi. Thanks Paolo!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16368 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-15 17:06:42 +00:00
Misha Brukman
5adf0ca0b2 Unbreak doxygen, according to Reid.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16298 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-12 20:56:38 +00:00
Misha Brukman
7df0074db5 Fix code spacing/alignment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16297 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-12 20:47:33 +00:00
Reid Spencer
46a981c3e2 Change interface to use correct typedef so it will always compile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16281 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-11 04:22:58 +00:00
Reid Spencer
3ee8eed034 Print the dependent libraries when dumping bytecode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16275 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-11 04:14:07 +00:00
Alkis Evlogimenos
20aa474f8f Fixes to make LLVM compile with vc7.1.
Patch contributed by Paolo Invernizzi!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16152 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-03 18:19:51 +00:00
Reid Spencer
551ccae044 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-01 22:55:40 +00:00
Reid Spencer
488d73a8b7 Correctly compute the number of compaction tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16064 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-27 00:43:51 +00:00
Reid Spencer
e0cf59e52f Add a wrapper for extraction of the dependent libraries from a bytecode
file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16037 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-24 22:46:20 +00:00
Reid Spencer
3120e714e6 Rearrange output a little to make it nicer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16036 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-24 22:45:32 +00:00
Reid Spencer
911ec6d1c0 Bytecode Analyzer Cleanup:
- Rearrange output order to make more sense
- Make only the function level output count as "detailed"
- Output dump output directly to stream, don't buffer it.
- Fix counting of block sizes
- Implement new handlers for number of types, dependent libs, target triple
- Compute the size of block headers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15985 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-21 20:58:19 +00:00
Reid Spencer
af073bdee6 Get rid of an extraneous local variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15984 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-21 20:53:56 +00:00
Reid Spencer
4542c43761 Two Changes:
- Pass the output stream to the analyzer so it can write its output there
  directly instead of buffering it.
- Don't pass a boolean to ParseBytecode because its not needed any more.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15983 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-21 20:52:03 +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
5b472d9879 Bytecode Reader Cleanup:
- provide the correct conversion for ModuleBlockID in read_block (a potential
  bug but not actually exploited because reading module block ids doesn't
  use read_block).
- install support for handleTypeList handler
- install support for handleDependentLibrary handler
- install support for handleTargetTriple handler
- clean up comments, output strings,
- ensure that processing function arguments doesn't SIGSEGV if one of the
  arguments is a null pointer (yeah, it happened .. weird)
- prepare for version 5 bytecode by documenting what will change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15981 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-21 20:49:23 +00:00
Brian Gaeke
715c90ba52 Packed types, brought to you by Brad Jones
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15938 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-20 06:00:58 +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
Reid Spencer
9a7e0c5366 Turn a use of intptr_t into a reinterpret_cast<uint64_t> instead to get
rid of compilation warnings on some platforms.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15512 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 22:56:46 +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
Chris Lattner
bcb11cf132 Simplify code and silence warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15255 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 02:34:49 +00:00
Chris Lattner
1d78516c65 Fix a serious bug in the double constant reader. In particular, because
(At[3] << 24) is an int type and it is being coerced to uint64_t, it was
getting sign extended, causing us to get FFFFFFFFxxxxxxxx constants all of
the time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15224 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-25 23:15:44 +00:00
Reid Spencer
ada1618afa Always write FP values correctly.
Adjust for new Module.h interface for dependent libraries.
Excise unused backwards compatibility flag.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15220 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-25 21:36:26 +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
a86037e4d9 bug 122:
- Replace ConstantPointerRef usage with GlobalValue usage
- Correct isa<Constant> for GlobalValue subclass


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14939 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-18 00:12:03 +00:00
Reid Spencer
3c90f9fd12 bug 122:
- Update for BytecodeHandler interface change resuing from CPRs going away


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14938 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-18 00:10:36 +00:00
Brian Gaeke
fe2102b61d Actually set the endian/pointersize flags on the module being read in!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14826 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-14 20:33:13 +00:00
Brian Gaeke
0859e52582 Fix warning on SparcV9, where sizeof (int) != sizeof (void *).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14786 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-13 07:37:43 +00:00
Reid Spencer
46b002cd9b Various cleanups:
- Remove tabs
- Standardize use of space around ( and ).
- Consolidate the ConstantPlaceHolder class
- Rename two methods to be more meaningful (ParseType, ParseTypes)
- Correct indentation of blocks
- Add documentation
- Convert input dependent asserts to error(...) so it throws instead.
Provide placeholder implementations of read_float and read_double that
still read in platform-specific endianess. When I figure out how to do
this without knowing the endianess of the platform, it will get implemented
correctly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14765 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-11 17:28:43 +00:00