1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 11:33:24 +02:00
Commit Graph

23 Commits

Author SHA1 Message Date
Eugene Zelenko
0ebce618ad Fix Clang-tidy readability-redundant-control-flow warnings; other minor fixes.
Differential revision: http://reviews.llvm.org/D16793

llvm-svn: 259539
2016-02-02 18:20:45 +00:00
Benjamin Kramer
69a3fdb314 Fix some comment typos.
llvm-svn: 244402
2015-08-08 18:27:36 +00:00
Diego Novillo
f19a3e9172 Fix infinite recursion in ScaledNumber::toInt.
Patch from dexonsmith. The call to toInt() was calling compareTo() which
in some cases would call back to toInt(), creating an infinite loop.

Fixed by simplifying the logic in compareTo() to avoid the co-recursion.

llvm-svn: 236326
2015-05-01 17:59:15 +00:00
Diego Novillo
14246c3af8 Fix private constructor for ScaledNumber.
Summary:
The private constructor for ScaledNumber was using uint64_t instead of
DigitsT. This was preventing instantiations of ScaledNumber with
anything other than uint64_t types.

In implementing the tests, I ran into another issue. Operators >>= and
<<= did not have variants for accepting other ScaledNumber as the shift
argument. This is expected by the SCALED_NUMBER_BOP.

It makes no sense to allow shifting a ScaledNumber by another
ScaledNumber, so the patch includes two new templates for shifting
ScaledNumbers.

Reviewers: dexonsmith

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D9350

llvm-svn: 236232
2015-04-30 13:22:48 +00:00
Chandler Carruth
0b619fcc8e [cleanup] Re-sort all the #include lines in LLVM using
utils/sort_includes.py.

I clearly haven't done this in a while, so more changed than usual. This
even uncovered a missing include from the InstrProf library that I've
added. No functionality changed here, just mechanical cleanup of the
include order.

llvm-svn: 225974
2015-01-14 11:23:27 +00:00
Alexey Samsonov
529d99c295 Include <tuple> for std::tie
llvm-svn: 211569
2014-06-24 05:59:52 +00:00
Duncan P. N. Exon Smith
2b829a7a79 Support: Move class ScaledNumber
ScaledNumber has been cleaned up enough to pull out of BFI now.  Still
work to do there (tests for shifting, bloated printing code, etc.), but
it seems clean enough for its new home.

llvm-svn: 211562
2014-06-24 00:38:09 +00:00
Duncan P. N. Exon Smith
339e2238e8 Support: Return ScaledNumbers::MaxScale from getQuotient()
Return MaxScale now that it's available.

llvm-svn: 211559
2014-06-24 00:26:08 +00:00
Duncan P. N. Exon Smith
6ccaf0fa23 Support: Extract ScaledNumbers::MinScale and MaxScale
llvm-svn: 211558
2014-06-24 00:15:19 +00:00
Duncan P. N. Exon Smith
7e90f4a718 Fix comments from r211553
llvm-svn: 211554
2014-06-23 23:17:36 +00:00
Duncan P. N. Exon Smith
edde0a70d5 Support: Extract ScaledNumbers::getSum() and getDifference()
llvm-svn: 211553
2014-06-23 23:15:25 +00:00
Duncan P. N. Exon Smith
422a9a9c69 Support: Return scale from ScaledNumbers::matchScales()
This will be convenient when extracting `ScaledNumbers::getSum()`.

llvm-svn: 211552
2014-06-23 23:14:51 +00:00
Duncan P. N. Exon Smith
dd8e45c6d7 Support: Extract ScaledNumbers::matchScale()
llvm-svn: 211531
2014-06-23 20:40:45 +00:00
Duncan P. N. Exon Smith
c484dba251 Cleanup r211507
llvm-svn: 211521
2014-06-23 18:08:58 +00:00
Duncan P. N. Exon Smith
ef178c4288 Support: Extract ScaledNumbers::compare()
llvm-svn: 211507
2014-06-23 17:47:40 +00:00
Duncan P. N. Exon Smith
282a896d30 Support: ScaledNumber: Fix inconsistent test names
llvm-svn: 211414
2014-06-20 22:36:09 +00:00
Duncan P. N. Exon Smith
63810bb7e2 Support: Write ScaledNumbers::getLg{,Floor,Ceiling}()
llvm-svn: 211413
2014-06-20 22:33:40 +00:00
Duncan P. N. Exon Smith
db0cbc8b8a Support: Write ScaledNumber::getQuotient() and getProduct()
llvm-svn: 211409
2014-06-20 21:47:47 +00:00
Duncan P. N. Exon Smith
6fde469206 Support: Cleanup ScaledNumber::getAdjusted() doc
llvm-svn: 211407
2014-06-20 21:44:36 +00:00
Duncan P. N. Exon Smith
276d22efba Support: Mark end of namespaces
This convinces clang-format to leave a newline.

llvm-svn: 211406
2014-06-20 21:43:20 +00:00
Duncan P. N. Exon Smith
d63ac88ff6 Support: Clean up getRounded() tests
llvm-svn: 211337
2014-06-20 02:31:07 +00:00
Duncan P. N. Exon Smith
4d04667b18 Support: Write ScaledNumbers::getAdjusted()
llvm-svn: 211336
2014-06-20 02:31:03 +00:00
Duncan P. N. Exon Smith
2ce70890ce Support: Write ScaledNumbers::getRounded()
Start extracting helper functions out of -block-freq's `UnsignedFloat`
into `Support/ScaledNumber.h` with the eventual goal of moving and
renaming the class to `ScaledNumber`.

The bike shed about names is still being painted, but I'm going with
this for now.

llvm-svn: 211333
2014-06-20 01:30:43 +00:00