summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* [OPENMP] Codegen for 'omp barrier' directive.Alexey Bataev2014-12-055-46/+52
| | | | | | | | | Adds generation of call to "i32 kmpc_cancel_barrier(ident_t *, i32)" libcall for explicitly specified barriers (OMP_IDENT_BARRIER_EXPL flag is added to "flags" field of "ident_t" structure). Also this patch replaces all calls to "kmpc_barrier" function by calls of "__kmpc_cancel_barrier" function which provides additional functionality for OpenMP 4.0. Also, library specific enum OpenMPLocationFlags moved to private section of CGOpenMPRuntime class to make it more independent from library implementation. Differential Revision: http://reviews.llvm.org/D6447 llvm-svn: 223444
* [modules] Instead of storing absolute paths in a .pcm file, store the path toRichard Smith2014-12-057-153/+221
| | | | | | | | | the root of the module and use paths relative to that directory wherever possible. This is a step towards allowing explicit modules to be relocated without being rebuilt, which is important for some kinds of distributed builds, for good paths in diagnostics, and for appropriate .d output. llvm-svn: 223443
* Have the driver and the target code agree on what the default ABIEric Christopher2014-12-057-35/+69
| | | | | | | | | is for each machine. Fix up darwin tests that were testing for aapcs on armv7-ios when the actual ABI is apcs. Should be no user visible change without -cc1. llvm-svn: 223429
* [analyzer] Eliminated endless loop.Anton Yartsev2014-12-051-0/+1
| | | | llvm-svn: 223426
* Use isOSBinFormatMachO() instead of comparing the object formatEric Christopher2014-12-053-4/+3
| | | | | | against an enum. llvm-svn: 223422
* Parse qualifiers after comma in declarator lists as a Microsoft extensionNico Rieck2014-12-045-0/+61
| | | | | | MSVC parses and ignores these with a warning. llvm-svn: 223413
* Recognize __unaligned keyword after type specifierNico Rieck2014-12-042-0/+2
| | | | | | | | The __unaligned keyword can appear after a struct definition: struct foo {...} __unaligned *x; llvm-svn: 223412
* Adding a FIXME to the code, based on a discussion in IRC; NFC.Aaron Ballman2014-12-041-0/+4
| | | | llvm-svn: 223403
* Silence warning: "NOMINMAX" redefined.Yaron Keren2014-12-041-1/+3
| | | | llvm-svn: 223391
* Add attributes for AMDGPU register limits.Matt Arsenault2014-12-049-2/+264
| | | | | | | This is a performance hint that can be applied to kernels to attempt to limit the number of used registers. llvm-svn: 223384
* clang-format: [JS] Don't put top-level dict literals on a single line.Daniel Jasper2014-12-042-9/+15
| | | | | | | These are often used for enums which apparently are easier to read if formatted with one element per line. llvm-svn: 223367
* Fix PR21684 - Ellipsis following an 'auto' parameter sans name/ID Faisal Vali2014-12-042-7/+12
| | | | | | | | should indicate a c++ parameter pack not a c-variadic. int i = [](auto...) { return 0; }(); // OK now. llvm-svn: 223357
* Make getInsertArgumentAdjuster insert extra arguments to the end by default.Alexander Kornienko2014-12-041-2/+3
| | | | llvm-svn: 223352
* clang-format: More restrictively classify import declarations.Daniel Jasper2014-12-042-1/+6
| | | | | | | | | | | Before: import::SomeFunction(aaaaaaaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaa); After: import::SomeFunction(aaaaaaaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaa); llvm-svn: 223345
* [OPENMP] Codegen for 'omp master' directiveAlexey Bataev2014-12-044-3/+132
| | | | | | | | | | | | | | Patch adds 2 library functions to OpenMPRuntime class - int32 kmpc_master(ident_t *, int32 gtid) and void kmpc_end_master(ident_t *, int32 gtid); For 'omp master' directive the next code is generated: if (__kmpc_master(loc, gtid)) { <Associated structured block>; __kmpc_end_master(log, gtid); } Differential Revision: http://reviews.llvm.org/D6473 llvm-svn: 223342
* Always emit kernel arg info for SPIR.Sameer Sahasrabuddhe2014-12-044-13/+24
| | | | | | | | | | | | | | | http://llvm.org/bugs/show_bug.cgi?id=21555 Currently, kernel argument metadata is omitted unless the "-cl-kernel-arg-info" option is specified. But the SPIR 1.2 spec requires that all metadata except kernel_arg_name should always be emitted, and kernel_arg_name is only emitted when "-cl-kernel-arg-info" is specified. Patch ported by Ryan Burn from the Khronos SPIR generator. https://github.com/KhronosGroup/SPIR llvm-svn: 223340
* CodeGen: refactor ARM builtin handlingSaleem Abdulrasool2014-12-042-20/+22
| | | | | | | | Create a helper function to construct a value for the ARM hint intrinsic rather than inling the construction. In order to avoid the use of the sentinel value, inline the use of intrinsic instruction retrieval. NFC. llvm-svn: 223338
* CMake: try to actually fix the regexes for setting HOST_LINK_VERSION this ↵Hans Wennborg2014-12-041-4/+4
| | | | | | | | | | | | | | time (PR21268) The regex should not accept an empty version number. The previous attempt at r223106 failed, and the build was still erroring: CMake Error at tools/clang/CMakeLists.txt:269 (string): string sub-command REGEX, mode REPLACE regex "[^0-9]*([0-9.]*).*" matched an empty string. llvm-svn: 223333
* Add test for __umulhReid Kleckner2014-12-031-12/+34
| | | | llvm-svn: 223319
* Implement __umulh with __int128 arithmeticReid Kleckner2014-12-031-1/+6
| | | | | | Use the same approach as _umul128, but just return the high half. llvm-svn: 223316
* [msan] allow -fsanitize-coverage=N together with -fsanitize=memory, clang partKostya Serebryany2014-12-032-1/+2
| | | | llvm-svn: 223311
* CUDA host device code with two code pathsReid Kleckner2014-12-036-17/+97
| | | | | | | | | | | | | | | | | | | | | | | Summary: Allow CUDA host device functions with two code paths using __CUDA_ARCH__ to differentiate between code path being compiled. For example: __host__ __device__ void host_device_function(void) { #ifdef __CUDA_ARCH__ device_only_function(); #else host_only_function(); #endif } Patch by Jacques Pienaar. Reviewed By: rnk Differential Revision: http://reviews.llvm.org/D6457 llvm-svn: 223271
* Cast vtable address points to i32 (...)** to enable more globaloptReid Kleckner2014-12-0311-50/+82
| | | | | | | | | | | | We currently use i32 (...)** as the type of the vptr field in the LLVM struct type. LLVM's GlobalOpt prefers any bitcasts to be on the side of the data being stored rather than on the pointer being stored to. Reviewers: majnemer Differential Revision: http://reviews.llvm.org/D5916 llvm-svn: 223267
* Teach EvaluatedExprVisitor that the condition and unselected branches of aRichard Smith2014-12-032-0/+14
| | | | | | _Generic expression are unevaluated. llvm-svn: 223266
* Make ArgumentsAdjuster an std::function.Alexander Kornienko2014-12-037-126/+113
| | | | | | | | | | | | Reviewers: klimek Reviewed By: klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D6505 llvm-svn: 223248
* Fix isThreadModelSupported()'s comment. NFCJonathan Roelofs2014-12-031-1/+1
| | | | llvm-svn: 223241
* clang-format: Fix fake parentheses placement with comments.Daniel Jasper2014-12-032-1/+8
| | | | | | | | | | | | | | | | Before: return (a > b // comment1 // comment2 || c); After: return (a > b // comment1 // comment2 || c); llvm-svn: 223234
* clang-format: Fix expression parser not closing stuff at end of stmt.Daniel Jasper2014-12-032-10/+16
| | | | | | | | | | | | | | Uncovered by a Java test case: Before: public some.package.Type someFunction( // comment int parameter) {} After: public some.package.Type someFunction( // comment int parameter) {} llvm-svn: 223228
* [OPENMP] Code formatting and improvement, no functional changes.Alexey Bataev2014-12-032-22/+18
| | | | llvm-svn: 223225
* Preserve LD_LIBRARY_PATH when using the 'env' commandHal Finkel2014-12-031-2/+4
| | | | | | | | | In many Linux environments (and similar), just-built applications won't run correctly without making use of the current LD_LIBRARY_PATH environmental variable in order to find dynamic libraries. Propagate it through the 'env' command (hopefully this works on all platforms). llvm-svn: 223219
* Handle delayed corrections in a couple more error paths in ↵Kaelyn Takata2014-12-032-0/+8
| | | | | | ParsePostfixExpressionSuffix. llvm-svn: 223209
* Update test to check for prologue instead of prefixPeter Collingbourne2014-12-031-1/+1
| | | | llvm-svn: 223191
* UBSan now uses prologue data instead of prefix dataPeter Collingbourne2014-12-031-6/+6
| | | | | | | | | | | | As the semantics of prefix data has changed. See D6454. Patch by Ben Gamari! Test Plan: Testsuite Differential Revision: http://reviews.llvm.org/D6489 llvm-svn: 223190
* Add support for has_feature(cxx_alignof) and has_feature(c_alignof).Nico Weber2014-12-035-4/+35
| | | | | | | r142020 added support for has_feature(cxx_alignas). This does the same for alignof. llvm-svn: 223186
* Fix incorrect codegen for devirtualized calls to virtual overloaded operators.Nico Weber2014-12-034-59/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider this program: struct A { virtual void operator-() { printf("base\n"); } }; struct B final : public A { virtual void operator-() override { printf("derived\n"); } }; int main() { B* b = new B; -static_cast<A&>(*b); } Before this patch, clang saw the virtual call to A::operator-(), figured out that it can be devirtualized, and then just called A::operator-() directly, without going through the vtable. Instead, it should've looked up which operator-() the call devirtualizes to and should've called that. For regular virtual member calls, clang gets all this right already. So instead of giving EmitCXXOperatorMemberCallee() all the logic that EmitCXXMemberCallExpr() already has, cut the latter function into two pieces, call the second piece EmitCXXMemberOrOperatorMemberCallExpr(), and use it also to generate code for calls to virtual member operators. This way, virtual overloaded operators automatically don't get devirtualized if they have covariant returns (like it was done for regular calls in r218602), etc. This also happens to fix (or at least improve) codegen for explicit constructor calls (`A a; a.A::A()`) in MS mode with -fsanitize-address-field-padding=1. (This adjustment for virtual operator calls seems still wrong with the MS ABI.) llvm-svn: 223185
* PR21706: -Wunsequenced was missing warnings when leaving a sequenced region ↵Richard Smith2014-12-032-7/+13
| | | | | | that contained side effects. llvm-svn: 223184
* FullProduct should be _FullProductDavid Majnemer2014-12-021-2/+2
| | | | llvm-svn: 223179
* Ensure typos in the default values of template parameters get diagnosed.Kaelyn Takata2014-12-023-1/+11
| | | | llvm-svn: 223177
* Intrin: shrx_u64 should be _shrx_u64David Majnemer2014-12-021-1/+1
| | | | llvm-svn: 223176
* Intrin: Add _umul128David Majnemer2014-12-021-3/+12
| | | | | | | | | | | | | | Implement _umul128; it provides the high and low halves of a 128-bit multiply. We can simply use our __int128 arithmetic to implement this, we generate great code for it: movq %rdx, %rax mulq %rcx movq %rdx, (%r8) retq Differential Revision: http://reviews.llvm.org/D6486 llvm-svn: 223175
* InstrProf: Use the same names for variables as we use in the profileJustin Bogner2014-12-027-28/+24
| | | | | | | | There's no need to use different names for the local variables than we use in the profile itself, and it's a bit simpler and easier to debug if we're consistent. llvm-svn: 223173
* Another warning with no group name bites the dust.Fariborz Jahanian2014-12-022-3/+3
| | | | | | rdar://19116886 llvm-svn: 223168
* InstrProf: Remove some pointless indirection (NFC)Justin Bogner2014-12-022-15/+15
| | | | | | | | It doesn't make much sense to have std::unique_ptrs of std::string and std::vector. Avoid some useless indirection by using these types directly. llvm-svn: 223166
* Diagnose TypoExprs in a couple of error cases in ParsePostfixExpressionSuffix.Kaelyn Takata2014-12-022-3/+7
| | | | | | | Also have CorrectDelayedTyposInExpr check that the Expr* isn't null before trying to access its members. Fixes PR21679. llvm-svn: 223162
* Wrap to 80 columns. No behavior change.Nico Weber2014-12-021-3/+4
| | | | llvm-svn: 223149
* Make le64 DescriptionString consistent with other targets.JF Bastien2014-12-021-1/+1
| | | | | | | | | | | | | | | Summary: In particular, remove the defaults and reorder fields so it matches the result of DataLayout::getStringDescription(). Change by David Neto. Reviewers: dschuff, sdt Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6482 llvm-svn: 223140
* This patch fixes a crash involving use of predefinedFariborz Jahanian2014-12-022-2/+36
| | | | | | | | expressions. It fixes crash when mangling name for block's helper function used inside a constructor/destructor. rdar://19065361. llvm-svn: 223136
* Skip some unnecessary type checks.Samuel Benzaquen2014-12-022-11/+31
| | | | | | | | | | | | | | | | | | | | Summary: Skip some unnecessary type checks wrt DynTypedNodes. Add DynTypedNode::getUnchecked() to skip the runtime check when the type is known. Speed up DynTypedNode::operator== by using isSame() instead of isBaseOf(). Skip the type check in MatcherInterface<T>::matches(). All calls come from DynTypedMatcher::matches(), which already did the type check. This change speeds up our clang-tidy benchmark by ~4%. Reviewers: klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D6468 llvm-svn: 223134
* Fix invalid calling convention used for libcalls on ARM.Anton Korobeynikov2014-12-026-9/+60
| | | | | | | | | | | | | | | | ARM ABI specifies that all the libcalls use soft FP ABI (even hard FP binaries). These days clang emits _mulsc3 / _muldc3 calls with default (C) calling convention which would be translated into AAPCS_VFP LLVM calling and thus the result of complex multiplication will be bogus. Introduce a way for a target to specify explicitly calling convention for libcalls. Right now this is temporary correctness fix. Ultimately, we'll end with intrinsic for complex multiplication and all calling convention decisions for libcalls will be put into backend. llvm-svn: 223123
* Reverted r223114, it caused failure on on clang-native-arm-cortex-a9.Serge Pavlov2014-12-028-115/+2
| | | | llvm-svn: 223120
OpenPOWER on IntegriCloud