Commit Graph

4848 Commits

Author SHA1 Message Date
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
Reid Spencer
b7d61101b1 Fixed packed structure breakage from earlier TargetData patch; applied
Chris Lattner's code style suggestions.

Patch by Scott Michel!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34292 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 02:11:06 +00:00
Chris Lattner
d2b7cec527 Generalize TargetData strings, to support more interesting forms of data.
Patch by Scott Michel.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34266 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-14 05:52:17 +00:00
Reid Spencer
db3faa64ee Make some minor improvements to APInt:
1. Make all the operators use uppercase
2. Rename APIntRoundToDouble method just RoundToDouble, the APInt is
   redundant.
3. Turn the class on for compilation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34253 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 22:41:58 +00:00
Lauro Ramos Venancio
13a3cee131 Add comment about original function argument alignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34243 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 17:57:38 +00:00
Reid Spencer
9964d75d83 Fix a compilation error that caused the nightly test to fail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34239 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 09:26:04 +00:00
Chris Lattner
f00042a999 Switch UnaryOperators to default to passing names up by const char* when possible.
This speeds up bcreading by 1.5%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34233 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 07:54:42 +00:00
Chris Lattner
ec79b3da13 add a setName variant that takes a null-terminated string. This can be
used to avoid std::string allocations in common cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34232 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 07:53:34 +00:00
Chris Lattner
8c06509f95 fix a critical bug in smallvector, where it would destroy elements that are
not in its range (!).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34230 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 07:25:36 +00:00
Chris Lattner
133bab0606 eliminate instruction ctors that take vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34228 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 06:22:32 +00:00
Chris Lattner
d2dd1508aa Add invokeinst and callinst ctors that don't take vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34214 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 01:04:01 +00:00
Chris Lattner
d54f432006 remove some dead methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34213 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 00:58:44 +00:00
Andrew Lenharth
f7e804b683 I love non-deturminism. Returning objects with references to stack objects is a bad idea (TM).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34210 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 00:37:50 +00:00
Zhou Sheng
d93f00c35d 1. Make APInt::shl work correctly and more efficiently.
2. Add functions to support the numberical conversion between APInt and
   double/float.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34201 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-12 20:02:55 +00:00
Jim Laskey
21ba3d7c2b Wrong value type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34199 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-12 19:05:51 +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
Chris Lattner
042ad36871 Add new setName accessor which doesn't require creating a string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34197 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-12 18:52:59 +00:00
Chris Lattner
dec628eead Switch ValueSymbolTable to use StringMap<Value*> instead of std::map<std::string, Value*>
as its main datastructure.  There are many improvements yet to be made, but
this speeds up opt --std-compile-opts on 447.dealII by 7.3%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34193 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-12 05:18:08 +00:00
Chris Lattner
36f78c8935 add #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34190 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-12 05:00:35 +00:00
Chris Lattner
a96b4ee7ff add new ShouldRehash method to factor out common code. Fix the dtor to not
delete tombstones.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34189 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-11 21:46:36 +00:00
Chris Lattner
65033ffc29 do not allow hash table to be filled with tombstones.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34186 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-11 21:07:36 +00:00
Chris Lattner
44dcd01cb3 Add support for removing elements out of StringMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34185 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-11 20:58:00 +00:00
Chris Lattner
b5bb9f5b5c Replace the ugly FindValue method with STL-like find methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34183 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-11 19:49:41 +00:00
Chris Lattner
360cac8fef remove support for stringmap visitors now that iterators exist.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34180 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-11 08:22:15 +00:00
Chris Lattner
6ccadf6f7f add iterator support, plus support for size() and empty().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34178 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-11 08:12:13 +00:00
Nick Lewycky
3e051647c0 Fix comments to match names of functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34173 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-11 00:58:49 +00:00
Chris Lattner
7216811ea2 add a helper method: Value::takeName
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34171 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-11 00:37:27 +00:00
Chris Lattner
9cc2d3dce8 Split StringMapEntry construction out of StringMap, into StringMapEntry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34170 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-11 00:10:26 +00:00
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