1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00
Commit Graph

370 Commits

Author SHA1 Message Date
Chris Lattner
a8fcbe17d7 Fix reading LLVM 1.3 bc files.
llvm-svn: 24329
2005-11-12 18:31:54 +00:00
Chris Lattner
c51b0afa07 Read and write section info from/to .bc files
llvm-svn: 24321
2005-11-12 01:33:40 +00:00
Chris Lattner
d88f347ba5 minor clarity changes, no functionality difference.
llvm-svn: 24223
2005-11-06 08:23:17 +00:00
Chris Lattner
e86e4acf28 don't misencode CC#'s
llvm-svn: 24219
2005-11-06 07:46:13 +00:00
Chris Lattner
6c8657e621 encode/decode function alignment in bc files
llvm-svn: 24218
2005-11-06 07:43:39 +00:00
Chris Lattner
b456fb372d Read/write global variable alignments if present
llvm-svn: 24216
2005-11-06 07:11:04 +00:00
Chris Lattner
76a2afc0d3 Write/read allocation instruction alignment info to .bc files.
llvm-svn: 24203
2005-11-05 22:08:14 +00:00
Jeff Cohen
a38c737e85 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
14db91a643 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
61e3d7bca5 Culling out use of unions for converting FP to bits and vice versa.
llvm-svn: 22838
2005-08-17 19:34:49 +00:00
Chris Lattner
8fcd135595 This is a dummy, it doesn't matter what the ValueType is
llvm-svn: 22809
2005-08-16 21:59:52 +00:00
Jeff Cohen
bd51ec7461 Eliminate all remaining tabs and trailing spaces.
llvm-svn: 22523
2005-07-27 06:12:32 +00:00
Andrew Lenharth
4fd2bde906 If we support structs as va_list, we must pass pointers to them to va_copy
See last commit for LangRef, this implements it on all targets.

llvm-svn: 22273
2005-06-22 21:04:42 +00:00
Andrew Lenharth
231216b573 va_end fix
llvm-svn: 22262
2005-06-19 14:04:55 +00:00
Andrew Lenharth
a9214fec08 core changes for varargs
llvm-svn: 22254
2005-06-18 18:34:52 +00:00
Andrew Lenharth
e6b85af482 Remove code for conversion from old style va_args. Preparing the way for
returning to the old style :)

llvm-svn: 22199
2005-06-08 00:49:08 +00:00
Chris Lattner
f6775e16bf remove some dead (always dynamically false) flags
llvm-svn: 21752
2005-05-06 22:35:09 +00:00
Chris Lattner
1f6d3b2344 encode calling conventions for call/invoke instructions.
llvm-svn: 21751
2005-05-06 22:34:01 +00:00
Chris Lattner
494f3da7b3 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
59d23baab1 add bytecode reader support for tail calls
llvm-svn: 21727
2005-05-06 06:13:34 +00:00
Misha Brukman
f52511fcc6 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
c390fbea0d 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
e69deb7eec Remove trailing whitespace
llvm-svn: 21417
2005-04-21 21:44:41 +00:00
Chris Lattner
4b688a1c70 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
1ccff5c8c7 second argument to Value::setName is now gone.
llvm-svn: 20463
2005-03-05 19:05:20 +00:00
Chris Lattner
608a8c9f55 use more specific cast.
llvm-svn: 20297
2005-02-24 05:26:04 +00:00
Reid Spencer
a7a01f13df Make the check for global variables the same as the one for functions. In
both cases they are looking for non-external variables/functions that do
not have internal linkage. Using "!isExternal()" is a little more
understandable than "hasInitializer()"

llvm-svn: 20155
2005-02-13 18:12:20 +00:00
Chris Lattner
1788cf35ab 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
fdc746ac38 Do not put internal symbols into the symbol table. This shrinks the symbol
table for archives in common cases, and prevents trying to resolve a
external reference with an internal reference.  This shrinks the libpython.a
symbol table from 126302 to 19770 bytes.

llvm-svn: 20151
2005-02-13 17:42:11 +00:00
Chris Lattner
e4aaa4cf01 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
031d5f649c Adjust to changes in User class and minor changes in instruction ctors.
llvm-svn: 19894
2005-01-29 00:36:19 +00:00
Reid Spencer
44d96443fe For PR351:
Remove unix specific code (use of errno and read) from the reader.
Thanks to Jeff Cohen for pointing this out.

llvm-svn: 19081
2004-12-21 07:51:33 +00:00
Reid Spencer
f9693c67ae Remove the #include of llvm/Config/unistd.h as it is no longer needed.
llvm-svn: 19067
2004-12-20 04:52:04 +00:00
Jeff Cohen
61fe69a426 Fix problems uncovered by VC++ (first time compiled by VC++)
llvm-svn: 19056
2004-12-20 03:23:46 +00:00
Reid Spencer
1c72c28b2b For PR351:
Use sys::MappedFile instead of ReadFileIntoAddressSpace and
UnmapFileFromAddressSpace. sys::MappedFile has the nice property that it
cleans up after itself so exception handling can be removed.

llvm-svn: 18902
2004-12-13 18:25:27 +00:00
Reid Spencer
e2af9dc813 Path::get -> Path::toString
llvm-svn: 18785
2004-12-11 00:14:15 +00:00
Chris Lattner
c5f6c3fd48 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
565d505b28 Remove #include inadvertently added
llvm-svn: 18686
2004-12-09 04:53:17 +00:00
Chris Lattner
23b2d6fd82 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
8cddd97526 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
8bd875f0de 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
d6020eabef RevisionNum is read by error(), initialize it early.
llvm-svn: 18386
2004-11-30 16:58:18 +00:00
Reid Spencer
df25e5b3bb Fix a comment to imply the correct semantics.
llvm-svn: 18097
2004-11-22 02:58:47 +00:00
Chris Lattner
e5662f4700 Add note that this is for old bytecode files.
llvm-svn: 17991
2004-11-19 16:24:05 +00:00
Reid Spencer
2fe884dad8 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
558ce75905 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
704cad0375 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
4a2ae87435 Cleanups. Null out pointer after freeing it for paranoia
llvm-svn: 17855
2004-11-15 21:55:06 +00:00
Chris Lattner
d1e621acc6 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
bfc924424d Changes necessary to enable linking of archives without LLVM symbol tables.
llvm-svn: 17811
2004-11-15 01:20:11 +00:00