summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [OpenCL] Add supported OpenCL extensions to target info.Yaxun Liu2016-05-1328-146/+277
| | | | | | | | Add supported OpenCL extensions to target info. It serves as default values to save the users of the burden setting each supported extensions and optional core features in command line. Differential Revision: http://reviews.llvm.org/D19484 llvm-svn: 269431
* [include-fixer] Use scope contexts information to improve query.Haojian Wu2016-05-133-12/+57
| | | | | | | | | | Reviewers: bkramer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20205 llvm-svn: 269430
* [clang-rename] Fix broken dependency on shared build.Etienne Bergeron2016-05-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Summary: The build is broken due to a missing dependency. To repro: [Release + Shared] ``` -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON ``` Which produce this error: ``` tools/clang/tools/extra/clang-rename/CMakeFiles/clangRename.dir/USRLocFinder.cpp.o: In function `clang::RecursiveASTVisitor<clang::rename::(anonymous namespace)::USRLocFindingASTVisitor>::TraverseCXXConstructorDecl(clang::CXXConstructorDecl*)': USRLocFinder.cpp:(.text._ZN5clang19RecursiveASTVisitorINS_6rename12_GLOBAL__N_123USRLocFindingASTVisitorEE26TraverseCXXConstructorDeclEPNS_18CXXConstructorDeclE+0x170): undefined reference to `clang::Lexer::getSourceText(clang::CharSourceRange, clang::SourceManager const&, clang::LangOptions const&, bool*)' ``` Reviewers: alexfh, yaron.keren Subscribers: yaron.keren, cfe-commits Differential Revision: http://reviews.llvm.org/D20240 llvm-svn: 269429
* [llc] New diagnostic handlerRenato Golin2016-05-1331-34/+70
| | | | | | | | | | | | | | | | | | | Without a diagnostic handler installed, llc's behaviour is to exit on the first error that it encounters. This is very different from the behaviour of clang and other front ends, which try to gather as many errors as possible before exiting. This commit adds a diagnostic handler to llc, allowing it to find and report more than one error. The old behaviour is preserved under a flag (-exit-on-error). Some of the tests fail with the new diagnostic handler, so they have to use the new flag in order to run under the previous behaviour. Some of these are known bugs, others need further investigation. Ideally, we should fix the tests and remove the flag at some point in the future. Patch by Diana Picus. llvm-svn: 269428
* [include-fixer] Simplify unittest code.Haojian Wu2016-05-138-116/+96
| | | | | | | | | | | | | | | Summary: The InMemorySymbolIndex only constructs hard-coded Class symbols from a string map. The patch provide a flexable way in InMemorySymbolIndex to create a custom SymbolInfo in the include-fixer unittest. Reviewers: bkramer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20232 llvm-svn: 269427
* [InstCombine] canonicalize* LE/GE vector integer comparisons to LT/GT ↵Sanjay Patel2016-05-133-3/+180
| | | | | | | | | | | | | | | (PR26701, PR26819) *We don't currently handle the edge case constants (min/max values), so it's not a complete canonicalization. To fully solve the motivating bugs, we need to enhance this to recognize a zero vector too because that's a ConstantAggregateZero which is a ConstantData, not a ConstantVector or a ConstantDataVector. Differential Revision: http://reviews.llvm.org/D17859 llvm-svn: 269426
* [ARM,AArch64] NFC. Add extra test cases for bswap lowering.Renato Golin2016-05-132-0/+184
| | | | | | | | These tests were sitting in Phab for many months. They're good tests and should be in. Patch by Charlie Turner. llvm-svn: 269425
* [scan-build] fix warnings emiited on LLVM Analysis code baseSilviu Baranga2016-05-132-24/+26
| | | | | | | | | | | | Fix "Logic error" warnings of the type "Called C++ object pointer is null" reported by Clang Static Analyzer on the following files: lib/Analysis/ScalarEvolution.cpp, lib/Analysis/LoopInfo.cpp. Patch by Apelete Seketeli! llvm-svn: 269424
* Prune four superfluous ExternalSemaSource.h includes and one forward ↵Yaron Keren2016-05-135-5/+0
| | | | | | | | declaration in Sema.h where ExternalSemaSource.h was already included due to ExternalSemaSource:: member uses. llvm-svn: 269423
* [find-all-symbols] Add EnumDecl type in YAML traits.Haojian Wu2016-05-131-0/+1
| | | | llvm-svn: 269422
* Remove unused variableEd Maste2016-05-131-2/+1
| | | | llvm-svn: 269421
* [X86][AVX512] Moved CHECKs inside functions to stop update_llc_test_checks ↵Simon Pilgrim2016-05-132-161/+150
| | | | | | | | going haywire I'm not going to regenerate these anytime soon but do have some diffs to apply that I'd like to do with update_llc_test_checks llvm-svn: 269420
* [CodeGen] Clang does not choose aapcs-vfp calling convention for ARM bare ↵Oleg Ranevskyy2016-05-132-1/+6
| | | | | | | | | | | | | | | | | | | metal target with hard float (EABIHF) Summary: Clang does not detect `aapcs-vfp` for the EABIHF environment. The reason is that only GNUEABIHF is considered while choosing calling convention, EABIHF is ignored. This causes clang to use `aapcs` for EABIHF and add the `arm_aapcscc` specifier to functions in generated IR. The modified `arm-cc.c` test checks that no calling convention specifier is added to functions for EABIHF, which means the default one is used (`CallingConv::ARM_AAPCS_VFP`). Reviewers: rengolin, compnerd, t.p.northover Subscribers: aemerson, rengolin, asl, cfe-commits Differential Revision: http://reviews.llvm.org/D20219 llvm-svn: 269419
* [AST] Add missing const qualifiers to AstContext in Type.cppEtienne Bergeron2016-05-132-20/+20
| | | | | | | | | | | | | | | | Summary: Add some missing const qualifiers to AstContext. The ASTContext can't be modified with accessors. There is no behavior change. This patch is cleanup only. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20226 llvm-svn: 269418
* When using Rela, don't write the addend to the output section.Rafael Espindola2016-05-133-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Elf_Rela has an explicit addend. It doesn't need the addend to be written to the section being relocated. Since relative relocations are very common in the output, this is a noticeable speedup. The results I got were chromium master 4.778149487 patch 4.761120792 0.996436131802 chromium fast master 1.896253636 patch 1.840990582 0.970856718241 the gold plugin master 0.399337811 patch 0.392279276 0.982324401032 clang master 0.666873675 patch 0.665895708 0.998533504865 llvm-as master 0.037101095 patch 0.037123149 1.00059442989 the gold plugin fsds master 0.422473396 patch 0.414192879 0.980399909016 clang fsds master 0.747302008 patch 0.744843964 0.996710775599 llvm-as fsds master 0.033146245 patch 0.033064531 0.997534743377 scylla master 4.08857525 patch 4.082245184 0.998451767275 llvm-svn: 269417
* Remove ASTContexts from SystemInitializerCommonPavel Labath2016-05-131-8/+0
| | | | | | | | | | | | | | | | | | Summary: The AST contexts are not needed in the server components, and the clang context in particular pulls in large parts of clang into the binary. Simply removing these two calls reduces the lldb-server size by about 50%--80%, depending on the architecture and build type. This should not impact the client parts as the same calls are already present in SystemInitializerFull. Reviewers: tberghammer, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D20236 llvm-svn: 269416
* [scan-build] fix dead store warnings emitted on LLVM Hexagon code baseKrzysztof Parzyszek2016-05-134-4/+0
| | | | | | | | Patch by Apelete Seketeli. Differential Revision: http://reviews.llvm.org/D19900 llvm-svn: 269415
* [MIB] Create a helper function getRegState to extract all register flagsKrzysztof Parzyszek2016-05-132-12/+11
| | | | llvm-svn: 269414
* Assure calling "cld" instruction in prologue of X86 interrupt handler function.Amjad Aboud2016-05-132-0/+29
| | | | | | Differential Revision: http://reviews.llvm.org/D18725 llvm-svn: 269413
* Simplify getLinuxDynamicLinker() by using a common variable for the triple. NFC.Vasileios Kalintiris2016-05-131-13/+12
| | | | llvm-svn: 269412
* [mips] Consult triple's vendor field before using musl's interpreter.Vasileios Kalintiris2016-05-131-1/+3
| | | | | | This should affect only the mips-mti-linux toolchain. llvm-svn: 269411
* [mips][ias] Work around yet another incorrect microMIPS relocation ↵Daniel Sanders2016-05-132-4/+10
| | | | | | | | | | | | evaluation exposed by r268900. It's not entirely clear why R_MICROMIPS_(GOT|HI16|LO16) are evaluated incorrectly in a small number of the LNT tests at this point. However, it's not related to the STO_MIPS_MICROMIPS issue. At this point all the microMIPS-related changes of r268900 have been reverted. llvm-svn: 269410
* Yet another attempt to appease MSVC...Chandler Carruth2016-05-131-1/+2
| | | | llvm-svn: 269409
* [mips][microMIPS] Implement APPEND, BPOSGE32C, MODSUB, MULSA.W.PH and ↵Hrvoje Varga2016-05-1316-5/+113
| | | | | | | | MULSAQ_S.W.PH instructions Differential Revision: http://reviews.llvm.org/D14117 llvm-svn: 269408
* [LLDB][MIPS] Provide ABI string to compiler for appropriate code generation ↵Sagar Thakur2016-05-132-2/+43
| | | | | | | | | | | | | for MIPS Patch by Nitesh Jain. Summary: These patch will set clang::TargetOptions::ABI and accordingly code will be generated for MIPS target. Reviewers: ovyalov, clayborg Subscribers: lldb-commits, mohit.bhakkad, sagar, jaydeep, bhushan Differential: D18638 llvm-svn: 269407
* Try to fix MSVC by explicitly providing copy and move constructors so itChandler Carruth2016-05-131-0/+2
| | | | | | | doesn't try to use the converting constructor template for those operations. llvm-svn: 269406
* [llvm-mc-fuzzer] Use LLVMFuzzerInitialize() instead of a custom main() and ↵Daniel Sanders2016-05-132-11/+34
| | | | | | | | | | | | FuzzerDriver() Reviewers: kcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D20201 llvm-svn: 269405
* [Support/ELF] - Added few constants and structs relative to compressed sections.George Rimar2016-05-131-0/+27
| | | | | | | | | | | | | | Patch adds few constants and structs to support compressed sections. SHF_COMPRESSED intersects with platform specific XCORE_SHF_CP_SECTION, both has value of 0x800U. Reference link: http://www.sco.com/developers/gabi/latest/ch4.sheader.html Differential revision: http://reviews.llvm.org/D20209 llvm-svn: 269404
* [include-fixer] Rename XrefsDB to SymbolIndex.Benjamin Kramer2016-05-1314-90/+96
| | | | | | It's not really containing xrefs so the name didn't fit. No functional change. llvm-svn: 269403
* clang-rename: check that the source location we find actually has the old nameMiklos Vajna2016-05-133-7/+20
| | | | | | | | | | | This more general check could have prevented the specific problem "getSourceOrder() == -1" guards. Reviewers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D20216 llvm-svn: 269402
* [find-all-symbols] Add enum type support.Haojian Wu2016-05-135-56/+162
| | | | | | | | | | | | | | Summary: Also change enums defined in SymbolInfo to scoped enums to avoid conflicts. Reviewers: bkramer Subscribers: cfe-commits, ioeric Differential Revision: http://reviews.llvm.org/D20203 llvm-svn: 269401
* [ms][dll] #27212: Generating of implicit special members should take into ↵Dmitry Polukhin2016-05-132-7/+26
| | | | | | | | | | | | | | account MSVC compatibility version Clang creates implicit move constructor/assign operator in all cases if there is std=c++11. But MSVC supports such generation starting from version 1900 only. As result we have some binary incompatibility. Differential Revision: http://reviews.llvm.org/D19156 Patch by Andrew V. Tischenko llvm-svn: 269400
* Solve 'Too many args to microtask' problemPaul Osmialowski2016-05-132-3/+144
| | | | | | | | | | | | | This patch solves 'Too many args to microtask' problem which occurs while executing lulesh2.0.3 benchmark on AArch64. To solve this I had to wrtite AArch64 assembly version of __kmp_invoke_microtask() function, similar to x86 and x86_64 implementations. Differential Revision: http://reviews.llvm.org/D19879 llvm-svn: 269399
* Add support for derived class special members hiding functions brought in fromRichard Smith2016-05-1310-39/+150
| | | | | | | | | a base class via a using-declaration. If a class has a using-declaration declaring either a constructor or an assignment operator, eagerly declare its special members in case they need to displace a shadow declaration from a using-declaration. llvm-svn: 269398
* Extend this test to also be valid in C++14.Richard Smith2016-05-131-7/+7
| | | | llvm-svn: 269397
* SDAG: Clean up a dangling node in SparcISelDAGToDAG::SelectImplJustin Bogner2016-05-131-0/+1
| | | | | | | | | When we convert to the void Select interface, leaving unreferenced nodes around won't be allowed anymore. Part of llvm.org/pr26808. llvm-svn: 269396
* Revert "[Unroll] Implement a conservative and monotonically increasing cost ↵Michael Zolotukhin2016-05-137-236/+18
| | | | | | | | | | | tracking system during the full unroll heuristic analysis that avoids counting any instruction cost until that instruction becomes "live" through a side-effect or use outside the..." This reverts commit r269388. It caused some bots to fail, I'm reverting it until I investigate the issue. llvm-svn: 269395
* SDAG: Clean up a dangling node in MipsISelDAGToDAG::SelectImplJustin Bogner2016-05-131-0/+1
| | | | | | | | | When we convert to the void Select interface, leaving unreferenced nodes around won't be allowed anymore. Part of llvm.org/pr26808. llvm-svn: 269394
* SDAG: Implement Select instead of SelectImpl in MSP430DAGToDAGISelJustin Bogner2016-05-131-76/+57
| | | | | | | | | | | - Where we were returning a node before, call ReplaceNode instead. - Where we would return null to fall back to another selector, rename the method to try* and return a bool for success. - Where we were calling SelectNodeTo, just return afterwards. Part of llvm.org/pr26808. llvm-svn: 269393
* [LoopDist] Only run LAA for loops with the pragmaAdam Nemet2016-05-131-17/+17
| | | | | | | This should fix some compile-time regressions after r267672. Thanks to Chris Matthews for bisecting it. llvm-svn: 269392
* AMDGPU: Remove verifier check for scc live insMatt Arsenault2016-05-132-16/+44
| | | | | | | | | | We only really need this to be true for SIFixSGPRCopies. I'm not sure there's any way this could happen before that point. Fixes a case where MachineCSE could introduce a cross block scc use. llvm-svn: 269391
* [ADT] Add an 'llvm::seq' function which produces an iterator range overChandler Carruth2016-05-134-2/+134
| | | | | | | | | | | | | | | | | | | | | | | | | a sequence of values. It increments through the values in the half-open range: [Begin, End), producing those values when indirecting the iterator. It should support integers, iterators, and any other type providing these basic arithmetic operations. This came up in the C++ standards committee meeting, and it seemed like a useful construct that LLVM might want as well, and I wanted to understand how easily we could solve it. I suspect this can be used to write simpler counting loops even in LLVM along the lines of: for (int i : seq(0, v.size())) { ... }; As part of this, I had to fix the lack of a proxy object returned from the operator[] in our iterator facade. Differential Revision: http://reviews.llvm.org/D17870 llvm-svn: 269390
* [clang-tidy] - PerformanceUnnecesaryCopyInitialization - only trigger for ↵Felix Berger2016-05-133-20/+35
| | | | | | | | | | | | | | decl stmts with single VarDecl. Summary: This fixes bug: https://llvm.org/bugs/show_bug.cgi?id=27325 Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19865 llvm-svn: 269389
* [Unroll] Implement a conservative and monotonically increasing cost tracking ↵Michael Zolotukhin2016-05-137-18/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | system during the full unroll heuristic analysis that avoids counting any instruction cost until that instruction becomes "live" through a side-effect or use outside the... Summary: ...loop after the last iteration. This is really hard to do correctly. The core problem is that we need to model liveness through the induction PHIs from iteration to iteration in order to get the correct results, and we need to correctly de-duplicate the common subgraphs of instructions feeding some subset of the induction PHIs. All of this can be driven either from a side effect at some iteration or from the loop values used after the loop finishes. This patch implements this by storing the forward-propagating analysis of each instruction in a cache to recall whether it was free and whether it has become live and thus counted toward the total unroll cost. Then, at each sink for a value in the loop, we recursively walk back through every value that feeds the sink, including looping back through the iterations as needed, until we have marked the entire input graph as live. Because we cache this, we never visit instructions more than twice -- once when we analyze them and put them into the cache, and once when we count their cost towards the unrolled loop. Also, because the cache is only two bits and because we are dealing with relatively small iteration counts, we can store all of this very densely in memory to avoid this from becoming an excessively slow analysis. The code here is still pretty gross. I would appreciate suggestions about better ways to factor or split this up, I've stared too long at the algorithmic side to really have a good sense of what the design should probably look at. Also, it might seem like we should do all of this bottom-up, but I think that is a red herring. Specifically, the simplification power is *much* greater working top-down. We can forward propagate very effectively, even across strange and interesting recurrances around the backedge. Because we use data to propagate, this doesn't cause a state space explosion. Doing this level of constant folding, etc, would be very expensive to do bottom-up because it wouldn't be until the last moment that you could collapse everything. The current solution is essentially a top-down simplification with a bottom-up cost accounting which seems to get the best of both worlds. It makes the simplification incremental and powerful while leaving everything dead until we *know* it is needed. Finally, a core property of this approach is its *monotonicity*. At all times, the current UnrolledCost is a conservatively low estimate. This ensures that we will never early-exit from the analysis due to exceeding a threshold when if we had continued, the cost would have gone back below the threshold. These kinds of bugs can cause incredibly hard to track down random changes to behavior. We could use a techinque similar (but much simpler) within the inliner as well to avoid considering speculated code in the inline cost. Reviewers: chandlerc Subscribers: sanjoy, mzolotukhin, llvm-commits Differential Revision: http://reviews.llvm.org/D11758 llvm-svn: 269388
* [LoopUnrollAnalyzer] Don't treat gep-instructions with simplified offset as ↵Michael Zolotukhin2016-05-133-2/+30
| | | | | | | | | | | | | | | | | | simplified. Summary: Currently we consider such instructions as simplified, which is incorrect, because if their user isn't simplified, we can't actually simplify them too. This biases our estimates of profitability: for instance the analyzer expects much more gains from unrolling memcpy loops than there actually are. Reviewers: hfinkel, chandlerc Subscribers: mzolotukhin, llvm-commits Differential Revision: http://reviews.llvm.org/D17365 llvm-svn: 269387
* [ThinLTO] Use correct pipeline for ThinLTO in gold-plugin.Teresa Johnson2016-05-131-1/+4
| | | | | | | | This change is the gold side of the change made in D17115 and clang patch r261045 to add a ThinLTO specific pipeline that moves more of the optimization to the backends. llvm-svn: 269386
* [ObjC][CodeGen] Remove an assert that is no longer correct.Akira Hatanaka2016-05-132-4/+27
| | | | | | | | | | | | | | | | | | clang asserts when compiling the following code because r231508 made changes to promote constant temporary arrays and records to globals with constant initializers: std::vector<NSString*> strs = {@"a", @"b"}; This commit changes the code to return early if the object returned by createReferenceTemporary is a global variable with an initializer. rdar://problem/25504992 rdar://problem/25955179 Differential Revision: http://reviews.llvm.org/D20045 llvm-svn: 269385
* Remove runtime specific code from common headerXinliang David Li2016-05-132-161/+33
| | | | llvm-svn: 269384
* dsymutil: Fix the DWOId mismatch check for cached modules.Adrian Prantl2016-05-132-6/+21
| | | | | | | | | | | | | | In verbose mode, we emit a warning if the DWOId of a skeleton CU mismatches the DWOId of the referenced module. This patch updates the cached DWOId after a module has been loaded to the DWOId of the module on disk (instead of storing the DWOId we expected to load). This allows us to correctly emit the mismatch warning for all subsequent object files that want to import the same module. This patch also ensures both warnings are only emitted in verbose mode. rdar://problem/26214027 llvm-svn: 269383
* Preserve the FoundDecl properly in constructor overload resolution. NoRichard Smith2016-05-122-11/+7
| | | | | | functionality change; this information is not yet in use. llvm-svn: 269382
OpenPOWER on IntegriCloud