summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [OpenMP] Cast captures by copy when passed to fork call so that they are ↵Samuel Antao2016-06-169-110/+162
| | | | | | | | | | | | | | | | | compatible to what the runtime library expects. Summary: This patch fixes an issue detected when firstprivate variables are passed to an OpenMP outlined function vararg list. Currently they are not compatible with what the runtime library expects causing malfunction in some targets. This patch fixes the issue by moving the casting logic already in place for offloading to the common code that creates the outline function and arguments and updates the regression tests accordingly. Reviewers: hfinkel, arpith-jacob, carlo.bertolli, kkwli0, ABataev Subscribers: cfe-commits, caomhin Differential Revision: http://reviews.llvm.org/D21150 llvm-svn: 272900
* [codeview] Pass CVRecord to visitTypeBegin callback.Rui Ueyama2016-06-164-34/+24
| | | | | | | | | Both parameters to visitTypeBegin are actually members of CVRecord, so we can just pass CVRecord instead of destructuring it. Differential Revision: http://reviews.llvm.org/D21435 llvm-svn: 272899
* [codeview] Remove unused parameter.Rui Ueyama2016-06-164-68/+46
| | | | | | Differential Revision: http://reviews.llvm.org/D21433 llvm-svn: 272898
* [clang-tidy] misc-move-const-arg: Fix typosAlexander Kornienko2016-06-162-5/+5
| | | | | | | | | | | | Reviewers: alexfh Subscribers: cfe-commits Patch by Martin Boehme! Differential Revision: http://reviews.llvm.org/D21366 llvm-svn: 272897
* [clang-tidy] misc-move-const-arg: Detect if result of std::move() is being ↵Alexander Kornienko2016-06-163-23/+149
| | | | | | | | | | | | | | | | | | | | | | | | passed as a const ref argument Summary: Conceptually, this is very close to the existing functionality of misc-move-const-arg, which is why I'm adding it here and not creating a new check. For example, for a type A that is both movable and copyable, this const A a1; A a2(std::move(a1)); is not only a case where a const argument is being passed to std::move(), but the result of std::move() is also being passed as a const reference (due to overload resolution). The new check typically triggers (exclusively) in cases where people think they're dealing with a movable type, but in fact the type is not movable. Reviewers: hokein, aaron.ballman, alexfh Subscribers: aaron.ballman, cfe-commits Patch by Martin Boehme! Differential Revision: http://reviews.llvm.org/D21223 llvm-svn: 272896
* [mips] Fix small typo. NFC.Vasileios Kalintiris2016-06-161-1/+1
| | | | llvm-svn: 272895
* Implement pdb::hashBufferV8 hash function.Rui Ueyama2016-06-165-14/+65
| | | | llvm-svn: 272894
* [Builtin] Make __builtin_thread_pointer target-independent.Marcin Koscielnicki2016-06-165-3/+9
| | | | | | | | This is now supported for ARM, AArch64, PowerPC, SystemZ, SPARC, Mips. Differential Revision: http://reviews.llvm.org/D19589 llvm-svn: 272893
* Add support for # comments.Rafael Espindola2016-06-162-2/+11
| | | | llvm-svn: 272892
* [JumpThreading] Prevent dangling pointer problems in BranchProbabilityInfoIgor Laevsky2016-06-168-7/+64
| | | | | | | | | We should update results of the BranchProbabilityInfo after removing block in JumpThreading. Otherwise we will get dangling pointer inside BranchProbabilityInfo cache. Differential Revision: http://reviews.llvm.org/D20957 llvm-svn: 272891
* A follow-up fixing on cuda-march.cu: Don't match clang to other place.Haojian Wu2016-06-161-8/+6
| | | | llvm-svn: 272890
* Remove redundant namespace specifiers.Rui Ueyama2016-06-161-9/+9
| | | | llvm-svn: 272889
* [codeview] Use CVTypeVisitor instead of a hand-written switch-cases.Rui Ueyama2016-06-162-68/+66
| | | | | | Differential Revision: http://reviews.llvm.org/D21418 llvm-svn: 272888
* Patch "Compilation for Intel MCU (Part 2/3)" caused the clang-x64-ninja-win7Andrey Turetskiy2016-06-161-2/+2
| | | | | | | buildbot to fail because of inaccurate CHECK in the test. This is a quick fix for the test to make it platform independent. llvm-svn: 272887
* Remove CloudABI specific workaround.Ed Schouten2016-06-161-2/+0
| | | | | | | | CloudABI has gained the mblen_l() function in the meantime that does properly return whether the character set has shift-states (read: never). llvm-svn: 272886
* Compilation for Intel MCU (Part 3/3)Andrey Turetskiy2016-06-162-14/+41
| | | | | | | | | | | | | This is the last patch required to support compilation for Intel MCU target (e.g. Intel(R) Quark(TM) micro controller D 2000). When IAMCU triple is used: * Use IAMCU linker output format * Link with IAMCU crt objects * Link with IAMCU libraries Differential Revision: http://reviews.llvm.org/D20675 llvm-svn: 272885
* PR27938: Don't remove valid DebugLoc in ScalarizerPatrik Hagglund2016-06-162-1/+45
| | | | | | | | | | | | | | | | | Added checks to make sure the Scalarizer::transferMetadata() don't remove valid debug locations from instructions. This is important as the verifier pass require that e.g. inlinable callsites have a valid debug location. https://llvm.org/bugs/show_bug.cgi?id=27938 Patch by Karl-Johan Karlsson Reviewers: dblaikie Differential Revision: http://reviews.llvm.org/D20807 llvm-svn: 272884
* Compilation for Intel MCU (Part 2/3)Andrey Turetskiy2016-06-168-13/+56
| | | | | | | | | | | | This is the second patch required to support compilation for Intel MCU target (e.g. Intel(R) Quark(TM) micro controller D 2000). When IAMCU triple is used: * Recognize and use IAMCU GCC toolchain * Set up include paths * Forbid C++ Differential Revision: http://reviews.llvm.org/D19274 llvm-svn: 272883
* [mips][mips16] Fix machine verifier errors about incorrect register classes ↵Daniel Sanders2016-06-1611-227/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | on load/stores. Summary: [ls][bh] and [ls][bh]u cannot use sp-relative addresses and must therefore lower frameindex nodes such that there is a copy to a CPU16Regs register. This is now done consistently using a separate addressing mode that does not permit frameindex nodes. As part of this I've had to remove an optimization that reduced the number of instructions needed to work around the lack of sp-relative addresses on [ls][bh] and [ls][bh]u. This optimization used one of the eight CPU16Regs registers as a copy of the stack pointer and it's implementation was the root cause of many of the register vs register class mismatches. lw/sw can use sp-relative addresses but we ought to ensure that we use the correct version of lw/sw internally for things like IAS. This is not currently the case and this change does not fix this. However, this change does clean it up sufficiently well to fix the machine verifier failures. Also removed irrelevant functions from stchar.ll. Reviewers: sdardis Subscribers: dsanders, sdardis, llvm-commits Differential Revision: http://reviews.llvm.org/D21062 llvm-svn: 272882
* Add initial support for Thumb for ARMv7aPeter Smith2016-06-1612-3/+655
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for the R_ARM_THM relocations used in the objects present in arm-linux-gnueabihf-gcc. These are: R_ARM_THM_CALL R_ARM_THM_JUMP11 R_ARM_THM_JUMP19 R_ARM_THM_JUMP24 R_ARM_THM_MOVT_ABS R_ARM_THM_MOVW_ABS_NC Interworking between ARM and Thumb is partially supported with BLX. The R_ARM_CALL relocation for ARM instructions and R_ARM_THM_CALL relocation for Thumb instructions will write out a BL or BLX depending on the state of the Target. Assumptions: - Availability of BLX and extended range of Thumb 4-byte Branch instructions. - In relocateOne if (Val & 0x1) == 1 target is Thumb, 0 is ARM. This will hold for objects that comply with the ABI for the ARM architecture. This is sufficient for hello world to work with a recent arm-linux-gnueabihf distribution. Limitations: No interworking for R_ARM_JUMP24, R_ARM_THM_JUMP24, R_ARM_THM_JUMP19 and the deprecated R_ARM_PLT32 and R_ARM_PC24 instructions as these cannot be written out as a BLX and need a state change thunk. No range extension thunks. The R_ARM_JUMP24 and R_ARM_THM_CALL have a range of 16Mb llvm-svn: 272881
* [llvm-objdump] Support detection of feature bits from the object and ↵Daniel Sanders2016-06-1623-95/+122
| | | | | | | | | | | | | | | | | | | | implement this for Mips. Summary: The Mips implementation only covers the feature bits described by the ELF e_flags so far. Mips stores additional feature bits such as MSA in the .MIPS.abiflags section. Also fixed a small bug this revealed where microMIPS wouldn't add the EF_MIPS_MICROMIPS flag when using -filetype=obj. Reviewers: echristo, rafael Subscribers: rafael, mehdi_amini, dsanders, sdardis, llvm-commits Differential Revision: http://reviews.llvm.org/D21125 llvm-svn: 272880
* [LAA] Rename Strides to SymblicStrides in analyzeLoop. NFCAdam Nemet2016-06-162-8/+9
| | | | | | This is to facilitate to move of SymblicStrides from LV to LAA. llvm-svn: 272879
* [LAA] Default getInfo to not speculate symbolic strides. NFCAdam Nemet2016-06-165-7/+6
| | | | | | | Soon we won't be passing Strides to getInfo and then we'll have fewer call sites to update. llvm-svn: 272878
* [modules] Combine Pass.h, PassSupport.h and PassAnalysisSupport.h into one ↵Vassil Vassilev2016-06-161-6/+13
| | | | | | | | | | | | | | module. The header files are designed to be used always together (through Pass.h). Addresses the first part of https://llvm.org/bugs/show_bug.cgi?id=27991 Patch by Cristina Cristescu and me. Reviewed by Richard Smith. llvm-svn: 272877
* [mips][micromips] Implement DCLO, DCLZ, DROTR, DROTR32 and DROTRV instructionsHrvoje Varga2016-06-1610-101/+171
| | | | | | Differential Revision: http://reviews.llvm.org/D16917 llvm-svn: 272876
* Attempt to define friend function more portably.Sean Silva2016-06-161-16/+5
| | | | | | Patch written by Reid. I verified it locally with clang. llvm-svn: 272875
* clang/test/Driver/cuda-march.cu: Tweak not to match "clang" to other place ↵NAKAMURA Takumi2016-06-161-2/+2
| | | | | | like "path-to-clang-foo". llvm-svn: 272874
* SimplifyCFG is able to detect the pattern:Chuang-Yu Cheng2016-06-162-4/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (i == 5334 || i == 5335) to: ((i & -2) == 5334) This transformation has some incorrect side conditions. Specifically, the transformation is only applied when the right-hand side constant (5334 in the example) is a power of two not equal and not equal to the negated mask. These side conditions were added in r258904 to fix PR26323. The correct side condition is that: ((Constant & Mask) == Constant)[(5334 & -2) == 5334]. It's a little bit hard to see why these transformations are correct and what the side conditions ought to be. Here is a CVC3 program to verify them for 64-bit values: ONE : BITVECTOR(64) = BVZEROEXTEND(0bin1, 63); x : BITVECTOR(64); y : BITVECTOR(64); z : BITVECTOR(64); mask : BITVECTOR(64) = BVSHL(ONE, z); QUERY( (y & ~mask = y) => ((x & ~mask = y) <=> (x = y OR x = (y | mask))) ); Please note that each pattern must be a dual implication (<--> or iff). One directional implication can create spurious matches. If the implication is only one-way, an unsatisfiable condition on the left side can imply a satisfiable condition on the right side. Dual implication ensures that satisfiable conditions are transformed to other satisfiable conditions and unsatisfiable conditions are transformed to other unsatisfiable conditions. Here is a concrete example of a unsatisfiable condition on the left implying a satisfiable condition on the right: mask = (1 << z) (x & ~mask) == y --> (x == y || x == (y | mask)) Substituting y = 3, z = 0 yields: (x & -2) == 3 --> (x == 3 || x == 2) The version of this code before r258904 had no side-conditions and incorrectly justified itself in comments through one-directional implication. Thanks to Chandler for the suggestion! Author: Thomas Jablin (tjablin) Reviewers: chandlerc majnemer hfinkel cycheng http://reviews.llvm.org/D21417 llvm-svn: 272873
* [X86] Pre-size some SmallVectors using the constructor in the shuffle ↵Craig Topper2016-06-161-18/+13
| | | | | | lowering code instead of using push_back. Some of these already did this but used resize or assign instead of the constructor. NFC llvm-svn: 272872
* [X86] Remove else after return. NFCCraig Topper2016-06-161-3/+2
| | | | llvm-svn: 272871
* [esan] Use internal_mmap during initializationDerek Bruening2016-06-161-0/+6
| | | | | | | | | Fixes another interceptor issue where an app with a static tcmalloc library that prevents our early-calloc handling from triggering yet does not have a static mmap crashes in our mmap interceptor. The solution is to call internal_mmap when REAL(mmap) is not yet set up. llvm-svn: 272870
* [X86] Inline a couple lambdas into their callers since they are only used ↵Craig Topper2016-06-161-6/+2
| | | | | | once and it all fits on a single line. NFC llvm-svn: 272869
* [InstCombine] Don't widen metadata on store-to-load forwardingEli Friedman2016-06-164-4/+27
| | | | | | | | | | | | | The original check for load CSE or store-to-load forwarding is wrong when the forwarded stored value happened to be a load. Ref https://github.com/JuliaLang/julia/issues/16894 Differential Revision: http://reviews.llvm.org/D21271 Patch by Yichao Yu! llvm-svn: 272868
* [Lex] Try to fix a 'comparison is always false' warning. NFC.George Burgess IV2016-06-161-1/+1
| | | | llvm-svn: 272867
* Fix test from D21194Vitaly Buka2016-06-161-2/+1
| | | | | | Bot sets ASAN_OPTIONS=handle_abort=1 which prevents expected crash. llvm-svn: 272866
* AArch64: allow MOV (imm) alias to be printedTim Northover2016-06-1642-183/+337
| | | | | | | | | The backend has been around for years, it's pretty ridiculous that we can't even use the preferred form for printing "MOV" aliases. Unfortunately, TableGen can't handle the complex predicates when printing so it's a bunch of nasty C++. Oh well. llvm-svn: 272865
* [codeview] Regenerate test case with unique identifiersReid Kleckner2016-06-161-41/+59
| | | | | | | Clang now emits these, and these match MSVC. Should allow more powerful merging of type records across TUs. llvm-svn: 272864
* Debugging D21194 issues on botVitaly Buka2016-06-161-0/+1
| | | | llvm-svn: 272863
* [DebugInfo] Enable generation of unique identifiers for externally visible ↵Reid Kleckner2016-06-162-4/+13
| | | | | | | | MS ABI types We implemented the mangling for this a long time ago. llvm-svn: 272862
* Tidy the asm parser: 80-col, whitespace.Eric Christopher2016-06-161-8/+14
| | | | llvm-svn: 272861
* AMDGPU: Disable scheduling in some slow testsMatt Arsenault2016-06-162-4/+4
| | | | | | | Disabling the pre-RA scheduler on large-work-group-registers causes it to be ~50% slower. llvm-svn: 272860
* Allow 'nodebug' on local variables.Paul Robinson2016-06-166-7/+42
| | | | | | | | | Parameters and non-static members of aggregates are still excluded, and probably should remain that way. Differential Revision: http://reviews.llvm.org/D19754 llvm-svn: 272859
* Enable libFuzzer's afl_driver to append stderr to a file.Vitaly Buka2016-06-164-0/+56
| | | | | | | | | | | | | | | | | | | Summary: [libFuzzer] Enable afl_driver to append stderr to a user specified file. Append stderr of afl_driver to the file specified by the environmental variable AFL_DRIVER_STDERR_DUPLICATE_FILENAME if it is set. This lets users see outputs on crashes without rerunning crashing test cases (which won't work for crashes that are difficult to reproduce). Before this patch, stderr would only be sent to afl-fuzz and users would have no way of seeing it. Reviewers: llvm-commits, aizatsky, kcc, vitalybuka Subscribers: vitalybuka Differential Revision: http://reviews.llvm.org/D21194 llvm-svn: 272858
* [CUDA] Don't pass top-level -march down to device cc1 or ptxas.Justin Lebar2016-06-152-1/+27
| | | | | | | | | | | | | | | | | | Summary: Previously if you did e.g. $ clang -march=haswell -x cuda foo.cu we would pass "-march=haswell -march=sm_20" down to the ptxas tool. This causes it to assert, and rightly so! Reviewers: tra Subscribers: cfe-commits, echristo Differential Revision: http://reviews.llvm.org/D21419 llvm-svn: 272857
* Fix sanitizer-ld test.Evgeniy Stepanov2016-06-151-7/+0
| | | | llvm-svn: 272856
* [IR] [DAE] Copy comdats during DAE, and don't copy comdats in ↵Justin Lebar2016-06-153-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | GlobalObject::copyAttributesFrom. Summary: This reverts the changes to Globals.cpp and IRMover.cpp in "[IR] Copy comdats in GlobalObject::copyAttributesFrom" (D20631, rL270743). The DeadArgElim test is left unchanged, and we change DAE to explicitly copy comdats. The reverted change breaks copyAttributesFrom when the destination lives in a different module from the source. The decision in D21255 was to revert this patch and handle comdat copying separately from copyAttributesFrom. Reviewers: majnemer, rnk Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D21403 llvm-svn: 272855
* [Bugpoint] Erase comdat annotations after removing a global's initializer.Justin Lebar2016-06-152-0/+4
| | | | | | | | | | | | | | | Summary: This is necessary to keep the verifier happy after bugpoint removes an initializer from a global variable with a comdat annotation, because globals without initializers may not have comdats. Reviewers: majnemer, rnk Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D21274 llvm-svn: 272854
* Fix linking of DFSan + coverage.Evgeniy Stepanov2016-06-152-1/+56
| | | | | | Broken in r272717 because of no test coverage. llvm-svn: 272853
* [clang-tools] mark TokenName as unusedArtem Belevich2016-06-151-1/+1
| | | | | | Otherwise it produces compiler warning if asserts are disabled. llvm-svn: 272852
* [LV] Make the new getter return a const reference. NFCAdam Nemet2016-06-151-1/+3
| | | | | | | | | LoopVectorizationLegality holds a constant reference to LAI, so this will have to be const as well. Also added missed function comment. llvm-svn: 272851
OpenPOWER on IntegriCloud