| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 211507
|
|
|
|
| |
llvm-svn: 211414
|
|
|
|
| |
llvm-svn: 211413
|
|
|
|
| |
llvm-svn: 211409
|
|
|
|
|
|
| |
This convinces clang-format to leave a newline.
llvm-svn: 211406
|
|
|
|
| |
llvm-svn: 211337
|
|
|
|
| |
llvm-svn: 211336
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After a number of previous small iterations, the functions
llvm_start_multithreaded() and llvm_stop_multithreaded() have
been reduced essentially to no-ops. This change removes them
entirely.
Reviewed by: rnk, dblaikie
Differential Revision: http://reviews.llvm.org/D4216
llvm-svn: 211287
|
|
|
|
|
|
|
|
| |
OR-result.
Mark conversion operator explicit and const qualify comparison operators.
llvm-svn: 211244
|
|
|
|
|
|
| |
with MSVC
llvm-svn: 211093
|
|
|
|
|
|
|
| |
These were committed accidentally from the wrong branch before having
a review sign-off.
llvm-svn: 211072
|
|
|
|
| |
llvm-svn: 211067
|
|
|
|
|
|
|
|
|
| |
given in the Unicode spec
That is, replace every maximal subpart of an ill-formed subsequence with one
U+FFFD.
llvm-svn: 211015
|
|
|
|
|
|
| |
value in place
llvm-svn: 210976
|
|
|
|
|
|
| |
The next commit will add swapByteOrder(), acting in-place
llvm-svn: 210973
|
|
|
|
|
|
|
|
|
|
|
| |
While std::error_code itself seems to work OK in all platforms, there
are few annoying differences with regards to the std::errc enumeration.
This patch adds a simple llvm enumeration, which will hopefully avoid build
breakages in other platforms and surprises as we get more uses of
std::error_code.
llvm-svn: 210920
|
|
|
|
|
|
| |
This finishes the transition to std::error_code.
llvm-svn: 210877
|
|
|
|
|
|
| |
This should make sure that most new uses use the std prefix.
llvm-svn: 210835
|
|
|
|
|
|
|
| |
This will allow inlining get_magic, which should in turn fix one of the mingw
build problems after the switch to std::error_code.
llvm-svn: 210712
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The idea of this patch is to turn llvm/Support/system_error.h into a
transitional header that just brings in the erorr_code api to the llvm
namespace. I will remove it shortly afterwards.
The cases where the general idea needed some tweaking:
* std::errc is a namespace in msvc, so we cannot use "using std::errc". I could
add an #ifdef, but there were not that many uses, so I just added std:: to
them in this patch.
* Template specialization had to be moved to the std namespace in this
patch set already.
* The msvc implementation of default_error_condition doesn't seem to
provide the same transformations as we need. Not too surprising since
the standard doesn't actually say what "equivalent" means. I fixed the
problem by keeping our old mapping and using it at error_code
construction time.
Despite these shortcomings I think this is still a good thing. Some reasons:
* The different implementations of system_error might improve over time.
* It removes 925 lines of code from llvm already.
* It removes 6313 bytes from the text segment of the clang binary when
it is built with gcc and 2816 bytes when building with clang and
libstdc++.
llvm-svn: 210687
|
|
|
|
|
|
|
|
|
|
| |
MSVC doesn't seem to provide any is_error_code_enum enumeration for the
windows errors.
Fortunately very few places in llvm have to handle raw windows errors, so
we can just construct the corresponding error_code directly.
llvm-svn: 210631
|
|
|
|
| |
llvm-svn: 210442
|
|
|
|
| |
llvm-svn: 210072
|
|
|
|
|
|
|
| |
There is no std::error_code::success, so this removes much of the noise
in transitioning to std::error_code.
llvm-svn: 209952
|
|
|
|
| |
llvm-svn: 209951
|
|
|
|
| |
llvm-svn: 209102
|
|
|
|
|
|
| |
r207552, r207553 and r207554 all had bad test names.
llvm-svn: 207560
|
|
|
|
| |
llvm-svn: 207554
|
|
|
|
| |
llvm-svn: 207553
|
|
|
|
|
|
|
| |
Move a detailed test of `BranchProbability::scale()` from
`BlockFrequencyTest` over to `BranchProbabilityTest`.
llvm-svn: 207552
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change `BlockFrequency` to defer to `BranchProbability::scale()` and
`BranchProbability::scaleByInverse()`.
This removes `BlockFrequency::scale()` from its API (and drops the
ability to see the remainder), but the only user was the unit tests. If
some code in the future needs an API that exposes the remainder, we can
add something to `BranchProbability`, but I find that unlikely.
llvm-svn: 207550
|
|
|
|
|
|
|
| |
Add API to `BranchProbability` for scaling big integers. Next job is to
rip the logic out of `BlockMass` and `BlockFrequency`.
llvm-svn: 207544
|
|
|
|
| |
llvm-svn: 207540
|
|
|
|
|
|
| |
Based on review feedback from Dave on the original patch.
llvm-svn: 207146
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Boost's iterator_adaptor, and a specific adaptor which iterates over
pointees when wrapped around an iterator over pointers.
This is the result of a long discussion on IRC with Duncan Smith, Dave
Blaikie, Richard Smith, and myself. Essentially, I could use some subset
of the iterator facade facilities often used from Boost, and everyone
seemed interested in having the functionality in a reasonably generic
form. I've tried to strike a balance between the pragmatism and the
established Boost design. The primary differences are:
1) Delegating to the standard iterator interface names rather than
special names that then make up a second iterator-like API.
2) Using the name 'pointee_iterator' which seems more clear than
'indirect_iterator'. The whole business of calling the '*p' operation
'pointer indirection' in the standard is ... quite confusing. And
'dereference' is no better of a term for moving from a pointer to
a reference.
Hoping Duncan, and others continue to provide comments on this until
we've got a nice, minimal abstraction.
llvm-svn: 207069
|
|
|
|
| |
llvm-svn: 206372
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
by removing the MallocSlabAllocator entirely and just using
MallocAllocator directly. This makes all off these allocators expose and
utilize the same core interface.
The only ugly part of this is that it exposes the fact that the JIT
allocator has no real handling of alignment, any more than the malloc
allocator does. =/ It would be nice to fix both of these to support
alignments, and then to leverage that in the BumpPtrAllocator to do less
over allocation in order to manually align pointers. But, that's another
patch for another day. This patch has no functional impact, it just
removes the somewhat meaningless wrapper around MallocAllocator.
llvm-svn: 206267
|
|
|
|
|
|
|
|
|
|
|
|
| |
abstract interface. The only user of this functionality is the JIT
memory manager and it is quite happy to have a custom type here. This
removes a virtual function call and a lot of unnecessary abstraction
from the common case where this is just a *very* thin vaneer around
a call to malloc.
Hopefully still no functionality changed here. =]
llvm-svn: 206149
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
slabs rather than embedding a singly linked list in the slabs
themselves. This has a few advantages:
- Better utilization of the slab's memory by not wasting 16-bytes at the
front.
- Simpler allocation strategy by not having a struct packed at the
front.
- Avoids paging every allocated slab in just to traverse them for
deallocating or dumping stats.
The latter is the really nice part. Folks have complained from time to
time bitterly that tearing down a BumpPtrAllocator, even if it doesn't
run any destructors, pages in all of the memory allocated. Now it won't.
=]
Also resolves a FIXME with the scaling of the slab sizes. The scaling
now disregards specially sized slabs for allocations larger than the
threshold.
llvm-svn: 206147
|
|
|
|
|
|
|
| |
Introduce ScalarTraits::mustQuote which determines whether or not a
StringRef needs quoting before it is acceptable to output.
llvm-svn: 205955
|
|
|
|
|
|
|
|
|
| |
Don't quote octal compatible strings if they are only two wide, they
aren't ambiguous.
This reverts commit r205857 which reverted r205857.
llvm-svn: 205914
|
|
|
|
|
|
|
|
| |
This reverts commit r205839.
It broke several tests in lld.
llvm-svn: 205857
|
|
|
|
|
|
|
|
|
|
| |
YAMLIO would turn a BinaryRef into the string 0000000004000000.
However, the leading zero causes parsers to interpret it as being an
octal number instead of a hexadecimal one.
Instead, escape such strings as needed.
llvm-svn: 205839
|
|
|
|
|
|
|
|
| |
MemoryBuffer
This is the other half of r205676.
llvm-svn: 205677
|
|
|
|
|
|
|
|
|
|
|
|
| |
MemoryBuffer
This avoids an extra copy during decompression and avoids the use of
MemoryBuffer which is a weirdly esoteric device that includes unrelated
concepts like "file name" (its rather generic name is a bit misleading).
Similar refactoring of zlib::compress coming up.
llvm-svn: 205676
|
|
|
|
|
|
|
|
|
|
| |
parameters rather than runtime parameters.
There is only one user of these parameters and they are compile time for
that user. Making these compile time seems to better reflect their
intended usage as well.
llvm-svn: 205143
|
|
|
|
|
|
| |
more places.
llvm-svn: 205141
|
|
|
|
|
|
|
|
|
| |
It is impossible to create a hard link to a non existing file, so create a
dummy file, create the link an delete the dummy file.
On windows one cannot remove the current directory, so chdir first.
llvm-svn: 204719
|
|
|
|
|
|
|
| |
- create_link doesn't work for nonexistent file.
- remove cannot remove working directory.
llvm-svn: 204579
|