summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [Clang][BuiltIn][avx512] Adding avx512 (shuf,sqrt{ss|sd},rsqrt ) builtin to ↵Michael Zuckerman2016-04-125-0/+954
| | | | | | clang llvm-svn: 266048
* Refactor the Internalize stage of libLTO in a separate file (NFC)Mehdi Amini2016-04-126-141/+232
| | | | | | | | | | | | | | | | | This is intended to be shared by the ThinLTOCodeGenerator. Note that there is a change in the way the verifier is run, previously it was ran as a Pass on the merged module during internalization. While now the verifier is called explicitely on the merged module outside of the internalize "pass pipeline". What remains strange in the API is the fact that `DisableVerify` in the API does not disable this initial verifier. Differential Revision: http://reviews.llvm.org/D19000 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266047
* Use StringSet instead of StringMap where it makes sense to in ↵Mehdi Amini2016-04-121-4/+3
| | | | | | | LTOCodeGenerator (NFC) From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266046
* Minor code cleanup. NFC.Junmo Park2016-04-121-2/+2
| | | | llvm-svn: 266045
* [clang-tidy] fix readability-avoid-const-params-in-decls creating invalid ↵Matthias Gehre2016-04-122-10/+50
| | | | | | | | | | | | | | | | | | | | code in fix-its Summary: The Fix-Its for the added test cases were before: -void F11(const unsigned int /*version*/); +void F11(unsigned int int /*version*/); -void F12(const bool b = true); +void F12(_Bool true); Reviewers: fowles, hokein, sbenza, alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18993 llvm-svn: 266044
* [ASTMatchers]: fix crash in hasReturnValueMatthias Gehre2016-04-122-2/+5
| | | | | | | | | | | | | | | Summary: The crash was reproduced by the included test case. It was initially found through a crash of clang-tidy's misc-misplaced-widening-cast check. Reviewers: klimek, alexfh Subscribers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D18991 llvm-svn: 266043
* Process: fix the build with certain kernel versionsSaleem Abdulrasool2016-04-121-0/+2
| | | | | | | | The structure definitions are not provided, but we perform a sizeof operation of them which causes a build failure. Include `asm/ptrace.h` to get the structure definitions. llvm-svn: 266042
* [OPENMP 4.0] Support for 'uniform' clause in 'declare simd' directive.Alexey Bataev2016-04-1215-161/+282
| | | | | | | | | OpenMP 4.0 defines clause 'uniform' in 'declare simd' directive: 'uniform' '(' <argument-list> ')' The uniform clause declares one or more arguments to have an invariant value for all concurrent invocations of the function in the execution of a single SIMD loop. The special this pointer can be used as if was one of the arguments to the function in any of the linear, aligned, or uniform clauses. llvm-svn: 266041
* [PPC64] Mark CR0 Live if PPCInstrInfo::optimizeCompareInstr Creates a Use of CR0Chuang-Yu Cheng2016-04-122-0/+27
| | | | | | | | | | | | | | Resolve Bug 27046 (https://llvm.org/bugs/show_bug.cgi?id=27046). The PPCInstrInfo::optimizeCompareInstr function could create a new use of CR0, even if CR0 were previously dead. This patch marks CR0 live if a use of CR0 is created. Author: Tom Jablin (tjablin) Reviewers: hfinkel kbarton cycheng http://reviews.llvm.org/D18884 llvm-svn: 266040
* Basic: fix profiling with GNU EABISaleem Abdulrasool2016-04-122-11/+25
| | | | | | | | | The GNU profiling support indicates that the interface is `_mcount` rather than `mcount`. Conditionalise the behaviour according to the `-meabi gnu` flag. Resolves PR27311 llvm-svn: 266039
* [PPC64] Use mfocrf in prologue when we only need to save 1 nonvolatile CR fieldChuang-Yu Cheng2016-04-123-9/+37
| | | | | | | | | | | | | | In the ELFv2 ABI, we are not required to save all CR fields. If only one nonvolatile CR field is clobbered, use mfocrf instead of mfcr to selectively save the field, because mfocrf has short latency compares to mfcr. Thanks Nemanja's invaluable hint! Reviewers: nemanjai tjablin hfinkel kbarton http://reviews.llvm.org/D17749 llvm-svn: 266038
* Devide _gp in the same spot as other mips symbols. NFC.Rafael Espindola2016-04-126-14/+13
| | | | | | The test changes are just because of the symbol order. llvm-svn: 266037
* TargetLowering: Add missing doxygen group end.Matthias Braun2016-04-121-0/+2
| | | | | | | The missing end was also confusing the '{', '}' matching heuristics in vim. llvm-svn: 266036
* AArch64: Drive-by cleanupMatthias Braun2016-04-121-3/+2
| | | | llvm-svn: 266035
* Attempt to make buildbot happier with r266032.George Burgess IV2016-04-121-2/+1
| | | | | | | Apparently std::numeric_limits<unsigned>::max() isn't constexpr everywhere yet. llvm-svn: 266034
* Restore the lazy initialization of ScriptInterpreterPython, which was lost ↵Enrico Granata2016-04-122-8/+8
| | | | | | as part of the SystemLifetimeManager work llvm-svn: 266033
* Add the allocsize attribute to LLVM.George Burgess IV2016-04-1220-71/+577
| | | | | | | | | | | | | | | | `allocsize` is a function attribute that allows users to request that LLVM treat arbitrary functions as allocation functions. This patch makes LLVM accept the `allocsize` attribute, and makes `@llvm.objectsize` recognize said attribute. The review for this was split into two patches for ease of reviewing: D18974 and D14933. As promised on the revisions, I'm landing both patches as a single commit. Differential Revision: http://reviews.llvm.org/D14933 llvm-svn: 266032
* [analyzer] Fix assertion in ReturnVisitor for body-farm synthesized gettersDevin Coughlin2016-04-122-0/+16
| | | | | | | Don't emit a path note marking the return site if the return statement does not have a valid location. This fixes an assertion failure I introduced in r265839. llvm-svn: 266031
* [AArch64] Add test cases for the repairing of physical registers.Quentin Colombet2016-04-121-0/+48
| | | | llvm-svn: 266030
* [RegBankSelect] Teach the repairing code how to handle physicalQuentin Colombet2016-04-121-2/+6
| | | | | | registers. llvm-svn: 266029
* [AArch64] Add a test case for the propagation of register banks throughQuentin Colombet2016-04-121-0/+49
| | | | | | phis. llvm-svn: 266028
* [RegisterBankInfo] Do not provide a default mapping for non-reg of phiQuentin Colombet2016-04-121-0/+7
| | | | | | operations. llvm-svn: 266027
* [AArch64] Add a test case for the repairing of definitions.Quentin Colombet2016-04-121-0/+28
| | | | llvm-svn: 266026
* [RegBankSelect] Teach how to repair definitions.Quentin Colombet2016-04-122-16/+135
| | | | | | | | | Although repairing definitions is not mandatory for correctness (only phis would be impacted because of the RPO traversal), not repairing might go against the cost model. Therefore, just repair when it is possible. llvm-svn: 266025
* [MachineIRBuilder] Expose the insertion point in the public API.Quentin Colombet2016-04-121-3/+3
| | | | | | | It may be convenient to know where we are about to insert some code, for instance to save and then restore this insertion. llvm-svn: 266024
* Fixed Variable::GetDecl() and Variable::GetDeclContext() to check the "Type ↵Greg Clayton2016-04-121-4/+10
| | | | | | | | *" before using it so we don't crash if a variable's type can't be realized which happens more often recently due to -gmodules. <rdar://problem/25612626> llvm-svn: 266023
* MergeFunctions: test alloca betterJF Bastien2016-04-122-16/+41
| | | | | | r237193 fix handling of alloca size / align in MergeFunctions, but only tested one and didn't follow FunctionComparator::cmpOperations's usual comparison pattern. It also didn't update Instruction.cpp:haveSameSpecialState which I'll do separately. llvm-svn: 266022
* [AArch64] Test that RegBankSelect inserts the proper copies to fix theQuentin Colombet2016-04-121-0/+53
| | | | | | register bank assignments. llvm-svn: 266021
* Replace MachineRegisterInfo::TracksLiveness with a MachineFunctionPropertyDerek Schuff2016-04-114-27/+25
| | | | | | | | | | Use the MachineFunctionProperty mechanism to indicate whether the liveness info is accurate instead of a bool flag on MRI. Keeps the MRI accessor function for convenience. NFC Differential Revision: http://reviews.llvm.org/D18767 llvm-svn: 266020
* Add a missing DICompileUnit to testcase.Adrian Prantl2016-04-111-6/+7
| | | | llvm-svn: 266019
* ThinLTO renaming: use module hash instead of position in the summaryMehdi Amini2016-04-115-23/+24
| | | | | | | | | This is more robust to changes in the link ordering. Differential Revision: http://reviews.llvm.org/D18946 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266018
* Legalize the debug info in this testcase in anticipation of future Verifier ↵Adrian Prantl2016-04-112-27/+46
| | | | | | improvements. llvm-svn: 266017
* AtomicExpandPass: mark assert variable as usedJF Bastien2016-04-111-0/+3
| | | | | | Avoid -Wunused-variable llvm-svn: 266016
* Fix compile with GCC after r266002 (Add __atomic_* lowering to AtomicExpandPass)James Y Knight2016-04-111-8/+8
| | | | | | | | It doesn't like implicitly calling the ArrayRef constructor with a returned array -- it appears to decays the returned value to a pointer, first, before trying to make an ArrayRef out of it. llvm-svn: 266011
* [LTO] Switch Module to std::unique_ptr<>.Davide Italiano2016-04-112-7/+10
| | | | | | Differential Revision: http://reviews.llvm.org/D18994 llvm-svn: 266009
* CodeGen: Fix a use-after-free in TailDuplicationJustin Bogner2016-04-111-2/+0
| | | | | | | | | | The call to processPHI already erased MI from its parent, so MI isn't even valid here, making the getParent() call a use-after-free in addition to being redundant. Found by ASan with the ArrayRecycler changes in llvm.org/pr26808. llvm-svn: 266008
* NFC: keep comment up to dateJF Bastien2016-04-111-4/+4
| | | | | | MergeFunctions was refactored a while ago, and Instruction.cpp's comments went out of sync. The content did as well, will fix later. llvm-svn: 266007
* [safestack] A test for stackprotector canaries.Evgeniy Stepanov2016-04-111-0/+37
| | | | llvm-svn: 266006
* Allow simultaneous safestack and stackprotector attributes.Evgeniy Stepanov2016-04-113-33/+36
| | | | | | | | | This is the clang part of http://reviews.llvm.org/D18846. SafeStack instrumentation pass adds stack protector canaries if both attributes are present on a function. StackProtector pass will step back if the function has a safestack attribute. llvm-svn: 266005
* [safestack] Add canary to unsafe stack framesEvgeniy Stepanov2016-04-117-26/+178
| | | | | | | | Add StackProtector to SafeStack. This adds limited protection against data corruption in the caller frame. Current implementation treats all stack protector levels as -fstack-protector-all. llvm-svn: 266004
* ARM: use r7 as the frame-pointer on all MachO targets.Tim Northover2016-04-115-22/+21
| | | | | | | | | | | | This is better for a few reasons: + It matches the other tooling for iOS. + It matches EABI in more cases (i.e. Thumb-mode, and in practice we don't use ARM mode). + It leads to infinitesimally smaller code (0.2%, yay!). rdar://25369506 llvm-svn: 266003
* Add __atomic_* lowering to AtomicExpandPass.James Y Knight2016-04-118-22/+1071
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AtomicExpandPass can now lower atomic load, atomic store, atomicrmw, and cmpxchg instructions to __atomic_* library calls, when the target doesn't support atomics of a given size. This is the first step towards moving all atomic lowering from clang into llvm. When all is done, the behavior of __sync_* builtins, __atomic_* builtins, and C11 atomics will be unified. Previously LLVM would pass everything through to the ISelLowering code. There, unsupported atomic instructions would turn into __sync_* library calls. Because of that behavior, Clang currently avoids emitting llvm IR atomic instructions when this would happen, and emits __atomic_* library functions itself, in the frontend. This change makes LLVM able to emit __atomic_* libcalls, and thus will eventually allow clang to depend on LLVM to do the right thing. It is advantageous to do the new lowering to atomic libcalls in AtomicExpandPass, before ISel time, because it's important that all atomic operations for a given size either lower to __atomic_* libcalls (which may use locks), or native instructions which won't. No mixing and matching. At the moment, this code is enabled only for SPARC, as a demonstration. The next commit will expand support to all of the other targets. Differential Revision: http://reviews.llvm.org/D18200 llvm-svn: 266002
* Add support for resolving dynamic types of extended ObjC tagged pointersEnrico Granata2016-04-112-0/+188
| | | | | | rdar://problem/24401051 llvm-svn: 266001
* swifterror: fix up a testing case.Manman Ren2016-04-111-5/+5
| | | | llvm-svn: 266000
* [DebugInfo/Test] Add CU as required.Davide Italiano2016-04-111-0/+2
| | | | llvm-svn: 265999
* [DAGCombiner] Fold xor/and/or (bitcast(A), bitcast(B)) -> bitcast(op (A,B)) ↵Simon Pilgrim2016-04-119-2417/+299
| | | | | | | | | | | | | | anytime before LegalizeVectorOprs xor/and/or (bitcast(A), bitcast(B)) -> bitcast(op (A,B)) was only being combined at the AfterLegalizeTypes stage, this patch permits the combine to occur anytime before then as well. The main aim with this to improve the ability to recognise bitmasks that can be converted to shuffles. I had to modify a number of AVX512 mask tests as the basic bitcast to/from scalar pattern was being stripped out, preventing testing of the mmask bitops. By replacing the bitcasts with loads we can get almost the same result. Differential Revision: http://reviews.llvm.org/D18944 llvm-svn: 265998
* Swift Calling Convention: swifterror target support.Manman Ren2016-04-1117-7/+1344
| | | | | | Differential Revision: http://reviews.llvm.org/D18716 llvm-svn: 265997
* Revert accidentally committed changeAdrian Prantl2016-04-111-2/+0
| | | | llvm-svn: 265996
* Add missing DICompileUnit to this testcaseAdrian Prantl2016-04-113-0/+10
| | | | llvm-svn: 265995
* libclang: fix two memory leaks (PR26292)Hans Wennborg2016-04-111-2/+3
| | | | llvm-svn: 265994
OpenPOWER on IntegriCloud