Commit Graph

1733 Commits

Author SHA1 Message Date
Rafael Espindola
15658b2908 Fix -Wdocumentation warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187336 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-28 23:43:28 +00:00
Michael Gottesman
7ffc854002 [APFloat] Removed nextafter from missing operations since it is implemented in APFloat::next.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187312 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-27 21:49:19 +00:00
Bill Wendling
e130dc6cc9 Use a non-c'tor for converting a boolean into a StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187250 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-26 21:50:30 +00:00
Bill Schmidt
f38cc38fa6 [PowerPC] Support powerpc64le as a syntax-checking target.
This patch provides basic support for powerpc64le as an LLVM target.
However, use of this target will not actually generate little-endian
code.  Instead, use of the target will cause the correct little-endian
built-in defines to be generated, so that code that tests for
__LITTLE_ENDIAN__, for example, will be correctly parsed for
syntax-only testing.  Code generation will otherwise be the same as
powerpc64 (big-endian), for now.

The patch leaves open the possibility of creating a little-endian
PowerPC64 back end, but there is no immediate intent to create such a
thing.

The LLVM portions of this patch simply add ppc64le coverage everywhere
that ppc64 coverage currently exists.  There is nothing of any import
worth testing until such time as little-endian code generation is
implemented.  In the corresponding Clang patch, there is a new test
case variant to ensure that correct built-in defines for little-endian
code are generated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187179 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-26 01:35:43 +00:00
Bill Wendling
fb5b3eaacb Add a bool->StringRef c'tor to StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187166 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-25 23:06:39 +00:00
Rafael Espindola
6fccaafd8b Remove the mblaze backend from llvm.
Approval in here http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-July/064169.html

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187145 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-25 18:55:05 +00:00
Benjamin Kramer
459d7bf8f6 Sync SmallBitVector with BitVector. Add unit tests for the missing methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186123 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-11 21:59:16 +00:00
Argyrios Kyrtzidis
10b2997913 Remove llvm/ADT/NullablePtr.h, there are no uses of it in-tree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186006 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-10 15:33:20 +00:00
Manman Ren
6afede522e Revert r185852.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185861 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-08 20:27:34 +00:00
Manman Ren
f856249d49 StringRef: add DenseMapInfo for StringRef.
Remove the implementation in include/llvm/Support/YAMLTraits.h.
Added a DenseMap type DITypeHashMap in DebugInfo.h:
  DenseMap<std::pair<StringRef, unsigned>, MDNode*>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185852 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-08 19:17:48 +00:00
Argyrios Kyrtzidis
7426a3b588 [ADT/NullablePtr] Allow implicit conversion of NullablePtr<OtherT> -> NullablePtr<T> if OtherT is derived from T.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185851 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-08 19:12:01 +00:00
Michael Gottesman
4dfc257a1a Revert "Revert "[APFloat] Removed APFloat constructor which initialized to either zero/NaN but allowed you to arbitrarily set the category of the float.""
This reverts commit r185099.

Looks like both the ppc-64 and mips bots are still failing after I reverted this
change.

Since:

1. The mips bot always performs a clean build,
2. The ppc64-bot failed again after a clean build (I asked the ppc-64
maintainers to clean the bot which they did... Thanks Will!),

I think it is safe to assume that this change was not the cause of the failures
that said builders were seeing. Thus I am recomitting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185111 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-27 21:58:19 +00:00
Michael Gottesman
d6bd98d01c Revert "[APFloat] Removed APFloat constructor which initialized to either zero/NaN but allowed you to arbitrarily set the category of the float."
This reverts commit r185095. This is causing a FileCheck failure on
the 3dnow intrinsics on at least the mips/ppc bots but not on the x86
bots.

Reverting while I figure out what is going on.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185099 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-27 20:40:11 +00:00
Michael Gottesman
4da2ebeefb [APFloat] Removed APFloat constructor which initialized to either zero/NaN but allowed you to arbitrarily set the category of the float.
The category which an APFloat belongs to should be dependent on the
actual value that the APFloat has, not be arbitrarily passed in by the
user. This will prevent inconsistency bugs where the category and the
actual value in APFloat differ.

