summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Revert r265817Colin LeMahieu2016-04-0862-107/+105
| | | | | | lld tests need to be addressed. llvm-svn: 265822
* fix missing import of 'time' in lldbutil.wait_for_file_on_targetTodd Fiala2016-04-081-0/+1
| | | | | | | | | This triggers in some timeout scenarios in the LLDB test suite. Fixes: https://bugs.swift.org/browse/SR-1193 llvm-svn: 265821
* Cleanups to command alias to refer to itself as 'command alias' and not ↵Enrico Granata2016-04-081-5/+17
| | | | | | allow to make aliases starting with a - as that isn't really supported, and is most often a mistake (trying to pass options) llvm-svn: 265820
* Add help for our regular expression commands when aliasedEnrico Granata2016-04-081-16/+12
| | | | llvm-svn: 265819
* Append a missing \nEnrico Granata2016-04-081-1/+1
| | | | llvm-svn: 265818
* [llvm-objdump] Printing hex instead of dec by defaultColin LeMahieu2016-04-0861-104/+106
| | | | | | Differential Revision: http://reviews.llvm.org/D18770 llvm-svn: 265817
* Always have clang pass -pie-level and -pic-level values to the code generator.Wei Mi2016-04-081-7/+12
| | | | | | | | Patch by tmsriram! Differential Revision: http://reviews.llvm.org/D18843 llvm-svn: 265816
* [Object] Report an error if .alt_entry is used with ELF or COFF.Lang Hames2016-04-082-1/+3
| | | | | | | I'm looking into a better way to do this long-term, but for now at least don't crash. llvm-svn: 265815
* [SystemZ] Support conditional sibling calls via BRCLUlrich Weigand2016-04-084-1/+395
| | | | | | | | | | | | This adds a conditional variant of CallJG instruction, CallBRCL. It can be used for conditional sibling calls. Unfortunately, due to IfCvt limitations, it only really works well for functions without arguments. Author: koriakin Differential Revision: http://reviews.llvm.org/D18864 llvm-svn: 265814
* [Release Notes] Sort checks alphabetically.Eugene Zelenko2016-04-081-7/+6
| | | | llvm-svn: 265813
* [RegBankSelect] Use reverse post order traversal.Quentin Colombet2016-04-081-2/+12
| | | | | | | | When assigning the register banks of an instruction, it is best to know all the constraints of the input to have a good idea of how this will impact the cost of the whole function. llvm-svn: 265812
* [AArch64] Add a test case for the default mapping of RegBankSelect.Quentin Colombet2016-04-081-0/+49
| | | | llvm-svn: 265811
* [RegisterBankInfo] Change the implementation for the default mapping.Quentin Colombet2016-04-081-1/+14
| | | | | | | | | | Do not give that much importance to the current register bank of an operand. This is likely just a side effect of the current execution and it is properly wise to prefer a register bank that can be extracted from the information available statically (like encoding constraints and type). llvm-svn: 265810
* Add testcase from PR27218. NFC.Michael Kruse2016-04-081-0/+49
| | | | | | | The the bug has already been fixed r265795, but this second testcase still useful. llvm-svn: 265809
* Remove bad indentation introduced in 263859Luke Drummond2016-04-081-21/+21
| | | | | | | This commit touches whitespace only. This commit was the original intention of the botched 265797 llvm-svn: 265808
* Move EABIVersion from CodeGenOptions to TargetOptionsSaleem Abdulrasool2016-04-084-21/+22
| | | | | | | | | It is possible to argue that the EABIVersion field is similar in spirit to the ABI field in TargetOptions. It represents the embedded ABI that the target follows. This will allow us to thread this information into the target information construction. llvm-svn: 265807
* revert SVN r265702, r265640Saleem Abdulrasool2016-04-0836-426/+339
| | | | | | | | | | | Revert the two changes to thread CodeGenOptions into the TargetInfo allocation and to fix the layering violation by moving CodeGenOptions into Basic. Code Generation is arguably not particularly "basic". This addresses Richard's post-commit review comments. This change purely does the mechanical revert and will be followed up with an alternate approach to thread the desired information into TargetInfo. llvm-svn: 265806
* [InstCombine] Fix miscompile in FoldSPFofSPFDavid Majnemer2016-04-082-0/+22
| | | | | | | | | | | We had a select of a cast of a select but attempted to replace the outer select with the inner select dispite their incompatible types. Patch by Anton Korobeynikov! This fixes PR27236. llvm-svn: 265805
* [RegBankSelect] Improve debug output.Quentin Colombet2016-04-081-1/+10
| | | | | | | | Add verbose information when checking if the current and the desired register banks match. Detail what happens when we assign a register bank. llvm-svn: 265804
* Fix missing include on OpenBSDMehdi Amini2016-04-081-0/+1
| | | | | From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 265803
* [MIR] Teach the parser how to deal with register banks.Quentin Colombet2016-04-082-11/+52
| | | | llvm-svn: 265802
* [InstCombine] Add a peephole for redundant assumesDavid Majnemer2016-04-081-2/+7
| | | | | | | | | | Two or more identical assumes are occasionally next to each other in a basic block. While our generic machinery will turn a redundant assume into a no-op, it is not super cheap. We can perform a simpler check to achieve the same result for this case. llvm-svn: 265801
* [LoopVectorize] Register cloned assumptionsDavid Majnemer2016-04-082-10/+56
| | | | | | | | | | | | InstCombine cannot effectively remove redundant assumptions without them registered in the assumption cache. The vectorizer can create identical assumptions but doesn't register them with the cache, resulting in slower compile times because InstCombine tries to reason about a lot more assumptions. Fix this by registering the cloned assumptions. llvm-svn: 265800
* Revert bad commit 265797.Luke Drummond2016-04-081-15/+1
| | | | llvm-svn: 265799
* [MachineVerifier] Teach how to check some of the properties of genericQuentin Colombet2016-04-081-1/+24
| | | | | | | | | | | | | | virtual registers. Generic virtual registers: - May not have a register class - May not have a register bank - If they do not have a register class they must have a size - If they have a register bank, the size of the register bank must be greater or equal to the size of the virtual register (basically check that the virtual register will fit into that register class) llvm-svn: 265798
* Fix indentation for commit 263859.Luke Drummond2016-04-081-1/+15
| | | | llvm-svn: 265797
* [MIR] Teach the mir printer how to print the register bank.Quentin Colombet2016-04-081-5/+8
| | | | | | | | | For now, we put the register bank in the Class field since a register may only have one of those at a given time. The downside of that representation is that if a register class and a register bank have the same name, we will not be able to distinguish them. llvm-svn: 265796
* [ScopInfo] Fix check for element size mismatch.Michael Kruse2016-04-082-1/+59
| | | | | | | | | | | | The way to get the elements size with getPrimitiveSizeInBits() is not the same as used in other parts of Polly which should use DataLayout::getTypeAllocSize(). Its use only queries the size of the pointer and getPrimitiveSizeInBits returns 0 for types that require a DataLayout object such as pointers. Together with r265379, this should fix PR27195. llvm-svn: 265795
* Don't lower the visibility because of shared symbols.Rafael Espindola2016-04-083-3/+20
| | | | | | | If a shared library has a protected symbol 'foo', that doesn't imply that the symbol 'foo' in the output should be protected or not. llvm-svn: 265794
* [ARM] Enable SMLAW[B|T] and SMLUW[B|T] instruction selectionSam Parker2016-04-083-26/+243
| | | | | | | | | | Added ISelDAGToDAG functions to enable selection of the smlawb, smlawt, smulwb and smulwt instructions for the ARM backend. Also updated the smul CodeGen test and removed the smulw one. Differential Revision: http://reviews.llvm.org/D18892 llvm-svn: 265793
* Produce STV_DEFAULT for symbols in shared libraries.Rafael Espindola2016-04-083-1/+28
| | | | | | | | | | The spec says: If a symbol definition with STV_PROTECTED visibility from a shared object is taken as resolving a reference from an executable or another shared object, the SHN_UNDEF symbol table entry created has STV_DEFAULT visibility. llvm-svn: 265792
* Make getSymbolBinding a local static. NFC.Rafael Espindola2016-04-082-11/+9
| | | | llvm-svn: 265791
* Revert r265547 "Recommit r265309 after fixed an invalid memory reference bug ↵Hans Wennborg2016-04-0816-956/+1053
| | | | | | | | | | | | | happened" It caused PR27275: "ARM: Bad machine code: Using an undefined physical register" Also reverting the following commits that were landed on top: r265610 "Fix the compare-clang diff error introduced by r265547." r265639 "Fix the sanitizer bootstrap error in r265547." r265657 "InlineSpiller.cpp: Escap \@ in r265547. [-Wdocumentation]" llvm-svn: 265790
* [X86][SSE] Added 32-bit tests for vector lzcnt/tzcnt testsSimon Pilgrim2016-04-082-0/+607
| | | | | | v2i64 tests are particularly bad on 32-bit targets. llvm-svn: 265789
* [ScopInfo] Rename variable to AccType. NFC.Michael Kruse2016-04-081-8/+8
| | | | | | This avoids a name clash with the type llvm::Type. llvm-svn: 265788
* Fix-up LLDB build after rL13179Tamas Berghammer2016-04-081-18/+54
| | | | llvm-svn: 265787
* Re-commit [SCEV] Introduce a guarded backedge taken count and use it in LAA ↵Silviu Baranga2016-04-088-125/+730
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and LV This re-commits r265535 which was reverted in r265541 because it broke the windows bots. The problem was that we had a PointerIntPair which took a pointer to a struct allocated with new. The problem was that new doesn't provide sufficient alignment guarantees. This pattern was already present before r265535 and it just happened to work. To fix this, we now separate the PointerToIntPair from the ExitNotTakenInfo struct into a pointer and a bool. Original commit message: Summary: When the backedge taken codition is computed from an icmp, SCEV can deduce the backedge taken count only if one of the sides of the icmp is an AddRecExpr. However, due to sign/zero extensions, we sometimes end up with something that is not an AddRecExpr. However, we can use SCEV predicates to produce a 'guarded' expression. This change adds a method to SCEV to get this expression, and the SCEV predicate associated with it. In HowManyGreaterThans and HowManyLessThans we will now add a SCEV predicate associated with the guarded backedge taken count when the analyzed SCEV expression is not an AddRecExpr. Note that we only do this as an alternative to returning a 'CouldNotCompute'. We use new feature in Loop Access Analysis and LoopVectorize to analyze and transform more loops. Reviewers: anemet, mzolotukhin, hfinkel, sanjoy Subscribers: flyingforyou, mcrosier, atrick, mssimpso, sanjoy, mzolotukhin, llvm-commits Differential Revision: http://reviews.llvm.org/D17201 llvm-svn: 265786
* [X86] Tidied up shuffle decode function doxygen descriptionsSimon Pilgrim2016-04-082-30/+41
| | | | | | As discussed on D18441 - auto brief is used so we don't need /brief, we don't need to include the function name and added some missing descriptions. llvm-svn: 265785
* [lld] [ELF/AARCH64] Fix dynamic relocation from PIC GOT accessAdhemerval Zanella2016-04-082-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes dynamic relocation creation from GOT access in dynamic objects on aarch64. Current code creates a plt relative one (R_AARCH64_JUMP_SLOT) instead of a got relative (R_AARCH64_GLOB_DAT). It leads the programs fails with: $ cat t.cc std::string test = "hello...\n"; int main () { printf ("%s\n", test.c_str()); return 0; } $ clang++ t.cc -fpic -o t $ ./t hello... Segmentation fault (core dumped) Due the fact it will try to access the plt instead of the got for __cxa_atexit registration for the std::string destruction. It will lead in a bogus function address in atexit. llvm-svn: 265784
* [OpenCL] Complete image types support.Alexey Bader2016-04-0840-550/+310
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I. Current implementation of images is not conformant to spec in the following points: 1. It makes no distinction with respect to access qualifiers and therefore allows to use images with different access type interchangeably. The following code would compile just fine: void write_image(write_only image2d_t img); kernel void foo(read_only image2d_t img) { write_image(img); } // Accepted code which is disallowed according to s6.13.14. 2. It discards access qualifier on generated code, which leads to generated code for the above example: call void @write_image(%opencl.image2d_t* %img); In OpenCL2.0 however we can have different calls into write_image with read_only and wite_only images. Also generally following compiler steps have no easy way to take different path depending on the image access: linking to the right implementation of image types, performing IR opts and backend codegen differently. 3. Image types are language keywords and can't be redeclared s6.1.9, which can happen currently as they are just typedef names. 4. Default access qualifier read_only is to be added if not provided explicitly. II. This patch corrects the above points as follows: 1. All images are encapsulated into a separate .def file that is inserted in different points where image handling is required. This avoid a lot of code repetition as all images are handled the same way in the code with no distinction of their exact type. 2. The Cartesian product of image types and image access qualifiers is added to the builtin types. This simplifies a lot handling of access type mismatch as no operations are allowed by default on distinct Builtin types. Also spec intended access qualifier as special type qualifier that are combined with an image type to form a distinct type (see statement above - images can't be created w/o access qualifiers). 3. Improves testing of images in Clang. Author: Anastasia Stulova Reviewers: bader, mgrang. Subscribers: pxli168, pekka.jaaskelainen, yaxunl. Differential Revision: http://reviews.llvm.org/D17821 llvm-svn: 265783
* Silencing a 32-bit shift implicit conversion warning from MSVC; NFC.Aaron Ballman2016-04-081-1/+1
| | | | llvm-svn: 265782
* CXX_FAST_TLS calling convention: performance improvement for PPC64Chuang-Yu Cheng2016-04-089-3/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the same change on PPC64 as r255821 on AArch64. I have even borrowed his commit message. The access function has a short entry and a short exit, the initialization block is only run the first time. To improve the performance, we want to have a short frame at the entry and exit. We explicitly handle most of the CSRs via copies. Only the CSRs that are not handled via copies will be in CSR_SaveList. Frame lowering and prologue/epilogue insertion will generate a short frame in the entry and exit according to CSR_SaveList. The majority of the CSRs will be handled by register allcoator. Register allocator will try to spill and reload them in the initialization block. We add CSRsViaCopy, it will be explicitly handled during lowering. 1> we first set FunctionLoweringInfo->SplitCSR if conditions are met (the target supports it for the given machine function and the function has only return exits). We also call TLI->initializeSplitCSR to perform initialization. 2> we call TLI->insertCopiesSplitCSR to insert copies from CSRsViaCopy to virtual registers at beginning of the entry block and copies from virtual registers to CSRsViaCopy at beginning of the exit blocks. 3> we also need to make sure the explicit copies will not be eliminated. Author: Tom Jablin (tjablin) Reviewers: hfinkel kbarton cycheng http://reviews.llvm.org/D17533 llvm-svn: 265781
* [mips] Use range-based for loops. NFC.Vasileios Kalintiris2016-04-081-10/+16
| | | | llvm-svn: 265780
* [FIX] Allow to lookup domains for non-affine subregion blocksJohannes Doerfert2016-04-083-23/+85
| | | | llvm-svn: 265779
* [FIX] Adjust execution context of hoisted loads wrt. error domainsJohannes Doerfert2016-04-083-41/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we build the domains for error blocks and later remove them we lose the information that they are not executed. Thus, in the SCoP it looks like the control will always reach the statement S: for (i = 0 ... N) if (*valid == 0) doSth(&ptr); S: A[i] = *ptr; Consequently, we would have assumed "ptr" to be always accessed and preloaded it unconditionally. However, only if "*valid != 0" we would execute the optimized version of the SCoP. Nevertheless, we would have hoisted and accessed "ptr"regardless of "*valid". This changes the semantic of the program as the value of "*valid" can cause a change of "ptr" and control if it is executed or not. To fix this problem we adjust the execution context of hoisted loads wrt. error domains. To this end we introduce an ErrorDomainCtxMap that maps each basic block to the error context under which it might be executed. Thus, to the context under which it is executed but an error block would have been executed to. To fill this map one traversal of the blocks in the SCoP suffices. During this traversal we do also "remove" error statements and those that are only reachable via error statements. This was previously done by the removeErrorBlockDomains function which is therefor not needed anymore. This fixes bug PR26683 and thereby several SPEC miscompiles. Differential Revision: http://reviews.llvm.org/D18822 llvm-svn: 265778
* [FIX] Handle multiplications in the SCEVAffinator againJohannes Doerfert2016-04-082-1/+102
| | | | | | | | | | | If ScalarEvolution cannot look through some expression but we do, it might happen that a multiplication will arrive at the SCEVAffinator::visitMulExpr. While we could always try to improve the extractConstantFactor function we might still miss something, thus we reintroduce the code to generate multiplicative piecewise-affine functions as a fall-back. llvm-svn: 265777
* Add test cases for the removal of error blocksJohannes Doerfert2016-04-082-0/+152
| | | | llvm-svn: 265776
* [FIX] Look through div & srem instructions in SCEVsJohannes Doerfert2016-04-085-11/+88
| | | | | | | | | The findValues() function did not look through div & srem instructions that were part of the argument SCEV. However, in different other places we already look through it. This mismatch caused us to preload values in the wrong order. llvm-svn: 265775
* [clang-tidy] cppcoreguidelines-interfaces-global-initAlexander Kornienko2016-04-088-0/+204
| | | | | | | | | | | | | | | | Summary: This check flags initializers of globals that access extern objects, and therefore can lead to order-of-initialization problems (this recommandation is part of CPP core guidelines). Note that this only checks half of the guideline for now (it does not enforce using constexpr functions). Reviewers: aaron.ballman, alexfh Subscribers: aaron.ballman, etienneb, Eugene.Zelenko, cfe-commits Patch by Clement Courbet! Differential Revision: http://reviews.llvm.org/D18649 llvm-svn: 265774
* [llvm-c] Expose LLVMContextGetDiagnostic{Handler,Context}Jeroen Ketema2016-04-089-11/+137
| | | | | | Differential Revision: http://reviews.llvm.org/D18820 llvm-svn: 265773
OpenPOWER on IntegriCloud