1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
Commit Graph

4480 Commits

Author SHA1 Message Date
Reid Spencer
0ce7199e4e Fix a compilation error that caused the nightly test to fail.
llvm-svn: 34239
2007-02-13 09:26:04 +00:00
Chris Lattner
4534d3fc6e Switch UnaryOperators to default to passing names up by const char* when possible.
This speeds up bcreading by 1.5%.

llvm-svn: 34233
2007-02-13 07:54:42 +00:00
Chris Lattner
cc543b031e add a setName variant that takes a null-terminated string. This can be
used to avoid std::string allocations in common cases.

llvm-svn: 34232
2007-02-13 07:53:34 +00:00
Chris Lattner
3490afcd50 fix a critical bug in smallvector, where it would destroy elements that are
not in its range (!).

llvm-svn: 34230
2007-02-13 07:25:36 +00:00
Chris Lattner
326271ee46 eliminate instruction ctors that take vectors.
llvm-svn: 34228
2007-02-13 06:22:32 +00:00
Chris Lattner
bc384d8d50 Add invokeinst and callinst ctors that don't take vectors.
llvm-svn: 34214
2007-02-13 01:04:01 +00:00
Chris Lattner
94ce3e4550 remove some dead methods.
llvm-svn: 34213
2007-02-13 00:58:44 +00:00
Andrew Lenharth
3c51b17d7b I love non-deturminism. Returning objects with references to stack objects is a bad idea (TM).
llvm-svn: 34210
2007-02-13 00:37:50 +00:00
Zhou Sheng
7b47556f5c 1. Make APInt::shl work correctly and more efficiently.
2. Add functions to support the numberical conversion between APInt and
   double/float.

llvm-svn: 34201
2007-02-12 20:02:55 +00:00
Jim Laskey
aaa75d587c Wrong value type.
llvm-svn: 34199
2007-02-12 19:05:51 +00:00
Chris Lattner
70af9b98ec avoid creating a temporary string when reading the symbol table for a
module.  This speeds up the bcreader 11%.

llvm-svn: 34198
2007-02-12 18:53:43 +00:00
Chris Lattner
a48bf1bdbf Add new setName accessor which doesn't require creating a string.
llvm-svn: 34197
2007-02-12 18:52:59 +00:00
Chris Lattner
5a58a65c10 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%.

llvm-svn: 34193
2007-02-12 05:18:08 +00:00
Chris Lattner
f94d4a17a7 add #include
llvm-svn: 34190
2007-02-12 05:00:35 +00:00
Chris Lattner
d61a01003b add new ShouldRehash method to factor out common code. Fix the dtor to not
delete tombstones.

llvm-svn: 34189
2007-02-11 21:46:36 +00:00
Chris Lattner
15eaaa2bbd do not allow hash table to be filled with tombstones.
llvm-svn: 34186
2007-02-11 21:07:36 +00:00
Chris Lattner
ce3f5f906a Add support for removing elements out of StringMap.
llvm-svn: 34185
2007-02-11 20:58:00 +00:00
Chris Lattner
3a9d38035f Replace the ugly FindValue method with STL-like find methods.
llvm-svn: 34183
2007-02-11 19:49:41 +00:00
Chris Lattner
f1e2e9e259 remove support for stringmap visitors now that iterators exist.
llvm-svn: 34180
2007-02-11 08:22:15 +00:00
Chris Lattner
c3396d5ff8 add iterator support, plus support for size() and empty().
llvm-svn: 34178
2007-02-11 08:12:13 +00:00
Nick Lewycky
b994bafc0f Fix comments to match names of functions.
llvm-svn: 34173
2007-02-11 00:58:49 +00:00
Chris Lattner
e8dd3c90f1 add a helper method: Value::takeName
llvm-svn: 34171
2007-02-11 00:37:27 +00:00
Chris Lattner
8a8d0a44a6 Split StringMapEntry construction out of StringMap, into StringMapEntry.
llvm-svn: 34170
2007-02-11 00:10:26 +00:00
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