summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [XCOFF][MC] report_fatal_error before dereferencing NULLHubert Tong2019-08-061-1/+2
| | | | | | | | This patch replaces a TODO comment with a call to `report_fatal_error`. The path that reaches the added call to `report_fatal_error` manifestly dereferences a null pointer. llvm-svn: 368048
* [test/Object] - Cleanup the Object\obj2yaml.test a bit.George Rimar2019-08-063-12/+1
| | | | | | | | | | | | | | | This makes 2 changes: 1) Removes unwind-section.elf-x86-64 object and the corresponding test case, because SHT_X86_64_UNWIND is already tested here: https://github.com/llvm-mirror/llvm/blob/master/test/tools/obj2yaml/section-type.yaml 2) Removes/partially moves "No such file or directory" test, because we already have a similar test here: https://github.com/llvm-mirror/llvm/blob/master/test/tools/obj2yaml/invalid_input_file.test Differential revision: https://reviews.llvm.org/D65570 llvm-svn: 368044
* [TargetLowering] SimplifyMultipleUseDemandedBits - return UNDEF for ↵Simon Pilgrim2019-08-065-59/+66
| | | | | | | | undemanded ops If we demand no bits/elts from an Op, just return UNDEF llvm-svn: 368043
* [StructurizeCFG] Enable -structurizecfg-relaxed-uniform-regions by defaultTim Renouf2019-08-062-3/+3
| | | | | | | | | | | D62198 introduced an option to relax the checks for hasOnlyUniformBranches. This commit turns the option on by default, for better code generation in some cases in AMDGPU. Differential Revision: https://reviews.llvm.org/D63198 Change-Id: I9cbff002a1e74d3b7eb96b4192dc8129936d537d llvm-svn: 368042
* [ELF][ARM] Fix /DISCARD/ of section with .ARM.exidx sectionPeter Smith2019-08-062-1/+50
| | | | | | | | | | | | | | | | | | The combineEhSections runs, by design, before processSectionCommands so that input exception sections like .ARM.exidx and .eh_frame are not assigned to OutputSections. Unfortunately if /DISCARD/ removes InputSections that have associated .ARM.exidx sections without discarding the .ARM.exidx synthetic section then we will end up crashing when trying to sort the InputSections in ascending address order. We fix this by filtering out the sections that have been discarded prior to processing the InputSections in finalizeContents(). fixes pr42890 Differential Revision: https://reviews.llvm.org/D65759 llvm-svn: 368041
* [ELF] Make binding (weak or non-weak) logic consistent for Undefined and ↵Fangrui Song2019-08-064-19/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SharedSymbol This is a case missed by D64136. If %t1.o has a weak reference on foo, and %t2.so has a non-weak reference on foo: ``` 0. ld.lld %t1.o %t2.so # ok; STB_WEAK; accepted since D64136 1. ld.lld %t2.so %t1.o # undefined symbol: foo; STB_GLOBAL 2. gold %t1.o %t2.so # ok; STB_WEAK 3. gold %t2.so %t1.o # undefined reference to 'foo'; STB_GLOBAL 4. ld.bfd %t1.o %t2.so # undefined reference to `foo'; STB_WEAK 5. ld.bfd %t2.so %t1.o # undefined reference to `foo'; STB_WEAK ``` It can be argued that in both cases, the binding of the undefined foo should be set to STB_WEAK, because the binding should not be affected by referenced from shared objects. --allow-shlib-undefined doesn't suppress errors (3,4,5), but -shared or --noinhibit-exec allows ld.bfd/gold to produce a binary: ``` 3. gold -shared %t2.so %t1.o # ok; STB_GLOBAL 4. ld.bfd -shared %t2.so %t1.o # ok; STB_WEAK 5. ld.bfd -shared %t1.o %t1.o # ok; STB_WEAK ``` If %t2.so has DT_NEEDED entries, ld.bfd will load them (lld/gold don't have the behavior). If one of the DSO defines foo and it is in the link-time search path (e.g. DT_NEEDED entry is an absolute path, via -rpath=, via -rpath-link=, etc), `ld.bfd %t1.o %t2.so` and `ld.bfd %t1.o %t2.so` will not error. In this patch, we make Undefined and SharedSymbol share the same binding computing logic. Case 1 will be allowed: ``` 0. ld.lld %t1.o %t2.so # ok; STB_WEAK; accepted since D64136 1. ld.lld %t2.so %t1.o # ok; STB_WEAK; changed by this patch ``` In the future, we can explore the option that turns both (0,1) into errors if --no-allow-shlib-undefined (default when linking an executable) is in action. Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D65584 llvm-svn: 368038
* Revert "Fixed failing test cases"Dmitri Gribenko2019-08-062-2/+2
| | | | | | This reverts commit r368030, which depends on r368021 that I reverted. llvm-svn: 368036
* Revert "[yaml2obj] Move core yaml2obj code into lib and include for use in ↵Dmitri Gribenko2019-08-0616-290/+149
| | | | | | | | unit tests" This reverts commit r368021, it broke tests. llvm-svn: 368035
* Revert "gn build: Merge r368021"Dmitri Gribenko2019-08-063-9/+8
| | | | | | | This reverts commit r368025, which depends on r368021, which needs to be reverted. llvm-svn: 368034
* Update LLDB to follow changes in llvm::DWARFDebugNames::NameIndex (4/5)Igor Kudrin2019-08-061-3/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D65640 llvm-svn: 368033
* [MachO] Update LLD to use 64-bit offsets with DataExtractor (3/5)Igor Kudrin2019-08-061-6/+6
| | | | | | Differential Revision: https://reviews.llvm.org/D65639 llvm-svn: 368032
* AArch64: bail instead of asserting on unexpected type in G_CONSTANT 0.Tim Northover2019-08-062-2/+27
| | | | llvm-svn: 368031
* Fixed failing test casesAlex Brachet2019-08-062-2/+2
| | | | llvm-svn: 368030
* Improve MSVC visualizations so the parser shows where we are in the codeMike Spertus2019-08-061-0/+46
| | | | | | Also provide a visualizer for lambda introducers llvm-svn: 368029
* [InstCombine] add tests for binop with FMF with select operands; NFCSanjay Patel2019-08-061-0/+51
| | | | | | Baseline coverage for D65658. llvm-svn: 368028
* gn build: Merge r368024Nico Weber2019-08-061-0/+1
| | | | llvm-svn: 368027
* [X86][SSE] Call SimplifyMultipleUseDemandedBits on PACKSS/PACKUS arguments.Simon Pilgrim2019-08-067-16/+36
| | | | | | This mainly helps to replace unused arguments with UNDEF in the case where they have multiple users. llvm-svn: 368026
* gn build: Merge r368021Nico Weber2019-08-063-8/+9
| | | | llvm-svn: 368025
* [AArch64] NFC: Add generic StackOffset to describe scalable offsets.Sander de Smalen2019-08-069-74/+260
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To support spilling/filling of scalable vectors we need a more generic representation of a stack offset than simply 'int'. For this we introduce the StackOffset struct, which comprises multiple offsets sized by their respective MVTs. Byte-offsets will thus be a simple tuple such as { offset, MVT::i8 }. Adding two byte-offsets will result in a byte offset { offsetA + offsetB, MVT::i8 }. When two offsets have different types, we can canonicalise them to use the same MVT, as long as their runtime sizes are guaranteed to have the same size-ratio as they would have at compile-time. When we have both scalable- and fixed-size objects on the stack, we can create an offset that is: ({ offset_fixed, MVT::i8 } + { offset_scalable, MVT::nxv1i8 }) The struct also contains a getForFrameOffset() method that is specific to AArch64 and decomposes the frame-offset to be used directly in instructions that operate on the stack or index into the stack. Note: This patch adds StackOffset as an AArch64-only concept, but we would like to make this a generic concept/struct that is supported by all interfaces that take or return stack offsets (currently as 'int'). Since that would be a bigger change that is currently pending on D32530 landing, we thought it makes sense to first show/prove the concept in the AArch64 target before proposing to roll this out further. Reviewers: thegameg, rovka, t.p.northover, efriedma, greened Reviewed By: rovka, greened Differential Revision: https://reviews.llvm.org/D61435 llvm-svn: 368024
* [llvm/test/Object] Remove redundant test case. NFCSimon Atanasyan2019-08-061-19/+0
| | | | | | | Remove redundant `yaml2obj-elf-file-headers-with-e_flags.yaml` test case. The same functionality is checked by the `Mips/elf-flags.yaml`. llvm-svn: 368023
* [X86] SimplifyMultipleUseDemandedBits - target shuffles might not be identitySimon Pilgrim2019-08-061-2/+3
| | | | | | | | If we don't demand any non-undef shuffle elements then the assert will fail as all shuffle inputs would still be flagged as 'identity' safe. Exposed by an incoming patch. llvm-svn: 368022
* [yaml2obj] Move core yaml2obj code into lib and include for use in unit testsAlex Brachet2019-08-0616-149/+290
| | | | | | | | | | | | | | Reviewers: jhenderson, rupprecht, MaskRay, grimar, labath Reviewed By: rupprecht Subscribers: seiya, mgorny, sbc100, hiraditya, aheejin, jakehehrlich, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65255 llvm-svn: 368021
* [CrossTU] Handle case when no USR could be generated during Decl search.Balazs Keri2019-08-067-12/+56
| | | | | | | | | | | | | | | | | | | Summary: When searching for a declaration to be loaded the "lookup name" for every other Decl is computed. If the USR can not be determined here should be not an assert, instead skip this Decl. Reviewers: martong Reviewed By: martong Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65445 llvm-svn: 368020
* [clangd] Compute scopes eagerly in IncludeFixerIlya Biryukov2019-08-063-37/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Computing lazily leads to crashes. In particular, computing scopes may produce diagnostics (from inside template instantiations) and we currently do it when processing another diagnostic, which leads to crashes. Moreover, we remember and access 'Scope*' when computing scopes. This might lead to invalid memory access if the Scope is deleted by the time we run the delayed computation. We did not actually construct an example when this happens, though. From the VCS and review history, it seems the optimization was introduced in the initial version without a mention of any performance benchmarks justifying the performance gains. This led me to a conclusion that the optimization was premature, so removing it to avoid crashes seems like the right trade-off at that point. Reviewers: sammccall Reviewed By: sammccall Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65796 llvm-svn: 368019
* Try to unbreak buildbots after r368014Igor Kudrin2019-08-061-1/+1
| | | | llvm-svn: 368018
* [X86][SSE] Enable min/max partial reductionSimon Pilgrim2019-08-065-231/+219
| | | | | | As mentioned on D65047 / rL366933 the plan is to enable partial reduction handling wherever possible. llvm-svn: 368016
* [X86][SSE] Add tests for min/max partial reductionSimon Pilgrim2019-08-064-0/+1688
| | | | | | As mentioned on D65047 / rL366933 the plan is to enable partial reduction handling wherever possible. llvm-svn: 368015
* Switch LLVM to use 64-bit offsets (2/5)Igor Kudrin2019-08-0669-614/+652
| | | | | | | | | This updates all libraries and tools in LLVM Core to use 64-bit offsets which directly or indirectly come to DataExtractor. Differential Revision: https://reviews.llvm.org/D65638 llvm-svn: 368014
* Support 64-bit offsets in utility classes (1/5)Igor Kudrin2019-08-068-76/+294
| | | | | | | | | | Using 64-bit offsets is required to fully implement 64-bit DWARF. As these classes are used in many different libraries they should temporarily support both 32- and 64-bit offsets. Differential Revision: https://reviews.llvm.org/D64006 llvm-svn: 368013
* [Strict FP] Allow custom operation actionsUlrich Weigand2019-08-065-256/+670
| | | | | | | | | | | | | | | | | | | | | This patch changes the DAG legalizer to respect the operation actions set by the target for strict floating-point operations. (Currently, the legalizer will usually fall back to mutate to the non-strict action (which is assumed to be legal), and only skip mutation if the strict operation is marked legal.) With this patch, if whenever a strict operation is marked as Legal or Custom, it is passed to the target as usual. Only if it is marked as Expand will the legalizer attempt to mutate to the non-strict operation. Note that this will now fail if the non-strict operation is itself marked as Custom -- the target will have to provide a Custom definition for the strict operation then as well. Reviewed By: hfinkel Differential Revision: https://reviews.llvm.org/D65226 llvm-svn: 368012
* Change two unnecessary uses of llvm::size(C) to C.size()Fangrui Song2019-08-061-4/+2
| | | | llvm-svn: 368011
* ObjectFileELF: permit thread-local sections with overlapping file addressesPavel Labath2019-08-064-17/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In an attempt to make file-address-based lookups more predictable, in D55998 we started ignoring sections which would result in file address overlaps. It turns out this was too aggressive because thread-local sections typically will have file addresses which apear to overlap regular data/code. This does not cause a problem at runtime because thread-local sections are loaded into memory using special logic, but it can cause problems for lldb when trying to lookup objects by their file address. This patch changes ObjectFileELF to permit thread-local sections to overlap regular ones by essentially giving them a separate address space. It also makes them more symmetrical to regular sections by creating container sections from PT_TLS segments. Simultaneously, the patch changes the regular file address lookup logic to ignore sections with the thread-specific bit set. I believe this is what the users looking up file addresses would typically expect, as looking up thread-local data generally requires more complex logic (e.g. DWARF has a special opcode for that). Reviewers: clayborg, jingham, MaskRay Subscribers: emaste, aprantl, arichardson, lldb-commits Differential Revision: https://reviews.llvm.org/D65282 llvm-svn: 368010
* Add User docs for ASTImporterGabor Marton2019-08-062-0/+614
| | | | | | | | | | | | | | | | | Summary: This document includes the description of the ASTImporter from the user/client perspective. A subsequent patch will describe the development internals. Reviewers: a_sidorin, shafik, gamesh411, balazske, a.sidorin Subscribers: rnkovacs, dkrupp, arphaman, Szelethus, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65573 llvm-svn: 368009
* [SelectionDAG] Extend base addressing modes supported by MGATHER/MSCATTERCullen Rhodes2019-08-069-41/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Before this patch MGATHER/MSCATTER is capable of representing all common addressing modes, but only when illegal types are used. This patch adds an IndexType property so more representations are available when using legal types only. Original modes: vector of bases base + vector of signed scaled offsets New modes: base + vector of signed unscaled offsets base + vector of unsigned scaled offsets base + vector of unsigned unscaled offsets The current behaviour of addressing modes for gather/scatter remains unchanged. Patch by Paul Walker. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D65636 llvm-svn: 368008
* [UpdateTestChecks] Fix an incorrect %s added in r368006Fangrui Song2019-08-061-1/+1
| | | | llvm-svn: 368007
* [UpdateTestChecks] Apply some string concatenation cleanupFangrui Song2019-08-061-8/+8
| | | | | | Some were what I suggested in D65610. llvm-svn: 368006
* test-release.sh: Reorder sed commands for the binary comparisonHans Wennborg2019-08-061-2/+2
| | | | llvm-svn: 368004
* AArch64: use xzr/wzr for constant 0 in GlobalISel.Tim Northover2019-08-066-28/+53
| | | | | | | COPYs from xzr and wzr can often be folded away entirely during register allocation, unlike a movz. llvm-svn: 368003
* [LLVM][Alignment] Introduce Alignment In AttributesGuillaume Chatelet2019-08-062-19/+26
| | | | | | | | | | | | | | | | | Summary: This is patch is part of a serie to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this patch for the introduction of the type: https://reviews.llvm.org/D64790 Reviewers: jfb Subscribers: hiraditya, dexonsmith, llvm-commits, courbet Tags: #llvm Differential Revision: https://reviews.llvm.org/D65742 llvm-svn: 368002
* SymbolVendor: Remove passthrough methodsPavel Labath2019-08-0615-409/+90
| | | | | | | | | | After the recent refactorings the SymbolVendor passthrough no longer serve any purpose. This patch removes those methods, and updates all callsites to go to the symbol file directly -- in most cases that just means calling GetSymbolFile()->foo() instead of GetSymbolVendor()->foo(). llvm-svn: 368001
* [LLVM][Alignment] Introduce Alignment In GlobalObjectGuillaume Chatelet2019-08-065-9/+20
| | | | | | | | | | | | | | | | | | | Summary: This is patch is part of a serie to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this patch for the introduction of the type: https://reviews.llvm.org/D64790 Reviewers: jfb Subscribers: hiraditya, dexonsmith, llvm-commits, courbet Tags: #llvm Differential Revision: https://reviews.llvm.org/D65748 Address comments llvm-svn: 368000
* [compiler-rt] Implement getrandom interceptionVitaly Buka2019-08-064-0/+52
| | | | | | | | | | | | | | | | | | | | | | | Summary: Straightforward implementation of `getrandom` syscall and libc hooks. Test Plan: Local MSAN failures caused by uninstrumented `getrandom` calls stop failing. Patch by Andrew Krieger. Reviewers: eugenis, vitalybuka Reviewed By: vitalybuka Subscribers: srhines, kubamracek, dberris, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D65551 llvm-svn: 367999
* Revert r367941 "Add a note to the release not about a potentially breaking ↵Hans Wennborg2019-08-061-13/+0
| | | | | | | | optimization" The note was moved to the release_90 branch in r367997. llvm-svn: 367998
* SymbolVendorELF: Perform build-id lookup even without a debug linkPavel Labath2019-08-064-85/+121
| | | | | | | | | | | | | | | | | | | | | | Summary: The debug link and build-id lookups are two independent ways one can search for a separate symbol file. However, our implementation in SymbolVendorELF was tying the two together and refusing to look up the symbol file based on a build id if the file did not contain a debug link. This patch makes it possible to search for the symbol file with just one of the two methods available. To demonstrate, I split the build-id-case test into two, so that we test the search using both methods. Reviewers: jankratochvil, mgorny, clayborg, espindola, alexshap Subscribers: emaste, arichardson, MaskRay, lldb-commits Differential Revision: https://reviews.llvm.org/D65561 llvm-svn: 367994
* [compiler-rt] Reverting r367962 due to Fuchsia bot build-breakage.Puyan Lotfi2019-08-061-7/+0
| | | | llvm-svn: 367990
* [lldb][NFC] Remove unnecessary cast in ClangUserExpressionRaphael Isemann2019-08-061-5/+3
| | | | llvm-svn: 367989
* [llvm/test/Object] - Cleanup and move out the yaml2obj tests.George Rimar2019-08-0622-521/+361
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are multiple yaml2obj-* tests in llvm/test/Object folder. This is not correct place to have them and my intention was to move them out to test\tools\yaml2obj folder. I reviewed them, made some changes, and my comments are below. For all tests I: Added comments when needed. Moved them from llvm/test/Object to yaml2obj tests. Another changes performed: 1) yaml2obj-invalid.yaml. It was a test for an invalid YAML input. I just moved it. 2) yaml2obj-coff-multi-doc.test/yaml2obj-elf-multi-doc.test: these were a tests for testing --docnum=x functionality, one was for COFF and one for ELF. I merged them into one. 3) yaml2obj-elf-bits-endian.test: I removed its 4 YAML inputs (merged into the main test). 4) yaml2obj-readobj.test: This file has a long history. It was added to check the "parsing of header charactestics" initially. Then was used to test how yaml2obj writes the relocations. Then was upgraded to check how yaml2obj handle "-o" option. I think it should be heavily splitted and refactored in a separate patch. For now I leaved it as is, but restyled to reduce the changes in a follow-ups. 5) yaml2obj-elf-alignment.yaml: its intention was to check we can set sh-addralign field. I moved, renamed (to elf-sh-addralign.yaml) and updated this test. 6) yaml2obj-elf-file-headers.yaml: I removed it. It's intention was to check that yaml2obj handles OS/ABI and ELF type (e.g Relocatable). We are testing this already, for example in D64800. We might want to add a better (more complete) test, but keeping the existent test does not have much sense I think. 7) yaml2obj-elf-file-headers-with-e_flags.yaml: I would describe its intention as "testing MIPS e_flags". It is far from being complete and tests only a few flags. I leaved it alone for now. 8) yaml2obj-elf-rel.yaml: its intention is to check the MIPS32 relocations. We have a version for MIPS64 here: test\Object\Mips\elf-mips64-rel.yaml Seems them both are incomplete. I leaved them alone for now. 9) yaml2obj-elf-rel-noref.yaml: was introduced to check the support of arm32 R_ARM_V4BX relocatiion. I leaved it alone for now. 10) yaml2obj-elf-section-basic.yaml: it just checked that we are able to recognise trivial fields like section 'Name', 'Type', 'Flags' and others. All of our yaml2obj tests are heavily using it. I just removed this test. 11) yaml2obj-elf-section-invalid-size.yaml: its intention was to check the "Section size must be greater than or equal to the content size" error. I moved this test to `tools\yaml2obj\section-size-content.yaml' 12) yaml2obj-elf-symbol-basic.yaml: its intention seems was to support declarations of the symbols in yaml2obj. I removed it. We use this in almost each test we already have. 13) yaml2obj-elf-symbol-LocalGlobalWeak.yaml: its intention was to check that we can declare different symbol bindings. I moved it to tools\yaml2obj\elf-symbol-binding.yaml. 14) yaml2obj-coff-invalid-alignment.test: check that error is reported for a too large coff section alignment. Moved it to tools\yaml2obj\coff-invalid-alignment.test 15) yaml2obj-elf-symbol-visibility.yaml: tests ELF symbols visibility. I improved it and moved to tools\yaml2obj\elf-symbol-visibility.yaml and tools\obj2yaml\elf-symbol-visibility.yaml Differential revision: https://reviews.llvm.org/D65652 llvm-svn: 367988
* Use "isa" since the variable isn't used.Bill Wendling2019-08-061-1/+1
| | | | llvm-svn: 367985
* [DirectoryWatcher] Fix asserts Mac buildsShoaib Meenai2019-08-061-1/+1
| | | | | | | Add a missing semicolon after an assert. Remove the period from the assert message while I'm here, because we don't usually have those. llvm-svn: 367984
* Fix line table resolution near the end of a sectionPavel Labath2019-08-066-32/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: lld r367537 changed the way the linker organizes sections and segments. This exposed an lldb bug and caused some tests to fail. In all of the failing tests the root cause was the same -- when we were trying to resolve the last address in the line_table section, we failed because it pointed past the end of the section. This patch changes the line table address resolution code to back up the address by one for end-of-sequence entries. This ensures the address still points inside a section/module even if the line table sequence ends at the very end of a section. It also reverts the linker flags which were added to the failing tests to restore previous behavior. Reviewers: clayborg, jingham Subscribers: mgorny, MaskRay, lldb-commits Differential Revision: https://reviews.llvm.org/D65647 llvm-svn: 367983
OpenPOWER on IntegriCloud