Reid Spencer
8a3312cab3
Compute the firstFileOffset correctly after reading the LLVM symbol table.
...
llvm-svn: 18300
2004-11-28 03:13:02 +00:00
Reid Spencer
af6fd29a08
Adjust to Compressor interface change
...
llvm-svn: 18249
2004-11-25 19:38:05 +00:00
Reid Spencer
a193f3cdbf
Allow reading of member names that begin with an _ character.
...
llvm-svn: 18179
2004-11-23 22:35:39 +00:00
Reid Spencer
db372c707b
Fix a comment to imply the correct semantics.
...
llvm-svn: 18097
2004-11-22 02:58:47 +00:00
Reid Spencer
7a32486483
Distinguish between BSD4.4 and SVR4 symbol tables
...
llvm-svn: 18044
2004-11-20 07:29:40 +00:00
Reid Spencer
78e12c73e5
Correct the computation of when to add the padding. It is not based on the
...
member's size. It is based on the oddness/evenness of the file pointer.
This fixes a bug with llvm-ar not being able to read archives produced by
llvm-ranlib when there are members with odd long file name lengths.
llvm-svn: 17997
2004-11-19 17:08:00 +00:00
Chris Lattner
ddf3b7997f
Add note that this is for old bytecode files.
...
llvm-svn: 17991
2004-11-19 16:24:05 +00:00
Reid Spencer
fc9f779039
Don't save an iterator, just use post-increment.
...
llvm-svn: 17981
2004-11-19 03:44:10 +00:00
Reid Spencer
39a0347b79
Make findModulesDefiningSymbols modify its symbols argument so we can \
...
eliminate symbols defined by the archive efficiently
llvm-svn: 17976
2004-11-19 03:18:22 +00:00
Reid Spencer
67c46c8d70
Fix some things for Mac OSX archives:
...
* ensure trailing spaces are eliminated so they don't factor into the
length of a member's name.
* make sure all the bytes of a name are written even if the name ends in
multiple null characters (bug in OSX ar)
* make sure we provide the full member name when searching for symbols so
the module name is not accidentally duplicated.
llvm-svn: 17918
2004-11-17 18:28:29 +00:00
Reid Spencer
b58bf5fa28
Make sure we parse bytecode with a module identifier that reflects the full
...
name of the module: "Archive.a(object.o)"
llvm-svn: 17917
2004-11-17 18:25:21 +00:00
Reid Spencer
1154bb6b43
Adjust long file name writing to match BSD 4.4 and Mac OSX style archives.
...
llvm-svn: 17910
2004-11-17 16:14:21 +00:00
Reid Spencer
0dea46fe67
Despite documentation to the contrary, Mac OSX and BSD 4.4 archive formats
...
*do* include the length of the long file in the length of the member and
they are *not* null terminated.
llvm-svn: 17909
2004-11-17 16:13:11 +00:00
Reid Spencer
4c66d89b33
Fix typeo in comment.
...
llvm-svn: 17892
2004-11-16 07:05:16 +00:00
Reid Spencer
8d784fbd3f
Per code review:\
...
* Make the numVbrBytes function more efficient and better documented \
* Fix a bug in name truncation \
* Add comments before functions \
* Get rid of functions that are now inlined into the header \
* Do not have Archive doing symbol table printing \
* Put assert comments into the assert so they print out \
* Make sure foreign symbol tables are written
llvm-svn: 17884
2004-11-16 06:47:30 +00:00
Reid Spencer
4abd79e8ea
Per code review:\
...
* Make sure we write out the foreign symbol table if we read one \
* Make the padding calculation more efficiently and avoid Solaris warnings
llvm-svn: 17883
2004-11-16 06:47:19 +00:00
Reid Spencer
40878f35de
Per code review:\
...
* Make sure all members are initialized upon construction
llvm-svn: 17882
2004-11-16 06:47:07 +00:00
Reid Spencer
2df70a7e2f
Per code review:\
...
* Get rid of memory leaks on exception \
* Provide better comments of how the memory handling works
llvm-svn: 17876
2004-11-16 06:41:05 +00:00
Chris Lattner
3b6bb48c16
Do not emit FunctionBlock blocks for external functions. This shrinks
...
bytecode files by about 8 bytes per external function
llvm-svn: 17859
2004-11-15 22:39:49 +00:00
Chris Lattner
642f8c5ed4
Use a per-function flag bit to indicate whether or not there is a function
...
body for the function.
llvm-svn: 17858
2004-11-15 22:38:52 +00:00
Chris Lattner
9b457e1c73
Disable this change, it was premature
...
llvm-svn: 17857
2004-11-15 21:56:33 +00:00
Chris Lattner
7d04cdab77
Make *SURE* to null out the pointer before throwing an exception, otherwise
...
the dtor for the BytecodeReader class will try to free it again!
llvm-svn: 17856
2004-11-15 21:55:33 +00:00
Chris Lattner
36c95e38b0
Cleanups. Null out pointer after freeing it for paranoia
...
llvm-svn: 17855
2004-11-15 21:55:06 +00:00
Chris Lattner
94bd315c3f
If a function is external, do not output a FunctionBlock for the function
...
AT ALL. This saves 11 bytes per external function from the bytecode file,
and is also required to make GhostLinkage work.
llvm-svn: 17854
2004-11-15 21:46:40 +00:00
Chris Lattner
55d85402f6
Make functions default to having external linkage if they have no
...
FunctionBlock.
llvm-svn: 17853
2004-11-15 21:43:03 +00:00
Reid Spencer
cbd9aeb587
* Make sure the string table gets read even if there isn't a foreign
...
symbol table.
* Make sure we update the file pointer for each member when rebuilding the
symbol table.
llvm-svn: 17812
2004-11-15 01:40:20 +00:00
Reid Spencer
fcf5ef7a4a
Changes necessary to enable linking of archives without LLVM symbol tables.
...
llvm-svn: 17811
2004-11-15 01:20:11 +00:00
Reid Spencer
6456d2f26d
Moved to lib/Bytecode/Archive.
...
llvm-svn: 17800
2004-11-14 22:38:32 +00:00
Reid Spencer
71f51e603c
Simplify compression code by using the high level interface to the Compressor
...
llvm-svn: 17771
2004-11-14 22:01:41 +00:00
Reid Spencer
0ce0d938b1
Add wrappers to get defined symbols from bytecode
...
llvm-svn: 17770
2004-11-14 22:00:48 +00:00
Reid Spencer
f01fc688ba
Simplify handling of decompression
...
llvm-svn: 17769
2004-11-14 22:00:09 +00:00
Reid Spencer
0e36b8afb9
Simplify decompression code by using the high level interface to the Compressor
...
llvm-svn: 17768
2004-11-14 21:59:21 +00:00
Reid Spencer
f0c201b34d
Completely rewritten to allow reading of archives and symbol table lookup in a more efficient manner.
...
llvm-svn: 17767
2004-11-14 21:58:33 +00:00
Reid Spencer
948ff3d628
Implementation declarations for Archive
...
llvm-svn: 17766
2004-11-14 21:57:46 +00:00
Reid Spencer
ba09b3bf28
First working version
...
llvm-svn: 17765
2004-11-14 21:56:59 +00:00
Reid Spencer
044adab53a
Add the Archive library
...
llvm-svn: 17764
2004-11-14 21:55:27 +00:00
Misha Brukman
b2e062c9d5
Mark an unmaterialized function as having GhostLinkage
...
llvm-svn: 17748
2004-11-14 21:02:55 +00:00
Reid Spencer
b9e561e90c
Moved to lib/Bytecode/Archive in preparation for re-write.
...
llvm-svn: 17742
2004-11-14 19:59:40 +00:00
John Criswell
623dc9c5c0
Recognize compressed LLVM bytecode files.
...
This should fix the problem of not being able to link compressed LLVM
bytecode files from LLVM libraries.
llvm-svn: 17648
2004-11-09 19:37:07 +00:00
Reid Spencer
796e531721
* Comments & cleanup per CL code review.
...
* Accept 'llvc' as signature for compressed bytecode
llvm-svn: 17579
2004-11-07 18:20:55 +00:00
Reid Spencer
899ad356f5
Add comments per CL code review.
...
llvm-svn: 17578
2004-11-07 18:19:00 +00:00
Reid Spencer
f3e639fc6a
* Add comments and cleanup per CL code review
...
* Make signature for compressed bytecode llvc instead of unreadable
* Make the CompressionContext have a constructor and destructor.
llvm-svn: 17576
2004-11-07 18:17:38 +00:00
Reid Spencer
2e49204e0f
Add support for compressed bytecode
...
llvm-svn: 17535
2004-11-06 23:17:23 +00:00
Reid Spencer
c686a2b64b
Implement the GetBytecodeSymbols interface function to extract just the
...
externally visible defined symbols from a bytecode file.
llvm-svn: 17503
2004-11-06 08:56:40 +00:00
Reid Spencer
0f8359b061
Makefile for the LLVMArchive library.
...
llvm-svn: 17500
2004-11-06 08:52:36 +00:00
Reid Spencer
0cc653e59b
First kinda/sorta working version of the Archive library. Reading is not
...
yet supported but writing works. Way too early to review this. More to come
llvm-svn: 17499
2004-11-06 08:51:45 +00:00
Reid Spencer
49cc2cf279
Fix library name.
...
llvm-svn: 17305
2004-10-28 05:32:01 +00:00
Reid Spencer
37d45f6934
Fix name of library
...
llvm-svn: 17304
2004-10-28 05:30:54 +00:00
Chris Lattner
3ff9289476
Fix the previous bug the correct way. This fixes ptrdist/bc
...
llvm-svn: 17201
2004-10-24 04:27:59 +00:00
Chris Lattner
46131bd16f
Fix a bug that Brian brought to my attention. This corrects:
...
Assembler/2004-10-22-BCWriterUndefBug.llx
llvm-svn: 17177
2004-10-23 03:10:23 +00:00
Reid Spencer
c1c320c335
We won't use automake
...
llvm-svn: 17155
2004-10-22 03:35:04 +00:00
Reid Spencer
6a11a75f31
Initial automake generated Makefile template
...
llvm-svn: 17136
2004-10-18 23:55:41 +00:00
Chris Lattner
eba3f46b2f
Do not erroneously accept revision 6 bytecode files when the format hasn't
...
been defined yet!
llvm-svn: 17063
2004-10-16 18:56:02 +00:00
Chris Lattner
770709befe
Add support for undef, unreachable, and function flags
...
llvm-svn: 17054
2004-10-16 18:18:16 +00:00
Chris Lattner
c4f93ac159
There is no reason not to build these in parallel
...
llvm-svn: 17023
2004-10-15 23:22:15 +00:00
Chris Lattner
0bc0f1d8de
Don't print a bunch of metrics that are meaningless for external functions
...
llvm-svn: 17017
2004-10-15 19:40:31 +00:00
Chris Lattner
9a0e2546a0
Today is not my day. Fix broken #
...
llvm-svn: 16967
2004-10-14 02:31:35 +00:00
Chris Lattner
bff972d453
unbreak previous checkin :(
...
llvm-svn: 16966
2004-10-14 02:06:48 +00:00
Chris Lattner
e8fe2c2418
Add back a missing paren
...
llvm-svn: 16965
2004-10-14 01:57:28 +00:00
Chris Lattner
315157df62
Fit to 80 cols
...
llvm-svn: 16964
2004-10-14 01:49:34 +00:00
Chris Lattner
3d98008553
Wrap to 80 cols, delete some seriously old debugging printouts
...
llvm-svn: 16963
2004-10-14 01:46:07 +00:00
Chris Lattner
da6a885076
Fit in 80 columns
...
llvm-svn: 16962
2004-10-14 01:39:18 +00:00
Chris Lattner
eddbc20e2e
Minor cleanups
...
llvm-svn: 16961
2004-10-14 01:35:17 +00:00
Reid Spencer
ace94df71f
Update to reflect changes in Makefile rules.
...
llvm-svn: 16950
2004-10-13 11:46:52 +00:00
Reid Spencer
b84cbf2725
Initial version of automake Makefile.am file.
...
llvm-svn: 16885
2004-10-10 20:43:57 +00:00
Misha Brukman
349717934a
Fix doxygen comment
...
llvm-svn: 16542
2004-09-28 16:57:46 +00:00
Chris Lattner
d7dc1ecd42
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.
llvm-svn: 16525
2004-09-27 16:59:06 +00:00
Reid Spencer
6614946443
Convert code to compile with vc7.1.
...
Patch contributed by Paolo Invernizzi. Thanks Paolo!
llvm-svn: 16368
2004-09-15 17:06:42 +00:00
Misha Brukman
14756e8e1c
Unbreak doxygen, according to Reid.
...
llvm-svn: 16298
2004-09-12 20:56:38 +00:00
Misha Brukman
dbcd4fda49
Fix code spacing/alignment
...
llvm-svn: 16297
2004-09-12 20:47:33 +00:00
Reid Spencer
14072a3f54
Change interface to use correct typedef so it will always compile.
...
llvm-svn: 16281
2004-09-11 04:22:58 +00:00
Reid Spencer
c90a765368
Print the dependent libraries when dumping bytecode.
...
llvm-svn: 16275
2004-09-11 04:14:07 +00:00
Alkis Evlogimenos
a5c04ee50f
Fixes to make LLVM compile with vc7.1.
...
Patch contributed by Paolo Invernizzi!
llvm-svn: 16152
2004-09-03 18:19:51 +00:00
Reid Spencer
7c16caa336
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/.
llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Reid Spencer
366c457e08
Correctly compute the number of compaction tables.
...
llvm-svn: 16064
2004-08-27 00:43:51 +00:00
Reid Spencer
248c06dcea
Prevent an empty compaction table from being written to the bytecode file.
...
llvm-svn: 16063
2004-08-27 00:38:44 +00:00
Reid Spencer
3b789ad2b8
Add the CompactionTableIsEmpty function so that we can determine if a
...
CompactionTable really needs to be emitted. This is not a straight forward
computation, hence the need for a member function here.
llvm-svn: 16062
2004-08-26 22:32:00 +00:00
Reid Spencer
79725deeb0
Add a wrapper for extraction of the dependent libraries from a bytecode
...
file.
llvm-svn: 16037
2004-08-24 22:46:20 +00:00
Reid Spencer
f341d29514
Rearrange output a little to make it nicer.
...
llvm-svn: 16036
2004-08-24 22:45:32 +00:00
Reid Spencer
2807accdc5
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.
llvm-svn: 15985
2004-08-21 20:58:19 +00:00
Reid Spencer
9874c63314
Get rid of an extraneous local variable.
...
llvm-svn: 15984
2004-08-21 20:53:56 +00:00
Reid Spencer
6639333f20
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.
llvm-svn: 15983
2004-08-21 20:52:03 +00:00
Reid Spencer
8631bc3aaa
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.
llvm-svn: 15982
2004-08-21 20:50:49 +00:00
Reid Spencer
191aa30ac1
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.
llvm-svn: 15981
2004-08-21 20:49:23 +00:00
Brian Gaeke
0220904e7a
Packed types, brought to you by Brad Jones
...
llvm-svn: 15938
2004-08-20 06:00:58 +00:00
Reid Spencer
c3e436427b
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
llvm-svn: 15875
2004-08-17 07:45:14 +00:00
Reid Spencer
f8a18099fb
Correct the comments in the symbol table writer to reflect reality.
...
llvm-svn: 15848
2004-08-17 02:59:02 +00:00
Reid Spencer
24fa5fd29b
Turn a use of intptr_t into a reinterpret_cast<uint64_t> instead to get
...
rid of compilation warnings on some platforms.
llvm-svn: 15512
2004-08-04 22:56:46 +00:00
Alkis Evlogimenos
832437255d
Stop using getValues().
...
llvm-svn: 15487
2004-08-04 08:44:43 +00:00
Chris Lattner
bba09b3f7f
Make getGlobalTableValue not use getTypeSlot, this speeds up the bc reader
...
by 5% on eon
llvm-svn: 15452
2004-08-04 00:19:23 +00:00
Chris Lattner
cd84396b58
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.
llvm-svn: 15450
2004-08-03 23:41:28 +00:00
Alkis Evlogimenos
fd7a2d4477
Merge i*.h headers into Instructions.h as part of bug403.
...
llvm-svn: 15325
2004-07-29 12:17:34 +00:00
Chris Lattner
7ef55da237
Simplify code and silence warning
...
llvm-svn: 15255
2004-07-27 02:34:49 +00:00
Chris Lattner
74635dc879
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.
llvm-svn: 15224
2004-07-25 23:15:44 +00:00
Reid Spencer
9a5f371ce9
Always write FP values correctly.
...
Adjust for new Module.h interface for dependent libraries.
Excise unused backwards compatibility flag.
llvm-svn: 15220
2004-07-25 21:36:26 +00:00
Reid Spencer
bd72920331
Don't create a backwards compatibility flag for something that was a
...
regression bug introduced in release 1.2
llvm-svn: 15219
2004-07-25 21:32:51 +00:00
Reid Spencer
b95885b210
Adjust to new Module.h interface for dependent libraries.
...
llvm-svn: 15218
2004-07-25 21:32:02 +00:00
Reid Spencer
b2bdb943b5
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.
llvm-svn: 15210
2004-07-25 18:07:36 +00:00
Reid Spencer
30d69a5af9
bug 122:
...
- Replace ConstantPointerRef usage with GlobalValue usage
- Minimize redundant isa<GlobalValue> usage
- Correct isa<Constant> for GlobalValue subclass
llvm-svn: 14942
2004-07-18 00:18:30 +00:00
Reid Spencer
51fe3361b6
bug 122:
...
- Correct ordering of tests because for GlobalValue isa Constant
llvm-svn: 14941
2004-07-18 00:16:21 +00:00
Reid Spencer
1d8d08f34a
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.
llvm-svn: 14940
2004-07-18 00:13:12 +00:00
Reid Spencer
db1863d50c
bug 122:
...
- Replace ConstantPointerRef usage with GlobalValue usage
- Correct isa<Constant> for GlobalValue subclass
llvm-svn: 14939
2004-07-18 00:12:03 +00:00
Reid Spencer
edbb40b23c
bug 122:
...
- Update for BytecodeHandler interface change resuing from CPRs going away
llvm-svn: 14938
2004-07-18 00:10:36 +00:00
Chris Lattner
fcdab1b5f5
Fix for PR341
...
llvm-svn: 14845
2004-07-15 02:40:04 +00:00
Brian Gaeke
def1a51232
Actually set the endian/pointersize flags on the module being read in!
...
llvm-svn: 14826
2004-07-14 20:33:13 +00:00
Brian Gaeke
b88d2a44f9
Fix warning on SparcV9, where sizeof (int) != sizeof (void *).
...
llvm-svn: 14786
2004-07-13 07:37:43 +00:00
Chris Lattner
420fd1425d
Fix unused var warning
...
llvm-svn: 14775
2004-07-12 20:29:52 +00:00
Reid Spencer
194c576efc
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.
llvm-svn: 14765
2004-07-11 17:28:43 +00:00
Reid Spencer
db3bf19ad0
- 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.
llvm-svn: 14764
2004-07-11 17:24:05 +00:00
Reid Spencer
cf5c6e4adb
Remove tabs.
...
llvm-svn: 14763
2004-07-11 17:22:51 +00:00
Reid Spencer
a64b62ef6a
Prepare the writer for a non-broken implementation of writing floating
...
point values. This will be fixed when I figure out how to do it correctly
without depending on knowing the endianess of a platform.
llvm-svn: 14762
2004-07-11 17:22:07 +00:00
Reid Spencer
e5e19daa1b
Make the VBRSavings percentage make sense (as a fraction of the total
...
expanded size instead of the file size). Thanks Chris.
llvm-svn: 14731
2004-07-10 08:04:13 +00:00
Reid Spencer
f3905c8511
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.
llvm-svn: 14729
2004-07-09 22:21:33 +00:00
Reid Spencer
6a218134e3
Fix a backwards compatibility bug found by Tanya. In version 1.2, the
...
global type plane starts with a length and the TypeTyID value to identify
the type plane has having type definitions. This doesn't happen in 1.3
because the types are read from a known position in the file. However, the
TypeTyID must be read in (and ignored) if its a 1.2 bytecode file.
llvm-svn: 14728
2004-07-09 21:13:53 +00:00
Reid Spencer
987e503e2e
Remove definition and use of OtherVal enumerator. This just fixes a thinko.
...
llvm-svn: 14634
2004-07-06 01:30:36 +00:00
Reid Spencer
02b6708e01
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.
llvm-svn: 14627
2004-07-05 00:57:50 +00:00
Reid Spencer
bf2bce3f74
Implementation of SlotTable went into header file. Note that this header
...
is currently not being used but is retained because it will be the basis
for a clean up of the SlotCalculator class.
llvm-svn: 14612
2004-07-04 11:47:22 +00:00
Reid Spencer
2fa95bcd68
Remove Tabs.
...
llvm-svn: 14611
2004-07-04 11:46:15 +00:00
Reid Spencer
a52b0009ea
Implement new output functions for types and compacted type planes. Also
...
remove use of Type::TypeTyID and Type::TypeTy since Type no longer inherits
Value.
llvm-svn: 14610
2004-07-04 11:45:47 +00:00
Reid Spencer
3cdb4e88e5
Add new methods outputTypes and outputCompactionTypes for handling Types
...
separately from Values. This needed for bug 122.
llvm-svn: 14609
2004-07-04 11:44:27 +00:00
Reid Spencer
88f3e0731e
For bug 122:
...
Separate Types from Values because Type no longer inherits from Value. The
changes for this are too numerous to list. In essence, any data structure
that contained a Value was doubled so that Types could be contained
similarly. New members include Types, TypeMap, CompactionTypes, and
CompactionTypeMap. Functions taking a Value* were overloaded with a variant
that takes a Type* that acts on the new data structures.
llvm-svn: 14608
2004-07-04 11:42:49 +00:00
Reid Spencer
25319569fb
- Type::TypeTyID doesn't exist any more (bug 122)
...
- Types don't have names any more, just write them on ostream directly
llvm-svn: 14606
2004-07-04 11:37:54 +00:00
Reid Spencer
5ef4237089
Move SlotCalculator.h to lib/Bytecode/Writer since that is the only place
...
that needs it after the Type != Value changes (bug 122).
llvm-svn: 14605
2004-07-04 11:36:31 +00:00
Reid Spencer
bc70f74825
- Don't use macros to call the BytecodeHandler
...
- Don't use PARSE_ERROR macro unnecessarily (for simple strings)
- Add comments before each function
- Convert for bug 122 (Type != Value)
- Handle new value range on Type::PrimitiveTypeId enumeration by augmenting
the reader with a new read_typeid method and sanitizeTypeId method.
- Remove BytecodeHandler's default method implementations to header file.
llvm-svn: 14604
2004-07-04 11:33:49 +00:00
Reid Spencer
e6c95490a0
- 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.
llvm-svn: 14602
2004-07-04 11:04:56 +00:00
Reid Spencer
0421e6c843
Remove tabs. Move function declaration to Reader.h where it belongs.
...
llvm-svn: 14601
2004-07-04 11:03:03 +00:00
Reid Spencer
646f829e33
Add #include <iostream> which is needed now that Value.h doesn't include it
...
llvm-svn: 14600
2004-07-04 11:01:27 +00:00
Reid Spencer
6eecc40b2d
Excise tabs.
...
llvm-svn: 14599
2004-07-04 11:00:39 +00:00
Reid Spencer
fddebf7ff2
Remove files no longer needed. ConstantReader and InstructionReader were
...
integrated into Reader. Parser.* was just a bad idea. AnalyzerInternals.h
is no longer needed. ReaderPrimitives.h was integrated into Reader.h and
Reader.cpp. Dumper.cpp was integrated into Analyzer.cpp. ReaderInternals.h
became Reader.h. AnalyzerWrappers.cpp was integerated into
ReaderWrappers.cpp
llvm-svn: 14496
2004-06-29 23:32:41 +00:00
Reid Spencer
f4ec6383c0
This is a slimming down of the previous ReaderInternals.h that just
...
declares the BytecodeReader class.
llvm-svn: 14495
2004-06-29 23:31:01 +00:00
Reid Spencer
284b7c7174
MAJOR REWRITE.
...
- stop passing Buf/BufEnd to every function (now member vars)
- internalize things that used to be in a header file that no one else
included/needed.
- Remove defunct BCR_TRACE lines
- Standardize error handling with the PARSE_ERROR macro.
- Integrate ConstantReader.cpp and InstructionReader.cpp and reorgnize
the definition order so that gcc has a chance at optimizing this module
- Standardize case and style of method names.
- Eliminate unneeded header files
- Prepare for Type != Value (bug122) change by splitting Types into their
own data structures.
- Implement the BytecodeHandler interface calls.
- Provide default implementation of BytecodeHandler interface.
llvm-svn: 14494
2004-06-29 23:29:38 +00:00
Reid Spencer
891cb9d925
Adjustments to allow Bytecode Reading to support the BytecodeHandler
...
interface which is called by the reader if a BytecodeHandler is provided.
llvm-svn: 14493
2004-06-29 23:24:14 +00:00
Reid Spencer
351f6bf714
Merge Dumper.cpp and AnalyzerWrappers.cpp into this file. Also, adjust the
...
dumping facility to produce useful output.
llvm-svn: 14492
2004-06-29 23:23:12 +00:00
Reid Spencer
c7b9419add
Analyzer moved to ../Reader directory.
...
llvm-svn: 14491
2004-06-29 23:21:53 +00:00
Reid Spencer
75923a4f93
Remove newly defunct Analyzer directory.
...
llvm-svn: 14490
2004-06-29 23:21:16 +00:00
Chris Lattner
4ba8a8d1ef
No functionality changes here:
...
* Some warning fixes for MSVC
* Minor simplification to the deque scanning code
llvm-svn: 14417
2004-06-25 20:52:10 +00:00
Chris Lattner
ccd8ed145a
Fix more warnings building with VC++
...
llvm-svn: 14391
2004-06-25 00:35:55 +00:00
Chris Lattner
521eb8752b
fix warnings
...
llvm-svn: 14388
2004-06-25 00:11:25 +00:00
Chris Lattner
6b7275996c
Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()
...
llvm-svn: 14201
2004-06-17 18:19:28 +00:00
Reid Spencer
c0999e134e
Implement tracking of bytecode instruction size and the number of long
...
instructions generated.
llvm-svn: 14154
2004-06-11 15:10:38 +00:00
Reid Spencer
c22be9f9d5
Revert an unneeded interface change to Instruction.h
...
llvm-svn: 14137
2004-06-11 03:06:43 +00:00
Reid Spencer
8395e67fb1
Remove tabs.
...
llvm-svn: 14123
2004-06-10 22:03:00 +00:00
Reid Spencer
7670bbdfb9
Implement detailed function level data collection and reporting.
...
llvm-svn: 14122
2004-06-10 22:00:54 +00:00
Reid Spencer
90f0032664
Adjust prototypes to new Handler interface.
...
llvm-svn: 14121
2004-06-10 22:00:29 +00:00
Reid Spencer
2491b0959e
Make the parser deal with functions instead of just function types.
...
llvm-svn: 14120
2004-06-10 21:59:20 +00:00
Reid Spencer
ff35cf92c5
Doxygenize a comment.
...
llvm-svn: 14115
2004-06-10 08:27:00 +00:00
Reid Spencer
8e5de9cd75
Implemented the bulk of the functionality. Cleaned up the code.
...
llvm-svn: 14113
2004-06-10 08:09:13 +00:00
Reid Spencer
2acee7e4d6
Cleanup alignment of output.
...
llvm-svn: 14093
2004-06-09 06:22:00 +00:00
Reid Spencer
cc4e35a404
Implement analysis output. Don't dump function details unless requested.
...
llvm-svn: 14091
2004-06-09 06:17:58 +00:00
Reid Spencer
839fa681f6
Implement some rudimentary analysis.
...
llvm-svn: 14090
2004-06-09 06:16:43 +00:00