Commit Graph

557 Commits

Author SHA1 Message Date
Chris Lattner
42ba6b4b88 Write/read allocation instruction alignment info to .bc files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24203 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-05 22:08:14 +00:00
Chris Lattner
f36aeedaa3 DONT_BUILD_RELINKED is gone and implied by BUILD_ARCHIVE now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23940 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 02:26:13 +00:00
Jeff Cohen
66c5fd6c53 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23888 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-23 04:37:20 +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
7c439929bc speed up Archive::isBytecodeArchive in the case when the archive doesn't have
an llvm-ranlib symtab.  This speeds up gccld -native on an almost empty .o file
from 1.63s to 0.18s.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23406 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-23 06:22:58 +00:00
Jim Laskey
cb6682fa44 Culling out use of unions for converting FP to bits and vice versa.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22838 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-17 19:34:49 +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
Jeff Cohen
00b16889ab Eliminate all remaining tabs and trailing spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22523 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-27 06:12:32 +00:00
Reid Spencer
a229c5cce7 Final Changes For PR495:
This chagne just renames some sys::Path methods to ensure they are not
misused. The Path documentation now divides methods into two dimensions:
Path/Disk and accessor/mutator. Path accessors and mutators only operate
on the Path object itself without making any disk accesses. Disk accessors
and mutators will also access or modify the file system. Because of the
potentially destructive nature of disk mutators, it was decided that all
such methods should end in the work "Disk" to ensure the user recognizes
that the change will occur on the file system. This patch makes that
change. The method name changes are:

makeReadable        -> makeReadableOnDisk
makeWriteable       -> makeWriteableOnDisk
makeExecutable      -> makeExecutableOnDisk
setStatusInfo       -> setStatusInfoOnDisk
createDirectory     -> createDirectoryOnDisk
createFile          -> createFileOnDisk
createTemporaryFile -> createTemporaryFileOnDisk
destroy             -> eraseFromDisk
rename              -> renamePathOnDisk

These changes pass the Linux Deja Gnu tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22354 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-08 03:08:58 +00:00
Reid Spencer
dd04df0ec3 For PR495:
Get rid of the difference between file paths and directory paths. The Path
class now simply stores a path that can refer to either a file or a
directory. This required various changes in the implementation and interface
of the class with the corresponding impact to its users. Doxygen comments were
also updated to reflect these changes. Interface changes are:

appendDirectory -> appendComponent
appendFile -> appendComponent
elideDirectory -> eraseComponent
elideFile -> eraseComponent
elideSuffix -> eraseSuffix
renameFile -> rename
setDirectory -> set
setFile -> set

Changes pass Dejagnu and llvm-test/SingleSource tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22349 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-07 23:21:43 +00:00
Andrew Lenharth
213e557cef 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22273 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-22 21:04:42 +00:00
Andrew Lenharth
017fba9d0f va_end fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22262 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-19 14:04:55 +00:00
Andrew Lenharth
558bc88a00 core changes for varargs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22254 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-18 18:34:52 +00:00
Andrew Lenharth
141e488a70 Remove code for conversion from old style va_args. Preparing the way for
returning to the old style :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22199 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-08 00:49:08 +00:00
Chris Lattner
bfed9247f1 fix the assertion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21994 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-13 23:35:47 +00:00
Jeff Cohen
39cef60259 Silence VC++ warnings about unsafe mixing of ints and bools with the | operator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21758 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-07 02:44:04 +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
Chris Lattner
dee199fe82 encode calling conventions for call/invoke instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21751 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-06 22:34:01 +00:00
Chris Lattner
479ffebd73 encode function calling convs in the bytecode file. invoke and call are
still to come.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21749 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-06 20:42:57 +00:00
Chris Lattner
28caccff30 wrap a longline
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21747 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-06 20:27:03 +00:00
Chris Lattner
38287bdfde add bytecode reader support for tail calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21727 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-06 06:13:34 +00:00
Misha Brukman
6b8a63ae58 Remove vim settings from source code; people should use llvm/utils/vim/vimrc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21704 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-05 22:33:09 +00:00
Chris Lattner
9e60d8dbdc add support for undef values of opaque type, addressing PR541
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21701 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-05 22:21:19 +00:00
Chris Lattner
aba5ff5671 Add some extra checks. Opaque types don't have a null marker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21700 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-05 20:57:00 +00:00
Misha Brukman
dedf2bd5a3 Convert tabs to spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21439 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-22 04:01:18 +00:00
Misha Brukman
23c6d2cb79 * Remove trailing whitespace
* Convert tabs to spaces


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21418 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 21:48:46 +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
Misha Brukman
2b37d7cf28 Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21416 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 21:13:18 +00:00
Reid Spencer
8e827e8661 Use the actual uid/gid for defaulting the fields in the archive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21405 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 17:49:57 +00:00
Reid Spencer
3468e57f64 Eliminate calls to system dependent function getuid by using
the newly implemented sys::Process::GetCurrentUserId function. Replace
similarly for getgid.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21402 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 16:15:19 +00:00
Misha Brukman
4b2afe6394 Initialize fields mode, uid, and gid.
Patch by Markus Oberhumer.  Thanks!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21369 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-20 03:55:35 +00:00
Misha Brukman
72a9caa260 Align comments together for consistency
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21368 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-20 03:52:59 +00:00
Chris Lattner
e4d5c441e0 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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20597 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 04:54:21 +00:00
Chris Lattner
001d16aa9c Fix an apparent ambiguity compiling on PPC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20507 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-07 02:59:36 +00:00
Chris Lattner
af4a9bb2ba simplify and speed up some code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20472 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 02:32:00 +00:00
Chris Lattner
7acff25f7f second argument to Value::setName is now gone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20463 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-05 19:05:20 +00:00
Chris Lattner
da895d6337 Fix spelling, patch contributed by Gabor Greif!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20343 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-27 06:18:25 +00:00
Reid Spencer
eaa06bb979 Implement an isBytecodeArchive method to determine if an archive contains
bytecode file members or not.
Patch Contributed By Adam Treat


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20338 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-26 22:00:32 +00:00
Chris Lattner
7e6182319d use more specific cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20297 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-24 05:26:04 +00:00
Reid Spencer
818827d734 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()"


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20155 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-13 18:12:20 +00:00
Chris Lattner
b52f1c2950 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20152 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-13 17:48:18 +00:00
Chris Lattner
e5cea5eb89 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20151 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-13 17:42:11 +00:00
Chris Lattner
613233230b 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! :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19943 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-31 01:11:13 +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
Jeff Cohen
d19d89a04c Properly close mapped files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19863 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-28 01:17:07 +00:00
Jeff Cohen
5fb6ed4ae6 Use binary mode for reading/writing bytecode files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19751 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 17:36:17 +00:00
Reid Spencer
56127624e7 Remove potential platform portability issue with size of "int".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19172 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-29 01:20:24 +00:00
Reid Spencer
0a834720db For PR351:
Remove unix specific code (use of errno and read) from the reader.
Thanks to Jeff Cohen for pointing this out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19081 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-21 07:51:33 +00:00
Reid Spencer
7904c4ffe4 Remove the #include of llvm/Config/unistd.h as it is no longer needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19067 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 04:52:04 +00:00
Jeff Cohen
e133721047 Fix problems uncovered by VC++ (first time compiled by VC++)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19056 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 03:23:46 +00:00