summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix illegal relocations in X86FastISelLouis Gerbarg2014-06-163-3/+31
| | | | | | | | | | | | On x86_86 the lea instruction can only use a 32 bit immediate value. When the code is compiled statically the RIP register is not used, meaning the immediate is all that can be used for the relocation, which is not sufficient in the case of targets more than +/- 2GB away. This patch bails out of fast isel in those cases and reverts to DAG which does the right thing. Test case included. llvm-svn: 211040
* Objective-C. Diagnose when property access is using declaredFariborz Jahanian2014-06-168-17/+69
| | | | | | | property accessor methods which have become deprecated or available. // rdar://15951801 llvm-svn: 211039
* LowerSwitch: track bounding range for the condition tree.Jim Grosbach2014-06-164-102/+209
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When LowerSwitch transforms a switch instruction into a tree of ifs it is actually performing a binary search into the various case ranges, to see if the current value falls into one cases range of values. So, if we have a program with something like this: switch (a) { case 0: do0(); break; case 1: do1(); break; case 2: do2(); break; default: break; } the code produced is something like this: if (a < 1) { if (a == 0) { do0(); } } else { if (a < 2) { if (a == 1) { do1(); } } else { if (a == 2) { do2(); } } } This code is inefficient because the check (a == 1) to execute do1() is not needed. The reason is that because we already checked that (a >= 1) initially by checking that also (a < 2) we basically already inferred that (a == 1) without the need of an extra basic block spawned to check if actually (a == 1). The patch addresses this problem by keeping track of already checked bounds in the LowerSwitch algorithm, so that when the time arrives to produce a Leaf Block that checks the equality with the case value / range the algorithm can decide if that block is really needed depending on the already checked bounds . For example, the above with "a = 1" would work like this: the bounds start as LB: NONE , UB: NONE as (a < 1) is emitted the bounds for the else path become LB: 1 UB: NONE. This happens because by failing the test (a < 1) we know that the value "a" cannot be smaller than 1 if we enter the else branch. After the emitting the check (a < 2) the bounds in the if branch become LB: 1 UB: 1. This is because by checking that "a" is smaller than 2 then the upper bound becomes 2 - 1 = 1. When it is time to emit the leaf block for "case 1:" we notice that 1 can be squeezed exactly in between the LB and UB, which means that if we arrived to that block there is no need to emit a block that checks if (a == 1). Patch by: Marcello Maggioni <hayarms@gmail.com> llvm-svn: 211038
* Refactor the disabling of Thumb-1 LDM/STM generationJames Molloy2014-06-162-7/+7
| | | | | | | | Originally I switched the LD/ST optimizer off in TargetMachine as it was previously, but Eric has suggested he'd prefer that it be short-circuited in the pass itself. No functionality change. llvm-svn: 211037
* Fix pr17056.Rafael Espindola2014-06-163-5/+11
| | | | | | | | | | | | | This makes llvm-nm ignore members that are not sufficiently aligned for lib/Object to handle. These archives are invalid. GNU AR is able to handle this, but in general just warns about broken archive members. We should probably start warning too, but for now just make sure llvm-nm exits with an 0. llvm-svn: 211036
* builtins: add it blocks for Thumb-2Saleem Abdulrasool2014-06-163-8/+38
| | | | | | | Add the missing IT-blocks for Thumb-2 compilation for code paths exercised by older ARM CPUs. This should fix the buildbots. llvm-svn: 211035
* Update for llvm api change.Rafael Espindola2014-06-161-10/+12
| | | | llvm-svn: 211034
* Convert the Archive API to use ErrorOr.Rafael Espindola2014-06-168-93/+88
| | | | | | | | | Now that we have c++11, even things like ErrorOr<std::unique_ptr<...>> are easy to use. No intended functionality change. llvm-svn: 211033
* compiler-rt: prefer thumb over ARMSaleem Abdulrasool2014-06-1610-0/+31
| | | | | | | | | | | When possible, use Thumb or Thumb-2 over ARM instructions. This is particularly important for pure-Thumb environments (e.g. Windows on ARM). Although, it is possible to conditionalise this for that target specifically, this is available on most newer ARM CPUs, and the code remains compatible with older CPUs with no adverse effects. It therefore feels better to always prefer Thumb when possible. llvm-svn: 211032
* [C++1z] Implement N4051: 'typename' is permitted instead of 'class' when ↵Richard Smith2014-06-165-15/+55
| | | | | | declaring a template template parameter. llvm-svn: 211031
* Add -std=c++1z flag for C++17 features.Richard Smith2014-06-167-7/+51
| | | | llvm-svn: 211030
* [AArch64] Remove dead code.Tilmann Scheller2014-06-161-3/+0
| | | | | | Both function declarations lack a callee and an implementation. llvm-svn: 211029
* [cmake] Switch python install to use an 'install(DIRECTORY...)' cmakeChandler Carruth2014-06-162-15/+2
| | | | | | | | | | | | | command instead of a script. In addition to cleaning things up, this allows more easy access to the variables. In the old version, it tried to pass variables as -D flags to cmake, but this didn't actually work. CMake drops all of those arguments on the floor (try passing garbage through them) and just picks up the limited subset of pre-defined macros. So, for example, this fixes the build with LLVM_LIBDIR_SUFFIX=64 which is how I ended up here. =] llvm-svn: 211028
* Swap getdtablesize() for sysconf(_SC_OPEN_MAX).Dan Albert2014-06-161-1/+1
| | | | | | Bionic is no removing this as it was removed from POSIX 2004. llvm-svn: 211027
* Move x86-specific struct user code for Linux ProcessMonitor behind #define ↵Todd Fiala2014-06-161-0/+4
| | | | | | | | | | guards. See http://reviews.llvm.org/D4092 for details. Change by Paul Osmialowski. (Minor tweaks to the comment by Todd.) llvm-svn: 211026
* Fix typosAlp Toker2014-06-162-2/+2
| | | | llvm-svn: 211025
* Hook up vector int_ctlz for AVX512.Cameron McInally2014-06-163-0/+32
| | | | llvm-svn: 211024
* Use the ShowInSystemHeader bit consistently for all diagnosticsAlp Toker2014-06-167-22/+22
| | | | | | | | | | | | By describing system header suppressions directly in tablegen we eliminate special cases in getDiagnosticSeverity(). Dropping the reliance on builtin diagnostic classes when mapping also gets us closer to the goal of reusing the diagnostic machinery for custom diagnostics. No change in functionality. llvm-svn: 211023
* [sanitizer] Support PTRACE_GETEVENTMSG in the ptrace() interceptor.Sergey Matveev2014-06-163-1/+5
| | | | llvm-svn: 211022
* [mips][mips64r6] ssnop is deprecated on MIPS32r6/MIPS64r6Daniel Sanders2014-06-164-3/+22
| | | | | | | | | | | | Summary: Depends on D4120 Reviewers: jkolek, zoran.jovanovic, vmedic Reviewed By: zoran.jovanovic, vmedic Differential Revision: http://reviews.llvm.org/D4121 llvm-svn: 211021
* [mips][mips64r6] cl[oz], and dcl[oz] are re-encoded in MIPS32r6/MIPS64r6Daniel Sanders2014-06-1617-60/+223
| | | | | | | | | | | | | | | | | Summary: There is no change to the restrictions, just the result register is stored once in the encoding rather than twice. The rt field is zero in MIPS32r6/MIPS64r6. Depends on D4119 Reviewers: zoran.jovanovic, jkolek, vmedic Reviewed By: vmedic Differential Revision: http://reviews.llvm.org/D4120 llvm-svn: 211019
* [mips][mips64r6] ll, sc, lld, and scd are re-encoded on MIPS32r6/MIPS64r6.Daniel Sanders2014-06-1623-82/+306
| | | | | | | | | | | | | | | | | | | | | Summary: The linked-load, store-conditional operations have been re-encoded such that have a 9-bit offset instead of the 16-bit offset they have prior to MIPS32r6/MIPS64r6. While implementing this, I noticed that the atomic load/store pseudos always emit a sign extension using sll and sra. I have improved this to use seb/seh when they are available (MIPS32r2/MIPS64r2 and above). Depends on D4118 Reviewers: jkolek, zoran.jovanovic, vmedic Reviewed By: vmedic Differential Revision: http://reviews.llvm.org/D4119 llvm-svn: 211018
* [Mips] Make hilo16-5.test test case independent from external input files.Simon Atanasyan2014-06-161-6/+37
| | | | llvm-svn: 211017
* Support/ConvertUTF: restore compatibility with MSVC, which only implements C89Dmitri Gribenko2014-06-161-5/+7
| | | | llvm-svn: 211016
* Support/ConvertUTF: implement U+FFFD insertion according to the recommendationDmitri Gribenko2014-06-163-9/+1342
| | | | | | | | | given in the Unicode spec That is, replace every maximal subpart of an ill-formed subsequence with one U+FFFD. llvm-svn: 211015
* [AArch64] Fix a fencepost error in lowering for llvm.aarch64.neon.uqshl.James Molloy2014-06-162-1/+10
| | | | | | Patch by Jiangning Liu! llvm-svn: 211014
* [mips] Merge most of the big/little endian checks in atomic.llDaniel Sanders2014-06-161-333/+179
| | | | | | | | | | | | | | | | | Summary: There is very little difference between the big and little endian cases in test/CodeGen/Mips/atomic.ll. Merge them together using multiple FileCheck prefixes. Depends on D4117 Reviewers: jkolek, zoran.jovanovic, vmedic Reviewed By: vmedic Differential Revision: http://reviews.llvm.org/D4118 llvm-svn: 211013
* [mips][mips64r6] [ls][wd]c2 were re-encoded with 11-bit signed immediates ↵Daniel Sanders2014-06-1618-47/+140
| | | | | | | | | | | | | | | | | | | | | rather than 16-bit in MIPS32r6/MIPS64r6 Summary: The error message for the invalid.s cases isn't very helpful. It happens because there is an instruction with a wider immediate that would have matched if the NotMips32r6 predicate were true. I have some WIP to improve the message but it affects most error messages for removed/re-encoded instructions on MIPS32r6/MIPS64r6 and should therefore be a separate commit. Depens on D4115 Reviewers: zoran.jovanovic, jkolek, vmedic Reviewed By: vmedic Differential Revision: http://reviews.llvm.org/D4117 llvm-svn: 211012
* clang/AST/OpenMPClause.h: Update \param VL. [-Wdocumentation]NAKAMURA Takumi2014-06-161-1/+1
| | | | llvm-svn: 211011
* ARMEB: Fix trunc store for vector typesChristian Pirker2014-06-162-1/+28
| | | | | | Reviewed at http://reviews.llvm.org/D4135 llvm-svn: 211010
* Add Guan-Hong Liu.Joerg Sonnenberger2014-06-161-0/+4
| | | | llvm-svn: 211009
* [asan] initialze varaibles to avoid a (false positive) report from gcc's ↵Kostya Serebryany2014-06-161-2/+2
| | | | | | -Wmaybe-uninitialized llvm-svn: 211008
* [OPENMP] Initial support of 'reduction' clauseAlexey Bataev2014-06-1620-41/+954
| | | | llvm-svn: 211007
* Minor gdb-remote test QListThreadsInStopReply changes from llgs branch.Todd Fiala2014-06-152-5/+7
| | | | llvm-svn: 211006
* Hide the concept of diagnostic levels from lex, parse and semaAlp Toker2014-06-1520-171/+114
| | | | | | | | | | | | | | | | The compilation pipeline doesn't actually need to know about the high-level concept of diagnostic mappings, and hiding the final computed level presents several simplifications and other potential benefits. The only exceptions are opportunistic checks to see whether expensive code paths can be avoided for diagnostics that are guaranteed to be ignored at a certain SourceLocation. This commit formalizes that invariant by introducing and using DiagnosticsEngine::isIgnored() in place of individual level checks throughout lex, parse and sema. llvm-svn: 211005
* Canonicalize addrspacecast ConstExpr between different pointer typesJingyue Wu2014-06-157-9/+37
| | | | | | | | | | | | | | | | | | As a follow-up to r210375 which canonicalizes addrspacecast instructions, this patch canonicalizes addrspacecast constant expressions. Given clang uses ConstantExpr::getAddrSpaceCast to emit addrspacecast cosntant expressions, this patch is also a step towards having the frontend emit canonicalized addrspacecasts. Piggyback a minor refactor in InstCombineCasts.cpp Update three affected tests in addrspacecast-alias.ll, access-non-generic.ll and constant-fold-gep.ll and added one new test in constant-fold-address-space-pointer.ll llvm-svn: 211004
* Fix copy paste errorMatt Arsenault2014-06-151-1/+1
| | | | llvm-svn: 211003
* R600: Add a rotr testcase I forgot to addMatt Arsenault2014-06-151-0/+58
| | | | llvm-svn: 211002
* R600: Remove a few more things from AMDILISelLoweringMatt Arsenault2014-06-153-27/+71
| | | | | | | Try to keep all the setOperationActions for integer ops together. llvm-svn: 211001
* R600: Fix assert on vector sdivMatt Arsenault2014-06-152-4/+36
| | | | llvm-svn: 211000
* R600: Move / cleanup more leftover AMDIL stuff.Matt Arsenault2014-06-153-71/+30
| | | | llvm-svn: 210998
* R600: Move division custom lowering out of AMDILISelLoweringMatt Arsenault2014-06-153-271/+257
| | | | llvm-svn: 210997
* Temporarily revert r210953 in an attempt to bring the ARM buildbotsEric Christopher2014-06-159-26/+24
| | | | | | back. llvm-svn: 210996
* R600: Report that integer division is expensive.Matt Arsenault2014-06-152-4/+61
| | | | | | Divides by weird constants now emit much better code. llvm-svn: 210995
* R600: Remove dead codeMatt Arsenault2014-06-152-75/+11
| | | | llvm-svn: 210994
* PR20038: DebugInfo missing DIEs for some concrete variables.David Blaikie2014-06-152-0/+149
| | | | | | | | I haven't nailed this down entirely, but this is about as small of a test case as I can seem to construct and adequately demonstrates the crasher. I'll continue investigating the root cause/fix(es). llvm-svn: 210993
* test: add missed file in previous commitSaleem Abdulrasool2014-06-151-3/+3
| | | | llvm-svn: 210992
* Preprocessor: improve ACLE 6.4.1, 6.4.2 supportSaleem Abdulrasool2014-06-152-7/+82
| | | | | | | | | | | | | | | | | | This improves conformance with ACLE 6.4.1. Define additional macros that indicate support for the ARM and Thumb instruction set architecture. This includes the following set of macros: __ARM_ARCH __ARM_ARCH_ISA_ARM __ARM_ARCH_ISA_THUMB __ARM_32BIT_STATE These help identify the environment that the code is intended to execute on. Adjust the handling for ACLE 6.4.2 to be more correct. We would define the profile as a free-standing token rather than a quoted single character. llvm-svn: 210991
* Add specialization of FoldingSetTrait for std::pair.Manuel Klimek2014-06-151-0/+8
| | | | llvm-svn: 210990
* Fix building InstrProfilingFile.c on FreeBSDViktor Kutuzov2014-06-151-1/+0
| | | | llvm-svn: 210989
OpenPOWER on IntegriCloud