I also fixed up all of the references to this constructor (which were
only in LLVM).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185095 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-27 19:50:52 +00:00
Michael Gottesman
575694b6a7 [APFloat] Added support for parsing float strings which contain {inf,-inf,NaN,-NaN}.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184713 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-24 09:58:05 +00:00
Michael Gottesman
fdec0c7a73 [APFloat] Added make{Zero,Inf} methods and implemented get{Zero,Inf} on top of them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184712 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-24 09:58:02 +00:00
Michael Gottesman
daee0b0def [APFloat] Removed out of date comment from isNormal().
I already finished the isIEEENormal => isNormal transition. So isNormal is now
IEEE-754R compliant.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184687 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-24 04:19:37 +00:00
Michael Gottesman
db045ab153 [APFloat] Rename llvm::exponent_t => llvm::APFloat::ExponentType.
exponent_t is only used internally in APFloat and no exponent_t values are
exposed via the APFloat API. In light of such conditions it does not make any
sense to gum up the llvm namespace with said type. Plus it makes it clearer that
exponent_t is associated with APFloat.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184686 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-24 04:06:23 +00:00
Justin Holewinski
0ff4287fe2 [NVPTX] Add support for selecting CUDA vs OCL mode based on triple
IR for CUDA should use "nvptx[64]-nvidia-cuda", and IR for NV OpenCL should use "nvptx[64]-nvidia-nvcl"

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184579 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-21 18:51:49 +00:00
Michael Gottesman
d3d03fe758 [APFloat] Added missing doxygen module closing statement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184526 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-21 04:14:17 +00:00
Michael Gottesman
a1694e5784 [APFloat] Rename isIEEENormal => isNormal and remove old isNormal method.
The old isNormal is already functionally replaced by the method isFiniteNonZero
in r184350 and all references to said method were replaced in LLVM/clang in
r184356/134366.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184449 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-20 18:34:38 +00:00
Michael Gottesman
07969dc8ae [APFloat] Converted all references to APFloat::isNormal => APFloat::isFiniteNonZero.
Turns out all the references were in llvm and not in clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184356 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 21:23:18 +00:00
Michael Gottesman
7032c883cd [APFloat] Added isFiniteNonZero predicate.
This is the first patch in a series of patches to rename isNormal =>
isFiniteNonZero and isIEEENormal => isNormal. In order to prevent careless
errors on my part the overall plan is:

1. Add the isFiniteNonZero predicate with tests. I can do this in a method
independent of isNormal. (This step is this patch).
2. Convert all references to isNormal with isFiniteNonZero. My plan is to
comment out isNormal locally and continually convert isNormal references =>
isFiniteNonZero until llvm/clang compiles.
3. Remove old isNormal and rename isIEEENormal to isNormal.
4. Look through all of said references from patch 2 and see if we can simplify
them by using the new isNormal.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184350 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 21:00:17 +00:00
Michael Gottesman
c896020dd8 [APFloat] Expose isSmallest/isLargest as public methods.
I have had several requests to expose these two methods as public for various
potential optimizations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184345 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 20:31:54 +00:00
Benjamin Kramer
8dcff88982 APInt: Add a fast case for isAllOnesValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184042 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-15 11:32:09 +00:00
Duncan Sands
48d5e750a8 Avoid warnings about unused parameters that tend to come up a lot when
building outside projects with a different compiler than that used to build
LLVM itself (eg switching between gcc and clang).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183650 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-10 12:09:30 +00:00
Benjamin Kramer
a77376dae1 BitVector: Do the right thing in all() when Size is a multiple of BITWORD_SIZE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183525 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-07 15:14:31 +00:00
Benjamin Kramer
597253da97 Optimize BitVector::all().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183521 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-07 14:14:38 +00:00
Michael Gottesman
b30718af1a IEEE-754R 5.7.2 General Operations is* operations (except for isCanonical).
Specifically the following work was done:

1. If the operation was not implemented, I implemented it.

2. If the operation was already implemented, I just moved its location
in the APFloat header into the IEEE-754R 5.7.2 section. If the name was
incorrect, I put in a comment giving the true IEEE-754R name.

