- Jan 22, 2015
-
-
Alexey Bataev authored
Need to add initialization of AtomicInfo::EvaluationKind field llvm-svn: 226787
-
Alexey Bataev authored
"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
-
Alexey Bataev authored
Accidentally modified file SemaType.cpp must be restored to its original state. llvm-svn: 226785
-
Alexey Bataev authored
"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
-
Chandler Carruth authored
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
-
Greg Fitzgerald authored
From: Greg Fitzgerald <garious@gmail.com> llvm-svn: 226782
-
Chandler Carruth authored
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
-
Francisco Lopes da Silva authored
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
-
Saleem Abdulrasool authored
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
-
Richard Smith authored
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
-
Chandler Carruth authored
used earlier. NFC. llvm-svn: 226777
-
Richard Smith authored
llvm-svn: 226776
-
Duncan P. N. Exon Smith authored
llvm-svn: 226775
-
Duncan P. N. Exon Smith authored
Use begin/end functions so that users don't need to know how these weird things work. llvm-svn: 226774
-
Duncan P. N. Exon Smith authored
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
-
Duncan P. N. Exon Smith authored
Reduce code duplication between `DIBuilder` and `DIExpressionIterator` by implementing a `getNumber()` directly in the iterator. llvm-svn: 226772
-
Enrico Granata authored
Add an API to ValueObject that iterates over the entire parent chain via a callback, and rewrite GetRoot() in terms of this general iteration API. NFC llvm-svn: 226771
-
Duncan P. N. Exon Smith authored
Extract this so it can be reused. llvm-svn: 226770
-
Chris Bieneman authored
Making deleted copy constructors and operators to be private for better diagnostics when deleted is not available. llvm-svn: 226769
-
Reid Kleckner authored
llvm-svn: 226768
-
Reid Kleckner authored
llvm-svn: 226767
-
Reid Kleckner authored
Minor optimization of code like __try { ... } __except(1) { ... }. llvm-svn: 226766 -
Richard Smith authored
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
-
Justin Bogner authored
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
-
Chris Bieneman authored
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
-
Richard Smith authored
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
-
Reid Kleckner authored
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 -
Rafael Espindola authored
This reverts commit r226758. Looks like rnk's 226757 fixed the real issue. Sorry for the noise. llvm-svn: 226759
-
Rafael Espindola authored
llvm-svn: 226758
-
Reid Kleckner authored
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
-
Richard Smith authored
llvm-svn: 226756
-
Sanjoy Das authored
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
-
Hans Wennborg authored
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
-
Jason Molenda authored
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
-
Jason Molenda authored
work again. llvm-svn: 226752
-
Rafael Espindola authored
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
-
Paul Robinson authored
llvm-svn: 226750
-
Jonathan Roelofs authored
llvm-svn: 226749
-
Adrian Prantl authored
llvm-svn: 226748
-
Adrian Prantl authored
Addresses review comments for r226627. llvm-svn: 226747
-