Commit Graph

4820 Commits

Author SHA1 Message Date
Chris Lattner
4e9f579028 remove dead method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34164 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 20:37:40 +00:00
Chris Lattner
9182e3f205 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%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34158 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 20:15:41 +00:00
Chris Lattner
b0c39a3b4d encapsulate the rest of the StructLayout members.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34157 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 19:59:22 +00:00
Chris Lattner
b1919e2f08 Privatize StructLayout::MemberOffsets, adding an accessor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34156 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 19:55:17 +00:00
Chris Lattner
68ce9ba666 add helper method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34155 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 19:54:24 +00:00
Chris Lattner
ddce8d21ea Change TargetData::getIndexedOffset interface to not require indices
in a vector.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34153 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 19:33:15 +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
569b935e6b Make find return the appropriate iterator/const_iterator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34137 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 06:58:17 +00:00
Chris Lattner
a76b1febd4 Allow DenseMAp to take an explicit DenseMapKeyInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34134 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 06:34:58 +00:00
Evan Cheng
13d8285678 Add live-ins to MachineBasicBlock.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34111 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 02:38:19 +00:00
Zhou Sheng
ff4304f824 Eliminates friend function declaration inside APInt, instead, adds public
methods as those global function's internal implementation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34083 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-09 07:48:24 +00:00
Evan Cheng
fa1eb27b76 Move SimplifySetCC to TargetLowering and allow it to be shared with legalizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34065 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 22:13:59 +00:00
Chris Lattner
bb28a81ba3 Rename CStringMap -> StringMap, since it now supports nul characters in the
strings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34064 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 19:20:57 +00:00
Chris Lattner
ee182422ff Allow cstringmap to contain strings with nul characters in them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34062 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 19:08:37 +00:00
Zhou Sheng
0b706b18bd 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34053 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 14:35:19 +00:00
Bill Wendling
2f5bcb5f38 Fixed comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34040 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 06:05:08 +00:00
Bill Wendling
d25f933c0d 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34030 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 01:34:45 +00:00
Bill Wendling
529f0690d5 Declarations for functions that create different file writers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34028 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 01:31:38 +00:00
Bill Wendling
4b2ca1a3c4 Moved from include/llvm/CodeGen to lib/CodeGen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34027 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 01:30:50 +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
Jim Laskey
95af592a63 Automatically generating intrinsic declarations from Dan Gohman. Modified
to construct FunctionType in separate function, and, have getDeclaration
return a Function instead of a Constant.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34008 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 20:38:26 +00:00
Lauro Ramos Venancio
58a0d64fae Fix build error.
include/llvm/ADT/APInt.h:326: error: ‘assert’ was not declared in this scope


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34002 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 16:59:17 +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
7f1444bc0a shrink vmcore by moving symbol table stripping support out of VMCore into
the one IPO pass that uses it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33990 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 06:22:45 +00:00
Chris Lattner
56920a0ecc eliminate ValueSymbolTable::rename, it has no advantage over using remove+insert.
Make insert/remove assert if used incorrectly instead of returning a bool.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33988 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 06:13:49 +00:00
Chris Lattner
1e348549d9 Make SymbolTable::insert, SymbolTable::remove and SymbolTable::rename private.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33987 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 06:06:24 +00:00
Zhou Sheng
f29a09d627 As Chris suggested, fixed some problems. (This is the first part.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33986 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 05:58:38 +00:00
Chris Lattner
58f84d4b2d 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33983 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 05:35:58 +00:00
Chris Lattner
67408dab1b TypeSymbolTable::rename is dead, remove it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33982 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 05:29:34 +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
Chris Lattner
e237cf934f do not let the table fill up with tombstones.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33973 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 01:11:25 +00:00
Chris Lattner
04a3115e61 Fix a really subtle bug where the entire hash table could fill with
tombstones, causing subsequent insertions to infinitely loop.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33972 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 00:55:59 +00:00
Jim Laskey
81a21eae3e Deemed too cute to live.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33964 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-06 18:19:44 +00:00
Jim Laskey
ba4cc09f51 Support var arg intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33962 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-06 18:02:54 +00:00
Lauro Ramos Venancio
53a58106d4 Fix build error.
UniqueVector.h:66: error: ‘assert’ was not declared in this scope


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33961 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-06 14:59:28 +00:00
Zhou Sheng
7406dcdc29 As Reid suggested, fixed some problems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33954 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-06 05:59:47 +00:00
Chris Lattner
c04a1ce623 Simplify this a bit, add an assertion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33936 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-05 23:24:48 +00:00
Chris Lattner
ae6eb5bfbe StableBasicBlockNumbering is conceptually just a wrapper around UniqueVector,
so we should actually use a UniqueVector to implement it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33935 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-05 23:19:24 +00:00
Chris Lattner
7b13624b32 Const method must use const_iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33933 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-05 23:18:32 +00:00
Reid Spencer
60ea274c70 For PR411:
Clean up the Module::getFunction interface. getMainFunction and
getNamedFunction are now gone. Just use getFunction instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33920 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-05 21:17:06 +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
Zhou Sheng
d0f285e212 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33913 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-05 17:29:16 +00:00
Bill Wendling
05c0b9ad79 Use unsigned char& instead of std::vector<>::reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33896 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-05 02:37:07 +00:00
Chris Lattner
831e0374a7 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%).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33879 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-04 08:47:20 +00:00
Chris Lattner
3f97eb449b 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%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33878 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-04 08:35:21 +00:00
Chris Lattner
bc2e26241d 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33877 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-04 08:13:53 +00:00
Chris Lattner
ab4ed59538 eliminate the SDNode::setValueTypes method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33876 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-04 07:37:24 +00:00