Commit Graph

124 Commits

Author SHA1 Message Date
Devang Patel
1997473cf7 Drop 'const'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36662 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-03 01:11:54 +00:00
Devang Patel
3e15bf33e0 Use 'static const char' instead of 'static const int'.
Due to darwin gcc bug, one version of darwin linker coalesces
static const int, which defauts PassID based pass identification.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36652 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-02 21:39:20 +00:00
Devang Patel
794fd75c67 Do not use typeinfo to identify pass in pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36632 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-01 21:15:47 +00:00
Anton Korobeynikov
a80e1181b7 Implement review feedback. Aliasees can be either GlobalValue's or
bitcasts of them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36537 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-28 13:45:00 +00:00
Lauro Ramos Venancio
c763552299 Implement the "thread_local" keyword.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35950 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-12 18:32:50 +00:00
Reid Spencer
be5dcf5c1e For PR1291:
Change to use PathWithStatus


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35746 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-07 19:50:21 +00:00
Reid Spencer
9d6565a5b1 For PR1195:
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34293 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 02:26:10 +00:00
Chris Lattner
dd8cec59fc avoid creating a temporary string when reading the symbol table for a
module.  This speeds up the bcreader 11%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34198 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-12 18:53:43 +00:00
Reid Spencer
91c4af242a Compaction tables don't exist any more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34148 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 14:07:56 +00:00
Chris Lattner
f36c7b860d move archive-specific stuff out of bcreader into archive library.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34022 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 23:53:17 +00:00
Chris Lattner
7cf7c2b703 move an llvmc-specific function out of the bcreader into llvmc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34021 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 23:48:32 +00:00
Chris Lattner
f2e292ce58 push bytecode decompressor out through APIs. Now the bytecode reader
api's look like this:

ModuleProvider *getBytecodeModuleProvider(
  const std::string &Filename,  ///< Name of file to be read
  BCDecompressor_t *BCDC = Compressor::decompressToNewBuffer,
  std::string* ErrMsg = 0,      ///< Optional error message holder
  BytecodeHandler* H = 0        ///< Optional handler for reader events
);

This is ugly, but allows a client to say:

  getBytecodeModuleProvider("foo", 0);

