Chris Lattner
fded2d41c1
remove dead method.
...
llvm-svn: 34164
2007-02-10 20:37:40 +00:00
Chris Lattner
863b62eb50
eliminate the std::vector from StructLayout, allocating the elements immediately
...
after the StructLayout object in memory. This marginally improves locality,
speeding up -load-vn -gcse by ~0.8%.
llvm-svn: 34158
2007-02-10 20:15:41 +00:00
Chris Lattner
109373538b
encapsulate the rest of the StructLayout members.
...
llvm-svn: 34157
2007-02-10 19:59:22 +00:00
Chris Lattner
9dafd9fe90
Privatize StructLayout::MemberOffsets, adding an accessor
...
llvm-svn: 34156
2007-02-10 19:55:17 +00:00
Chris Lattner
e5eb7d79d3
add helper method.
...
llvm-svn: 34155
2007-02-10 19:54:24 +00:00
Chris Lattner
eaceeb61fb
Change TargetData::getIndexedOffset interface to not require indices
...
in a vector.
llvm-svn: 34153
2007-02-10 19:33:15 +00:00
Reid Spencer
66bb33845e
Compaction tables don't exist any more.
...
llvm-svn: 34148
2007-02-10 14:07:56 +00:00
Chris Lattner
f686454486
Make find return the appropriate iterator/const_iterator
...
llvm-svn: 34137
2007-02-10 06:58:17 +00:00
Chris Lattner
025607b8b0
Allow DenseMAp to take an explicit DenseMapKeyInfo
...
llvm-svn: 34134
2007-02-10 06:34:58 +00:00
Evan Cheng
6dc088ffd4
Add live-ins to MachineBasicBlock.
...
llvm-svn: 34111
2007-02-10 02:38:19 +00:00
Zhou Sheng
20d0f4e319
Eliminates friend function declaration inside APInt, instead, adds public
...
methods as those global function's internal implementation.
llvm-svn: 34083
2007-02-09 07:48:24 +00:00
Evan Cheng
1b155ac243
Move SimplifySetCC to TargetLowering and allow it to be shared with legalizer.
...
llvm-svn: 34065
2007-02-08 22:13:59 +00:00
Chris Lattner
d16cc5ebcb
Rename CStringMap -> StringMap, since it now supports nul characters in the
...
strings.
llvm-svn: 34064
2007-02-08 19:20:57 +00:00
Chris Lattner
3705cf294c
Allow cstringmap to contain strings with nul characters in them.
...
llvm-svn: 34062
2007-02-08 19:08:37 +00:00
Zhou Sheng
6efcdc8049
As Chris and Reid suggested, remove "isSigned" field from APInt, instead,
...
add some signed/unsigned arithmetic operation functions into APInt.h to
handle the signed/unsigned issue. These functions will be defined inside a
namespace "APIntOps" which is inside llvm namespace.
llvm-svn: 34053
2007-02-08 14:35:19 +00:00
Bill Wendling
4b33b03487
Fixed comments.
...
llvm-svn: 34040
2007-02-08 06:05:08 +00:00
Bill Wendling
d5788e1f87
Added new method to finish up the addition of passes to emit files. This
...
allows us to split that method into two so that we can optionally call a
concrete function to add a writer. Removed moribund addObjectWriter()
method.
llvm-svn: 34030
2007-02-08 01:34:45 +00:00
Bill Wendling
9fb358c70f
Declarations for functions that create different file writers.
...
llvm-svn: 34028
2007-02-08 01:31:38 +00:00
Bill Wendling
48653bfaa4
Moved from include/llvm/CodeGen to lib/CodeGen.
...
llvm-svn: 34027
2007-02-08 01:30:50 +00:00
Chris Lattner
3cac8eac4e
move archive-specific stuff out of bcreader into archive library.
...
llvm-svn: 34022
2007-02-07 23:53:17 +00:00
Chris Lattner
1c17d65878
move an llvmc-specific function out of the bcreader into llvmc.
...
llvm-svn: 34021
2007-02-07 23:48:32 +00:00
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