Sergei Larin
28dc2b4383
Fix indeterminism in MI scheduler DAG construction.
...
Similarly to several recent fixes throughout the code replace std::map use with the MapVector.
Add find() method to the MapVector.
llvm-svn: 168051
2012-11-15 17:45:50 +00:00
Guy Benyei
04ae9963a3
Add support for SPIR64 target - the 64bit counterpart of SPIR.
...
The new OpenCL SPIR extension spec will define separate SPIR for 32 and 64 bit architectures.
llvm-svn: 168036
2012-11-15 10:35:47 +00:00
Jakub Staszak
5c1af96255
Use LLVM_DELETED_FUNCTION.
...
llvm-svn: 168009
2012-11-15 00:25:36 +00:00
Eric Christopher
caf5a23d81
Remove the CellSPU port.
...
Approved by Chris Lattner.
llvm-svn: 167984
2012-11-14 22:09:20 +00:00
Rafael Espindola
6ec1315705
Remove Triple::getArchTypeForDarwinArchName. I lives on the clang driver now.
...
llvm-svn: 167157
2012-10-31 18:52:25 +00:00
Rafael Espindola
79781084a5
Add extra declarations of hash_value needed to build llvm with xlc 12.1.
...
Patch by Kai!
llvm-svn: 167085
2012-10-31 00:46:18 +00:00
Ulrich Weigand
ac97e73457
APFloat cleanup: Remove now unused fields "sign2" and "exponent2".
...
llvm-svn: 166952
2012-10-29 18:17:42 +00:00
Derek Schuff
e93c168939
Stop APInt::shl from generating llvm.trap
...
APInt::shl generated llvm.trap to guard against shifts greater than bit-width.
This was already checked with an assert, and there was a special case for
shifts equal to bit-width. Modify this check to catch shifts greater than or
equal to bit-width, so llvm.trap isn't generated.
Patch contributed by JF Bastien
llvm-svn: 166803
2012-10-26 19:52:27 +00:00
Pete Cooper
b97bf8bd50
Improve DenseMap checks for power of 2 growth. Thanks for the tip Jakob
...
llvm-svn: 166609
2012-10-24 18:50:44 +00:00
Michael J. Spencer
c9419b777a
[Support/StringSet] Fix memory leak when inserted key already exists.
...
llvm-svn: 166517
2012-10-23 22:55:54 +00:00
Pete Cooper
eda7d99a58
Change DenseMap to use a power of 2 growth if one is given instead of the next power of 2. This was causing DenseMaps to grow 4x instead of 2x. I'll keep an eye on the buildbots as this could impact performance
...
llvm-svn: 166493
2012-10-23 19:34:36 +00:00
Pete Cooper
ccb3ee0d18
Fixed bug in SmallDenseMap where it wouldn't leave enough space for an empty bucket if the number of values was exactly equal to the small capacity. This led to an infinite loop when finding a non-existent element
...
llvm-svn: 166492
2012-10-23 18:47:35 +00:00
Jordan Rose
2d1d4bb52f
Fix case for include of Compiler.h.
...
llvm-svn: 166243
2012-10-18 22:36:01 +00:00
Jordan Rose
254e676432
Add move constructors for OwningPtr and OwningArrayPtr.
...
While LLVM itself is still C++03, there's no reason why tools built on
top of it can't use C++11 features.
llvm-svn: 166242
2012-10-18 22:22:58 +00:00
Jordan Rose
8f3fa09912
Add a T&& constructor to llvm::Optional.
...
This allows llvm::Optional to be used with movable-but-not-copyable types.
While LLVM itself is still C++03, there's no reason why tools built on
top of it can't use C++11 features.
llvm-svn: 166241
2012-10-18 22:22:55 +00:00
Owen Anderson
38e04ae4a0
Speculative fix the mask constants to be of type uintptr_t. I don't know of any case where the old form was incorrect, but I'm more confident that such cases don't exist in this version.
...
llvm-svn: 166031
2012-10-16 17:10:33 +00:00
Owen Anderson
cb8d1f6815
Fix a bug in the set(I,E)/reset(I,E) methods that I recently added. The boundary condition for checking if I and E were in the same word were incorrect, and, beyond that, the mask computation was not using a wide enough constant.
...
llvm-svn: 166015
2012-10-16 06:04:27 +00:00
Owen Anderson
e678a60cc8
Add range-based set()/reset() to BitVector. These allow fast setting/resetting of ranges of bits, particularly useful when dealing with very large BitVector's.
...
llvm-svn: 165984
2012-10-15 22:05:27 +00:00
Benjamin Kramer
25522ac16c
Fix a typo that made ImmutableMap::getMaxElement() useless.
...
Add a basic unit test for ImmutableMap. Found by inspection.
llvm-svn: 165907
2012-10-14 15:56:39 +00:00
Duncan Sands
fe6c41af6b
Add powerpc-ibm-aix to Triple. Patch by Kai.
...
llvm-svn: 165792
2012-10-12 11:08:57 +00:00
Douglas Gregor
ecabb8b6ff
Add count() method to MapVector
...
llvm-svn: 165559
2012-10-09 23:02:47 +00:00
Douglas Gregor
97b9fac1c3
Not everyone uses C++11, apparently
...
llvm-svn: 165517
2012-10-09 17:51:56 +00:00
Douglas Gregor
703f076085
Allow MapVector clients to specify the map and vector types, and add a
...
clear() method.
llvm-svn: 165514
2012-10-09 17:49:42 +00:00
Chandler Carruth
e189a098e8
Third try at fixing this. ;] Go back to using std::remove_if, which has
...
most of the behavior we want, but wrap the predicate in one which erases
elements from the set if they pass the predicate. Oh what I wouldn't
give for a lambda here.
Let me know if the predicate wrapping is too much magic. ;]
llvm-svn: 165076
2012-10-03 01:04:07 +00:00
Chandler Carruth
f28a5b80a4
Switch the SetVector::remove_if implementation to use partition which
...
preserves the values of the relocated entries, unlikely remove_if. This
allows walking them and erasing them.
Also flesh out the predicate we are using for this to support the
various constraints actually imposed on a UnaryPredicate -- without this
we can't compose it with std::not1.
Thanks to Sean Silva for the review here and noticing the issue with
std::remove_if.
llvm-svn: 165073
2012-10-03 00:03:00 +00:00
Chandler Carruth
72359007f5
Teach the new SROA to handle cases where an alloca that has already been
...
scheduled for processing on the worklist eventually gets deleted while
we are processing another alloca, fixing the original test case in
PR13990.
To facilitate this, add a remove_if helper to the SetVector abstraction.
It's not easy to use the standard abstractions for this because of the
specifics of SetVectors types and implementation.
Finally, a nice small test case is included. Thanks to Benjamin for the
fantastic reduced test case here! All I had to do was delete some empty
basic blocks!
llvm-svn: 165065
2012-10-02 22:46:45 +00:00
Chandler Carruth
04822c8467
Clean up these doxygen comments to follow the proposed new style. This
...
also makes it more consistent with Clang and several passes' doxygen
style.
llvm-svn: 165064
2012-10-02 22:46:40 +00:00
Andrew Kaylor
0d06582cd5
Support for generating ELF objects on Windows.
...
This adds 'elf' as a recognized target triple environment value and overrides the default generated object format on Windows platforms if that value is present. This patch also enables MCJIT tests on Windows using the new environment value.
llvm-svn: 165030
2012-10-02 18:38:34 +00:00
Micah Villmow
c2b360eb5b
Add in support for SPIR to LLVM core. This adds a new target and two new calling conventions.
...
llvm-svn: 164948
2012-10-01 17:01:31 +00:00
Benjamin Kramer
bfbf4015c4
PackedVector: Make the BitVector implementation configurable.
...
llvm-svn: 164826
2012-09-28 16:40:29 +00:00
Benjamin Kramer
518ed57959
Provide malloc-free sentinels for the SparseBitVector internals.
...
llvm-svn: 164823
2012-09-28 15:36:41 +00:00
Sylvestre Ledru
b77340e506
Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164767
...
llvm-svn: 164768
2012-09-27 10:14:43 +00:00
Sylvestre Ledru
1c5e7904de
Fix a typo 'iff' => 'if'
...
llvm-svn: 164767
2012-09-27 09:59:43 +00:00
Jordan Rose
322d2a4afc
Add llvm::getOrdinalSuffix to get the appropriate -st, -nd, -rd, -th suffix.
...
Used by clang to print parameter indexes.
llvm-svn: 164440
2012-09-22 01:24:21 +00:00
Jordan Rose
8632457a1a
DenseMap: assert that we have found a bucket before we try to insert into it.
...
This silences literally dozens of analyzer warnings on LLVM (since DenseMap
is such a commonly-used class).
llvm-svn: 164438
2012-09-22 01:24:16 +00:00
Rafael Espindola
8926dd6aeb
Make MapVector a bit more expensive but harder to misuse. We now only
...
provide insertion order iteration, instead of the old option of
DenseMap order iteration over keys and insertion order iteration over
values.
This is implemented by keeping two copies of each key.
llvm-svn: 164221
2012-09-19 13:42:51 +00:00
Rafael Espindola
528ca88d0c
Add a MapVector class. It provides a regular set iteration, but
...
also provides a insertion order iteration over the values.
llvm-svn: 164157
2012-09-18 18:43:21 +00:00
Craig Topper
f2e8b27fbc
Mark unimplemented copy constructors and copy assignment operators as LLVM_DELETED_FUNCTION.
...
llvm-svn: 164014
2012-09-17 06:31:17 +00:00
Craig Topper
d34712230a
Use LLVM_DELETED_FUNCTION for copy constructors and copy assignment operators that aren't implemented.
...
llvm-svn: 164006
2012-09-16 21:37:56 +00:00
Craig Topper
a71d0f57b9
Tidy up formatting of some elses on a separate line from preceding bracing. No functional change.
...
llvm-svn: 163992
2012-09-16 03:00:03 +00:00
Craig Topper
239ccf7e3a
Tidy up trailing whitespace.
...
llvm-svn: 163988
2012-09-16 01:20:35 +00:00
Craig Topper
51933d960f
Remove unneeded header.
...
llvm-svn: 163987
2012-09-16 01:18:51 +00:00
Dmitri Gribenko
dd5d6c0da7
Fix Doxygen issues: wrap code examples in \code and use \p to refer to
...
parameters.
llvm-svn: 163984
2012-09-15 20:22:05 +00:00
Dmitri Gribenko
93c7ec80b7
Fix Doxygen issues:
...
* wrap code blocks in \code ... \endcode;
* refer to parameter names in paragraphs correctly (\arg is not what most
people want -- it starts a new paragraph);
* use \param instead of \arg to document parameters in order to be consistent
with the rest of the codebase.
llvm-svn: 163902
2012-09-14 14:57:36 +00:00
Dmitri Gribenko
aee81e7cae
Fix Doxygen issues:
...
* wrap code blocks in \code ... \endcode;
* refer to parameter names in paragraphs correctly (\arg is not what most
people want -- it starts a new paragraph).
llvm-svn: 163790
2012-09-13 12:34:29 +00:00
Nick Lewycky
5931f2813a
Fix typo in comment.
...
llvm-svn: 163782
2012-09-13 07:01:25 +00:00
Ted Kremenek
beadef0e28
Add operator< for FoldingSetNodeID.
...
llvm-svn: 163454
2012-09-08 04:25:29 +00:00
Nadav Rotem
f25e382cd2
Add a new optimization pass: Stack Coloring, that merges disjoint static allocations (allocas). Allocas are known to be
...
disjoint if they are marked by disjoint lifetime markers (@llvm.lifetime.XXX intrinsics).
llvm-svn: 163299
2012-09-06 09:17:37 +00:00
Roman Divacky
4c161d6fab
Remove unused typedefs gcc4.8 warns about.
...
llvm-svn: 163225
2012-09-05 17:55:46 +00:00
Marshall Clow
86cc403d56
Removed Trie.h; unused in a long time
...
llvm-svn: 163191
2012-09-05 03:18:55 +00:00