| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
name of the iOS simulator platform which was changed
in r181631.
<rdar://problem/19200084>
llvm-svn: 226789
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
"omp atomic read [seq_cst]" accepts expressions "v=x;". In this patch we perform
an atomic load of "x" (using builtin atomic loading instructions or a call to
"atomic_load()" for simple lvalues and "kmpc_atomic_start();load
<x>;kmpc_atomic_end();" for other lvalues), convert the result of loading to
type of "v" (using EmitScalarConversion() for simple types and
EmitComplexToScalarConversion() for conversions from complex to scalar) and then
store the result in "v".)
Differential Revision: http://reviews.llvm.org/D6431
llvm-svn: 226788
|
| |
|
|
|
|
| |
Need to add initialization of AtomicInfo::EvaluationKind field
llvm-svn: 226787
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
"omp atomic read [seq_cst]" accepts expressions "v=x;". In this patch we perform
an atomic load of "x" (using builtin atomic loading instructions or a call to
"atomic_load()" for simple lvalues and "kmpc_atomic_start();load
<x>;kmpc_atomic_end();" for other lvalues), convert the result of loading to
type of "v" (using EmitScalarConversion() for simple types and
EmitComplexToScalarConversion() for conversions from complex to scalar) and then
store the result in "v".)
Differential Revision: http://reviews.llvm.org/D6431
llvm-svn: 226786
|
| |
|
|
|
|
| |
Accidentally modified file SemaType.cpp must be restored to its original state.
llvm-svn: 226785
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
"omp atomic read [seq_cst]" accepts expressions "v=x;". In this patch we perform
an atomic load of "x" (using builtin atomic loading instructions or a call to
"atomic_load()" for simple lvalues and "kmpc_atomic_start();load
<x>;kmpc_atomic_end();" for other lvalues), convert the result of loading to
type of "v" (using EmitScalarConversion() for simple types and
EmitComplexToScalarConversion() for conversions from complex to scalar) and then
store the result in "v".
Differential Revision: http://reviews.llvm.org/D6431
llvm-svn: 226784
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
creating a non-internal header file for the InstCombine pass.
I thought about calling this InstCombiner.h or in some way more clearly
associating it with the InstCombiner clas that it is primarily defining,
but there are several other utility interfaces defined within this for
InstCombine. If, in the course of refactoring, those end up moving
elsewhere or going away, it might make more sense to make this the
combiner's header alone.
Naturally, this is a bikeshed to a certain degree, so feel free to lobby
for a different shade of paint if this name just doesn't suit you.
llvm-svn: 226783
|
| |
|
|
|
| |
From: Greg Fitzgerald <garious@gmail.com>
llvm-svn: 226782
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ever stored to always use a legal integer type if one is available.
Regardless of whether this particular type is good or bad, it ensures we
don't get weird differences in generated code (and resulting
performance) from "equivalent" patterns that happen to end up using
a slightly different type.
After some discussion on llvmdev it seems everyone generally likes this
canonicalization. However, there may be some parts of LLVM that handle
it poorly and need to be fixed. I have at least verified that this
doesn't impede GVN and instcombine's store-to-load forwarding powers in
any obvious cases. Subtle cases are exactly what we need te flush out if
they remain.
Also note that this IR pattern should already be hitting LLVM from Clang
at least because it is exactly the IR which would be produced if you
used memcpy to copy a pointer or floating point between memory instead
of a variable.
llvm-svn: 226781
|
| |
|
|
|
|
|
| |
This function has been just included with the initial support for C++
parameter completion and it's trivial enough to be a static member.
llvm-svn: 226780
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Windows supports a restricted set of relocations (compared to ARM ELF). In some
cases, we may end up generating an unsupported relocation. This can occur with
bad input to the assembler in particular (the frontend should never generate
code that cannot be compiled). Generate an error rather than just aborting.
The change in the API is driven by the desire to provide a slightly more helpful
message for debugging purposes.
llvm-svn: 226779
|
| |
|
|
|
|
|
|
| |
record, and that class declaration is not the canonical definition of the
class, be sure to add the class to the list of classes that are consulted when
we look up a special member in the canonical definition.
llvm-svn: 226778
|
| |
|
|
|
|
| |
used earlier. NFC.
llvm-svn: 226777
|
| |
|
|
| |
llvm-svn: 226776
|
| |
|
|
| |
llvm-svn: 226775
|
| |
|
|
|
|
|
| |
Use begin/end functions so that users don't need to know how these weird
things work.
llvm-svn: 226774
|
| |
|
|
|
|
|
|
|
| |
This code was confusing, since it created a `DIExpressionIterator` from
an invalid start point (although it wasn't wrong: it never actually
iterated). Now that the underlying iterator has `getNumber()`, just use
it directly.
llvm-svn: 226773
|
| |
|
|
|
|
|
| |
Reduce code duplication between `DIBuilder` and `DIExpressionIterator`
by implementing a `getNumber()` directly in the iterator.
llvm-svn: 226772
|
| |
|
|
|
|
| |
callback, and rewrite GetRoot() in terms of this general iteration API. NFC
llvm-svn: 226771
|
| |
|
|
|
|
| |
Extract this so it can be reused.
llvm-svn: 226770
|
| |
|
|
|
|
| |
diagnostics when deleted is not available.
llvm-svn: 226769
|
| |
|
|
| |
llvm-svn: 226768
|
| |
|
|
| |
llvm-svn: 226767
|
| |
|
|
|
|
| |
Minor optimization of code like __try { ... } __except(1) { ... }.
llvm-svn: 226766
|
| |
|
|
|
|
|
| |
on top of a local declaration of the same entity, we still need to remember
that we loaded the first one or we may fail to merge the second one properly.
llvm-svn: 226765
|
| |
|
|
|
|
|
|
|
|
| |
We don't emit any coverage mapping for uncovered functions that come
from system headers, but we were creating a GlobalVariable with each
of their names. This is wasteful since the linker will need to dead
strip the unused symbols, and it can lead to issues when merging
coverage with others TUs that do have coverage for those functions.
llvm-svn: 226764
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The default copy and assignment operators for these objects probably don't actually do what the clients intend, so they should be deleted.
Places using the assignment operator to set the value of an option should cast to the option's data type first to call into the override for operator=. Places using the copy constructor just need to be changed to not copy (i.e. passing by const reference instead of value).
Reviewers: dexonsmith, chandlerc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7114
llvm-svn: 226762
|
| |
|
|
|
|
|
| |
load the definition data from the declaration itself. In that case, merge
properly; don't assume the prior definition is the same as our own.
llvm-svn: 226761
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The lowering looks a lot like normal EH lowering, with the exception
that the exceptions are caught by executing filter expression code
instead of matching typeinfo globals. The filter expressions are
outlined into functions which are used in landingpad clauses where
typeinfo would normally go.
Major aspects that still need work:
- Non-call exceptions in __try bodies won't work yet. The plan is to
outline the __try block in the frontend to keep things simple.
- Filter expressions cannot use local variables until capturing is
implemented.
- __finally blocks will not run after exceptions. Fixing this requires
work in the LLVM SEH preparation pass.
The IR lowering looks like this:
// C code:
bool safe_div(int n, int d, int *r) {
__try {
*r = normal_div(n, d);
} __except(_exception_code() == EXCEPTION_INT_DIVIDE_BY_ZERO) {
return false;
}
return true;
}
; LLVM IR:
define i32 @filter(i8* %e, i8* %fp) {
%ehptrs = bitcast i8* %e to i32**
%ehrec = load i32** %ehptrs
%code = load i32* %ehrec
%matches = icmp eq i32 %code, i32 u0xC0000094
%matches.i32 = zext i1 %matches to i32
ret i32 %matches.i32
}
define i1 zeroext @safe_div(i32 %n, i32 %d, i32* %r) {
%rr = invoke i32 @normal_div(i32 %n, i32 %d)
to label %normal unwind to label %lpad
normal:
store i32 %rr, i32* %r
ret i1 1
lpad:
%ehvals = landingpad {i8*, i32} personality i32 (...)* @__C_specific_handler
catch i8* bitcast (i32 (i8*, i8*)* @filter to i8*)
%ehptr = extractvalue {i8*, i32} %ehvals, i32 0
%sel = extractvalue {i8*, i32} %ehvals, i32 1
%filter_sel = call i32 @llvm.eh.seh.typeid.for(i8* bitcast (i32 (i8*, i8*)* @filter to i8*))
%matches = icmp eq i32 %sel, %filter_sel
br i1 %matches, label %eh.except, label %eh.resume
eh.except:
ret i1 false
eh.resume:
resume
}
Reviewers: rjmccall, rsmith, majnemer
Differential Revision: http://reviews.llvm.org/D5607
llvm-svn: 226760
|
| |
|
|
|
|
|
|
|
| |
This reverts commit r226758.
Looks like rnk's 226757 fixed the real issue.
Sorry for the noise.
llvm-svn: 226759
|
| |
|
|
| |
llvm-svn: 226758
|
| |
|
|
|
|
|
|
| |
It fails on Windows due to another temporary being emitted first, so the
LLVM internal renaming scheme gives out the name
__block_descriptor_tmp1.
llvm-svn: 226757
|
| |
|
|
| |
llvm-svn: 226756
|
| |
|
|
|
|
|
|
|
|
|
|
| |
ScalarEvolution currently lowers a subtraction recurrence to an add
recurrence with the same no-wrap flags as the subtraction. This is
incorrect because `sub nsw X, Y` is not the same as `add nsw X, -Y`
and `sub nuw X, Y` is not the same as `add nuw X, -Y`. This patch
fixes the issue, and adds two test cases demonstrating the bug.
Differential Revision: http://reviews.llvm.org/D7081
llvm-svn: 226755
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
malloc.h
Importing _Builtin_intrinsics.sse and avx would transitively pull in those
headers, and the test would fail when building in an environment where
they were not available on the include path.
This fixes PR20995 for me.
Differential Revision: http://reviews.llvm.org/D7112
llvm-svn: 226754
|
| |
|
|
|
|
|
|
|
|
|
|
| |
buffer and to add a nul terminator byte, was incorrectly resizing
its buffer so the nul terminator was not included.
Problem found by clang ASAN instrumentation when using an
expression prefix file which was read via this mechanism.
<rdar://problem/19556459>
llvm-svn: 226753
|
| |
|
|
|
|
| |
work again.
llvm-svn: 226752
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently we emit DeferredDeclsToEmit in reverse order. This patch changes that.
The advantages of the change are that
* The output order is a bit closer to the source order. The change to
test/CodeGenCXX/pod-member-memcpys.cpp is a good example.
* If we decide to deffer more, it will not cause as large changes in the
estcases as it would without this patch.
llvm-svn: 226751
|
| |
|
|
| |
llvm-svn: 226750
|
| |
|
|
| |
llvm-svn: 226749
|
| |
|
|
| |
llvm-svn: 226748
|
| |
|
|
|
|
| |
Addresses review comments for r226627.
llvm-svn: 226747
|
| |
|
|
|
|
|
| |
function. This is a bit tidier anyways and will make a subsquent patch
simpler as I want to add another case to this combine.
llvm-svn: 226746
|
| |
|
|
|
|
|
|
|
|
| |
Added most of the missing integer vector folding patterns for SSE (to SSE42) and AVX1.
The most useful of these are probably the i32/i64 extraction, i8/i16/i32/i64 insertions, zero/sign extension, unsigned saturation subtractions, i64 subtractions and the variable mask blends (pblendvb) - others include CLMUL, SSE42 string comparisons and bit tests.
Differential Revision: http://reviews.llvm.org/D7094
llvm-svn: 226745
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
inferring the function signature. This works well where the ABI doesn't
distinguish between variadic and fixed argument lists, but on arm64 the
calling conventions differ. The default assumption works for fixed argument
lists, but variadic functions require explicit prototypes to be called.
By far the most common case where this is an issue is when attempting to use
printf(). This change augments the default expression prefix to include a
working variadic prototype for the function.
<rdar://problem/19024779>
llvm-svn: 226744
|
| |
|
|
| |
llvm-svn: 226743
|
| |
|
|
| |
llvm-svn: 226742
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Summary: cl::HideUnrelatedOptions allows tools to hide all options not part of a specific OptionCategory. This is the common use case for cl::getRegisteredOptions, which should be deprecated in the future because it exposes implementation details of command line parsing.
Reviewers: dexonsmith
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D7109
llvm-svn: 226741
|
| |
|
|
|
|
|
| |
It can help with argument juggling on some targets, and is generally a good
idea.
llvm-svn: 226740
|
| |
|
|
| |
llvm-svn: 226739
|