Chris Lattner
865b2f741a
remove dead methods
...
llvm-svn: 34419
2007-02-19 07:44:24 +00:00
Chris Lattner
35a14c07e4
add alternate version of constant ctors that don't take a vector. For now
...
this offers no performance advantage.
llvm-svn: 34415
2007-02-19 07:23:24 +00:00
Reid Spencer
b27fcf3482
For PR1207:
...
Revert patches that caused the problem. Evan, please investigate and reapply
when you've discovered the problem.
llvm-svn: 34399
2007-02-19 03:20:00 +00:00
Reid Spencer
6eb099875c
Add some new constants.
...
llvm-svn: 34398
2007-02-19 03:18:22 +00:00
Reid Spencer
79d2fad9f5
1. "unsigned" -> "uint32_t" to gaurantee its bit width on all platforms.
...
Size matters in this case.
2. Remove the unused whichByte private function, which was also broken.
3. Remove the non-const overload of the getWord function, getWord() is
never used as an lvalue.
4. Rename some local variables for clarity (e.g. API -> Result).
llvm-svn: 34390
2007-02-18 18:42:35 +00:00
Reid Spencer
62b55a934b
Implement signed output for toString.
...
Fix bugs in countLeadingZeros and countTrailingZeros.
llvm-svn: 34386
2007-02-18 00:44:22 +00:00
Chris Lattner
dee1492159
temporarily revert Devang's most recent patch, which caused a large
...
compile-time regression in LLC.
llvm-svn: 34385
2007-02-17 23:14:24 +00:00
Evan Cheng
8ac045a4b2
- Changes how function livein's are handled, they now have a start index of 0.
...
- When coalescing a copy MI, if its destination is "dead", propagate the
property to the source MI's destination if there are no intervening uses.
- Detect dead function live-in's and remove them.
llvm-svn: 34383
2007-02-17 11:15:40 +00:00
Evan Cheng
35f59a6dd2
Added findRegisterDefOperand().
...
llvm-svn: 34380
2007-02-17 11:10:18 +00:00
Evan Cheng
2db4db48ed
Added removeLiveIn and more livein iterators.
...
llvm-svn: 34378
2007-02-17 11:07:41 +00:00
Evan Cheng
ad05c398b1
Allow LiveVariables to track liveness of more registers.
...
llvm-svn: 34377
2007-02-17 11:07:08 +00:00
Evan Cheng
8f7896bacc
- Added regsOverlap() to test if two registers overlap. Or in case they are
...
virtual registers, test if they the same.
- Added a virtual method to return target specific reserved registers, e.g. SP.
llvm-svn: 34375
2007-02-17 11:04:35 +00:00
Devang Patel
953cadacbc
Use inverted map to speedup collectLastUses().
...
llvm-svn: 34364
2007-02-17 03:53:44 +00:00
Chris Lattner
14496ddfd4
Do not dereference invalid ranges. Generalize targetdata alignment model.
...
This fixes the UnitTests/Vector/sumarray-dbl regressions.
llvm-svn: 34358
2007-02-17 00:41:42 +00:00
Reid Spencer
9c5efbcef2
Fix bugs introduced by constructor parameter order change.
...
llvm-svn: 34357
2007-02-17 00:18:01 +00:00
Reid Spencer
d22266f456
Review changes:
...
1. Function style changes.
2. 80-col violations.
3. Better names for things.
4. Arrange constructors so they all take bit width first.
5. Add named signed and unsigned comparison functions and remove the
corresponding operators.
6. Remove operator&& and operator|| but provide a getBoolValue function which
converts to bool as comparison against 0. This allows the normal && and
|| operators to be used as if (X.getBoolValue() && Y.getBoolValue())
Note: this still doesn't function 100% yet. I'm working on the bugs now.
llvm-svn: 34353
2007-02-16 22:36:51 +00:00
Anton Korobeynikov
87e945c62d
Add possibility to set memory limit for binaries run via libSystem. This
...
is especially needed for bugpoint. This partly implements PR688
llvm-svn: 34349
2007-02-16 19:11:07 +00:00
Chris Lattner
134ae17654
make mayWriteToMemory a non-virtual function
...
llvm-svn: 34334
2007-02-15 23:15:00 +00:00
Reid Spencer
c5814f843c
For PR1195:
...
PACKED_ALIGN -> VECTOR_ALIGN
llvm-svn: 34330
2007-02-15 22:07:05 +00:00
Evan Cheng
c17b6ab5f7
Proper fix for the off-by-one bug in clear_unused_bits().
...
llvm-svn: 34328
2007-02-15 21:38:15 +00:00
Reid Spencer
3b68dab779
Fix an off-by-one bug in computing the index of the word to clear.
...
llvm-svn: 34326
2007-02-15 20:49:10 +00:00
Reid Spencer
6fd2d9d381
Make sure Capacity gets initialized too.
...
llvm-svn: 34325
2007-02-15 20:14:06 +00:00
Evan Cheng
ca4cab1cd2
Missing a ;
...
llvm-svn: 34322
2007-02-15 19:29:05 +00:00
Evan Cheng
f73b1abdea
BitVector::reference operator=(const reference& rhs) is unnecessary thanks to autoconvert to bool.
...
llvm-svn: 34320
2007-02-15 19:21:44 +00:00
Evan Cheng
471e882080
Remove unnecessary checks.
...
llvm-svn: 34319
2007-02-15 19:18:12 +00:00
Evan Cheng
25a8dc8e25
operator== returns false when two bitvectors have different sizes.
...
llvm-svn: 34317
2007-02-15 19:16:21 +00:00
Evan Cheng
84142d6607
Merges two resize() variants.
...
llvm-svn: 34316
2007-02-15 19:12:39 +00:00
Evan Cheng
fe4d7486d2
Clear no longer deleting the bits to avoid mallocs.
...
llvm-svn: 34315
2007-02-15 19:10:34 +00:00
Evan Cheng
21177a5395
BitVector::count() bugs.
...
llvm-svn: 34314
2007-02-15 19:09:36 +00:00
Evan Cheng
a916761a3a
Eliminate a redundent ctor; eliminate one more potential new [0].
...
llvm-svn: 34313
2007-02-15 19:05:25 +00:00
Evan Cheng
622cd4bd4d
1 -> 1L since BitWord has type unsigned long.
...
llvm-svn: 34312
2007-02-15 19:03:23 +00:00
Evan Cheng
a8fcf075f1
Eliminate new[0], just set Bits to NULL.
...
llvm-svn: 34311
2007-02-15 18:59:15 +00:00
Chris Lattner
fbd6928545
Add a new Value::getNameStr method, which is preferred over getName.
...
llvm-svn: 34310
2007-02-15 18:53:54 +00:00
Evan Cheng
2216148289
Inverted the condition by accident.
...
llvm-svn: 34309
2007-02-15 18:48:41 +00:00
Evan Cheng
7ff021d148
Bug fixes: assignment operator forgot to copy over size; copy ctor forgot to clear unused top bits.
...
llvm-svn: 34305
2007-02-15 08:15:58 +00:00
Zhou Sheng
9868d8d7db
Fix some buges:
...
1. Make getMinValue() returns the right value.
2. Fix the ByteSwap() crash problem.
3. Make Postfix increment work correctly.
4. Fix some bugs in LogBase2, Hi/LoBits and UDiv.
llvm-svn: 34304
2007-02-15 06:36:31 +00:00
Evan Cheng
28eaad250f
Use BitVector instead of vector<bool> which can be extremely slow.
...
llvm-svn: 34302
2007-02-15 05:59:24 +00:00
Evan Cheng
0cd0f0f232
Add a BitVector class.
...
llvm-svn: 34301
2007-02-15 05:56:11 +00:00
Reid Spencer
e7ff3305d6
For PR1195:
...
Change use of "packed" term to "vector" in comments, strings, variable
names, etc.
llvm-svn: 34300
2007-02-15 03:39:18 +00:00
Evan Cheng
990a0946a2
isPhysRegUsed should be const.
...
llvm-svn: 34295
2007-02-15 02:55:51 +00:00
Evan Cheng
033f2496c8
Should pass isKill and isDead to addRegOperand() as well.
...
llvm-svn: 34294
2007-02-15 02:52:40 +00:00
Reid Spencer
55e4e98a2a
For PR1195:
...
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.
llvm-svn: 34293
2007-02-15 02:26:10 +00:00
Reid Spencer
ca25d2b273
Fixed packed structure breakage from earlier TargetData patch; applied
...
Chris Lattner's code style suggestions.
Patch by Scott Michel!
llvm-svn: 34292
2007-02-15 02:11:06 +00:00
Chris Lattner
5cece73ec8
Generalize TargetData strings, to support more interesting forms of data.
...
Patch by Scott Michel.
llvm-svn: 34266
2007-02-14 05:52:17 +00:00
Reid Spencer
80ac48cfdf
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.
llvm-svn: 34253
2007-02-13 22:41:58 +00:00
Lauro Ramos Venancio
0471446487
Add comment about original function argument alignment.
...
llvm-svn: 34243
2007-02-13 17:57:38 +00:00
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
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
Chris Lattner
d0c5814b38
add iterators
...
llvm-svn: 33790
2007-02-02 19:27:13 +00:00
Reid Spencer
591bfa1e0b
Changes to support making the shift instructions be true BinaryOperators.
...
This feature is needed in order to support shifts of more than 255 bits
on large integer types. This changes the syntax for llvm assembly to
make shl, ashr and lshr instructions look like a binary operator:
shl i32 %X, 1
instead of
shl i32 %X, i8 1
Additionally, this should help a few passes perform additional optimizations.
llvm-svn: 33776
2007-02-02 02:16:23 +00:00
Devang Patel
3f71179e2d
Pretty print pass managers.
...
llvm-svn: 33767
2007-02-01 22:10:12 +00:00
Jim Laskey
52a12383a4
Support for non-landing pad exception handling.
...
llvm-svn: 33755
2007-02-01 16:31:34 +00:00
Reid Spencer
2d41dbae16
Fix a homonymo in a comment.
...
llvm-svn: 33754
2007-02-01 12:09:51 +00:00
Anton Korobeynikov
c469cbc2e7
Fixed uninitialized stuff inside LegalizeDAG. Fortunately, the only
...
affected part is codegen of "memove" inside x86 backend. This fixes
PR1144
llvm-svn: 33752
2007-02-01 08:39:52 +00:00
Chris Lattner
fe31060a23
Add a new dense hash table implementation
...
llvm-svn: 33751
2007-02-01 07:49:59 +00:00
Chris Lattner
a24a3aaa94
rename DenseMap to IndexedMap.
...
llvm-svn: 33749
2007-02-01 05:32:05 +00:00
Chris Lattner
e61728144b
rename DenseMap -> IndexedMap.
...
llvm-svn: 33748
2007-02-01 05:28:10 +00:00
Devang Patel
c6531e1867
Add printVersion(). Linker can use it to print LLVM version number.
...
llvm-svn: 33738
2007-02-01 01:46:06 +00:00
Devang Patel
46a1a617f5
Add PrintVersionMessage() that tools can use to print version number
...
without exiting program.
llvm-svn: 33737
2007-02-01 01:43:37 +00:00
Chris Lattner
d9c5442b61
add missing ctor
...
llvm-svn: 33714
2007-01-31 20:08:34 +00:00
Chris Lattner
55e5440018
implement the new GEP instruction ctors.
...
llvm-svn: 33708
2007-01-31 19:47:18 +00:00
Evan Cheng
3ec2e08a37
Allow the target to override the ISD::CondCode that's to be used to test the
...
result of the comparison libcall against zero.
llvm-svn: 33701
2007-01-31 09:29:11 +00:00
Evan Cheng
aa6f0f3b3b
Added O_F32 and O_64 in addition to UO_F32 and UO_64 even though by
...
default they call the same libgcc routine. The result of the calls are
"tested" differently.
llvm-svn: 33700
2007-01-31 09:26:31 +00:00
Chris Lattner
677cab8ef3
Revise APIs for creating constantexpr GEPs to not require the use of
...
vectors. This allows us to eliminate many temporary vectors, and their
associated malloc/free pairs.
llvm-svn: 33691
2007-01-31 04:39:29 +00:00
Chris Lattner
8959334b96
Make this a *real* header:
...
1. Remove using namespace llvm;
2. Remove unneeded #includes.
3. Add #include guard.
Also add prototypes for new code moved from transformutils to libanalysis.
llvm-svn: 33682
2007-01-30 23:47:35 +00:00
Chris Lattner
854464d748
move constant folding code out of Utils/Local into libanalysis
...
llvm-svn: 33681
2007-01-30 23:46:43 +00:00
Chris Lattner
23628987e2
The inliner/cloner can now optionally take TargetData info, which can be
...
used by constant folding.
llvm-svn: 33676
2007-01-30 23:22:39 +00:00
Chris Lattner
59ba02e557
Change constant folding APIs to take an optional TargetData, and change
...
ConstantFoldInstOperands/ConstantFoldCall to take a pointer to an array
of operands + size, instead of an std::vector.
llvm-svn: 33669
2007-01-30 23:12:47 +00:00
Reid Spencer
19af04a142
For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoid
...
confusion with external linkage types.
llvm-svn: 33663
2007-01-30 20:08:39 +00:00
Reid Spencer
a4b339934a
Compaction tables no longer supported, remove its block ID.
...
llvm-svn: 33662
2007-01-30 19:37:26 +00:00
Jim Laskey
fc450bfd0d
Out of line function.
...
llvm-svn: 33641
2007-01-29 23:40:33 +00:00
Jim Laskey
6f5d7d292f
Only gather frame info if debug or eh.
...
llvm-svn: 33639
2007-01-29 23:20:22 +00:00
Devang Patel
61ccc1c4b0
- Undo previous check-in (i.e. Do not export TimingInfo class through
...
PassManagers.h).
- Add StopPassTimer() and StartPassTimer() to expose TimingInfo to
CallGraphPassManager
- Use these two APIs in CalLgraphPassManager to measure timings.
llvm-svn: 33638
2007-01-29 23:10:37 +00:00
Nate Begeman
dc46021355
Finish off bug 680, allowing targets to custom lower frame and return
...
address nodes.
llvm-svn: 33636
2007-01-29 22:58:52 +00:00
Nate Begeman
05e9fd0443
Properly support cstrings
...
llvm-svn: 33629
2007-01-29 21:20:42 +00:00
Jim Laskey
705f60ece9
Flag to control exception handling.
...
llvm-svn: 33628
2007-01-29 20:48:32 +00:00
Devang Patel
fa27881c1c
Move TimingInfo into PassManagers.h so that other libs can use it.
...
llvm-svn: 33626
2007-01-29 20:06:26 +00:00
Jim Laskey
eba0cf04e5
Landing pad-less eh for PPC.
...
llvm-svn: 33622
2007-01-29 18:51:14 +00:00
Reid Spencer
bf69808b88
IntrinsicLowering now requires TargetData.
...
llvm-svn: 33617
2007-01-29 17:39:50 +00:00
Anton Korobeynikov
f3a3b6d157
Make doxygen happy
...
llvm-svn: 33609
2007-01-29 00:09:00 +00:00
Reid Spencer
38687c478b
Adjust a comment to reflect reality.
...
llvm-svn: 33607
2007-01-28 22:26:42 +00:00
Anton Korobeynikov
611d5e2eda
Propagate changes from my local tree. This patch includes:
...
1. New parameter attribute called 'inreg'. It has meaning "place this
parameter in registers, if possible". This is some generalization of
gcc's regparm(n) attribute. It's currently used only in X86-32 backend.
2. Completely rewritten CC handling/lowering code inside X86 backend.
Merged stdcall + c CCs and fastcall + fast CC.
3. Dropped CSRET CC. We cannot add struct return variant for each
target-specific CC (e.g. stdcall + csretcc and so on).
4. Instead of CSRET CC introduced 'sret' parameter attribute. Setting in
on first attribute has meaning 'This is hidden pointer to structure
return. Handle it gently'.
5. Fixed small bug in llvm-extract + add new feature to
FunctionExtraction pass, which relinks all internal-linkaged callees
from deleted function to external linkage. This will allow further
linking everything together.
NOTEs: 1. Documentation will be updated soon.
2. llvm-upgrade should be improved to translate csret => sret.
Before this, there will be some unexpected test fails.
llvm-svn: 33597
2007-01-28 13:31:35 +00:00
Chris Lattner
302032e482
provide a definition for uintptr_t
...
llvm-svn: 33592
2007-01-27 23:52:33 +00:00
Chris Lattner
38f873d682
Make SmallSet<whatever*, N> faster by transparently implementing it with
...
SmallPtrSet. Some clients will need to use SmallPtrSet directly though if
they need to iterate over the set.
llvm-svn: 33584
2007-01-27 08:20:15 +00:00
Chris Lattner
4307892029
add some missing API
...
llvm-svn: 33583
2007-01-27 08:19:03 +00:00
Chris Lattner
8360d61860
Give SmallSet a reasonable fallback if it gets large: use an std::set.
...
llvm-svn: 33582
2007-01-27 08:14:53 +00:00
Chris Lattner
2ca5edd29e
implement SmallPtrSet::erase
...
llvm-svn: 33581
2007-01-27 07:59:10 +00:00
Chris Lattner
cc42c6a00d
Fix a limitation of SmallPtrSet. Before it would assert if the smallsize
...
was not a power of two. Now it rounds up to the next power of two internally.
llvm-svn: 33580
2007-01-27 07:52:27 +00:00
Chris Lattner
6e11e4fb50
add some comments on the algorithm
...
llvm-svn: 33579
2007-01-27 07:24:51 +00:00
Chris Lattner
22513a4828
Add a new SmallSet ADT specialized for pointers.
...
llvm-svn: 33577
2007-01-27 07:10:46 +00:00
Reid Spencer
a31a19d76c
Add some comments, fix an 80 cols violation.
...
llvm-svn: 33576
2007-01-27 04:42:50 +00:00
Bill Wendling
671eb167eb
Accessor for the TargetELFWriterInfo class object.
...
llvm-svn: 33572
2007-01-27 02:55:04 +00:00
Bill Wendling
94f0477a62
The TargetELFWriterInfo class holds target-specific information for the ELF writer.
...
llvm-svn: 33570
2007-01-27 02:53:50 +00:00
Chris Lattner
a0210a8d2b
simplify insert interface
...
llvm-svn: 33567
2007-01-27 02:13:58 +00:00
Chris Lattner
8e8ec41bea
clean up comment
...
llvm-svn: 33566
2007-01-27 01:14:20 +00:00
Nate Begeman
481b84a66b
Handle multiple functions, properly mangle symbols, and fix support for
...
scattered relocations.
llvm-svn: 33555
2007-01-26 22:39:48 +00:00
Chris Lattner
c7e278045f
fit in 80 cols
...
llvm-svn: 33553
2007-01-26 21:48:40 +00:00
Jim Laskey
fdc04d1ea7
rename files
...
llvm-svn: 33552
2007-01-26 21:38:26 +00:00
Jim Laskey
64f4242072
Change the MachineDebugInfo to MachineModuleInfo to better reflect usage
...
for debugging and exception handling.
llvm-svn: 33550
2007-01-26 21:22:28 +00:00
Jim Laskey
23ed7d2625
Make LABEL a builtin opcode.
...
llvm-svn: 33537
2007-01-26 14:34:52 +00:00
Reid Spencer
ff43a6d80c
For PR761:
...
BCReader no longer has a header that contains the endinanness and
pointer size. It's been replaced by datalayout field.
llvm-svn: 33528
2007-01-26 08:09:01 +00:00
Reid Spencer
bf7f018011
For PR761:
...
Remove the setEndiannes and setPointerSize methods. These are now set
through the setDataLayout method.
llvm-svn: 33526
2007-01-26 08:07:01 +00:00
Reid Spencer
cca21cf060
For PR645:
...
Remove the Function::renameLocalSymbols function as it is no longer
needed.
llvm-svn: 33522
2007-01-26 08:01:30 +00:00
Devang Patel
f1ef346a53
Remove dead code.
...
CallGraphSCCPass does not need to implement runOnModule().
It supports runOnSCC().
llvm-svn: 33516
2007-01-26 01:08:18 +00:00
Devang Patel
bf44036fbf
Inherit CallGraphSCCPass directly from Pass.
...
llvm-svn: 33514
2007-01-26 00:47:38 +00:00
Devang Patel
83f1fff08c
Inherit FunctionPass directly from Pass.
...
llvm-svn: 33513
2007-01-26 00:23:00 +00:00
Devang Patel
a9eae6951d
Inherit BasicBlockPass directly from Pass.
...
llvm-svn: 33511
2007-01-25 23:23:25 +00:00
Devang Patel
274fb2402d
Remove dead code.
...
llvm-svn: 33506
2007-01-25 22:27:00 +00:00