If they do this, there is no dependency on the compression libraries, saving
codesize.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34012 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 21:41:02 +00:00
Chris Lattner
e14639ac3d remove dead ivars.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33996 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 07:33:02 +00:00
Chris Lattner
7b6040b417 remove the handleVBR32/handleVBR64 callbacks. They are very fine-grained.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33994 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 06:53:02 +00:00
Chris Lattner
1b1c95c9bf eliminate std::vector's from the bchandler interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33979 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 05:09:50 +00:00
Reid Spencer
ef9b9a7939 For PR411:
This patch replaces the SymbolTable class with ValueSymbolTable which does
not support types planes. This means that all symbol names in LLVM must now
be unique. The patch addresses the necessary changes to deal with this and
removes code no longer needed as a result. This completes the bulk of the
changes for this PR. Some cleanup patches will follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33918 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-05 20:47:22 +00:00
Reid Spencer
2574fe5a22 Compaction tables no longer supported, remove its block ID.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33662 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-30 19:37:26 +00:00
Reid Spencer
4de76f4884 For PR761:
BCReader no longer has a header that contains the endinanness and
pointer size. It's been replaced by datalayout field.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33528 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 08:09:01 +00:00
Chris Lattner
17be6791b8 default to emiting an uncompressed .bc file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33420 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-21 06:34:18 +00:00
Anton Korobeynikov
7f70559bc4 * PIC codegen for X86/Linux has been implemented
* PIC-aware internal structures in X86 Codegen have been refactored
* Visibility (default/weak) has been added
* Docs fixes (external weak linkage, visibility, formatting)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33136 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 19:20:47 +00:00
Reid Spencer
78d033e086 For PR411:
Take an incremental step towards type plane elimination. This change
separates types from values in the symbol tables by finally making use
of the TypeSymbolTable class. This yields more natural interfaces for
dealing with types and unclutters the SymbolTable class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32956 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-06 07:24:44 +00:00
Bill Wendling
e81561909d Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
now cerr, cout, and NullStream resp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32298 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 01:30:32 +00:00
Bill Wendling
68fe61d6a1 Replacing std::iostreams with llvm iostreams. Some of these changes involve
adding a temporary wrapper around the ostream to make it friendly to
functions expecting an LLVM stream. This should be fixed in the future.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31990 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 00:19:40 +00:00
Bill Wendling
b5ebf15b2b Added a temporary hack to get the llvm-streams to work for future checkins.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31978 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 22:21:29 +00:00
Reid Spencer
d798a515e9 Discard code that supported old bytecode formats. This makes the Bytecode
Reader code much easier to read and maintain. Backwards compatibility from
version 5 format has been retained. Older formats will produce an error.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31723 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-14 04:47:22 +00:00
Jeff Cohen
d41b30def3 Unbreak VC++ build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31464 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-05 19:31:28 +00:00
Chris Lattner
4382c736df Restore source-level compatibility with clients of these functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29978 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-30 20:47:48 +00:00
Chris Lattner
20c71001a4 remove extraneous space
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29940 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-28 17:30:49 +00:00
Reid Spencer
0b5a504d10 For PR797:
Remove exception throwing/handling from lib/Bytecode, and adjust its users
to compensate for changes in the interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29875 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-25 17:43:11 +00:00
Reid Spencer
0ff2d31766 For PR797:
Remove exception handling from the bytecode archiver and adjust the llvm-ar
tool to accommodate the new interfaces.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29866 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-24 23:45:08 +00:00
Chris Lattner
86ca12988a Update comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29398 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-28 22:09:37 +00:00
Chris Lattner
252ad03d7d Change Path::getStatusInfo to return a boolean and error string on an error
instead of throwing an exception.  This reduces the amount of code that is
exposed to exceptions (e.g. FileUtilities), though it is clearly only one step
along the way.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29395 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-28 22:03:44 +00:00
Reid Spencer
8d8a7ffe58 Finish removal of EH usage from the Archive library. The REQUIRES_EH flag
in lib/Bytecode/Archive/Makefile is now removed. One small step closer to
a smaller LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29067 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 20:56:50 +00:00
Reid Spencer
3039b99697 Remove EH use from the Archive library and adjust its users accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29066 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 19:09:14 +00:00
Chris Lattner
c3bb700f36 improve comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28296 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-14 19:10:22 +00:00
Chris Lattner
410354fe0c Make the LLVM headers "-ansi -pedantic -Wno-long-long" clean.
Patch by Martin Partel!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26313 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 16:23:43 +00:00
Chris Lattner
7bcd6a36e2 minor cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24528 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-30 05:26:03 +00:00
Reid Spencer
6ff7240a5c Fix a problem with llvm-ranlib that (on some platforms) caused the archive
file to become corrupted due to interactions between mmap'd memory segments
and file descriptors closing. The problem is completely avoiding by using
a third temporary file.

Patch provided by Evan Jones


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24527 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-30 05:21:10 +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
Misha Brukman
3b1b6e626e Convert tabs to spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21436 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-22 03:27:20 +00:00
Misha Brukman
ea61c35872 Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21409 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 20:39:54 +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
3eb223eaf7 Improve compatibility with aCC on HPUX. Patch by Duraid Madina
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19585 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-16 01:22:18 +00:00
Reid Spencer
37911af8c4 Make the OpenAndLoad functions have an ErrorMessage argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18849 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 02:58:16 +00:00
Reid Spencer
9a29db43a7 Distinguish between BSD4.4 and SVR4 symbol tables
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18044 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-20 07:29:40 +00:00
Reid Spencer
7783e8ad69 Make findModulesDefiningSymbols modify its symbols argument so we can \
eliminate symbols defined by the archive efficiently


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17976 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-19 03:18:22 +00:00
Reid Spencer
60f1758f7c Per code review:\
* Use STL names for STL operations \
* Do not have Archive doing symbol table printing \
* Avoid compiler warnings about only having private constructors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17881 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-16 06:46:55 +00:00
Reid Spencer
226b72672e Remove useless/confusing namespace qualifier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17852 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-15 21:27:05 +00:00
Reid Spencer
766b793143 Changes necessary to enable linking of archives without LLVM symbol tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17811 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-15 01:20:11 +00:00
Reid Spencer
33e2fcd6f5 Remove ReadArchiveFile (functionality moved to Archive.h). Add an alternate form for GetBytecodeSymbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17755 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 21:48:27 +00:00