Chris Lattner
43d0b955a3
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.
llvm-svn: 34012
2007-02-07 21:41:02 +00:00
Jim Laskey
c27aed3dc0
Automatically generating intrinsic declarations from Dan Gohman. Modified
...
to construct FunctionType in separate function, and, have getDeclaration
return a Function instead of a Constant.
llvm-svn: 34008
2007-02-07 20:38:26 +00:00
Lauro Ramos Venancio
30734ef2e7
Fix build error.
...
include/llvm/ADT/APInt.h:326: error: âassertâ was not declared in this scope
llvm-svn: 34002
2007-02-07 16:59:17 +00:00
Chris Lattner
76db8d5593
remove dead ivars.
...
llvm-svn: 33996
2007-02-07 07:33:02 +00:00
Chris Lattner
36c2f9ea6d
remove the handleVBR32/handleVBR64 callbacks. They are very fine-grained.
...
llvm-svn: 33994
2007-02-07 06:53:02 +00:00
Chris Lattner
22fc4be632
shrink vmcore by moving symbol table stripping support out of VMCore into
...
the one IPO pass that uses it.
llvm-svn: 33990
2007-02-07 06:22:45 +00:00
Chris Lattner
a1455127ae
eliminate ValueSymbolTable::rename, it has no advantage over using remove+insert.
...
Make insert/remove assert if used incorrectly instead of returning a bool.
llvm-svn: 33988
2007-02-07 06:13:49 +00:00
Chris Lattner
a78272e94d
Make SymbolTable::insert, SymbolTable::remove and SymbolTable::rename private.
...
llvm-svn: 33987
2007-02-07 06:06:24 +00:00
Zhou Sheng
7881ec420f
As Chris suggested, fixed some problems. (This is the first part.)
...
llvm-svn: 33986
2007-02-07 05:58:38 +00:00
Chris Lattner
bdde131dac
Eliminate the O(n) version of TypeSymbolTable::remove, it is dead. When
...
inserting a type into the type symbol table, only compute unique name if not
in symtab already.
llvm-svn: 33983
2007-02-07 05:35:58 +00:00
Chris Lattner
bf91625f67
TypeSymbolTable::rename is dead, remove it
...
llvm-svn: 33982
2007-02-07 05:29:34 +00:00
Chris Lattner
83319092ef
eliminate std::vector's from the bchandler interface
...
llvm-svn: 33979
2007-02-07 05:09:50 +00:00
Chris Lattner
2c3df2a958
do not let the table fill up with tombstones.
...
llvm-svn: 33973
2007-02-07 01:11:25 +00:00
Chris Lattner
672550f0b1
Fix a really subtle bug where the entire hash table could fill with
...
tombstones, causing subsequent insertions to infinitely loop.
llvm-svn: 33972
2007-02-07 00:55:59 +00:00
Jim Laskey
595ef8f868
Deemed too cute to live.
...
llvm-svn: 33964
2007-02-06 18:19:44 +00:00
Jim Laskey
7d5ddeb668
Support var arg intrinsics.
...
llvm-svn: 33962
2007-02-06 18:02:54 +00:00
Lauro Ramos Venancio
a38cfcb65c
Fix build error.
...
UniqueVector.h:66: error: âassertâ was not declared in this scope
llvm-svn: 33961
2007-02-06 14:59:28 +00:00
Zhou Sheng
8eba14bd31
As Reid suggested, fixed some problems.
...
llvm-svn: 33954
2007-02-06 05:59:47 +00:00
Chris Lattner
7a51f3a520
Simplify this a bit, add an assertion
...
llvm-svn: 33936
2007-02-05 23:24:48 +00:00
Chris Lattner
ae8f9f7df4
StableBasicBlockNumbering is conceptually just a wrapper around UniqueVector,
...
so we should actually use a UniqueVector to implement it.
llvm-svn: 33935
2007-02-05 23:19:24 +00:00
Chris Lattner
4ec6868104
Const method must use const_iterator.
...
llvm-svn: 33933
2007-02-05 23:18:32 +00:00
Reid Spencer
2e281b54c7
For PR411:
...
Clean up the Module::getFunction interface. getMainFunction and
getNamedFunction are now gone. Just use getFunction instead.
llvm-svn: 33920
2007-02-05 21:17:06 +00:00
Reid Spencer
6af21b3029
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.
llvm-svn: 33918
2007-02-05 20:47:22 +00:00
Zhou Sheng
4967eb71b1
Add a class APInt to represent arbitrary precision constant integral values.
...
It is a functional replacement for common case integer type like "unsigned",
"uint64_t", but also allows non-byte-width integer type and large integer
value types such as 3-bits, 15-bits, or more than 64-bits of precision. For
more details, see pr1043.
llvm-svn: 33913
2007-02-05 17:29:16 +00:00
Bill Wendling
bc1c8e70ac
Use unsigned char& instead of std::vector<>::reference.
...
llvm-svn: 33896
2007-02-05 02:37:07 +00:00
Chris Lattner
15fb4ef992
switch the VRBaseMap in the scheduler from an std::map to a DenseMap. This
...
speeds up the isel pass from 2.5570s to 2.4722s on kc++ (3.4%).
llvm-svn: 33879
2007-02-04 08:47:20 +00:00
Chris Lattner
59d7c680b5
Introduce new UnarySDNode/BinarySDNode/TernarySDNode nodes, which coallocate
...
their operands with the node itself. This reduces malloc traffic for operand
lists. This reduces isel time on kc++ from 2.6164 to 2.5570s, about 2.3%.
llvm-svn: 33878
2007-02-04 08:35:21 +00:00
Chris Lattner
22db3d9fca
Add a new SDNode ctor and InitOperands method. This allows the operands for
...
an SDNode to be allocated as part of the node itself, instead of being a
separate new[]'d object. Switch HandleSDNode, LoadSDNode, and StoreSDNode
to use this mechanism. This saves one heap allocation and free for each node
of this type that is allocated. This reduces isel time from 2.7638 to 2.6164s
on kc++, which is a 5.6% speedup.
llvm-svn: 33877
2007-02-04 08:13:53 +00:00
Chris Lattner
dcdf1edd93
eliminate the SDNode::setValueTypes method.
...
llvm-svn: 33876
2007-02-04 07:37:24 +00:00
Chris Lattner
2b6734a983
eliminate a bunch of duplicate ctors and helper functions.
...
llvm-svn: 33875
2007-02-04 07:28:00 +00:00
Chris Lattner
8bbd45cd6e
move MorphNode to out of line and merge setNodeOperands into it. There is
...
no behavior or performance change here.
llvm-svn: 33869
2007-02-04 02:49:29 +00:00
Chris Lattner
ccd1f36346
simplify MorphNodeTo to take a VTList operand.
...
llvm-svn: 33868
2007-02-04 02:41:42 +00:00
Chris Lattner
7e8b8e7a68
eliminate some extraneous methods in SDNode
...
llvm-svn: 33867
2007-02-04 02:32:44 +00:00
Chris Lattner
f3b4a0cc95
Give each selectiondag node class a home for it's vtable and rtti info
...
llvm-svn: 33866
2007-02-04 02:23:32 +00:00
Chris Lattner
41ec7b272f
add a version of insert that takes the key and value.
...
llvm-svn: 33856
2007-02-04 00:42:41 +00:00
Reid Spencer
310b497b59
For PR1163:
...
Make the Module's dependent library use a std::vector instead of SetVector
adjust #includes in .cpp files because SetVector.h is no longer included.
llvm-svn: 33855
2007-02-04 00:40:42 +00:00
Chris Lattner
1113f4c8ee
Make SmallSetVector useful
...
llvm-svn: 33854
2007-02-04 00:30:40 +00:00
Chris Lattner
9758cc5fd2
Various bugfixes
...
llvm-svn: 33848
2007-02-04 00:12:12 +00:00
Chris Lattner
cfdda5e521
Convert SetVector to be a true adapter class and add SmallSetVector.
...
llvm-svn: 33846
2007-02-03 23:56:03 +00:00
Reid Spencer
45d9d72ac0
For PR1072:
...
Removing -raise has neglible positive or negative side effects so we are
opting to remove it. See the PR for comparison details.
llvm-svn: 33844
2007-02-03 23:15:56 +00:00
Chris Lattner
71f7b41b05
8 buckets is way too small to start out with. This was only for testing.
...
llvm-svn: 33835
2007-02-03 19:30:48 +00:00
Chris Lattner
d4bf1bd958
remove a dead header
...
llvm-svn: 33820
2007-02-03 03:02:10 +00:00
Bill Wendling
e60f8624f5
Added GetTargetRelocation method.
...
llvm-svn: 33815
2007-02-03 02:38:57 +00:00
Bill Wendling
d2623ac830
Added some accessor methods.
...
llvm-svn: 33814
2007-02-03 02:38:15 +00:00
Bill Wendling
fe6b83c654
Moved MachORelocation to its own header file. Have a call through the
...
TargetMachOInfo object to the GetTargetRelocation method. Pass into it
non-Mach-O-specific parameters.
llvm-svn: 33813
2007-02-03 02:37:51 +00:00
Bill Wendling
73f186a7da
New file for the MachORelocation structure. It doesn't have to be tied to the
...
MachOWriter.h file.
llvm-svn: 33812
2007-02-03 02:36:17 +00:00
Chris Lattner
b35593a1c5
switch the sched unit map over to use a DenseMap instead of std::map. This
...
speeds up isel as a whole time by 2.6%.
llvm-svn: 33810
2007-02-03 01:34:13 +00:00
Chris Lattner
71fe09f397
Switch inliner over to use DenseMap instead of std::map for ValueMap. This
...
speeds up the inliner 16%.
llvm-svn: 33801
2007-02-03 00:08:31 +00:00
Chris Lattner
c5f2684ba7
silence annoying warning in release-asserts build
...
llvm-svn: 33797
2007-02-02 21:19:18 +00:00
Chris Lattner
10292e5997
add find/erase, add const iterators, fix bugs in iterators.
...
llvm-svn: 33791
2007-02-02 20:34:32 +00:00