summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [dsymutil] Prevent use-after-freeFrederic Riss2016-05-094-2/+15
| | | | | | | | | | | | The BinaryHolder would query the archive member MemoryBuffer name to check if the current open archive also contains the next requested objectfile. This comparison was using a StringRef to a temporary buffer. It only happened with fat archives. This commit adds long-lived storage along with the MemoryBuffers for the fat archive filename. The added test would fail during an ASAN build without the fix. llvm-svn: 268924
* Enable ↵Pavel Labath2016-05-091-1/+1
| | | | | | | | NamespaceLookupTestCase.test_scope_lookup_before_using_with_run_command on linux test appears to be passing now. llvm-svn: 268923
* Optimize a printf with a double procent to putchar.Joerg Sonnenberger2016-05-092-2/+14
| | | | llvm-svn: 268922
* [VectorUtils] Query number of sign bits to allow more truncationsJames Molloy2016-05-092-4/+50
| | | | | | When deciding if a vector calculation can be done in a smaller bitwidth, use sign bit information from ValueTracking to add more information and allow more truncations. llvm-svn: 268921
* [include-fixer] Autodetect yaml databases in parent directories.Benjamin Kramer2016-05-094-12/+67
| | | | | | | | | | This looks for find_all_symbols_db.yaml in all parent directories of the source file (like we do for compile_commands.json) so we don't have to pass the path manually. Differential Revision: http://reviews.llvm.org/D20066 llvm-svn: 268920
* [clang-tidy] new google-default-arguments checkHaojian Wu2016-05-098-0/+117
| | | | | | | | | | | | | | | | Summary: To check the google style guide rule here: https://google.github.io/styleguide/cppguide.html#Default_Arguments Patch by Clement Courbet! Reviewers: hokein Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19534 llvm-svn: 268919
* [mips][micromips] Make getPointerRegClass() result depend on the instruction.Daniel Sanders2016-05-096-14/+58
| | | | | | | | | | | | | | | | | | | Summary: Previously, it returned the GPR16MMRegClass for all instructions which was incorrect for instructions like lwsp/lwgp and unnecesarily restricted the permitted registers for instructions like lw32. This fixes quite a few of the -verify-machineinstrs errors reported in PR27458. I've only added -verify-machineinstrs to one test in this change since I understand there is a plan to enable the verifier by default. Reviewers: hvarga, zbuljan, zoran.jovanovic, sdardis Subscribers: dsanders, llvm-commits, sdardis Differential Revision: http://reviews.llvm.org/D19873 llvm-svn: 268918
* Support variables and functions types in misc-unused-using-decls.Haojian Wu2016-05-093-5/+80
| | | | | | | | | | | | Summary: Fix PR27429. Reviewers: djasper Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20018 llvm-svn: 268917
* Fix bug where temporary file would be left behind every time an archive was ↵Rafael Espindola2016-05-093-9/+29
| | | | | | | | | | | | | | | | | | | updated. When updating an existing archive, llvm-ar opens the old archive into a `MemoryBuffer`, does its thing, and writes the results to a temporary file. That file is then renamed to the original archive filename, thus replacing it with the updated contents. However, on Windows at least, what would happen is that the `MemoryBuffer` for the old archive would actually be an mmap'ed view of the file, so when it came time to do the rename via Win32's `ReplaceFile`, it would succeed but would be unable to fully replace the file since there would still be a handle open on it; instead, the old version got renamed to a random temporary name and left behind. Patch by Cameron! llvm-svn: 268916
* [X86][SSE] Added TODO comment to add support for AVX512 mask registers to ↵Simon Pilgrim2016-05-092-0/+2
| | | | | | | | shuffle comments This came up in discussion on D19198 llvm-svn: 268915
* Proper detection and handling of RHEL and variants.Rafael Espindola2016-05-091-8/+7
| | | | | | | | | | | - Don't consider "/etc/lsb-release" to be Ubuntu only. - Detect SL, too. - Only add "--no-add-needed" for RHEL7 (or Fedora), not for RHEL6 (that's what the compilers shipped with RHEL do). - removed RHEL4 which is now four years past EOL and certainly incapable of building or running any recent version of llvm/clang. llvm-svn: 268914
* [mips] Fix use after free and an unnecessary copy introduced in r268896.Daniel Sanders2016-05-091-3/+4
| | | | llvm-svn: 268913
* RHEL: Look in more places to find g++ headers and runtime.Rafael Espindola2016-05-091-2/+10
| | | | | | | | | | | | | | | Some distros with ten years of support ship an old gcc but later offer more recent versions for installation in parallel. These versions are typically not only needed for the compilation of llvm/clang, but also to properly use the clang binary that comes out. Clang already searches /usr at runtime for the most recent installation of gcc. This patch appends paths for add-on installations of gcc in RHEL. Patch by Michael Lampe. llvm-svn: 268912
* [mips] Fix mips-got16.s following r268900.Daniel Sanders2016-05-091-2/+0
| | | | | | | $LC0 and $LC1 are no longer present in the symbol table because they are rewritten to .text+offset and .data+offset. llvm-svn: 268911
* [clang][AVX512] completing missing intrinsics [vmin/vmax].Michael Zuckerman2016-05-092-0/+142
| | | | | | Differential Revision: http://reviews.llvm.org/D20062 llvm-svn: 268910
* [PowerPC] fix register alignment for long double typeStrahinja Petrovic2016-05-097-4/+122
| | | | | | | | | This patch fixes register alignment for long double type in soft float mode. Before this patch alignment was 8 and this patch changes it to 4. Differential Revision: http://reviews.llvm.org/D18034 llvm-svn: 268909
* [Sparc][LEON] Add UMAC and SMAC instruction support for Sparc LEON subtargetsChris Dewhurst2016-05-097-5/+79
| | | | | | | | | | | | This change adds SMAC (signed multiply-accumulate) and UMAC (unsigned multiply-accumulate) for LEON subtargets of the Sparc processor. The new files LeonFeatures.td and leon-instructions.ll will both be expanded in future, so I want to leave them separate as small files for this review, to be expanded in future check-ins. Note: The functions are provided only for inline-assembly provision. No DAG selection is provided. Differential Revision: http://reviews.llvm.org/D19911 llvm-svn: 268908
* [AArch64] Implement lowering of the X constraint on AArch64Silviu Baranga2016-05-094-0/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This implements the lowering of the X constraint on AArch64. The default behaviour of the X constraint lowering is to restrict it to "f". This is a problem because the "f" constraint is not implemented on AArch64 and would be too restrictive anyway. Therefore, the AArch64 hook will lower this to "w" (if the operand is a floating point or vector) or "r" otherwise. The implementation is similar with the one added for ARM (r267411). This is the AArch64 side of the fix for http://llvm.org/PR26493 Reviewers: rengolin Subscribers: aemerson, rengolin, llvm-commits, t.p.northover Differential Revision: http://reviews.llvm.org/D19967 llvm-svn: 268907
* Fix assertion in SymbolFilePDBPavel Labath2016-05-091-0/+4
| | | | | | | llvm::Error requires all errors to be handled. Simply checking the whether there was an error is not enough, you have to actuall call handle(All)Errors, in case there was an error. llvm-svn: 268906
* Trying to fix docs.Alexander Kornienko2016-05-093-3/+4
| | | | llvm-svn: 268905
* [X86][AVX512] Added masked version of combine testsSimon Pilgrim2016-05-091-0/+112
| | | | llvm-svn: 268904
* [Clang][AVX512] completing missing intrinsics [CVT]Michael Zuckerman2016-05-092-8/+551
| | | | | | Differential Revision: http://reviews.llvm.org/D20056 llvm-svn: 268903
* Revert "[Mips] Fix use after free."Benjamin Kramer2016-05-091-1/+2
| | | | | | | | Fixes use after free but breaks tests. This reverts commit r268901. llvm-svn: 268902
* [Mips] Fix use after free.Benjamin Kramer2016-05-091-2/+1
| | | | llvm-svn: 268901
* [mips][ias] R_MIPS_(GOT|HI|LO|PC)16 and R_MIPS_GPREL32 do not need symbols.Daniel Sanders2016-05-094-54/+111
| | | | | | | | | | | | | | | | | Summary: In theory, care must be taken to ensure that pairs of R_MIPS_(GOT|HI|LO)16 make the same decision on both relocs in the reloc pair but in practice this isn't as hard as it sounds and only limits the complexity of the predicate used. We handle all three with the same code to ensure their decisions always agree with each other. Reviewers: sdardis Subscribers: rafael, dsanders, sdardis, llvm-commits Differential Revision: http://reviews.llvm.org/D19016 llvm-svn: 268900
* Fix docs.Alexander Kornienko2016-05-091-1/+1
| | | | llvm-svn: 268899
* Enable support for __float128 in Clang and enable it on pertinent platformsNemanja Ivanovic2016-05-0953-82/+462
| | | | | | | | | | | | | | | | | | This patch corresponds to reviews: http://reviews.llvm.org/D15120 http://reviews.llvm.org/D19125 It adds support for the __float128 keyword, literals and target feature to enable it. Based on the latter of the two aforementioned reviews, this feature is enabled on Linux on i386/X86 as well as SystemZ. This is also the second attempt in commiting this feature. The first attempt did not enable it on required platforms which caused failures when compiling type_traits with -std=gnu++11. If you see failures with compiling this header on your platform after this commit, it is likely that your platform needs to have this feature enabled. llvm-svn: 268898
* clang-rename tests: move the run lines to the top of the test filesMiklos Vajna2016-05-093-9/+9
| | | | | | | | | | Summary: To be consistent with the other tests. Reviewers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D20059 llvm-svn: 268897
* [mips][microMIPS] Implement LWP and SWP instructionsZlatko Buljan2016-05-0912-10/+123
| | | | | | Differential Revision: http://reviews.llvm.org/D10640 llvm-svn: 268896
* Fix spurious warnings about unused private fieldOlivier Goffart2016-05-092-4/+8
| | | | | | | | | | | | If the address of a field is taken as a pointer to member, we should not warn that the field is not used. Normaly, yse of fields are done from MemberExpr, but in case of pointer to member, it is in a DeclRefExpr Differential Revision: http://reviews.llvm.org/D20054 llvm-svn: 268895
* [dsymutil] Fix -arch option for thumb variants.Frederic Riss2016-05-094-1/+18
| | | | | | | | | | r267249 removed the dual ARM/Thumb interface from MachOObjectFile, simplifying llvm-dsymutil's code. This unfortunately also regressed llvm-dsymutil's ability to select thumb slices, because the simplified code was also dealing with the discrepency between the slice arch (eg. armv7m) and the triple arch name (eg. thumbv7m). llvm-svn: 268894
* [X86] Fix up type arguments of __builtin_ia32_cvtss2sd_round_mask and ↵Craig Topper2016-05-091-2/+2
| | | | | | __builtin_ia32_cvtsd2ss_round_mask to match the backend. llvm-svn: 268893
* [X86] Strengthen some type contraints for floating point round and extend.Craig Topper2016-05-091-14/+10
| | | | llvm-svn: 268892
* [AVX512] Fix up types for arguments of int_x86_avx512_mask_cvtsd2ss_round ↵Craig Topper2016-05-094-33/+33
| | | | | | and int_x86_avx512_mask_cvtss2sd_round. Only the argument being converted should be a different type. The other 2 argument should have the same type as the result. llvm-svn: 268891
* ThinLTOCodeGenerator: ignore 0 values for the cache settings.Mehdi Amini2016-05-092-9/+17
| | | | | From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 268890
* [AVX512] Add non-temporal store patterns for v16i32/v32i16/v64i8.Craig Topper2016-05-082-2/+23
| | | | llvm-svn: 268889
* Minor code cleanups. NFC.Junmo Park2016-05-081-3/+3
| | | | llvm-svn: 268888
* Generate code coverage for experimental librariesEric Fiselier2016-05-081-1/+1
| | | | llvm-svn: 268887
* [AVX512] Add missing patterns for non-temporal stores of 128/256-bit ↵Craig Topper2016-05-082-0/+55
| | | | | | | | vXi8/vXi16/vXi32 when VLX is enabled. The equivalent AVX1/2 patterns are disabled by VLX. This caused regular stores to be emitted instead. llvm-svn: 268886
* [AVX512] Change predicates on some vXi16/vXi8 AVX store patterns so they ↵Craig Topper2016-05-081-16/+22
| | | | | | | | stay enabled unless VLX and BWI instructions are supported." Without this we could fail instruction selection if VLX was enabled, but BWI wasn't. llvm-svn: 268885
* [AVX512] Add VLX 128/256-bit SET0 operations that encode to 128/256-bit EVEX ↵Craig Topper2016-05-0814-82/+114
| | | | | | encoded VPXORD so all 32 registers can be used. llvm-svn: 268884
* [X86] Re-generate tests using update_llc_test_checks.py to prepare for a ↵Craig Topper2016-05-082-157/+180
| | | | | | future commit. NFC llvm-svn: 268883
* Remove Windows line endings in some tests to prepare for a future commit. NFCCraig Topper2016-05-082-251/+251
| | | | llvm-svn: 268882
* [Bitcode] Fix an unsigned integer overflow while parsing bitcode wrapper headerBruno Cardoso Lopes2016-05-081-1/+2
| | | | | | | | | | | | | Specially crafted bitcode wrapper headers can cause unsigned interger overflow and lead to crashes when wrapping around. Fix the offset check and avoid such scenarios. Writing a testcase for this would involve editing the binary to generate values that trigger the overflow, since this would never happen while generating the bitcode in regular compilation flows, so there's currently no feasible way add one. llvm-svn: 268881
* [X86] Remove extra patterns that check for BUILD_VECTOR of all 0s. These are ↵Craig Topper2016-05-082-24/+7
| | | | | | always canonicalized to v4i32/v8i32/v16i32 except for in SSE1 only when only v4f32 is supported. llvm-svn: 268880
* clang-format: Fix space after argument comments.Daniel Jasper2016-05-082-2/+2
| | | | | | | | | | Before: f(/*a=*/a, /*b=*/ ::b); After: f(/*a=*/a, /*b=*/::b); llvm-svn: 268879
* clang-format: Support enum type template arguments.Daniel Jasper2016-05-082-0/+11
| | | | | | | | | | | | | Before: template <enum E> class A { public : E *f(); }; After: template <enum E> class A { public: E *f(); }; llvm-svn: 268878
* [CostModel][X86] Extended comparison instruction cost model tests to include ↵Simon Pilgrim2016-05-081-33/+113
| | | | | | SSE2/SSE3/SSSE3/SSE41/SSE42 targets llvm-svn: 268877
* [ELF][MIPS] Handling 'packed' N64 ABI relocationsSimon Atanasyan2016-05-082-14/+85
| | | | | | | | | | | | | | | | | | MIPS N64 ABI packs multiple relocations into the single relocation record. In general, all up to three relocations can have arbitrary types. In fact, Clang and GCC uses only a few combinations. For now, we support two of them. That is allow to pass at least all LLVM test suite cases. <any relocation> / R_MIPS_SUB / R_MIPS_HI16 | R_MIPS_LO16 <any relocation> / R_MIPS_64 / R_MIPS_NONE The first relocation is a 'real' relocation which is calculated using the corresponding symbol's value. The second and the third relocations used to modify result of the first one: extend it to 64-bit, extract high or low part etc. For details, see part 2.9 'Relocation' at https://dmz-portal.mips.com/mw/images/8/82/007-4658-001.pdf llvm-svn: 268876
* [X86] Promote several single precision FP libcalls on WindowsDavid Majnemer2016-05-082-10/+14
| | | | | | | | | | | | A number of libcalls don't exist in any particular lib but are, instead, defined in math.h as inline functions (even in C mode!). Don't rely on their existence when lowering @llvm.{cos,sin,floor,..}.f32, promote them instead. N.B. We had logic to handle FREM but were missing out on a number of others. This change generalizes the FREM handling. llvm-svn: 268875
OpenPOWER on IntegriCloud