Also unittests have been added for all of the functions which did not
already have a unittest.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183179 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-04 03:46:25 +00:00
Manuel Klimek
abff3aa821 Introduce needsCleanup() for APFloat and APInt.
This is needed in clang so one can check if the object needs the
destructor called after its memory was freed. This is useful when
creating many APInt/APFloat objects with placement new, where the
overhead of tracking the pointers for cleanup is significant.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183100 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-03 13:03:05 +00:00
Benjamin Kramer
da8b91a073 DenseMap: Move the key into place when we use the move version of operator[].
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183074 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-01 16:37:55 +00:00
Michael Gottesman
2e2922cd90 Removed a comment above an include which is unnecessary and added a missing closing @} for a doxygen comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183065 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-01 00:48:24 +00:00
Michael Gottesman
8a70f5815d Added method comments for getZero,getInf.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183064 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-01 00:44:29 +00:00
Michael Gottesman
7f88a3b20d Updated APFloat's comments to fit the LLVM style guide.
Also added a few more method comments and performed some copy editing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183063 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-01 00:44:05 +00:00
Michael Gottesman
964722ca40 Implement IEEE-754R 2008 nextUp/nextDown functions in the guise of the function APFloat::next(bool nextDown).
rdar://13852078

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182945 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-30 18:07:13 +00:00
Michael Gottesman
a32edcfbc5 [APInt] Implement tcDecrement as a counterpart to tcIncrement. This is for use in APFloat IEEE-754R 2008 nextUp/nextDown function.
rdar://13852078

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182801 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-28 19:50:20 +00:00
Chris Lattner
03abfc7114 Disable the StringMapEntry copy constructor, to make sure we
reject things like: "for (auto Entry : SomeStringMap)".  Previously
this would copy the value but not the tail allocated string data
(the key).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182713 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-25 22:28:22 +00:00
Michael Gottesman
fce7b6b5d9 clang formatted APFloat.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182686 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-24 22:40:37 +00:00
Michael Gottesman
612ca08e66 clang-formatted APInt.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182685 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-24 22:38:49 +00:00
Michael J. Spencer
c6af2432c8 Replace Count{Leading,Trailing}Zeros_{32,64} with count{Leading,Trailing}Zeros.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182680 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-24 22:23:49 +00:00
Michael Gottesman
a519666423 Fixed trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182556 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-23 02:03:05 +00:00
Michael Gottesman
cbc8777c58 Updated the comments of APInt.h to match the llvm style guide and be consistent. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182555 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-23 02:00:03 +00:00
Reid Kleckner
9e8dbe0d2d Remove unneeded call to a base default ctor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182503 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-22 19:07:26 +00:00
Reid Kleckner
039c56fb57 Fix StringMapIterator compile errors for non-MSVC compilers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182493 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-22 17:32:15 +00:00
Reid Kleckner
284ffa3863 [Support] Add StringMap::swap() and a default ctor for iterators
This makes StringMap<> more compatible with std::map<std::string, ...>.

Differential Revision: http://llvm-reviews.chandlerc.com/D842

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182487 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-22 17:10:11 +00:00
Richard Smith
6f43379e23 Comment update: these things are called "configuration names" these days, not
"triples". Also remove the implication that they're only used for specifying a
target.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182335 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-20 23:55:41 +00:00
Douglas Gregor
df6e5fb77c Add missing #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181900 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-15 17:41:02 +00:00
David Blaikie
453f4f0130 Use only explicit bool conversion operators
BitVector/SmallBitVector::reference::operator bool remain implicit since
they model more exactly a bool, rather than something else that can be
boolean tested.

The most common (non-buggy) case are where such objects are used as
return expressions in bool-returning functions or as boolean function
arguments. In those cases I've used (& added if necessary) a named
function to provide the equivalent (or sometimes negative, depending on
convenient wording) test.

One behavior change (YAMLParser) was made, though no test case is
included as I'm not sure how to reach that code path. Essentially any
comparison of llvm::yaml::document_iterators would be invalid if neither
iterator was at the end.

This helped uncover a couple of bugs in Clang - test cases provided for
those in a separate commit along with similar changes to `operator bool`
instances in Clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181868 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-15 07:36:59 +00:00
Dmitri Gribenko
5c332dbd30 Add ArrayRef constructor from None, and do the cleanups that this constructor enables
Patch by Robert Wilhelm.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181138 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-05 00:40:33 +00:00
Richard Sandiford
0512910867 [SystemZ] Add llvm::Triple::systemz
First step towards reinstating the SystemZ backend.  Tests will be
included in the main backend patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181007 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-03 11:05:17 +00:00