summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-readobj] Change -long-option to --long-option in tests. NFCFangrui Song2019-05-01672-1162/+1164
| | | | | | | | | | We use both -long-option and --long-option in tests. Switch to --long-option for consistency. In the "llvm-readelf" mode, -long-option is discouraged as it conflicts with grouped short options and it is not accepted by GNU readelf. While updating the tests, change llvm-readobj -s to llvm-readobj -S to reduce confusion ("s" is --section-headers in llvm-readobj but --symbols in llvm-readelf). llvm-svn: 359649
* Revert "[llvm] r359313 - [PowerPC] Update P9 vector costs for insert/extract ↵David L. Jones2019-05-012-53/+24
| | | | | | | | element" This causes segfaults during optimized builds. More details, including a reproducer, are on the llvm-commits thread for r359313. llvm-svn: 359648
* Delete outdated comment about DISubprogram. NFCFangrui Song2019-05-011-3/+0
| | | | | | rL301501 deleted DisplayName and rearranged the operands. llvm-svn: 359647
* [compiler-rt] Pass sysroot and disable pedantic for crtbegin.o/crtend.oPetr Hosek2019-05-013-1/+6
| | | | | | | | These are needed to make bots happy. Differential Revision: https://reviews.llvm.org/D61363 llvm-svn: 359646
* [CMake] Correct lldbPluginProcessPOSIX dependenciesAlex Langford2019-05-011-1/+1
| | | | | | | This plugin does not depend on lldbInterpreter. It only depends on lldbUtility. llvm-svn: 359645
* [compiler-rt] Rework the object build supportPetr Hosek2019-05-011-8/+33
| | | | | | | | | | The initial implementation didn't properly support cross-compilation via the runtime build, the updated implementation should address that by expanding the CMAKE_C_COMPILE_OBJECT variable with correct values. Differential Revision: https://reviews.llvm.org/D61356 llvm-svn: 359644
* [JITLink] Make sure we explicitly deallocate memory on failure.Lang Hames2019-05-012-4/+11
| | | | | | | | | | | | JITLinkGeneric phases 2 and 3 (focused on applying fixups and finalizing memory, respectively) may fail for various reasons. If this happens, we need to explicitly de-allocate the memory allocated in phase 1 (explicitly, because deallocation may also fail and so is implemented as a method returning error). No testcase yet: I am still trying to decide on the right way to test totally platform agnostic code like this. llvm-svn: 359643
* Fix a bunch of unordered container tests that were failing when ↵Marshall Clow2019-05-0118-46/+41
| | | | | | _LIBCPP_DEBUG was set. llvm-svn: 359642
* [libFuzzer] Disable i386 on non-Linux platformsJonathan Metzman2019-05-011-1/+5
| | | | | | | | | | | | | | | | Summary: Disable i386 on non-Linux platforms since it is unwanted and broken on Windows. Reviewers: morehouse, rnk Reviewed By: morehouse Subscribers: mgorny, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D61354 llvm-svn: 359641
* Make some comments that were meant to be for public documentationEric Christopher2019-05-011-3/+3
| | | | | | actually public documentation (i.e. // -> ///). llvm-svn: 359640
* [llvm-objcopy] Simplify SHT_NOBITS -> SHT_PROGBITS promotionFangrui Song2019-05-013-17/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GNU objcopy uses bfd_elf_get_default_section_type to decide the candidate section type, which roughly translates to our [a] (I assume SEC_COMMON implies SHF_ALLOC): (!(Sec.Flags & ELF::SHF_ALLOC) || Flags & (SectionFlag::SecContents | SectionFlag::SecLoad))) Then, it updates the section type in bfd/elf.c:elf_fake_sections if: if (this_hdr->sh_type == SHT_NULL) this_hdr->sh_type = sh_type; // common case else if (this_hdr->sh_type == SHT_NOBITS && sh_type == SHT_PROGBITS && (asect->flags & SEC_ALLOC) != 0) // uncommon case ... this_hdr->sh_type = sh_type; If the following condition is met the uncommon branch is executed: if (elf_section_type (osec) == SHT_NULL && (osec->flags == isec->flags || (final_link && ((osec->flags ^ isec->flags) & ~(SEC_LINK_ONCE | SEC_LINK_DUPLICATES | SEC_RELOC)) == 0))) I suggest we just ignore this clause and follow the common case behavior, which is done in this patch. Rationales to do so: If --set-section-flags is a no-op (osec->flags == isec->flags) (corresponds to the "readonly" test in set-section-flags.test), GNU objcopy will require (Sec.Flags & ELF::SHF_ALLOC). [a] is essentially: Flags & (SectionFlag::SecContents | SectionFlag::SecLoad) This special case is not really useful. Non-SHF_ALLOC SHT_NOBITS sections do not make much sense and it doesn't matter if they are SHT_NOBITS or SHT_PROGBITS. For all other RUN lines in set-section-flags.test, the new behavior matches GNU objcopy, i.e. this patch improves compatibility. Differential Revision: https://reviews.llvm.org/D60189 llvm-svn: 359639
* [libFuzzer] Fix failing test: sigint.testJonathan Metzman2019-04-301-3/+1
| | | | | | | | | | | | | | | | | | Summary: Fix sigint.test by making it require msan rather than enumerating unsupported platforms. Reviewers: kcc Reviewed By: kcc Subscribers: #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D61353 llvm-svn: 359638
* gn build: Fix build on macOS after r359570 / r359527Nico Weber2019-04-301-1/+1
| | | | llvm-svn: 359637
* Fix auto-init testJF Bastien2019-04-301-3/+3
| | | | | | r359628 changed the initialization of padding to follow C, but I didn't update the C++ tests. llvm-svn: 359636
* gn build: Merge r359626Nico Weber2019-04-301-0/+1
| | | | llvm-svn: 359635
* [WebAssembly] Update expectations for gcc torture testsSam Clegg2019-04-301-0/+12
| | | | | | | | | | This is needed to make the wasm waterfall green again after we land the update to WASI: https://github.com/WebAssembly/waterfall/pull/492 Differential Revision: https://reviews.llvm.org/D61351 llvm-svn: 359634
* [InstCombine] Limit a vector demanded elts rule which was producing invalid IR.Philip Reames2019-04-302-0/+25
| | | | | | | | The demanded elts rules introduced for GEPs in https://reviews.llvm.org/rL356293 replaced vector constants with undefs (by design). It turns out that the LangRef disallows such cases when indexing structs. The right fix is probably to relax the langref requirement, and update other passes to expect the result, but for the moment, limit the transform to avoid compiler crashes. This should fix https://bugs.llvm.org/show_bug.cgi?id=41624. llvm-svn: 359633
* Added test.Mitch Phillips2019-04-301-0/+16
| | | | llvm-svn: 359632
* [sanitizer_common] Added 64-bit signed flag parser.Mitch Phillips2019-04-301-0/+9
| | | | | | | | | | | | | | Summary: Adds a 64-bit signed flag parser for GWP-ASan's use. Reviewers: vlad.tsyrklevich, eugenis Subscribers: kubamracek, #sanitizers, llvm-commits, vitalybuka, morehouse, pcc, kcc Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D61342 llvm-svn: 359631
* [WebAssembly] Use the "wasm32-wasi" triple in testsDan Gohman2019-04-303-14/+14
| | | | | | | | | | | Similar to https://reviews.llvm.org/D61334, update clang tests to use the "wasm32-wasi" triple, removing the "-musl" environment and omitting the "-unknown" vendor. Differential Revision: https://reviews.llvm.org/D61338 Reviewer: sbc100 llvm-svn: 359630
* [WebAssembly] Test the "wasm32-wasi" tripleDan Gohman2019-04-301-8/+18
| | | | | | | | | | | | Add triple tests for "wasm32-wasi" and "wasm64-wasi", and also remove the "-musl" component from the existing wasm triple tests as we're not using that in practice (WASI libc is derived in part from musl, but it is not fully musl-compatible). Differential Revision: https://reviews.llvm.org/D61334 Reviewer: sbc100 llvm-svn: 359629
* Variable auto-init: don't initialize aggregate padding of all aggregatesJF Bastien2019-04-302-3/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: C guarantees that brace-init with fewer initializers than members in the aggregate will initialize the rest of the aggregate as-if it were static initialization. In turn static initialization guarantees that padding is initialized to zero bits. Quoth the Standard: C17 6.7.9 Initialization ❡21 If there are fewer initializers in a brace-enclosed list than there are elements or members of an aggregate, or fewer characters in a string literal used to initialize an array of known size than there are elements in the array, the remainder of the aggregate shall be initialized implicitly the same as objects that have static storage duration. C17 6.7.9 Initialization ❡10 If an object that has automatic storage duration is not initialized explicitly, its value is indeterminate. If an object that has static or thread storage duration is not initialized explicitly, then: * if it has pointer type, it is initialized to a null pointer; * if it has arithmetic type, it is initialized to (positive or unsigned) zero; * if it is an aggregate, every member is initialized (recursively) according to these rules, and any padding is initialized to zero bits; * if it is a union, the first named member is initialized (recursively) according to these rules, and any padding is initialized to zero bits; <rdar://problem/50188861> Reviewers: glider, pcc, kcc, rjmccall, erik.pilkington Subscribers: jkorous, dexonsmith, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61280 llvm-svn: 359628
* [MemorySSA] Invalidate MemorySSA if AA or DT are invalidated.Alina Sbirlea2019-04-303-0/+62
| | | | | | | | | | | | | | | | Summary: MemorySSA keeps internal pointers of AA and DT. If these get invalidated, so should MemorySSA. Reviewers: george.burgess.iv, chandlerc Subscribers: jlebar, Prazek, llvm-commits Tags: LLVM Differential Revision: https://reviews.llvm.org/D61043 llvm-svn: 359627
* [ORC] Move SimpleCompiler/ConcurrentIRCompiler definitions into a .cpp file.Lang Hames2019-04-303-64/+97
| | | | | | | SimpleCompiler is no longer templated, so there's no reason for this code to be in a header any more. llvm-svn: 359626
* [llvm-profdata] Fix indentation error in docs. NFC.Rong Xu2019-04-301-1/+1
| | | | llvm-svn: 359625
* [libFuzzer] temporarily disable a test on windows, where there is no memmem ↵Kostya Serebryany2019-04-301-0/+2
| | | | | | in the usual place llvm-svn: 359624
* Remove two unnecessary wrappers of canPassInRegistersReid Kleckner2019-04-304-19/+5
| | | | | | These extra layers aren't necessary. llvm-svn: 359623
* [AliasAnalysis/NewPassManager] Invalidate AAManager less often.Alina Sbirlea2019-04-306-11/+23
| | | | | | | | | | | | | | | | | | | | | Summary: This is a redo of D60914. The objective is to not invalidate AAManager, which is stateless, unless there is an explicit invalidate in one of the AAResults. To achieve this, this patch adds an API to PAC, to check precisely this: is this analysis not invalidated explicitly == is this analysis not abandoned == is this analysis stateless, so preserved without explicitly being marked as preserved by everyone Reviewers: chandlerc Subscribers: mehdi_amini, jlebar, george.burgess.iv, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61284 llvm-svn: 359622
* [AMDGPU] gfx1010 VMEM and SMEM implementationStanislav Mekhanoshin2019-04-30108-1581/+2845
| | | | | | Differential Revision: https://reviews.llvm.org/D61330 llvm-svn: 359621
* [libFuzzer] add MagicSeparatorTestKostya Serebryany2019-04-302-0/+51
| | | | llvm-svn: 359620
* [llvm-profdata] Fix indentation error. NFCRong Xu2019-04-301-1/+1
| | | | llvm-svn: 359619
* Add an include of Module since we actually access it now and removeEric Christopher2019-04-301-1/+1
| | | | | | the forward declaration. llvm-svn: 359618
* Fix a few -Werror warnings:Eric Christopher2019-04-301-4/+3
| | | | | | | - Remove a variable only used in an assert - Fix pessimizing move warning around copy elision llvm-svn: 359617
* Set LoopInterleaved in the PassManagerBuilder.Alina Sbirlea2019-04-301-0/+3
| | | | | | | | | | | | Summary: Corresponds to D61030. Subscribers: jlebar, cfe-commits, llvm-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61142 llvm-svn: 359616
* [PassManagerBuilder] Add option for interleaved loops, for loop vectorize.Alina Sbirlea2019-04-303-5/+4
| | | | | | | | | | | | | | | | | Summary: Match NewPassManager behavior: add option for interleaved loops in the old pass manager, and use that instead of the flag used to disable loop unroll. No changes in the defaults. Reviewers: chandlerc Subscribers: mehdi_amini, jlebar, dmgreen, hsaito, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61030 llvm-svn: 359615
* [JITLink] Add debugging output to print resolved external atoms.Lang Hames2019-04-301-0/+6
| | | | llvm-svn: 359614
* [ORC][JITLink] Name in-memory compiled objects after their source modules.Lang Hames2019-04-302-3/+5
| | | | | | | | In-memory compiled object buffer identifiers will now be derived from the identifiers of their source IR modules. This makes it easier to connect in-memory objects with their source modules in debugging output. llvm-svn: 359613
* [llvm-profdata] Add overlap command to compute similarity b/w two profile filesRong Xu2019-04-3017-3/+718
| | | | | | | | | Add overlap functionality to llvm-profdata tool to compute the similarity between two profile files. Differential Revision: https://reviews.llvm.org/D60977 llvm-svn: 359612
* Revert r359325 "[NFC][Sanitizer] Change "return type" of INTERCEPT_FUNCTION ↵Reid Kleckner2019-04-306-20/+48
| | | | | | | | | | | | | | | to void" Changing INTERCEPT_FUNCTION to return void is not functionally correct. IMO the best way to communicate failure or success of interception is with a return value, not some external address comparison. This change was also creating link errors for _except_handler4_common, which is exported from ucrtbase.dll in 32-bit Windows. Also revert dependent changes r359362 and r359466. llvm-svn: 359611
* [libFuzzer] Replace -seed_corpus to better support fork mode on WinJonathan Metzman2019-04-306-10/+56
| | | | | | | | | | | | | | | | | | Summary: Pass seed corpus list in a file to get around argument length limits on Windows. This limit was preventing many uses of fork mode on Windows. Reviewers: kcc, morehouse Reviewed By: kcc Subscribers: #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D60980 llvm-svn: 359610
* [NFC][InlineCost] cleanup - comments, overflow handling.Fedor Sergeev2019-04-301-52/+61
| | | | | | | | Reviewed By: apilipenko Tags: #llvm Differential Revision: https://reviews.llvm.org/D60751 llvm-svn: 359609
* [X86][SSE] Fold extract_subvector(extend(x)) -> extend_vector_inreg(x)Simon Pilgrim2019-04-303-25/+19
| | | | | | | | This adds any extend support - folding to zero_extend_vector_inreg (PMOVZX) for legality Minor improvement for PR39709 llvm-svn: 359608
* [compiler-rt][builtins][sanitizers] Update compiler-rt test cases forAmy Kwan2019-04-302-6/+15
| | | | | | | | | | | | | | | | compatibility with system's toolchain This patch aims to: - Guard ompiler-rt/test/builtins/Unit/compiler_rt_logb_test.c with macros, so the test runs on GLIBC versions >= 2.23. This is because the test relies on comparing its computed values to libm. Oolder versions might not compute to the same value as the compiler-rt value. - Update compiler-rt/test/sanitizer_common/TestCases/Posix/getpw_getgr.cc so that std::string is not used, since false positives may be detected. Differential Revision: https://reviews.llvm.org/D60644 llvm-svn: 359606
* [WebAssembly] Fix test after r359602Dan Gohman2019-04-301-1/+1
| | | | | | | Update the expected output for this test now that the EXPLICIT_NAME flag is being printed. llvm-svn: 359605
* Fix stack-use-after free after r359580Nico Weber2019-04-301-3/+4
| | | | | | | | `Candidate` was a StringRef refering to a temporary string. Instead, create a local variable for the string and use a StringRef referring to that. llvm-svn: 359604
* [Driver] Support compiler-rt crtbegin.o/crtend.o for LinuxPetr Hosek2019-04-306-85/+111
| | | | | | | | | | When compiler-rt is selected as the runtime library for Linux targets use its crtbegin.o/crtend.o implemenetation rather than platform one if available. Differential Revision: https://reviews.llvm.org/D59264 llvm-svn: 359603
* [WebAssembly] Support EXPLICIT_NAME symbols in llvm-readobjDan Gohman2019-04-303-0/+137
| | | | | | | | | Teach llvm-readobj about WASM_SYMBOL_EXPLICIT_NAME. Differential Revision: https://reviews.llvm.org/D61323 Reviewer: sbc100 llvm-svn: 359602
* [OpenMP] Add OpenMP 5.0 nonmonotonic codeJonathan Peyton2019-04-3011-95/+456
| | | | | | | | | | | | This patch adds: * New omp_sched_monotonic flag to omp_sched_t which is handled within the runtime * Parsing of monotonic/nonmonotonic in OMP_SCHEDULE * Tests for the monotonic flag and envirable parsing * Logic to force monotonic when hierarchical scheduling is used Differential Revision: https://reviews.llvm.org/D60979 llvm-svn: 359601
* [WebAssembly] Support f16 libcallsDan Gohman2019-04-303-9/+74
| | | | | | | | | | | | Add support for f16 libcalls in WebAssembly. This entails adding signatures for the remaining F16 libcalls, and renaming gnu_f2h_ieee/gnu_h2f_ieee to truncsfhf2/extendhfsf2 for consistency between f32 and f64/f128 (compiler-rt already supports this). Differential Revision: https://reviews.llvm.org/D61287 Reviewer: dschuff llvm-svn: 359600
* [OpenMP] Eliminate some compiler warningsJonathan Peyton2019-04-303-4/+10
| | | | | | | | | | | * Remove accidental == for = * Assign values to variables to appease compiler * Surround debug code with KMP_DEBUG * Remove unused local typedefs Differential Revision: https://reviews.llvm.org/D60983 llvm-svn: 359599
OpenPOWER on IntegriCloud