Chris Lattner
8e1e6117d0
Read and write section info from/to .bc files
...
llvm-svn: 24321
2005-11-12 01:33:40 +00:00
Chris Lattner
c5455bcbd2
minor clarity changes, no functionality difference.
...
llvm-svn: 24223
2005-11-06 08:23:17 +00:00
Chris Lattner
05c64d1496
don't misencode CC#'s
...
llvm-svn: 24219
2005-11-06 07:46:13 +00:00
Chris Lattner
49d1908af1
encode/decode function alignment in bc files
...
llvm-svn: 24218
2005-11-06 07:43:39 +00:00
Chris Lattner
547f20c63e
Read/write global variable alignments if present
...
llvm-svn: 24216
2005-11-06 07:11:04 +00:00
Chris Lattner
575e828aa5
Write/read allocation instruction alignment info to .bc files.
...
llvm-svn: 24203
2005-11-05 22:08:14 +00:00
Jeff Cohen
11e26b52b2
When a function takes a variable number of pointer arguments, with a zero
...
pointer marking the end of the list, the zero *must* be cast to the pointer
type. An un-cast zero is a 32-bit int, and at least on x86_64, gcc will
not extend the zero to 64 bits, thus allowing the upper 32 bits to be
random junk.
The new END_WITH_NULL macro may be used to annotate a such a function
so that GCC (version 4 or newer) will detect the use of un-casted zero
at compile time.
llvm-svn: 23888
2005-10-23 04:37:20 +00:00
Chris Lattner
bad09e71d0
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.
llvm-svn: 23611
2005-10-03 21:26:53 +00:00
Jim Laskey
b74c666186
Culling out use of unions for converting FP to bits and vice versa.
...
llvm-svn: 22838
2005-08-17 19:34:49 +00:00
Jeff Cohen
5f4ef3c5a8
Eliminate all remaining tabs and trailing spaces.
...
llvm-svn: 22523
2005-07-27 06:12:32 +00:00
Andrew Lenharth
9144ec4764
core changes for varargs
...
llvm-svn: 22254
2005-06-18 18:34:52 +00:00
Chris Lattner
9bbe58628b
remove some dead (always dynamically false) flags
...
llvm-svn: 21752
2005-05-06 22:35:09 +00:00
Chris Lattner
129535c787
encode calling conventions for call/invoke instructions.
...
llvm-svn: 21751
2005-05-06 22:34:01 +00:00
Chris Lattner
f2e1c1969f
encode function calling convs in the bytecode file. invoke and call are
...
still to come.
llvm-svn: 21749
2005-05-06 20:42:57 +00:00
Chris Lattner
fb6f1746f4
add bytecode reader support for tail calls
...
llvm-svn: 21727
2005-05-06 06:13:34 +00:00
Misha Brukman
291f6b7223
Remove vim settings from source code; people should use llvm/utils/vim/vimrc
...
llvm-svn: 21704
2005-05-05 22:33:09 +00:00
Chris Lattner
7ddaeb448b
Add some extra checks. Opaque types don't have a null marker.
...
llvm-svn: 21700
2005-05-05 20:57:00 +00:00
Misha Brukman
2ecc34dd3c
Remove trailing whitespace
...
llvm-svn: 21417
2005-04-21 21:44:41 +00:00
Chris Lattner
531f9e92d4
This mega patch converts us from using Function::a{iterator|begin|end} to
...
using Function::arg_{iterator|begin|end}. Likewise Module::g* -> Module::global_*.
This patch is contributed by Gabor Greif, thanks!
llvm-svn: 20597
2005-03-15 04:54:21 +00:00
Chris Lattner
6d0a24c608
second argument to Value::setName is now gone.
...
llvm-svn: 20463
2005-03-05 19:05:20 +00:00
Chris Lattner
75f5b42624
use more specific cast.
...
llvm-svn: 20297
2005-02-24 05:26:04 +00:00
Chris Lattner
147c561432
Make sure to clear the LazyFunctionLoadMap after we ParseAllFunctionBodies.
...
Otherwise, clients who call ParseAllFunctionBodies will attempt to parse
the function bodies twice, which is (uh) very very bad (tm).
This fixes gccld on python.
llvm-svn: 20152
2005-02-13 17:48:18 +00:00
Chris Lattner
ccf22fb182
Fix the regressions my User changes introduced. Apparently some parts of
...
LLVM make the very reasonable assumption that constant expressions will
have at least one operand! :)
llvm-svn: 19943
2005-01-31 01:11:13 +00:00
Chris Lattner
616b8fc630
Adjust to changes in User class and minor changes in instruction ctors.
...
llvm-svn: 19894
2005-01-29 00:36:19 +00:00
Jeff Cohen
be92640355
Fix problems uncovered by VC++ (first time compiled by VC++)
...
llvm-svn: 19056
2004-12-20 03:23:46 +00:00
Chris Lattner
6225146f20
Remove a dead field, make the map go to integer type ID to hash better and
...
avoid a getType.
llvm-svn: 18691
2004-12-09 06:19:44 +00:00
Chris Lattner
2cdf54c0f0
Remove #include inadvertently added
...
llvm-svn: 18686
2004-12-09 04:53:17 +00:00
Chris Lattner
e44907012a
Eliminate this ugly hack. This was put back in when replaceAllUsesOf used
...
a different algorithm that was extremely inefficient for instructions with
many operands.
This reduces the time of this code snippet from .23s for 176.gcc to 0.03s
in a debug build, which speeds up total llvm-dis time just barely.
It's more of a code cleanup than a speedup.
llvm-svn: 18685
2004-12-09 04:51:50 +00:00
Reid Spencer
ef510c0279
Provide more information in the error message that occurs when there are
...
unresolved constants remaining.
llvm-svn: 18502
2004-12-04 22:19:53 +00:00
Chris Lattner
8f97278c49
Do not allow bytecode files with unresolved references to be read. Doing
...
so lets wierd ConstantPlaceholder objects sneak into the system which
confuses it greatly.
llvm-svn: 18487
2004-12-04 05:28:27 +00:00
Chris Lattner
37a14496c5
RevisionNum is read by error(), initialize it early.
...
llvm-svn: 18386
2004-11-30 16:58:18 +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
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
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
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
0e36b8afb9
Simplify decompression code by using the high level interface to the Compressor
...
llvm-svn: 17768
2004-11-14 21:59:21 +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
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
2e49204e0f
Add support for compressed bytecode
...
llvm-svn: 17535
2004-11-06 23:17:23 +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
da6a885076
Fit in 80 columns
...
llvm-svn: 16962
2004-10-14 01:39:18 +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
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
9874c63314
Get rid of an extraneous local variable.
...
llvm-svn: 15984
2004-08-21 20:53:56 +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