summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* CodeGen: increase bits allocated for LegalizeActionsTim Northover2015-10-221-11/+12
| | | | | | | | | | | The array handling CondCodes only allocated 2 bits to describe the desired action for each type. The new addition of a "LibCall" option overflowed this and caused corruption for Custom actions. No in-tree targets have a Custom CondCodeAction, so unfortunately it can't be tested. llvm-svn: 251033
* Change makeLibCall to take an ArrayRef<SDValue> instead of pointer and size. ↵Craig Topper2015-10-229-87/+80
| | | | | | This removes the need to pass a hardcoded size in many places. NFC llvm-svn: 251032
* Attempt to fix MSVC builds after rL250966.Eugene Zelenko2015-10-221-9/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D13968 llvm-svn: 251031
* Fix broken build under MSVC.Zachary Turner2015-10-221-0/+2
| | | | llvm-svn: 251030
* Use ArrayRef instead of pointer and size. NFCCraig Topper2015-10-222-8/+7
| | | | llvm-svn: 251029
* [X86] - Catch extra combine opportunities for redundant imuls.Zia Ansari2015-10-222-8/+255
| | | | | | | | | | | | When we fold "mul ((add x, c1), c1)" -> "add ((mul x, c2), c1*c2)", we bail if (add x, c1) has multiple users which would result in an extra add instruction. In such cases, this patch adds a check to see if we can eliminate a multiply instruction in exchange for the extra add. I also added the capability of doing the existing optimization with non-splatted vectors (splatted also works). Differential Revision: http://reviews.llvm.org/D13740 llvm-svn: 251028
* [PPC] Fix PR24686 by failing assembly for an invalid relocationBill Schmidt2015-10-222-0/+14
| | | | | | | | | | | | PR24686 identifies a problem where a relocation expression is invalid when not all of the symbols in the expression can be locally resolved. This causes the compiler to request a PC-relative half16ds relocation, which is nonsensical for PowerPC. This patch recognizes this situation and ensures we fail the assembly cleanly. Test case provided by Anton Blanchard. llvm-svn: 251027
* Unbreak the shared cmake build. libToolingCore now depends on libAST.Benjamin Kramer2015-10-221-0/+1
| | | | llvm-svn: 251026
* Disable trigraph and escaped newline expansion on all types of raw string ↵Craig Topper2015-10-222-1/+25
| | | | | | literals not just ASCII type. llvm-svn: 251025
* Avoid hash lookups when finalizing StringTableBuilder. NFC.Rafael Espindola2015-10-221-10/+11
| | | | llvm-svn: 251024
* Use array_pod_sort. NFC.Rafael Espindola2015-10-221-4/+7
| | | | llvm-svn: 251023
* [Tooling] Add a utility function to replace one nested name with another.Benjamin Kramer2015-10-225-0/+271
| | | | | | | | | | | | | | | | One problem in clang-tidy and other clang tools face is that there is no way to lookup an arbitrary name in the AST, that's buried deep inside Sema and might not even be what the user wants as the new name may be freshly inserted and not available in the AST. A common use case for lookups is replacing one nested name with another while minimizing namespace qualifications, so replacing 'ns::foo' with 'ns::bar' will use just 'bar' if we happen to be inside the namespace 'ns'. This adds a little helper utility for exactly that use case. Differential Revision: http://reviews.llvm.org/D13931 llvm-svn: 251022
* Switch check_clang_tidy to argparse and add a -resource-dir argument.Manuel Klimek2015-10-2236-44/+55
| | | | | | | -resource-dir can be used to inject non-standard resource dirs via the lit site config. llvm-svn: 251021
* Fix incorrect target triple in fp16-promote.llPirama Arumuga Nainar2015-10-221-96/+99
| | | | | | | | | | | | | | | | | Summary: Hyphens were missing from the triple, causing it to be parsed incorrectly. This patch updates the triple and makes necessary changes to the expected output. Patch is from Vinicius Tinti. Reviewers: ab, tinti Subscribers: srhines, llvm-commits Differential Revision: http://reviews.llvm.org/D13792 llvm-svn: 251020
* [mips][mips16] Fix typo in FileCheck directive.Daniel Sanders2015-10-221-1/+1
| | | | llvm-svn: 251019
* [X86][AVX512] extend vcvtph2ps to support xmm/ymm and sae versionsAsaf Badouh2015-10-228-14/+237
| | | | | | Differential Revision: http://reviews.llvm.org/D13945 llvm-svn: 251018
* [GlobalsAA] Loosen an overly conservative bailoutJames Molloy2015-10-222-9/+88
| | | | | | | | | | Instead of bailing out when we see loads, analyze them. If we can prove that the loaded-from address must escape, then we can conclude that a load from that address must escape too and therefore cannot alias a non-addr-taken global. When checking if a Value can alias a non-addr-taken global, if the Value is a LoadInst of a non-global, recurse instead of bailing. If we can follow a trail of loads up to some base that is captured, we know by inference that all the loads we followed are also captured. llvm-svn: 251017
* [BasicAA] Non-equal indices in a GEP of a SequentialType don't overlapJames Molloy2015-10-222-8/+81
| | | | | | | | If the final indices of two GEPs can be proven to not be equal, and the GEP is of a SequentialType (not a StructType), then the two GEPs do not alias. llvm-svn: 251016
* Don't use "auto" on loops over fundamental types in modernize-loop-convert.Angel Garcia Gomez2015-10-227-115/+166
| | | | | | | | | | | | Summary: using "auto" on a loop that iterates over ints is kind of an overkill. Use the real type name instead. Reviewers: klimek Subscribers: alexfh, cfe-commits Differential Revision: http://reviews.llvm.org/D13982 llvm-svn: 251015
* Attempt to fix build bot test failures.Gabor Horvath2015-10-222-2/+2
| | | | llvm-svn: 251014
* Correctly print the type in modernize-make-unique.Angel Garcia Gomez2015-10-222-2/+14
| | | | | | | | | | | | Summary: Take into account the current LangOptions the check has to add back the template argument. Reviewers: klimek Subscribers: alexfh, cfe-commits Differential Revision: http://reviews.llvm.org/D13983 llvm-svn: 251013
* [ValueTracking] Add a new predicate: isKnownNonEqual()James Molloy2015-10-224-0/+92
| | | | | | | | | | | | | | isKnownNonEqual(A, B) returns true if it can be determined that A != B. At the moment it only knows two facts, that a non-wrapping add of nonzero to a value cannot be that value: A + B != A [where B != 0, addition is nsw or nuw] and that contradictory known bits imply two values are not equal. This patch also hooks this up to InstSimplify; InstSimplify had a peephole for the first fact but not the second so this teaches InstSimplify a new trick too (alas no measured performance impact!) llvm-svn: 251012
* [analyzer] Bug identificationGabor Horvath2015-10-2240-8422/+11868
| | | | | | | | | | | | | | | | This patch adds hashes to the plist and html output to be able to identfy bugs for suppressing false positives or diff results against a baseline. This hash aims to be resilient for code evolution and is usable to identify bugs in two different snapshots of the same software. One missing piece however is a permanent unique identifier of the checker that produces the warning. Once that issue is resolved, the hashes generated are going to change. Until that point this feature is marked experimental, but it is suitable for early adoption. Differential Revision: http://reviews.llvm.org/D10305 Original patch by: Bence Babati! llvm-svn: 251011
* Add %check_clang_tidy and %clang_tidy_diff.Manuel Klimek2015-10-2282-82/+91
| | | | | | | | | | With this, site specific lit configs can inject parameters into the test scripts if they need site specific parameters. Next up: enable check_clang_tidy to take a resource dir to enable non-standard locations for builtin includes. llvm-svn: 251010
* [AST] Remove redundant template keywords.Benjamin Kramer2015-10-221-3/+3
| | | | | | GCC complains about them, clang does not. llvm-svn: 251009
* [AST] Store Decl* and Stmt* directly into the ParentMap.Benjamin Kramer2015-10-222-20/+72
| | | | | | | | | | | | | | | | | | These are by far the most common types to be parents in the AST so it makes sense to optimize for them. Put them directly into the value of the map. This currently saves 32 bytes per parent in the map and a pointer indirection at the cost of some additional complexity in the code. Sadly this means we cannot return an ArrayRef from getParents anymore, add a proxy class that can own a single DynTypedNode and otherwise behaves exactly the same as ArrayRef. For example on a random large file (X86ISelLowering.cpp) this reduces the size of the parent map by 24 MB. Differential Revision: http://reviews.llvm.org/D13976 llvm-svn: 251008
* Make SymbolFileDWARF::GetCachedSectionData thread safeTamas Berghammer2015-10-224-151/+94
| | | | | | Differential revision: http://reviews.llvm.org/D13942 llvm-svn: 251007
* Fix some race condition in ConstString around Mangled name handlingTamas Berghammer2015-10-221-15/+40
| | | | | | Differential revision: http://reviews.llvm.org/D13941 llvm-svn: 251006
* Make string constants in the modernize module static.Angel Garcia Gomez2015-10-223-18/+18
| | | | | | | | | | | | Summary: Add static to global variables, if they are not in an anonymous namespace. Reviewers: klimek Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D13975 llvm-svn: 251005
* [AppleObjCRuntime] Don't bother looking for the runtime on non-apple targetsPavel Labath2015-10-221-1/+4
| | | | | | | | | | | | | | | Summary: This short-circuits the GetObjCVersion function to avoid iterating through target modules on non-apple targets. This function is called on every Process::IsDynamicValue call, so this overhead is not negligible. Reviewers: clayborg, jingham Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13948 llvm-svn: 251004
* [RenderScript] Support for mips64 runtime hookEwan Crawford2015-10-221-16/+61
| | | | | | | | | Previously we could not hook the RS runtime on mips64 architectures. Patch implements ABI specific code for inspecting function arguments. Author: Dean De Leo, dean@codeplay.com llvm-svn: 251003
* Fix the buildbot.Igor Kudrin2015-10-221-0/+2
| | | | | | test/elf2/gnu-hash-table.s requires ppc target support to run. llvm-svn: 251002
* Fix add_llvm_external_project.Manuel Klimek2015-10-221-1/+1
| | | | | | | | | | | | | r250835 unintentionally discarded the optional parameter to the add_llvm_external_project() macro that may point to a path when the said path is different from ${name}. This should fix it by passing ${ARGN} on to add_llvm_subdirectory(). The problem manifests itself with e.g. add_llvm_external_project(clang-tools-extra extra) from clang/tools/CMakeLists.txt Patch by Luchesar V. Iliev. llvm-svn: 251001
* [ELF2] Add support for GNU Hash sectionIgor Kudrin2015-10-227-17/+438
| | | | | | | | | | | | | | | | | | | This patch implements --hash-style command line switch. * By default, or with "sysv" or "both" parameters, the linker generates a standard ELF hash section. * With "gnu" or "both", it produces a GNU-style hash section. That section requires the symbols in the dynamic symbol table section, which are referenced in the GNU hash section, to be placed after not hashed ones and to be sorted to correspond the order of hash buckets in the GNU Hash section. The division function, as well as estimations for the section's parameters, are just the first rough attempt and the subjects for further adjustments. Differential Revision: http://reviews.llvm.org/D13815 llvm-svn: 251000
* Use range-based for loop in sys::path::append(). NFC.Pawel Bylica2015-10-221-8/+6
| | | | llvm-svn: 250999
* [asan] Get rid of UB in string tests. Patch by Max Ostapenko.Yury Gribov2015-10-2210-31/+41
| | | | | | Differential revision: http://reviews.llvm.org/D13895 llvm-svn: 250998
* [MS ABI] Mangle static anonymous unionsDavid Majnemer2015-10-223-13/+13
| | | | | | | | | | | | We believed that internal linkage variables at global scope which are not variable template specializations did not have to be mangled. However, static anonymous unions have no identifier and therefore must be mangled. This fixes PR18204. llvm-svn: 250997
* AVX-512: Fixed a bug in select_cc for i1 typeElena Demikhovsky2015-10-222-0/+26
| | | | | | | | | | | Fixed faiure: LLVM ERROR: Cannot select: t33: i1 = select_cc t25, Constant:i32<0>, t45, t42, seteq:ch added a test Differential Revision: http://reviews.llvm.org/D13943 llvm-svn: 250996
* Partially reverted changes from r250686Elena Demikhovsky2015-10-221-2/+4
| | | | | | | | Clang runtime failure was reported. Assertion failed: (isExtended() && "Type is not extended!"), function getTypeForEVT I'll need to add a proper handling for PointerType in masked load/store intrinsics. llvm-svn: 250995
* clang driver toolchain refactoringXinliang David Li2015-10-225-57/+58
| | | | | | | | | | | | | | In this patch, the file static method addProfileRT is moved to be a virtual member function of base ToolChain class. This allows derived toolchain to override the default behavior easily and make it consistent with Darwin toolchain (a TODO was added for this refactoring - now removed). A new helper method is also introduced to test if instrumentation profile option is turned on or not. Differential Revision: http://reviews.llvm.org/D13326 llvm-svn: 250994
* [coroutines] Initial stub Sema functionality for handling coroutine await / ↵Richard Smith2015-10-2212-16/+234
| | | | | | yield / return. llvm-svn: 250993
* [coroutines] Add forgotten test for lexing coroutines keywords.Richard Smith2015-10-221-0/+12
| | | | llvm-svn: 250992
* [coroutines] Add overloaded unary 'operator co_await'.Richard Smith2015-10-227-0/+29
| | | | llvm-svn: 250991
* Convert ActOnForwardProtocolDeclaration to take an ArrayRef and use a ↵Craig Topper2015-10-223-12/+8
| | | | | | range-based for loop. NFC llvm-svn: 250990
* Use an ArrayRef<OffsetOfComponent> instead of pointer and size throughout ↵Craig Topper2015-10-224-23/+15
| | | | | | offsetof handling code. Also use a range-based for loop. NFC llvm-svn: 250989
* Change FindProtocolDeclaration to take an ArrayRef and use a range-based for ↵Craig Topper2015-10-223-18/+11
| | | | | | loop. NFC llvm-svn: 250988
* Change MacroInfo::setArgumentList to take an ArrayRef instead of pointer and ↵Craig Topper2015-10-223-11/+9
| | | | | | size. While there use std::copy intead of a manual loop. llvm-svn: 250987
* clang-tools-extra/test/clang-tidy/cppcoreguidelines-pro-type-vararg.cpp: ↵NAKAMURA Takumi2015-10-221-1/+1
| | | | | | Tweak not to depend on out-of-tree header <cstdarg>. llvm-svn: 250986
* [coroutines] Add parsing support for co_await expression, co_yield expression,Richard Smith2015-10-226-4/+83
| | | | | | co_await modifier on range-based for loop, co_return statement. llvm-svn: 250985
* [coroutines] Fix description of LangOption for coroutines.Richard Smith2015-10-221-1/+1
| | | | llvm-svn: 250984
OpenPOWER on IntegriCloud