summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [InstCombine] fix demanded-bits propagation for zext/truncSanjay Patel2018-01-172-4/+2
| | | | | | | | | I was comparing the demanded-bits implementations between InstCombine and TargetLowering as part of investigating questions in D42088 and noticed that this was wrong in IR. We were losing all of the prior known bits when we got back to the 'zext'. llvm-svn: 322662
* [Sema] Add visited contexts to CodeCompleteContextHaojian Wu2018-01-176-1/+169
| | | | | | | | | | | | | | | | | | | Summary: This would allow code completion clients to know which context is visited during Sema code completion. Also some changes: * add `EnteredContext` callback in VisibleDeclConsumer. * add a simple unittest for sema code completion (only for visited contexts at the moment). Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: mgorny, bkramer, cfe-commits Differential Revision: https://reviews.llvm.org/D42071 llvm-svn: 322661
* [InstCombine] add test to show hole in demanded bits; NFCSanjay Patel2018-01-171-0/+19
| | | | llvm-svn: 322660
* [RISCV] Allow RISCVAsmBackend::writeNopData to generate c.nop when supportedAlex Bradbury2018-01-172-8/+44
| | | | | | | | | | When the compressed instruction set is enabled, the 16-bit c.nop can be generated if necessary. Differential Revision: https://reviews.llvm.org/D41221 Patch by Shiva Chen. llvm-svn: 322658
* [ARM GlobalISel] Map G_FPEXT and G_FPTRUNC to FPRDiana Picus2018-01-172-0/+63
| | | | llvm-svn: 322657
* [AMDGPU] add LDS f32 intrinsicsDaniil Fukalov2018-01-1710-11/+169
| | | | | | | | | | | | added llvm.amdgcn.atomic.{add|min|max}.f32 intrinsics to allow generate ds_{add|min|max}[_rtn]_f32 instructions needed for OpenCL float atomics in LDS Reviewed by: arsenm Differential Revision: https://reviews.llvm.org/D37985 llvm-svn: 322656
* [AMDGPU][MC][GFX9] Enable inline constants for SDWA operandsDmitry Preobrazhensky2018-01-177-85/+473
| | | | | | | | | See bug 35771: https://bugs.llvm.org/show_bug.cgi?id=35771 Differential Revision: https://reviews.llvm.org/D42058 Reviewers: vpykhtin, artem.tamazov, arsenm llvm-svn: 322655
* Simplify some LogTest testsPavel Labath2018-01-171-78/+90
| | | | | | | | | | | This removes boilerplate for setting up a log channel and capturing the output from some of the tests. I do this by moving the setup code into a test fixture and adding a logAndTakeOutput utility function to log some string and then retrieve it from the log. I also use some googlemock goodies to simplify a couple of assertions. llvm-svn: 322653
* [clang-cl] Let /FA output use intel assembly.Nico Weber2018-01-172-0/+5
| | | | | | | cl's assembly output is in intel syntax, so clang-cl's should be too, PR35031. https://reviews.llvm.org/D42157 llvm-svn: 322652
* [ARM GlobalISel] Legalize G_FPEXT and G_FPTRUNCDiana Picus2018-01-173-0/+138
| | | | | | | | | | | Mark G_FPEXT and G_FPTRUNC as legal or libcall, depending on hardware support, but only for conversions between float and double. Also add the necessary boilerplate so that the LegalizerHelper can introduce the required libcalls. This also works only for float and double, but isn't too difficult to extend when the need arises. llvm-svn: 322651
* [Transforms] Support making mutable versions of new-format TBAA access tagsIvan A. Kosarev2018-01-174-23/+57
| | | | | | Differential Revision: https://reviews.llvm.org/D41565 llvm-svn: 322650
* Add new interceptor: acct(2)Kamil Rytarowski2018-01-172-0/+16
| | | | | | | | | | | | | | | | | | | Summary: acct - enable or disable process accounting Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D42066 llvm-svn: 322646
* [X86] Don't mutate shuffle arguments after early-out for AVX512Benjamin Kramer2018-01-172-18/+62
| | | | | | | | | | The match* functions have the annoying behavior of modifying its inputs. Save and restore the inputs, just in case the early out for AVX512 is hit. This is still not great and its only a matter of time this kind of bug happens again, but I couldn't come up with a better pattern without rewriting significant chunks of this code. Fixes PR35977. llvm-svn: 322644
* [X86] Constify DebugLoc parameters. No functionality change.Benjamin Kramer2018-01-171-13/+10
| | | | llvm-svn: 322643
* Hotfix for test/asan/TestCases/alloca_constant_size.ccKamil Rytarowski2018-01-171-0/+1
| | | | | | Add missing endif. llvm-svn: 322638
* [clangd] Don't crash on LSP calls for non-added filesIlya Biryukov2018-01-174-21/+88
| | | | | | | | | | | | | | | | | | | | | Summary: We will return errors for non-added files for now. Another alternative for clangd would be to read non-added files from disk and provide useful features anyway. There are still some cases that fail with assertion (e.g., code complete). We should address those too, but they require more subtle changes to the code and therefore out of scope of this patch. Reviewers: sammccall, ioeric, hokein Reviewed By: sammccall Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D42164 llvm-svn: 322637
* [NFC] fix trivial typos in commentsHiroshi Inoue2018-01-176-9/+9
| | | | | | "the the" -> "the" llvm-svn: 322636
* [Sanitizers, test] Fix sanitizer tests on Solaris (PR 33274)Kamil Rytarowski2018-01-1720-8/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch (on top of the previous two (https://reviews.llvm.org/D40898 and https://reviews.llvm.org/D40899) complete the compiler-rt side of the the Solaris sanitizer port. It contains the following sets of changes: * For the time being, the port is for 32-bit x86 only, so reject the various tests on x86_64. * When compiling as C++, <setjmp.h> resp. <iso/setjmp_iso.h> only declares _setjmp and _longjmp inside namespace std. * MAP_FILE is a Windows feature. While e.g. Linux <sys/mman.h> provides a no-op compat define, Solaris does not. * test/asan/TestCases/Posix/coverage.cc was initially failing like this: /vol/gcc/src/llvm/llvm/local/projects/compiler-rt/lib/sanitizer_common/scripts/sancov.py: 4 files merged; 2 PCs total rm: cannot remove '/var/gcc/llvm/local/projects/compiler-rt/test/asan/I386SunOSConfig/TestCases/Posix/Output/coverage': Invalid argument Further digging revealed that the rm was trying to remove the running test's working directory which failed as observed. cd'ing out of the dir before let the test pass. * Two tests needed a declaration of alloca. I've now copied the existing code from test/asan/TestCases/alloca_constant_size.cc, but it may be more profitable and maintainable to have a common testsuite header where such code is collected. * Similarly, Solaris' printf %p format doesn't include the leading 0x. * In test/asan/TestCases/malloc-no-intercept.c, I had to undef __EXTENSIONS__ (predefined by clang for no apparent reason) to avoid conflicting declarations for memalign. * test/ubsan/TestCases/Float/cast-overflow.cpp has different platform dependent ways to define BYTE_ORDER and friends. Why not just use __BYTE_ORDER__ and friends as predefined by clang and gcc? Patch by Rainer Orth. Reviewers: kcc, alekseyshl Reviewed By: alekseyshl Subscribers: srhines, kubamracek, mgorny, krytarowski, fedor.sergeev, JDevlieghere, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D40900 llvm-svn: 322635
* [clang-format] Reorganize RawStringFormat based on languageKrasimir Georgiev2018-01-175-58/+81
| | | | | | | | | | | | | | | | | | Summary: This patch changes the structure for raw string formatting options by making it language based (enumerate delimiters per language) as opposed to delimiter-based (specify the language for a delimiter). The raw string formatting now uses an appropriate style from the .clang-format file, if exists. Reviewers: bkramer Reviewed By: bkramer Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D42098 llvm-svn: 322634
* Don't emit apple accelerator tables on non-darwin targetsPavel Labath2018-01-172-2/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently -glldb turns on emission of apple tables on all targets, but lldb is only really capable of consuming them on darwin. Furthermore, making lldb consume these tables is not straight-forward because of the differences in how the debug info is distributed on darwin vs. elf targets. The darwin debug model assumes that the debug info (along with accelerator tables) will either remain in the .o files or it will be linked into a dsym bundle by a linker that knows how to merge these tables. In the elf world, all present linkers will simply concatenate these accelerator tables into the shared object. Since the tables are not self-terminating, this renders the tables unusable, as the debugger cannot pry the individual tables apart anymore. It might theoretically be possible to make the tables work with split dwarf, as that is somewhat similar to the apple .o model, but unfortunately right now the combination of -glldb and -gsplit-dwarf produces broken object files. Until these issues are resolved there is no point in emitting the apple tables for these targets. At best, it wastes space; at worst, it breaks compilation and prevents the user from getting other benefits of -glldb. Reviewers: probinson, aprantl, dblaikie Subscribers: emaste, dim, llvm-commits, JDevlieghere Differential Revision: https://reviews.llvm.org/D41986 llvm-svn: 322633
* Partial revert of [OMPT] Rename ompt_mutex_impl_t to kmp_mutex_implJoachim Protze2018-01-171-3/+3
| | | | | | The previous commit did not revert all replaced ompt_mutex_impl_unknown. llvm-svn: 322631
* Rewrite debugger tuning test case to not depend on apple sectionsPavel Labath2018-01-171-26/+40
| | | | | | | | | | | | | | | | | | | | | Summary: In a follow-up commit I'll change the rules for emission of accelerator tables, which means we won't be able to use them as a litmus test for the debugger tuning options. Instead of sections, I base the test on the presence/absence of some debug info attributes and opcodes: LLDB - prefers DW_OP_form_tls_address and uses DW_AT_APPLE_optimized GDB - prefers DW_OP_GNU_push_tls_address and does not use the optimized attribute SCE - prefers DW_OP_form_tls_address and does not use the optimized attribute Reviewers: probinson, aprantl, dblaikie Subscribers: JDevlieghere, llvm-commits Differential Revision: https://reviews.llvm.org/D41985 llvm-svn: 322630
* [SCEV] fix typoJaved Absar2018-01-171-1/+1
| | | | llvm-svn: 322629
* [X86][AVX] Add extra 'interleaved+lanepermute' shuffle testSimon Pilgrim2018-01-171-0/+51
| | | | | | Possible missed opportunity to use 64-bit lane permute on AVX1 in lowerShuffleAsRepeatedMaskAndLanePermute llvm-svn: 322628
* [ThinLTO] - Remove code duplication. NFC.George Rimar2018-01-171-22/+17
| | | | | | | Refactors 3 copies of isExpected. Splitted from D42107. llvm-svn: 322627
* [clang-tidy] implement check for gotoJonas Toth2018-01-1710-0/+313
| | | | | | | | | | | | | | | | | | | | The usage of `goto` is discourage in C++ since forever. This check implements a warning for every `goto`. Even though there are (rare) valid use cases for `goto`, better high level constructs should be used. `goto` is used sometimes in C programs to free resources at the end of functions in the case of errors. This pattern is better implemented with RAII in C++. Reviewers: aaron.ballman, alexfh, hokein Reviewed By: aaron.ballman Subscribers: lebedev.ri, jbcoe, Eugene.Zelenko, klimek, nemanjai, mgorny, xazax.hun, kbarton, cfe-commits Differential Revision: https://reviews.llvm.org/D41815 llvm-svn: 322626
* [ELF] - Stop mixing order of -defsym/-script commands.George Rimar2018-01-172-8/+26
| | | | | | | | | | | | | | | | | | | | | Previously we always handled -defsym after other commands in command line. That made impossible to overload values set by -defsym from linker script: test.script: foo = 0x22; -defsym=foo=0x11 -script t.script would always set foo to 0x11. That is inconstent with common logic which allows to override command line options. it is inconsistent with bfd behavior and seems breaks assumption that -defsym is the same as linker script assignment, as -defsyms always handled out of command line order. Patch fixes the handling order. Differential revision: https://reviews.llvm.org/D42054 llvm-svn: 322625
* [clang-tidy] fix minor formatting issueJonas Toth2018-01-171-2/+1
| | | | llvm-svn: 322624
* Allow usage of X86-prefixes as separate instrs.Andrew V. Tischenko2018-01-173-2/+46
| | | | | | Differential Revision: https://reviews.llvm.org/D42102 llvm-svn: 322623
* [OMPT] Add Workaround for Intel Compiler BugJoachim Protze2018-01-172-1/+2
| | | | | | | | | | | | | | | | | | | | | | Add Workaround for Intel Compiler Bug with Case#: 03138964 A critical region within a nested task causes a segfault in icc 14-18: int main() { #pragma omp parallel num_threads(2) #pragma omp master #pragma omp task #pragma omp task #pragma omp critical printf("test\n"); } When the critical region is in a separate function, the segault does not occur. So we add noinline to make sure that the function call stays there. Differential Revision: https://reviews.llvm.org/D41182 llvm-svn: 322622
* [OMPT] Rename ompt_mutex_impl_t to kmp_mutex_implJoachim Protze2018-01-174-36/+36
| | | | | | | | | | The defintion is not part of the spec and thus should not have the prefix "ompt_" but rather a prefix that indicates that this is implementation specific. Differential Revision: https://reviews.llvm.org/D41166 llvm-svn: 322621
* [OMPT] Return appropiate values for ompt runtime entry points for non-OpenMP ↵Joachim Protze2018-01-173-8/+75
| | | | | | | | | | | threads When the current thread is not an (initialized) OpenMP thread, the runtime entry points return values that correspond to "not available" or similar Differential Revision: https://reviews.llvm.org/D41167 llvm-svn: 322620
* [MC] Fix -stack-size-section on ARMSean Eveson2018-01-174-4/+33
| | | | | | | | Change symbol values in the stack_size section from being 8 bytes, to being a target dependent size. Differential Revision: https://reviews.llvm.org/D42108 llvm-svn: 322619
* [CodeGen] Fix a crash on mangling multiversioned functionsGeorge Burgess IV2018-01-172-2/+18
| | | | | | | `multiVersionSortPriority` expects features to have no prefix. We currently carry them around in the format "+${feature}". llvm-svn: 322618
* libcxx: Stop using private MSVC macros in the exception implementation.Peter Collingbourne2018-01-173-43/+23
| | | | | | | | | | | Inline the provided "fallback" definitions (which seem to always be taken) that expand to __cdecl into users. The fallback definitions for the *CRTIMP* macros were wrong in the case where the CRT is being linked statically, so define our own macro as a replacement. Differential Revision: https://reviews.llvm.org/D42158 llvm-svn: 322617
* [X86] In LowerBUILD_VECTOR, rename ExtVT to EltVT so it makes sense.Craig Topper2018-01-171-7/+7
| | | | llvm-svn: 322616
* [X86] Remove duplicate lines from scheduler models. NFCCraig Topper2018-01-174-8/+0
| | | | llvm-svn: 322615
* [pdbutil] Replace 0 byte PDB input with correct version to fix failing unit testAaron Smith2018-01-171-0/+0
| | | | llvm-svn: 322614
* [Support] Return an enum instead of an unsigned; NFC.George Burgess IV2018-01-172-3/+3
| | | | | | | | | | | | | | We seem to be (logically) returning ArchExtKinds here in all cases, so the return type should reflect that. The static_cast is necessary because `A.ID` is actually an `unsigned`, presumably since we use `decltype(A)` to represent extended attributes for both ARM and AArch64, which use distinct `ArchExtKinds`. We can't trivially make the same change for ARM, because one of the values it returns is the bitwise-or of two `ARM::ArchExtKind`s. llvm-svn: 322613
* [analyzer] support a mode to only show relevant lines in HTML diagnosticsGeorge Karpenkov2018-01-1712-22/+305
| | | | | | | | | | | | | | HTML diagnostics can be an overwhelming blob of pages of code. This patch adds a checkbox which filters this list down to only the lines *relevant* to the counterexample by e.g. skipping branches which analyzer has assumed to be infeasible at a time. The resulting amount of output is much smaller, and often fits on one screen, and also provides a much more readable diagnostics. Differential Revision: https://reviews.llvm.org/D41378 llvm-svn: 322612
* Make DiagnosticsEngine() take DiagOpts as DiagnosticsEngine.Nico Weber2018-01-172-6/+6
| | | | | | | No behavior change, but makes it a bit clearer that DiagnosticsEngine adds a ref to DiagOpts. llvm-svn: 322611
* Fix build error - 'default label in switch which covers all enumeration values'Aaron Smith2018-01-171-2/+0
| | | | llvm-svn: 322610
* [WebAssembly] Define __heap_base globalSam Clegg2018-01-1716-4/+112
| | | | | | | | | This is an immutable exported global representing the start of the heap area. It is a page aligned. Differential Revision: https://reviews.llvm.org/D42030 llvm-svn: 322609
* Fix pretty printing the unspecified param of a variadic functionAaron Smith2018-01-177-0/+99
| | | | | | | | | | | | | | | | | | | | | | | Summary: - Fix a bug in PrettyBuiltinDumper that returns "void" as the name for an unspecified builtin type. Since the unspecified param of a variadic function is considered a builtin of unspecified type in PDBs, we set "..." for its name. - Provide a method to determine if a PDBSymbolFunc is variadic in PrettyFunctionDumper since PDBSymbolFunc::getArgument() doesn't return the last unspecified-type param. - Add a pretty-func-dumper.test to test pretty dumping of variadic functions. Reviewers: zturner, llvm-commits Reviewed By: zturner Differential Revision: https://reviews.llvm.org/D41801 llvm-svn: 322608
* cfi: Add a blacklist entry for MSVC's std::get_temporary_buffer function.Peter Collingbourne2018-01-171-1/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D42150 llvm-svn: 322607
* [WebAssembly] Create synthetic __dso_handle symbolSam Clegg2018-01-171-0/+9
| | | | | | | | | | | | | This is used by __cxa_ataxit to determine the currently executing DLL. Once we fully support DLLs this will need to be set to some address within the DLL. The ELF linker added support for this symbol here: https://reviews.llvm.org/D33856 Differential Revision: https://reviews.llvm.org/D42024 llvm-svn: 322606
* [LLD][COFF] Report error when file will exceed Windows maximum image size (4GB)Rui Ueyama2018-01-171-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch by Colden Cullen. Currently, when a large PE (>4 GiB) is to be produced, a crash occurs because: 1. Calling setOffset with a number greater than UINT32_MAX causes the PointerToRawData to overflow 2. When adding the symbol table to the end of the file, the last section's offset was used to calculate file size. Because this had overflowed, this number was too low, and the file created would not be large enough. This lead to the actual crash I saw, which was a buffer overrun. This change: 1. Adds comment to setOffset, clarifying that overflow can occur, but it's somewhat safe because the error will be handled elsewhere 2. Adds file size check after all output data has been created This matches the MS link.exe error, which looks prints as: "LINK : fatal error LNK1248: image size (10000EFC9) exceeds maximum allowable size (FFFFFFFF)" 3. Changes calculate of the symbol table offset to just use the existing FileSize. This should match the previous calculations, but doesn't rely on the use of a u32 that can overflow. 4. Removes trivial usage of a magic number that bugged me while I was debugging the issue I'm not sure how to add a test for this outside of adding 4GB of object files to the repo. If there's an easier way, let me know and I'll be happy to add a test. Differential Revision: https://reviews.llvm.org/D42010 llvm-svn: 322605
* [libFuzzer] Support using libc++Petr Hosek2018-01-178-37/+127
| | | | | | | | | | | | This is needed in case the users of libFuzzer use libc++ in their code, which the fuzz target (libFuzzer) will be linked against. When libc++ source is available, we build a private version of it and link it against libFuzzer which allows using the same static library against codebases which use both libc++ and libstdc++. Differential Revision: https://reviews.llvm.org/D37631 llvm-svn: 322604
* Remove the hardcoded macos deployment targets altogetherJason Molenda2018-01-172-25/+0
| | | | | | | from the xcode project files. We'll build for the current OS only, by default. llvm-svn: 322603
* add ID as a special acronym to objc property declaration check for property ↵Yan Zhang2018-01-172-8/+12
| | | | | | | | | | | | | | names like bundleID.allow using acronyms as suffix. Reviewers: benhamilton, hokein Reviewed By: benhamilton Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D42143 llvm-svn: 322602
OpenPOWER on IntegriCloud