summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* AMDGPU: Implement canonicalizeMatt Arsenault2016-04-149-1/+383
| | | | | | Also add generic DAG node for it. llvm-svn: 266272
* Don't use auto - (try to) appease the Android g++ botEnrico Granata2016-04-141-1/+1
| | | | llvm-svn: 266271
* TargetLowering: Factor out common code for tail call eligibility checking; NFCMatthias Braun2016-04-145-63/+46
| | | | llvm-svn: 266270
* [modules] Store the location of the lexical update record in a decl update asRichard Smith2016-04-142-3/+2
| | | | | | | an offset from the current record rather than as an absolute bit number. This gives a minor .pcm file size reduction. llvm-svn: 266269
* Reorder ASTNodeKind::AllKindInfo to match NodeKindId.Alexander Kornienko2016-04-144-15/+25
| | | | | | | | | | | | | | Summary: AllKindInfo is being indexed by NodeKindId, so the order must match. Extended ASTTypeTraits tests to cover this. Reviewers: sbenza Subscribers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D19059 llvm-svn: 266268
* Augment the 'language objc class-table dump' command to take a "-v" option, ↵Enrico Granata2016-04-142-8/+159
| | | | | | which makes it print ivar and method information, as well as an optional regex argument which filters out all class names that don't match the regex llvm-svn: 266267
* [modules] Remove CXX_BASE_SPECIFIERS_OFFSETS table. Instead of storing an ID ofRichard Smith2016-04-1410-172/+30
| | | | | | | | a table entry in the corresponding decl, store an offset from the current record to the relevant CXX_BASE_SPECIFIERS record. This results in fewer indirections and a minor .pcm file size reduction. llvm-svn: 266266
* clang-tools-extra/test/clang-tidy/readability-deleted-default.cpp: Add ↵NAKAMURA Takumi2016-04-131-1/+1
| | | | | | -fno-ms-compatibility. llvm-svn: 266265
* ObjC kindof: order the methods in global pool relative to availability.Manman Ren2016-04-133-14/+45
| | | | | | | | | | | | | | r265877 tries to put methods that are deprecated or unavailable to the front of the global pool to emit diagnostics, but it breaks some of our existing codes that depend on choosing a certain method for id lookup. This commit orders the methods with the same declaration with respect to the availability, but do not order methods with different declaration. rdar://25707511 llvm-svn: 266264
* [CodeGen] Avoid ctor/dtor boilerplate with some C++11Reid Kleckner2016-04-133-113/+94
| | | | | | | | | | | | | | Non-owning pointers that cache LLVM types and constants can use 'nullptr' default member initializers so that we don't need to mention them in the constructor initializer list. Owning pointers should use std::unique_ptr so that we don't need to manually delete them in the destructor. They also don't need to be mentioned in the constructor at that point. NFC llvm-svn: 266263
* [CFLAA] Fix up code style a bit. NFC.George Burgess IV2016-04-132-292/+276
| | | | llvm-svn: 266262
* [ppc] add tests to show potential andc optimizationSanjay Patel2016-04-131-0/+36
| | | | llvm-svn: 266261
* ARM: override cost function to re-enable ConstantHoisting (& fix it).Tim Northover2016-04-137-7/+94
| | | | | | | | | | | | | | | | At some point, ARM stopped getting any benefit from ConstantHoisting because the pass called a different variant of getIntImmCost. Reimplementing the correct variant revealed some problems, however: + ConstantHoisting was modifying switch statements. This is simply invalid, the cases must remain integer constants no matter the notional cost. + ConstantHoisting was mangling alloca instructions in the entry block. These should be handled by FrameLowering, so constants actually have a cost of 0. Worse, the resulting bitcasts meant they became dynamic allocas. rdar://25707382 llvm-svn: 266260
* Revert "Add LLVMGetAttrKindIDInContext in the C API in order to facilitate ↵Amaury Sechet2016-04-133-38/+0
| | | | | | | | migration away from LLVMAttribute" This reverts commit 0bcfd95c268bcb180a525e1837e84475df8acdc7. llvm-svn: 266259
* ValueMapper: Resolve cycles on the new nodesDuncan P. N. Exon Smith2016-04-132-2/+46
| | | | | | | | | | | | | | Fix a major bug from r265456. Although it's now much rarer, ValueMapper sometimes has to duplicate cycles. The might-transitively-reference-a-temporary counts don't decrement on their own when there are cycles, and you need to call MDNode::resolveCycles to fix it. r265456 was checking the input nodes to see if they were unresolved. This is useless; they should never be unresolved. Instead we should check the output nodes and resolve cycles on them. llvm-svn: 266258
* Add LLVMGetAttrKindIDInContext in the C API in order to facilitate migration ↵Amaury Sechet2016-04-133-0/+38
| | | | | | | | | | | | | | away from LLVMAttribute Summary: LLVMAttribute has outlived its utility and is becoming a problem for C API users that what to use all the LLVM attributes. In order to help moving away from LLVMAttribute in a smooth manner, this diff introduce LLVMGetAttrKindIDInContext, which can be used instead of the enum values. Reviewers: Wallbraker, whitequark, joker.eph, echristo Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D18749 llvm-svn: 266257
* [IR] Optimize memory usage of Metadata on MSVCReid Kleckner2016-04-131-1/+2
| | | | | | | | An unsigned 2 bit bitfield takes 4 bytes in MSVC. Instead of a bitfield, just use an unsigned char. We can go back to a bitfield when someone implements the TODO of exposing and reusing the remaining 6 bits. llvm-svn: 266256
* [llvm-lto] Uniform error handling. NFC.Davide Italiano2016-04-131-30/+14
| | | | llvm-svn: 266255
* [modules] Remove CXX_CTOR_INITIALIZERS_OFFSETS table. Instead of storing an IDRichard Smith2016-04-1312-180/+50
| | | | | | | | of a table entry in the corresponding decl, store an offset from the current record to the relevant CXX_CTOR_INITIALIZERS record. This results in fewer indirections and a minor .pcm file size reduction. llvm-svn: 266254
* ARM: Use a callee save register for the swiftself parameter.Matthias Braun2016-04-134-46/+105
| | | | | | | | | | | | | | | | | | It is very likely that the swiftself parameter is alive throughout most functions function so putting it into a callee save register should avoid spills for the callers with only a minimum amount of extra spills in the callees. Currently the generated code is correct but unnecessarily spills and reloads arguments passed in callee save registers, I will address this in upcoming patches. This also adds a missing check that for tail calls the preserved value of the caller must be the same as the callees parameter. Differential Revision: http://reviews.llvm.org/D18901 llvm-svn: 266253
* X86: Use a callee save register for the swiftself parameter.Matthias Braun2016-04-134-41/+94
| | | | | | | | | | | | | | | | | | It is very likely that the swiftself parameter is alive throughout most functions function so putting it into a callee save register should avoid spills for the callers with only a minimum amount of extra spills in the callees. Currently the generated code is correct but unnecessarily spills and reloads arguments passed in callee save registers, I will address this in upcoming patches. This also adds a missing check that for tail calls the preserved value of the caller must be the same as the callees parameter. Differential Revision: http://reviews.llvm.org/D18902 llvm-svn: 266252
* AArch64: Use a callee save registers for swiftself parametersMatthias Braun2016-04-134-36/+103
| | | | | | | | | | | | | | | | | | It is very likely that the swiftself parameter is alive throughout most functions function so putting it into a callee save register should avoid spills for the callers with only a minimum amount of extra spills in the callees. Currently the generated code is correct but unnecessarily spills and reloads arguments passed in callee save registers, I will address this in upcoming patches. This also adds a missing check that for tail calls the preserved value of the caller must be the same as the callees parameter. Differential Revision: http://reviews.llvm.org/D19007 llvm-svn: 266251
* [llvm-lto] clang-format before working on this file.Davide Italiano2016-04-131-33/+28
| | | | llvm-svn: 266250
* Return immediately from analyzeCall if analyzeBlock returns false.Easwaran Raman2016-04-131-14/+2
| | | | | | This is part of the patch reviewed at http://reviews.llvm.org/D17584 llvm-svn: 266249
* Start to add real error messages for malformed Mach-O files.Kevin Enderby2016-04-132-14/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And update the existing test cases in test/Object/macho-invalid.test to use llvm-objdump with the -macho option to produce these error messages and stop producing the generic "Invalid data was encountered while parsing the file" message. Working from the beginning of the file, if the mach header is too large for the size of the file and then if the load commands that follow extend past the end of the file these two errors now generate correct error messages. Both of these have existing test cases in test/Object/macho-invalid.test . But the first with macho-invalid-header it will never trigger the error message "mach header extends past the end of the file" using any of the llvm tools as they all use identify_magic() which rejects files with the correct magic number that are too small in size. So I tested this by hacking that code and seeing the error message down in parseHeader() really does happen. So in case there is ever code in llvm that directly calls createMachOObjectFile() this error message will be correctly produced. The second error message of "load commands extends past the end of the file" is triggered by a number of existing tests cases in test/Object/macho-invalid.test . Also other tests trigger different error messages now like "ilocalsym plus nlocalsym in LC_DYSYMTAB load command extends past the end of the symbol table". There are two existing test cases that still get the "Invalid data was encountered ..." error messages that I will tackle next. But they will involve a bit of pluming an Expect<...> up through the call stack and I want to do those as separate changes. FYI, for those test cases that were trying to test specific errors that now get different errors I’ll fix those in follow on changes and create new test cases for those so they test the error they were meant to test. llvm-svn: 266248
* NFC mergefunc: const correctnessJF Bastien2016-04-131-18/+20
| | | | | | Some of the comparators were const others weren't making it annoying to add new comparators which call existing ones. llvm-svn: 266247
* [asan] Prefer alloc-dealloc-mismatch to new-delete-type-mismatch.Evgeniy Stepanov2016-04-134-15/+33
| | | | | | | | With -fsized-deallocation, new[] vs delete mismatch is reported as new-delete-type-mismatch. This is technically true, but alloc-dealloc-mismatch describes it better. llvm-svn: 266246
* [SemaObjC] Properly handle mix between type arguments and protocols.Bruno Cardoso Lopes2016-04-134-9/+66
| | | | | | | | | | | | | | | | | | | | | | | Under certain conditions clang currently fails to properly diagnostic ObjectC parameter list when type args and protocols are mixed in the same list. This happens when the first item in the parameter list is a (1) protocol, (2) unknown type or (3) a list of protocols/unknown types up to the first type argument. Fix the problem to report the proper error, example: NSArray<M, NSValue *, NSURL, NSArray <id <M>>> *foo = @[@"a"]; NSNumber *bar = foo[0]; NSLog(@"%@", bar); $ clang ... x.m:7:13: error: angle brackets contain both a type ('NSValue') and a protocol ('M') NSArray<M, NSValue *, NSURL, NSArray <id <M>>> *foo = @[@"a"]; ~ ^ Differential Revision: http://reviews.llvm.org/D18997 rdar://problem/22204367 llvm-svn: 266245
* AMDGPU/SI: Add support for spilling VGPRs without having to scavenge registersTom Stellard2016-04-132-11/+29
| | | | | | | | | | | | | | | Summary: When we are spilling SGPRs to scratch memory, we usually don't have free SGPRs to do the address calculation, so we need to re-use the ScratchOffset register for the calculation. Reviewers: arsenm Subscribers: arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D18917 llvm-svn: 266244
* [x86] add tests to show potential BMI optimizationSanjay Patel2016-04-131-0/+68
| | | | llvm-svn: 266243
* Make sure CheckDestructor gets called on dllimported classes if the vtable ↵Hans Wennborg2016-04-132-7/+25
| | | | | | is used (PR27319) llvm-svn: 266242
* [DebugInfo] Optimize memory layout of DISubprogram.Davide Italiano2016-04-132-10/+24
| | | | | | | | | | | | | | | A DISubprogram on x86_64 was 48 bytes. During an LTO build we end up allocating *a lot* of these (see Duncan's numbers on llvm-dev and/or my numbers in the review link). This change reduces the size to 40 bytes, with a nice effect on peak memory usage when LTO'ing clang. There are more classes in the hierarchy which can be compacted so more patches will come. DISubprogram was the biggest offender in my profiling, anyway. Differential Revision: http://reviews.llvm.org/D18918 llvm-svn: 266241
* [PGO] Fix the buildbots for r266229. Betul Buyukkurt2016-04-131-2/+11
| | | | llvm-svn: 266240
* Lit C++11 Compatibility Patch #7Charles Li2016-04-1313-97/+527
| | | | | | | 13 tests have been updated for C++11 compatibility. Differential Revision: http://reviews.llvm.org/D19068 llvm-svn: 266239
* AsmParser: record "# line file" context to calculate location for diagTim Northover2016-04-133-32/+47
| | | | | | | | | | | Since we can't emit diagnostics for missing "jmp 1f" labels until the end of the file, we need to be able to restore the context used to calculate file/line. This is basically the "# line file" directive that's being used at the time the expression is seen. rdar://25706972 llvm-svn: 266238
* Test case for r265852.Easwaran Raman2016-04-131-0/+19
| | | | llvm-svn: 266237
* LibDriver: Silently do nothing when provided no inputs.Peter Collingbourne2016-04-132-2/+4
| | | | | | | | | This behavior is strange, but it matches lib.exe. Based on a patch by Nico Weber. Fixes PR27335. llvm-svn: 266236
* [CrashReproducer] Add test to run the reproducer script + modulesBruno Cardoso Lopes2016-04-131-0/+57
| | | | | | | Now that we have basic support in place, make sure the reproducer script works with modules for a simple testcase. llvm-svn: 266235
* [CrashReproducer] Setup 'use-external-names' in YAML files.Bruno Cardoso Lopes2016-04-136-7/+27
| | | | | | | | | | | | | | Hide the real paths when rebuilding from VFS by setting up the crash reproducer to use 'use-external-names' = false. This way we avoid module redifinition errors and consistently use the same paths against all modules. With this change on Darwin we are able to simulate a crash for a simple application using "Foundation/Foundation.h" (which relies on a bunch of different frameworks and headers) and successfully rebuild all the modules by relying solely at the VFS overlay. llvm-svn: 266234
* [VFS] Move default values to in-class member initialization. NFCBruno Cardoso Lopes2016-04-131-3/+3
| | | | llvm-svn: 266233
* Fix warning about unused variable.Rafael Espindola2016-04-131-3/+2
| | | | llvm-svn: 266232
* git-clang-format. NFC.Rafael Espindola2016-04-132-2/+2
| | | | llvm-svn: 266231
* Don't set MustBeInDynSym for hidden symbols.Rafael Espindola2016-04-132-2/+42
| | | | llvm-svn: 266230
* [PGO] Remove redundant VP instrumentationBetul Buyukkurt2016-04-132-0/+35
| | | | | | | | LLVM optimization passes may reduce a profiled target expression to a constant. Removing runtime calls at such instrumentation points would help speedup the runtime of the instrumented program. llvm-svn: 266229
* [PowerPC] Basic support for P9 byte comparison and count trailing zero insnsNemanja Ivanovic2016-04-137-8/+111
| | | | | | | | | | This patch corresponds to review: http://reviews.llvm.org/D17850 This patch implements the following instructions: cmprb, cmpeqb, cnttzw, cnttzw., cnttzd, cnttzd. llvm-svn: 266228
* ELF: Implement --dynamic-listAdhemerval Zanella2016-04-1311-7/+272
| | | | | | | | | | | | | | | | | | | | | This patch implements the --dynamic-list option, which adds a list of global symbol that either should not be bounded by default definition when creating shared libraries, or add in dynamic symbol table in the case of creating executables. The patch modifies the ScriptParserBase class to use a list of Token instead of StringRef, which contains information if the token is a quoted or unquoted strings. It is used to use a faster search for exact match symbol name. The input file follow a similar format of linker script with some simplifications (it does not have scope or node names). It leads to a simplified parser define in DynamicList.{cpp,h}. Different from ld/gold neither glob pattern nor mangled names (extern 'C++') are currently supported. llvm-svn: 266227
* Remove redundant null-check; NFCHubert Tong2016-04-131-1/+1
| | | | llvm-svn: 266226
* llvm-dwp: Add assert textDavid Blaikie2016-04-131-1/+3
| | | | | | Post-commit feedback from Eric Christopher on r265452. llvm-svn: 266225
* libclang: Use early-return to reduce indentation.David Blaikie2016-04-131-104/+96
| | | | | | | & since I'll get blamed for all the lines anyway, remove some else-after-return and otherwise tidy things up. llvm-svn: 266224
* [AArch64] Disable LDP/STP for quadsEvandro Menezes2016-04-133-0/+93
| | | | | | | | | Disable LDP/STP for quads on Exynos M1 as they are not as efficient as pairs of regular LDR/STR. Patch by Abderrazek Zaafrani <a.zaafrani@samsung.com>. llvm-svn: 266223
OpenPOWER on IntegriCloud