summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [NFC] fix trivial typos in commentsHiroshi Inoue2018-02-222-2/+2
| | | | | | "a a"->"a" llvm-svn: 325753
* [NFC] fix trivial typos in commentsHiroshi Inoue2018-02-227-7/+7
| | | | | | "a a" -> "a" llvm-svn: 325752
* Try to fix the syntax in testKamil Rytarowski2018-02-221-1/+1
| | | | | | | | | | | | | | Reported on a buildbot: Error in XFAIL list: couldn't parse text: '| arm || aarch64 || mips' in expression: 'freebsd | arm || aarch64 || mips' Add || in the place of | Fallout from D43382 llvm-svn: 325751
* [DAGCombiner] Add two calls to isVector before making calls to ↵Craig Topper2018-02-221-4/+5
| | | | | | | | | | getVectorElementType/getVectorNumElements to avoid an assert. We looked through a BITCAST, but the bitcast might be a from a scalar type rather than a vector. I don't have a test case. I stumbled onto it while prototyping another change that isn't ready yet. llvm-svn: 325750
* Revert part of D43378 in this fileKamil Rytarowski2018-02-221-1/+1
| | | | | | It causes failure on clang-x86_64-debian-fast. llvm-svn: 325749
* Revert part of r. 325746 D43378Kamil Rytarowski2018-02-221-1/+1
| | | | | | test/Driver/XRay/xray-shared-noxray.cpp fails on !Linux hosts. llvm-svn: 325748
* [SampleProf] NFC. Expose reusable functionality in SampleProfile.Mircea Trofin2018-02-223-29/+53
| | | | | | | | | | | | | | | | | | Summary: Exposing getOffset and findFunctionSamples as members of SampleProfile. They are intimately tied to design choices of the sample profile format - using offsets instead of line numbers, and traversing inlined functions stack, respectively. Reviewers: davidxl Reviewed By: davidxl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D43605 llvm-svn: 325747
* FreeBSD driver / Xray flags moving pthread to compile flags.Kamil Rytarowski2018-02-225-9/+16
| | | | | | | | | | | | | | | | | | Summary: - Using -lpthread instead, with -pthread the linkage does not work. -Warning about the -fxray-instrument usage outside of the working cases. Patch by: David CARLIER Reviewers: krytarowski, vitalybuka, dberris, emaste Reviewed By: krytarowski, emaste Subscribers: srhines, emaste, cfe-commits Differential Revision: https://reviews.llvm.org/D43378 llvm-svn: 325746
* [SCEV][NFC] Factor out common logic into a separate methodMax Kazantsev2018-02-222-13/+19
| | | | | | | | | | | | SCEV has multiple occurences of code when we need to prove some predicate on every iteration of a loop and do it with invocations of couple `isLoopEntryGuardedByCond`, `isLoopBackedgeGuardedByCond`. This patch factors out these two calls into a separate method. It is a preparation step to extend this logic: it is not the only way how we can prove such conditions. Differential Revision: https://reviews.llvm.org/D43373 llvm-svn: 325745
* Remove empty filesKamil Rytarowski2018-02-2220-0/+0
| | | | | | Left over after D43382 llvm-svn: 325744
* Xray instrumentation / enabling more testsKamil Rytarowski2018-02-2241-907/+910
| | | | | | | | | | | | | | | | | Summary: The Unix subdirectory mostly allows only on Linux x86_64 but now we can target x86_64 arch in general. Patch by David CARLIER Reviewers: krytarowski, dberris, emaste Reviewed By: krytarowski, dberris, emaste Subscribers: emaste, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D43382 llvm-svn: 325743
* [ODRHash] Fix hashing for friend functions.Richard Trieu2018-02-226-7/+120
| | | | | | | When hashing a templated function, use the hash of the function it was instantiated from. llvm-svn: 325742
* [ODRHash] Handle some template weirdness.Richard Trieu2018-02-223-21/+46
| | | | | | | | Build the index off of DeclarationName instead of Decl pointers. When finding an UnresolvedLookupExprClass, hash it as if it were a DeclRefExpr. This will allow methods to be hashed. llvm-svn: 325741
* Add another test case to the deduction guide for basic_string.Marshall Clow2018-02-221-0/+11
| | | | llvm-svn: 325740
* [PowerPC] Do not produce invalid CTR loop with an FRemNemanja Ivanovic2018-02-222-1/+50
| | | | | | | | | | | An FRem instruction inside a loop should prevent the loop from being converted into a CTR loop since this is not an operation that is legal on any PPC subtarget. This will always be a call to a library function which means the loop will be invalid if this instruction is in the body. Fixes PR36292. llvm-svn: 325739
* [Utils] Avoid a hash table lookup in salvageDI, NFCVedant Kumar2018-02-221-0/+5
| | | | | | | | | | | According to the current coverage report salvageDebugInfo() is called 5.12 million times during testing and almost always returns early. The early return depends on LocalAsMetadata::getIfExists returning null, which involves a DenseMap lookup in an LLVMContextImpl. We can probably speed this up by simply checking the IsUsedByMD bit in Value. llvm-svn: 325738
* [X86][MMX] Generlize MMX_MOVD64rr combines to accept v4i16/v8i8 build ↵Simon Pilgrim2018-02-212-357/+73
| | | | | | | | vectors as well as v2i32 Also handle both cases where the lower 32-bits of the MMX is undef or zero extended. llvm-svn: 325736
* bpf: disable DwarfUsesRelocationsAcrossSectionsYonghong Song2018-02-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pahole does not work with BPF backend properly: -bash-4.2$ cat test.c struct test_t { int a; int b; }; int test(struct test_t *s) { return s->a; } -bash-4.2$ clang -g -O2 -target bpf -c test.c -bash-4.2$ pahole test.o struct clang version 7.0.0 (trunk 325446) (llvm/trunk 325464) { clang version 7.0.0 (trunk 325446) (llvm/trunk 325464) clang version 7.0.0 (trunk 325446) (llvm/trunk 325464); /* 0 4 */ clang version 7.0.0 (trunk 325446) (llvm/trunk 325464) clang version 7.0.0 (trunk 325446) (llvm/trunk 325464); /* 4 4 */ /* size: 8, cachelines: 1, members: 2 */ /* last cacheline: 8 bytes */ }; -bash-4.2$ The reason is that BPF backend is not yet implemented in elfutils backend https://github.com/threatstack/elfutils/tree/master/backends and pahole depends on elfutils for dwarf parsing and resolving relocation. More specifically, the unsupported relocation in .debug_info for type/member name against symbol table caused the incorrect result above. The following is the raw .rel.debug_info for the above example, Hex dump of section '.rel.debug_info': 0x00000000 06000000 00000000 0a000000 0b000000 ................ 0x00000010 0c000000 00000000 0a000000 01000000 ................ 0x00000020 12000000 00000000 0a000000 02000000 ................ 0x00000030 16000000 00000000 0a000000 0e000000 ................ 0x00000040 1a000000 00000000 0a000000 03000000 ................ ----------------- -------- -------- reloc location type symtab index Hex dump of section '.debug_info': 0x00000000 7b000000 04000000 00000801 00000000 {............... 0x00000010 0c000000 00000000 00000000 00000000 ................ 0x00000020 00000000 00001000 00000200 00000000 ................ Based on "type", the proper value will be extracted from symbol table and filled in .debug_info so later on .debug_info can be properly resolved against debug strings. There are two ways to fix this problem. One is to fix elfutils by adding BPF support which is desirable. This could take a long time and won't work with already deployed pahole. For a short term workaround, we can disable dwarf cross-section relation which specifically avoids debug_info and symbol table cross relocation. This should help any dwarf-related tool which has not implement BPF specific relocations yet. Now .rel.debug_info does not have any relocation for symbol table and .debug_info itself contains necessary relocation information by itself. Hex dump of section '.debug_info': 0x00000000 7b000000 04000000 00000801 00000000 {............... 0x00000010 0c003700 00000000 00003e00 00000000 ..7.......>..... 0x00000020 00000000 00001000 00000200 00000000 ................ location 0xc has 0, 0x12 has 0x37, 0x1a has 0x3e in place which will be used in relocation resolution. Here, the values of 0, 0x37 and 0x3e are offset in .debug_str section. Please note the difference between two above .debug_info dumps. With the fix, pahole works properly with BPF backend: -bash-4.2$ clang -O2 -g -target bpf -c test.c -bash-4.2$ pahole test.o struct test_t { int a; /* 0 4 */ int b; /* 4 4 */ /* size: 8, cachelines: 1, members: 2 */ /* last cacheline: 8 bytes */ }; Signed-off-by: Yonghong Song <yhs@fb.com> llvm-svn: 325735
* [InstCombine] add some random FMF to tests so we know it's not dropped; NFCSanjay Patel2018-02-211-8/+8
| | | | llvm-svn: 325734
* [Driver] Generate .eh_frame_hdr for static executables too.Dan Albert2018-02-212-4/+2
| | | | | | | | | | | | | | Summary: libgcc won't unwind without an .eh_frame_hdr section. Reviewers: srhines, chandlerc Reviewed By: chandlerc Subscribers: chandlerc, cfe-commits Differential Revision: https://reviews.llvm.org/D43203 llvm-svn: 325733
* Resubmit r325107 (case folding DJB hash)Pavel Labath2018-02-218-2/+1063
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The issue was that the has function was generating different results depending on the signedness of char on the host platform. This commit fixes the issue by explicitly using an unsigned char type to prevent sign extension and adds some extra tests. The original commit message was: This patch implements a variant of the DJB hash function which folds the input according to the algorithm in the Dwarf 5 specification (Section 6.1.1.4.5), which in turn references the Unicode Standard (Section 5.18, "Case Mappings"). To achieve this, I have added a llvm::sys::unicode::foldCharSimple function, which performs this mapping. The implementation of this function was generated from the CaseMatching.txt file from the Unicode spec using a python script (which is also included in this patch). The script tries to optimize the function by coalescing adjecant mappings with the same shift and stride (terms I made up). Theoretically, it could be made a bit smarter and merge adjecant blocks that were interrupted by only one or two characters with exceptional mapping, but this would save only a couple of branches, while it would greatly complicate the implementation, so I deemed it was not worth it. Since we assume that the vast majority of the input characters will be US-ASCII, the folding hash function has a fast-path for handling these, and only whips out the full decode+fold+encode logic if we encounter a character outside of this range. It might be possible to implement the folding directly on utf8 sequences, but this would also bring a lot of complexity for the few cases where we will actually need to process non-ascii characters. Reviewers: JDevlieghere, aprantl, probinson, dblaikie Subscribers: mgorny, hintonda, echristo, clayborg, vleschuk, llvm-commits Differential Revision: https://reviews.llvm.org/D42740 llvm-svn: 325732
* [Hexagon] Add TargetRegisterInfo::getPointerRegClass() overrideTobias Edler von Koch2018-02-212-0/+9
| | | | llvm-svn: 325731
* [InstCombine] add and use Create*FMF functions; NFCSanjay Patel2018-02-212-15/+28
| | | | llvm-svn: 325730
* [X86][MMX] Add MMX_MOVD64rr build vector tests showing undef elements in the ↵Simon Pilgrim2018-02-211-0/+204
| | | | | | lower half llvm-svn: 325729
* [LLDB][PPC64] Fixed next blocked forever at same linePavel Labath2018-02-211-5/+1
| | | | | | | | | | | | | | | | | | Summary: The PC corresponding to the breakpoint was being calculated wrongly, which was causing LLDB to never go past the first breakpoint, when there was a second one adjacent to it. Reviewers: clayborg, labath Reviewed By: clayborg, labath Subscribers: anajuliapc, alexandreyy, lbianc Differential Revision: https://reviews.llvm.org/D43344 Patch by Leandro Lupori <leandro.lupori@gmail.com>. llvm-svn: 325728
* [ORC] Switch to shared_ptr ownership for SymbolSources in VSOs.Lang Hames2018-02-214-70/+79
| | | | | | | This makes it easy to free a SymbolSource (and any related resources) when the last reference in a VSO is dropped. llvm-svn: 325727
* [ORC] Switch from a StringMap to an internal VSO in RTDyldObjectLinkingLayer.Lang Hames2018-02-211-53/+45
| | | | | | | This is a first step towards switching to VSOs as the primary symbol tables in ORC. llvm-svn: 325726
* [ORC] Switch RTDyldObjectLinkingLayer to take a unique_ptr<MemoryBuffer> ratherLang Hames2018-02-2110-142/+115
| | | | | | | | | | than a shared ObjectFile/MemoryBuffer pair. There's no need to pre-parse the buffer into an ObjectFile before passing it down to the linking layer, and moving the parsing into the linking layer allows us remove the parsing code at each call site. llvm-svn: 325725
* CodeGen: handle blocks correctly when inalloca'edSaleem Abdulrasool2018-02-212-2/+16
| | | | | | | | | | When using blocks with C++ on Windows x86, it is possible to have the block literal be pushed into the inalloca'ed parameters. Teach IRGen to handle the case properly by extracting the block literal from the inalloca parameter. This fixes the use of blocks with C++ on Windows x86. llvm-svn: 325724
* libcxx: Unbreak external thread library configuration.Peter Collingbourne2018-02-211-12/+9
| | | | | | Differential Revision: https://reviews.llvm.org/D42503 llvm-svn: 325723
* [clang-format] Fix regression when getStyle() called with empty filenameBen Hamilton2018-02-212-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: D43522 caused an assertion failure when getStyle() was called with an empty filename: P8065 This adds a test to reproduce the failure and fixes the issue by ensuring we never pass an empty filename to Environment::CreateVirtualEnvironment(). Test Plan: New test added. Ran test with: % make -j12 FormatTests && ./tools/clang/unittests/Format/FormatTests Before diff, test failed with P8065. Now, test passes. Reviewers: vsapsai, jolesiak, krasimir Reviewed By: vsapsai Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D43590 llvm-svn: 325722
* [sanitizer] Allow to set SANITIZER_CAN_USE_PREINIT_ARRAY externallyVitaly Buka2018-02-211-0/+2
| | | | llvm-svn: 325720
* [testsuite] Run lit tests as part of `check-lldb`.Davide Italiano2018-02-212-0/+4
| | | | | | | | | | Also, fix a missing dependency, as lit requires llvm-config to run. This is becoming more and more important as we write more FileCheck style tests. Differential Revision: https://reviews.llvm.org/D43591 llvm-svn: 325719
* [AArch64] fix IR names to not be 'tmp' because that gives the CHECK script ↵Sanjay Patel2018-02-211-40/+40
| | | | | | problems llvm-svn: 325718
* [AArch64] add SLP test for matmul (PR36280); NFCSanjay Patel2018-02-211-0/+139
| | | | | | | | This is a slight reduction of one of the benchmarks that suffered with D43079. Cost model changes should not cause this test to remain scalarized. llvm-svn: 325717
* Replace incorrect usage of isInvalidDecl with intended setInvalidDecl Erich Keane2018-02-211-1/+1
| | | | | | | This typo would cause an attempt to multiversion 'main' to issue an error, but not mark the function as invalid. This patch fixes it. llvm-svn: 325716
* Revert "[IRMover] Implement name based structure type mapping"Rafael Espindola2018-02-215-55/+19
| | | | | | | | This reverts commit r325686. There was a misunderstanding and this has not been approved yet. llvm-svn: 325715
* Revert r325679: [ELF] Add -nopie alias for -no-pie (PR36423)Rui Ueyama2018-02-212-4/+1
| | | | | | | | | This reverts commit r325679 that was committed without discussion. Actually, in the discussion thread, most people opposed to have this option in lld. Reverting that change doesn't mean that this is a final decision, but that needs to be discussed first. llvm-svn: 325714
* [mips][lld] Address post commit review nit.Simon Dardis2018-02-211-3/+2
| | | | | | | Address @ruiu's post commit review comment about a value which is intended to be a unsigned 32 bit integer as using uint32_t rather than unsigned. llvm-svn: 325713
* Fix a memory leak and a cross module reference.Rafael Espindola2018-02-211-1/+2
| | | | llvm-svn: 325712
* [hwasan] Fix inline instrumentation.Evgeniy Stepanov2018-02-2111-50/+86
| | | | | | | | | | | | | | | This patch changes hwasan inline instrumentation: Fixes address untagging for shadow address calculation (use 0xFF instead of 0x00 for the top byte). Emits brk instruction instead of hlt for the kernel and user space. Use 0x900 instead of 0x100 for brk immediate (0x100 - 0x800 are unavailable in the kernel). Fixes and adds appropriate tests. Patch by Andrey Konovalov. Differential Revision: https://reviews.llvm.org/D43135 llvm-svn: 325711
* asan: add kernel inline instrumentation test (retry)Vedant Kumar2018-02-211-0/+28
| | | | | | | | | | Add a test that checks that kernel inline instrumentation works. Patch by Andrey Konovalov! Differential Revision: https://reviews.llvm.org/D42473 llvm-svn: 325710
* [testsuite/decorators] Get rid of some `expectFlakey` variants.Davide Italiano2018-02-211-27/+0
| | | | | | These seem to be pretty much dead. llvm-svn: 325708
* [X86][MMX] Run MMX bitcast test on 32 and 64-bit targetsSimon Pilgrim2018-02-211-19/+27
| | | | llvm-svn: 325707
* [WebAssembly] Use make<> rather then make_unique<>. NFC.Sam Clegg2018-02-211-5/+4
| | | | | | | | | lld uses an arena allocator to one of allocations like these can just use make<>. Differential Revision: https://reviews.llvm.org/D43587 llvm-svn: 325706
* [WebAssembly] Rename member DefinedFunctions -> InputFunctions. NFC.Sam Clegg2018-02-211-16/+16
| | | | | | | | | This avoids confusion with the `DefinedFunction` symbol type. Differential Revision: https://reviews.llvm.org/D43588 llvm-svn: 325705
* Fix TestBreakpointInGlobalConstructor for WindowsAdrian McCarthy2018-02-212-3/+5
| | | | | | | | | | | | | | | | | | Summary: This test was failing on Windows because it expected the breakpoint in the dynamic library to be resolved before the process is launched. Since the DLL isn't loaded until the process is launched this didn't work. The fix creates a special value (-2) for num_expected_locations that ignores the actual number of breakpoint locations found. Reviewers: jasonmolenda Subscribers: sanjoy, lldb-commits Differential Revision: https://reviews.llvm.org/D43419 llvm-svn: 325704
* Fix racy msan testMaxim Kuvyrkov2018-02-211-0/+12
| | | | | | | | | | | | | | | | | | | Summary: Child thread may finish before pthread_setname_np() and/or pthread_getname_np() had a chance to run, which causes these functions to fail with ENOENT (meaning /proc/self/task/[tid]/comm doesn't exist). Fix by stalling child thread on a mutex. Reviewers: eugenis Reviewed By: eugenis Subscribers: llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D43548 llvm-svn: 325703
* Fix remote tests broken by r325690Pavel Labath2018-02-211-1/+1
| | | | | | | | The patch added an extra argument to the append_to_process_working_directory function. I have somehow missed updating this test, and it did not show up because the code was only run in remote mode. llvm-svn: 325702
* llgs-tests: Fix r325511 for debugserverPavel Labath2018-02-212-3/+13
| | | | | | | Debugserver sends the thread-pcs field with leading zeroes omitted. Teach parseRegisterValue to pad these as necessary. llvm-svn: 325701
OpenPOWER on IntegriCloud