summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [X86] Add AVX512 integer comparison intrinsics for word and byte vectors.Craig Topper2015-01-262-0/+619
| | | | llvm-svn: 227079
* [msan] Remove MSanDR reference from the manual.Evgeniy Stepanov2015-01-261-9/+1
| | | | | | It is no longer supported. llvm-svn: 227078
* [X86] Add more of the AVX512 integer comparision intrinsics. This adds 128 ↵Craig Topper2015-01-263-0/+1258
| | | | | | and 256 bit vectors of dwords and qwords. llvm-svn: 227075
* Don't let virtual calls and dynamic casts call Sema::MarkVTableUsed().Nico Weber2015-01-2612-69/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clang currently calls MarkVTableUsed() for classes that get their virtual methods called or that participate in a dynamic_cast. This is unnecessary, since CodeGen only emits vtables when it generates constructor, destructor, and vtt code. (*) Note that Sema::MarkVTableUsed() doesn't cause the emission of a vtable. Its main user-visible effect is that it instantiates virtual member functions of template classes, to make sure that if codegen decides to write a vtable all the entries in the vtable are defined. While this shouldn't change the behavior of codegen (other than being faster), it does make clang more permissive: virtual methods of templates (in particular destructors) end up being instantiated less often. In particular, classes that have members that are smart pointers to incomplete types will now get their implicit virtual destructor instantiated less frequently. For example, this used to not compile but does now compile: template <typename T> struct OwnPtr { ~OwnPtr() { static_assert((sizeof(T) > 0), "TypeMustBeComplete"); } }; class ScriptLoader; struct Base { virtual ~Base(); }; struct Sub : public Base { virtual void someFun() const {} OwnPtr<ScriptLoader> m_loader; }; void f(Sub *s) { s->someFun(); } The more permissive behavior matches both gcc (where this is not often observable, since in practice most things with virtual methods have a key function, and Sema::DefineUsedVTables() skips vtables for classes with key functions) and cl (which is my motivation for this change) – this fixes PR20337. See this issue and the review thread for some discussions about optimizations. This is similar to r213109 in spirit. r225761 was a prerequisite for this change. Various tests relied on "a->f()" marking a's vtable as used (in the sema sense), switch these to just construct a on the stack. This forces instantiation of the implicit constructor, which will mark the vtable as used. (*) The exception is -fapple-kext mode: In this mode, qualified calls to virtual functions (`a->Base::f()`) still go through the vtable, and since the vtable pointer off this doesn't point to Base's vtable, this needs to reference Base's vtable directly. To keep this working, keep referencing the vtable for virtual calls in apple kext mode. llvm-svn: 227073
* Test that member functions of constexpr constructed templates are instantiated.Nico Weber2015-01-261-1/+14
| | | | | | | They are referenced from the vtable. (This worked fine, but I couldn't find an existing test for this. Maybe I didn't look hard enough.) llvm-svn: 227072
* Remove -verify from a codegen test that didn't have any expected-foo lines.Nico Weber2015-01-261-1/+1
| | | | | | | Makes the error output of the test more readable when it fails. Also allows removing a "not" from the run line. llvm-svn: 227071
* clang-format two Decl* code locations, NFC.Yaron Keren2015-01-261-6/+5
| | | | llvm-svn: 227070
* Reword comment.Nico Weber2015-01-262-8/+6
| | | | llvm-svn: 227069
* Test that qualified virtual calls mark vtables referenced in apple kext mode.Nico Weber2015-01-262-7/+66
| | | | | | | I broke this locally while working on PR20337 and no test caught that. Now there's coverage for this, and a comment explaining why this is needed. llvm-svn: 227068
* [X86] Add AVX512F integer comparision intrinsics to header file.Craig Topper2015-01-252-0/+575
| | | | llvm-svn: 227067
* [X86] Add immediate range checking to AVX512 integer comparision builtins.Craig Topper2015-01-251-0/+24
| | | | llvm-svn: 227066
* [X86] Add AVX512 floating cmpgt and integer comparison builtins. Intrinsic ↵Craig Topper2015-01-251-0/+37
| | | | | | header file usages coming later. llvm-svn: 227065
* Allows Clang to use LLVM's fixes-x18 optionRenato Golin2015-01-253-0/+11
| | | | | | | | | | | | | This patch allows clang to have llvm reserve the x18 platform register on AArch64. FreeBSD will use this in the kernel for per-cpu data but has no need to reserve this register in userland so will need this flag to reserve it. This uses llvm r226664 to allow this register to be reserved. Patch by Andrew Turner. llvm-svn: 227062
* clang/test/Driver/rewrite-map-in-diagnostics.c: This depends on crash-recovery.NAKAMURA Takumi2015-01-251-0/+2
| | | | llvm-svn: 227061
* Sema: Formatting. No behavior change.Francisco Lopes da Silva2015-01-251-1/+1
| | | | llvm-svn: 227052
* Sema: require a complete type before lookup.Francisco Lopes da Silva2015-01-252-23/+42
| | | | llvm-svn: 227037
* Fix the buildbots (fallout from r227028) by returning the exprloc of ↵David Blaikie2015-01-251-1/+6
| | | | | | | | | non-binary operator overload calls (and ->) to the start of the expression, not the location of the operator I'll give this some further thought/discussion later, but this is enough to unbreak the buildbots at least. llvm-svn: 227034
* Rename four test files from .C to .cpp.Nico Weber2015-01-254-7/+7
| | | | | | | | | lit.cfg has never supported running .C files, so these tests were never executed by check-clang. Rename them to .cpp so that they run as part of the test suite, and minorly tweak two of them that look like they were broken when checked in to actually pass. llvm-svn: 227029
* DebugInfo: Attribute calls to overloaded operators with the operator, not ↵David Blaikie2015-01-253-4/+6
| | | | | | the start of the whole expression llvm-svn: 227028
* DebugInfo: Use the preferred location rather than the start location for ↵David Blaikie2015-01-258-14/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | expression line info This causes things like assignment to refer to the '=' rather than the LHS when attributing the store instruction, for example. There were essentially 3 options for this: * The beginning of an expression (this was the behavior prior to this commit). This meant that stepping through subexpressions would bounce around from subexpressions back to the start of the outer expression, etc. (eg: x + y + z would go x, y, x, z, x (the repeated 'x's would be where the actual addition occurred)). * The end of an expression. This seems to be what GCC does /mostly/, and certainly this for function calls. This has the advantage that progress is always 'forwards' (never jumping backwards - except for independent subexpressions if they're evaluated in interesting orders, etc). "x + y + z" would go "x y z" with the additions occurring at y and z after the respective loads. The problem with this is that the user would still have to think fairly hard about precedence to realize which subexpression is being evaluated or which operator overload is being called in, say, an asan backtrace. * The preferred location or 'exprloc'. In this case you get sort of what you'd expect, though it's a bit confusing in its own way due to going 'backwards'. In this case the locations would be: "x y + z +" in lovely postfix arithmetic order. But this does mean that if the op+ were an operator overload, say, and in a backtrace, the backtrace will point to the exact '+' that's being called, not to the end of one of its operands. (actually the operator overload case doesn't work yet for other reasons, but that's being fixed - but this at least gets scalar/complex assignments and other plain operators right) llvm-svn: 227027
* Name a bool parameter. No behavior change.Nico Weber2015-01-251-1/+2
| | | | llvm-svn: 227026
* Remove duplicate codeNathan Sidwell2015-01-251-32/+18
| | | | llvm-svn: 227024
* DebugInfo: Correct the line location of geps on array accessesDavid Blaikie2015-01-242-0/+10
| | | | llvm-svn: 227023
* First steps in implementing DR1467: List-initialization of aggregate from ↵Larisse Voufo2015-01-242-32/+215
| | | | | | | | | | same-type object. Only the first two items for now, changing Sections 8.5.4 [dcl.init.list] paragraph 3 and 13.3.1.7 [over.match.list] paragraph 1, so that defining class objects and character arrays using uniform initialization syntax is actually treated as list initialization and before it is treated aggregate initialization. llvm-svn: 227022
* InstrProf: Use an Optional instead of an out parameterJustin Bogner2015-01-241-32/+27
| | | | llvm-svn: 227015
* test: Convert some tests to FileCheckJustin Bogner2015-01-247-12/+19
| | | | | | These were all doing trivial greps. It's better to use FileCheck. llvm-svn: 227007
* test: Remove two redundant lines from this testJustin Bogner2015-01-241-3/+0
| | | | | | The FileCheck already checks for these lines, no need to grep as well. llvm-svn: 227006
* When checking the template argument list, use a copy of that list for changesRichard Trieu2015-01-244-44/+94
| | | | | | | | | | | | | | | | | | | and only update the orginal list on a valid arugment list. When checking an individual expression template argument, and conversions are required, update the expression in the template argument. Since template arguments are speculatively checked, the copying of the template argument list prevents updating the template arguments when the list does not match the template. Additionally, clean up the integer checking code in the template diffing code. The code performs unneccessary conversions from APSInt to APInt. Fixes PR21758. This essentially reverts r224770 to recommits r224667 and r224668 with extra changes to prevent the template instantiation problems seen in PR22006. A test to catch the discovered problem is also added. llvm-svn: 226983
* [PM] Update Clang to reflect the TLI API change in LLVM r226981.Chandler Carruth2015-01-241-8/+9
| | | | llvm-svn: 226982
* [modules] Sometimes we can deserialize a class member but not have yetRichard Smith2015-01-2410-26/+100
| | | | | | | | | | | encountered any definition for the class; this happens when the definition is added by an update record that is not yet loaded. In such a case, eagerly pick the original parent of the member as the canonical definition of the class rather than muddling through with the canonical declaration (the latter can lead to us failing to merge properly later if the canonical definition turns out to be some other declaration). llvm-svn: 226977
* InstrProf: Use the stream when dumping countersJustin Bogner2015-01-231-1/+1
| | | | llvm-svn: 226968
* DebugInfo: Remove outdated comment. Column info is no longer needed to ↵David Blaikie2015-01-231-6/+0
| | | | | | differentiate inline callsites. llvm-svn: 226955
* Disable warnings in an IRGen test to make test failures less noisyDavid Blaikie2015-01-231-2/+2
| | | | llvm-svn: 226954
* Objective-C moderinzer [qoi], add space on rhs when needed whenFariborz Jahanian2015-01-233-0/+46
| | | | | | | converting to property-dot syntax for setters. rdar://19381786 llvm-svn: 226944
* clang-format: Fix another crasher caused by incomplete macro code.Daniel Jasper2015-01-232-5/+12
| | | | | | | | We did't properly mark all of an AnnotatedLine's children as finalized and thus would reformat the same tokens in different branches of #if/#else sequences leading to invalid replacements. llvm-svn: 226930
* Objective-C modernizer. Avoid using property-dot syntax whenFariborz Jahanian2015-01-233-0/+48
| | | | | | | receiver type is not valid for property-dot syntz use. rdar://19381786 llvm-svn: 226927
* Attempt to fix ::sscanf Cygwin build break reported in PR22302Reid Kleckner2015-01-231-1/+3
| | | | llvm-svn: 226925
* Add tests for code completion of variadic prototypesFrancisco Lopes da Silva2015-01-231-2/+30
| | | | llvm-svn: 226924
* clang-format: Fix incorrect classification of "*".Daniel Jasper2015-01-232-13/+15
| | | | | | | | | | Before: *a = b *c; After: *a = b * c; llvm-svn: 226923
* Process the -fno-signed-zeros optimization flag (PR20870)Sanjay Patel2015-01-236-5/+28
| | | | | | | | | | | | | | | | | | The driver currently accepts but ignores the -fno-signed-zeros flag. This patch passes the flag through and enables 'nsz' fast-math-flag generation in IR. The existing OpenCL flag for the same functionality is made into an alias here. It may be removed in a subsequent patch. This should resolve bug 20870 ( http://llvm.org/bugs/show_bug.cgi?id=20870 ); patches for the optimizer were checked in at: http://llvm.org/viewvc/llvm-project?view=revision&revision=225050 http://llvm.org/viewvc/llvm-project?view=revision&revision=224583 Differential Revision: http://reviews.llvm.org/D6873 llvm-svn: 226915
* Replace size() calls on containers with empty() calls where appropriate. NFCAlexander Kornienko2015-01-236-7/+7
| | | | | | | | http://reviews.llvm.org/D7090 Patch by Gábor Horváth! llvm-svn: 226914
* Sema: code completion for variadic prototypes.Francisco Lopes da Silva2015-01-231-1/+3
| | | | llvm-svn: 226908
* [pr22293] Don't crash during codegen of a recursive destructor.Rafael Espindola2015-01-232-1/+12
| | | | | | | | | | | In ItaniumCXXABI::EmitCXXDestructors we first emit the base destructor and then try to emit the complete one as an alias. If in the base ends up calling the complete destructor, the GD for the complete will be in the list of deferred decl by the time we replace it with an alias and delete the original GV. llvm-svn: 226896
* Fix reference to sysroot in this test (broken in r226875).Richard Smith2015-01-231-1/+1
| | | | llvm-svn: 226885
* PR22299: Relocate code for handling -fmodule-map-file= so that we don't try toRichard Smith2015-01-233-8/+17
| | | | | | | produce diagnostics with source locations before the diagnostics system is ready for them. llvm-svn: 226882
* [Mips] Fix type of 64-bit integer in case of MIPS N64 ABISimon Atanasyan2015-01-223-58/+678
| | | | | | Differential Revision: http://reviews.llvm.org/D7127 llvm-svn: 226877
* Reorganize test/Modules:Richard Smith2015-01-2224-16/+14
| | | | | | | * Put all input files under Inputs/, move corresponding tests into test/Modules. * Rename a modulemap test file to [...].modulemap, and teach lit that such files are tests. llvm-svn: 226875
* Make the ?: precedence warning handle pointers to the left of ?Hans Wennborg2015-01-222-1/+11
| | | | | | | | | | Previously, Clang would fail to warn on: int n = x + foo ? 1 : 2; when foo is a pointer. llvm-svn: 226870
* Sema: code completion for pointer and reference to functions.Francisco Lopes da Silva2015-01-222-19/+63
| | | | llvm-svn: 226865
* When reporting constraints that should be constant, the type doesn'tJoerg Sonnenberger2015-01-223-9/+10
| | | | | | really help. Improve diagnostics. llvm-svn: 226863
OpenPOWER on IntegriCloud