| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
make VariadicFunction actually be trivial. Do so, and also make it look
more like your standard trivial functor by making it a struct with no
access specifiers. The unit test is updated to initialize its functors
properly.
llvm-svn: 146827
|
| |
|
|
|
|
|
|
| |
Hexatridecimal was added in r139695.
And fix the unittest that now triggers the assert.
llvm-svn: 146754
|
| |
|
|
|
|
| |
bit of style, sorry.
llvm-svn: 146733
|
| |
|
|
|
|
|
|
|
|
|
|
| |
variadic-like functions in C++98. See the comments in the header file
for a more detailed description of how these work. We plan to use these
extensively in the AST matching library. This code and idea were
originally authored by Zhanyong Wan. I've condensed it using macros
to reduce repeatition and adjusted it to fit better with LLVM's ADT.
Thanks to both David Blaikie and Doug Gregor for the review!
llvm-svn: 146729
|
| |
|
|
|
|
|
|
| |
was returning incorrect values in rare cases, and incorrectly marking
exact conversions as inexact in some more common cases. Fixes PR11406, and a
missed optimization in test/CodeGen/X86/fp-stack-O0.ll.
llvm-svn: 145141
|
| |
|
|
|
|
|
|
|
| |
Based on Horspool's simplified version of Boyer-Moore. We use a constant-sized table of
uint8_ts to keep cache thrashing low, needles bigger than 255 bytes are uncommon anyways.
The worst case is still O(n*m) but we do a lot better on the average case now.
llvm-svn: 142061
|
| |
|
|
| |
llvm-svn: 141831
|
| |
|
|
|
|
| |
Found by accident while reviewing a patch to nearby code.
llvm-svn: 141816
|
| |
|
|
|
|
| |
integers where there is unsigned overflow. Fix APFloat::toString so that it doesn't depend on the incorrect behavior in common cases (and computes the correct result in some rare cases). Fixes PR11086.
llvm-svn: 141441
|
| |
|
|
|
|
| |
Thanks to Alexandru Dura and Jonas Paulsson for finding it.
llvm-svn: 140859
|
| |
|
|
| |
llvm-svn: 139695
|
| |
|
|
|
|
|
|
| |
The APFloat "Zero" test was actually calling the
APFloat(const fltSemantics &, integerPart) constructor, and EXPECT_EQ was
treating 0 and -0 as equal.
llvm-svn: 138745
|
| |
|
|
|
|
|
| |
whatever the size of unsigned is), though this can't actually
occur for any integer value of NUM_NODES.
llvm-svn: 136460
|
| |
|
|
| |
llvm-svn: 136432
|
| |
|
|
|
|
|
|
|
| |
more graphs, like all graphs with 5 nodes or less. With a 32 bit
unsigned type, the maximum is graphs with 6 nodes or less, but that
would take a while to test - 5 nodes or less already requires a few
seconds.
llvm-svn: 136354
|
| |
|
|
|
|
| |
iterates over SCC's.
llvm-svn: 136353
|
| |
|
|
|
|
|
|
| |
This computes every graph with 4 or fewer nodes, and checks that the SCC
class indeed returns exactly the simply connected components reachable
from the initial node.
llvm-svn: 136351
|
| |
|
|
|
|
| |
to print STL containers.
llvm-svn: 136213
|
| |
|
|
|
|
| |
to eliminate some casting.
llvm-svn: 135888
|
| |
|
|
|
|
|
|
|
| |
ambiguity
errors like the one corrected by r135261. Migrate all LLVM callers of the old
constructor to the new one.
llvm-svn: 135431
|
| |
|
|
| |
llvm-svn: 135375
|
| |
|
|
|
|
| |
memory for the result.
llvm-svn: 135259
|
| |
|
|
|
|
| |
const char* doesn't make sense. Have it return StringRef instead.
llvm-svn: 135167
|
| |
|
|
|
|
|
|
|
| |
vec.insert(vec.begin(), vec[3]);
The issue was that vec[3] returns a reference into the vector, which is invalidated when insert() memmove's the elements down to make space. The method needs to specifically detect and handle this case to correctly match std::vector's semantics.
Thanks to Howard Hinnant for clarifying the correct behavior, and explaining how std::vector solves this problem.
llvm-svn: 134554
|
| |
|
|
|
|
| |
Follow up to r133032.
llvm-svn: 133107
|
| |
|
|
|
|
| |
http://google1.osuosl.org:8011/builders/clang-i686-freebsd/builds/3548
llvm-svn: 133081
|
| |
|
|
| |
llvm-svn: 133075
|
| |
|
|
|
|
| |
and it is just as easy to use StringRef::substr() preceding StringRef::compare() to achieve the same thing.
llvm-svn: 130430
|
| |
|
|
|
|
| |
strncmp(). Unit tests also included.
llvm-svn: 129582
|
| |
|
|
|
|
|
|
|
| |
denormal multiplication.
Some platforms may treat denormals as zero, on other platforms multiplication
with a subnormal is slower than dividing by a normal.
llvm-svn: 128555
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The idea is, that if an ieee 754 float is divided by a power of two, we can
turn the division into a cheaper multiplication. This function sees if we can
get an exact multiplicative inverse for a divisor and returns it if possible.
This is the hard part of PR9587.
I tested many inputs against llvm-gcc's frotend implementation of this
optimization and didn't find any difference. However, floating point is the
land of weird edge cases, so any review would be appreciated.
llvm-svn: 128545
|
| |
|
|
|
|
|
|
| |
bits that are known zero in the divided number.
This will come in handy soon.
llvm-svn: 127828
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
approximation
of a constant had a minor typo introduced when copying it from the book, which
caused it to favor negative approximations over positive approximations in many
cases. Positive approximations require fewer operations beyond the multiplication.
In the case of division by 3, we still generate code that is a single instruction
larger than GCC's code.
llvm-svn: 126097
|
| |
|
|
|
|
| |
the loop.
llvm-svn: 124784
|
| |
|
|
|
|
|
|
|
| |
may be useful to understand "none", this is not the place for it. Tweak
the fix to Normalize while there: the fix added in 123990 works correctly,
but I like this way better. Finally, now that Triple understands some
non-trivial environment values, teach the unittests about them.
llvm-svn: 124720
|
| |
|
|
| |
llvm-svn: 124366
|
| |
|
|
|
|
| |
IR (wrong PCS) and passing the wrong information down llc via the target-triple printed in IR. I've fixed this by adding the parsing of EABI into LLVM's Triple class and using it to choose the correct PCS in Clang's Tools. A Clang patch is on its way to use this infrastructure.
llvm-svn: 123990
|
| |
|
|
|
|
|
|
|
|
| |
This implementation already exists as ConnectedVNInfoEqClasses in
LiveInterval.cpp, and it seems to be generally useful to have a light-weight way
of forming equivalence classes of small integers.
IntEqClasses doesn't allow enumeration of the elements in a class.
llvm-svn: 122293
|
| |
|
|
|
|
| |
monotonic keys.
llvm-svn: 122093
|
| |
|
|
|
|
|
|
| |
moves the iterator to end(), and it is valid to call it on end().
That means it is valid to call advanceTo() with any monotonic key sequence.
llvm-svn: 122092
|
| |
|
|
| |
llvm-svn: 122081
|
| |
|
|
| |
llvm-svn: 122019
|
| |
|
|
| |
llvm-svn: 121995
|
| |
|
|
|
|
|
|
|
|
|
| |
editing of the current interval.
These methods may cause coalescing, there are corresponding set*Unchecked
methods for editing without coalescing. The non-coalescing methods are useful
for applying monotonic transforms to all keys or values in a map without
accidentally coalescing transformed and untransformed intervals.
llvm-svn: 120829
|
| |
|
|
| |
llvm-svn: 120600
|
| |
|
|
|
|
| |
setAllBits(), setBit(unsigned), etc.
llvm-svn: 120564
|
| |
|
|
| |
llvm-svn: 120298
|
| |
|
|
|
|
|
|
|
|
|
| |
We always disallowed overlapping inserts with different values, and this makes
the insertion code smaller and faster.
If an overwriting insert is needed, it can be added as a separate method that
trims any existing intervals before inserting. The immediate use cases for
IntervalMap don't need this - they only use disjoint insertions.
llvm-svn: 120264
|
| |
|
|
|
|
|
| |
These iterators don't point anywhere, and they can't be compared to anything.
They are only good for assigning to.
llvm-svn: 120239
|
| |
|
|
|
|
|
| |
This is a version of find() that always searches forwards and is faster for
local searches.
llvm-svn: 120237
|