summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [AArch64] Fix unused variable [NFC]Mandeep Singh Grang2019-02-011-0/+1
| | | | llvm-svn: 352940
* [BPF] [BTF] Process FileName with absolute path correctlyYonghong Song2019-02-012-1/+84
| | | | | | | | | | | | | | | | | In IR, sometimes the following attributes for DIFile may be generated: filename: /home/yhs/test.c directory: /tmp The /tmp may represent the working directory of the compilation process. In such cases, since filename is with absolute path, the directory should be ignored by BTF. The filename alone is enough to get the source. Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Yonghong Song <yhs@fb.com> llvm-svn: 352939
* [analyzer] Hotfix for RetainCountChecker: assert was too strong.George Karpenkov2019-02-012-4/+18
| | | | | | Bridged casts can happen to non-CF objects as well. llvm-svn: 352938
* [CodeGen] Be as conservative about atomic accesses as for volatilePhilip Reames2019-02-013-2/+7
| | | | | | | | | | | | | | Background: At the moment, we record the AtomicOrdering of an access in the MMO, but also mark any atomic access as volatile in SelectionDAG. I'm working towards separating that. See https://reviews.llvm.org/D57601 for context. Update all usages of isVolatile in lib/CodeGen to preserve behaviour once atomic MMOs stop being also volatile. This is NFC in it's current form, but is essential for correctness once we make that final change. It useful to keep in mind that AtomicSDNode is not a parent of LoadSDNode, StoreSDNode, or LSBaseSDNode. As a result, any call to isVolatile on one of those static types doesn't need a companion isAtomic check. We should probably adjust that class hierarchy long term, but for now, that seperation is useful. I'm deliberately being conservative about handling. I want the change to stop adding volatile to be NFC itself, and then will work through places where we can be less conservative for atomics one by one in separate changes w/tests. Differential Revision: https://reviews.llvm.org/D57596 llvm-svn: 352937
* [WebAssembly] Fix ImportName's position in this test.Dan Gohman2019-02-011-1/+1
| | | | | | This is a follow-up to r352930. llvm-svn: 352936
* [InstCombine] Refactor test checks (NFC)Evandro Menezes2019-02-011-198/+198
| | | | llvm-svn: 352935
* Revert "[AST][OpenMP] OpenMP Sections / Section constructs contain ↵Roman Lebedev2019-02-012-71/+0
| | | | | | | | | | | | Structured blocks" Further reviews (D57594, D57615) have revealed that this was not reviewed, and that the differential's description was not read during the review, thus rendering this commit invalid. This reverts commit r352882. llvm-svn: 352933
* [Test] Update file w/update_test_checks.py to make a follow on change obviousPhilip Reames2019-02-011-29/+29
| | | | llvm-svn: 352932
* [WebAssembly] Add codegen support for the import_field attributeDan Gohman2019-02-018-23/+60
| | | | | | | | | This adds the LLVM side of https://reviews.llvm.org/D57602 -- the import_field attribute. See that patch for details. Differential Revision: https://reviews.llvm.org/D57603 llvm-svn: 352931
* [WebAssembly] Add an import_field function attributeDan Gohman2019-02-016-2/+71
| | | | | | | | | | | | | | | | | | | | | | | This is similar to import_module, but sets the import field name instead. By default, the import field name is the same as the C/asm/.o symbol name. However, there are situations where it's useful to have it be different. For example, suppose I have a wasm API with a module named "pwsix" and a field named "read". There's no risk of namespace collisions with user code at the wasm level because the generic name "read" is qualified by the module name "pwsix". However in the C/asm/.o namespaces, the module name is not used, so if I have a global function named "read", it is intruding on the user's namespace. With the import_field module, I can declare my function (in libc) to be "__read", and then set the wasm import module to be "pwsix" and the wasm import field to be "read". So at the C/asm/.o levels, my symbol is outside the user namespace. Differential Revision: https://reviews.llvm.org/D57602 llvm-svn: 352930
* [COFF] Create range extension thunks for ARM64Martin Storsjo2019-02-015-32/+97
| | | | | | | | | | | | | | On ARM64, this is normally necessary only after a module exceeds 128 MB in size (while the limit for thumb is 16 MB). For conditional branches, the range limit is only 1 MB though (the same as for thumb), and for the tbz instruction, the range is only 32 KB, which allows for a test much smaller than the full 128 MB. This fixes PR40467. Differential Revision: https://reviews.llvm.org/D57575 llvm-svn: 352929
* [COFF] Fix crashes when writing a PDB after adding thunks.Martin Storsjo2019-02-012-5/+24
| | | | | | | | | | | | When writing a PDB, the OutputSection of all chunks need to be set. The thunks are added directly to OutputSection after the normal machinery that sets it for all other chunks. This fixes part of PR40467. Differential Revision: https://reviews.llvm.org/D57574 llvm-svn: 352928
* Improve diagnostic to tell you a type is incomplete.Eric Fiselier2019-02-014-3/+14
| | | | | | | | | | | | | | | | | | I recently ran into this code: ``` \#include <iostream> void foo(const std::string &s, const std::string& = ""); \#include <string> void test() { foo(""); } ``` The diagnostic produced said it can't bind char[1] to std::string const&. It didn't mention std::string is incomplete. The user had to infer that. This patch causes the diagnostic to now say "incomplete type". llvm-svn: 352927
* add a test and a couple minor bug fixes for the ↵Marshall Clow2019-02-013-2/+7
| | | | | | implicit-signed-integer-truncation sanitizer. This is PR#40566 llvm-svn: 352926
* Factor out duplication between ExprIterator and ConstExprIterator.Richard Smith2019-02-012-26/+19
| | | | | | | This also exposes a more general iterator cast mechanism suitable for use in http://reviews.llvm.org/D56571. llvm-svn: 352925
* [COFF, ARM64] Fix localaddress to handle stack realignment and variable size ↵Mandeep Singh Grang2019-02-0111-112/+330
| | | | | | | | | | | | | | | | objects Summary: This fixes using the correct stack registers for SEH when stack realignment is needed or when variable size objects are present. Reviewers: rnk, efriedma, ssijaric, TomTan Reviewed By: rnk, efriedma Subscribers: javed.absar, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D57183 llvm-svn: 352923
* [X86][AVX] Add VMOVDDUP-VPBROADCASTQ execution domain mappingSimon Pilgrim2019-02-0127-298/+261
| | | | | | | | Noticed in D57514. Differential Revision: https://reviews.llvm.org/D57519 llvm-svn: 352922
* [ubsan] Make suppressions.cpp test pass for me on WindowsReid Kleckner2019-02-012-2/+11
| | | | | | | | | | | The test seems to be failing because the module suppression file contains a colon. I found that it was sufficient to just use the basename of the suppression file. While I was here, I noticed that we don't implement IsAbsolutePath for Windows, so I added it. llvm-svn: 352921
* [AMDGPU] Mark test functions with hidden visibilityScott Linder2019-02-018-70/+70
| | | | | | | | | Prepare for future patch which affects codegen for calls to preemptible functions. Differential Revision: https://reviews.llvm.org/D57605 llvm-svn: 352920
* Don't use ASTContext in DeclOpenMP.h because it's still incomplete.Eric Fiselier2019-02-012-8/+12
| | | | llvm-svn: 352919
* [DebugInfo] Fix mkdir use in testJordan Rupprecht2019-02-011-1/+1
| | | | llvm-svn: 352918
* [InstCombine] Expand Windows test (NFC)Evandro Menezes2019-02-011-52/+66
| | | | | | Run checks for Win32 as well. llvm-svn: 352917
* [DebugInfo] Don't use realpath when looking up debug binary locations.Jordan Rupprecht2019-02-012-10/+18
| | | | | | | | | | | | | | | | | | | Summary: Using realpath makes assumptions about build systems that do not always hold true. The debug binary referred to from the .gnu_debuglink should exist in the same directory (or in a .debug directory, etc.), but the files may only exist as symlinks to a differently named files elsewhere, and using realpath causes that lookup to fail. This was added in r189250, and this is basically a revert + regression test case. Reviewers: dblaikie, samsonov, jhenderson Reviewed By: dblaikie Subscribers: llvm-commits, hiraditya Tags: #llvm Differential Revision: https://reviews.llvm.org/D57609 llvm-svn: 352916
* [opaque pointer types] Pass function type for CallBase::setCalledFunction.James Y Knight2019-02-016-19/+25
| | | | | | Differential Revision: https://reviews.llvm.org/D57174 llvm-svn: 352914
* [opaque pointer types] Pass value type to GetElementPtr creation.James Y Knight2019-02-0135-169/+212
| | | | | | | | | This cleans up all GetElementPtr creation in LLVM to explicitly pass a value type rather than deriving it from the pointer's element-type. Differential Revision: https://reviews.llvm.org/D57173 llvm-svn: 352913
* [opaque pointer types] Pass value type to LoadInst creation.James Y Knight2019-02-0178-363/+459
| | | | | | | | | This cleans up all LoadInst creation in LLVM to explicitly pass the value type rather than deriving it from the pointer's element-type. Differential Revision: https://reviews.llvm.org/D57172 llvm-svn: 352911
* [opaque pointer types] Pass function types to InvokeInst creation.James Y Knight2019-02-017-13/+16
| | | | | | | | | This cleans up all InvokeInst creation in LLVM to explicitly pass a function type rather than deriving it from the pointer's element-type. Differential Revision: https://reviews.llvm.org/D57171 llvm-svn: 352910
* [opaque pointer types] Pass function types to CallInst creation.James Y Knight2019-02-0146-146/+163
| | | | | | | | | This cleans up all CallInst creation in LLVM to explicitly pass a function type rather than deriving it from the pointer's element-type. Differential Revision: https://reviews.llvm.org/D57170 llvm-svn: 352909
* [InstCombine] Expand Windows test (NFC)Evandro Menezes2019-02-011-21/+26
| | | | | | Run checks for Win64 as well. llvm-svn: 352908
* gn build: Create regular archives for the sanitizer runtimes.Peter Collingbourne2019-02-014-3/+18
| | | | | | | | | | We'll need to do this eventually if we create an installable package. For now, this lets me use the archives to build Android, whose build system wants to copy the archives to another location. Differential Revision: https://reviews.llvm.org/D57607 llvm-svn: 352907
* [OpenMP 5.0] Parsing/sema support for "omp declare mapper" directive.Michael Kruse2019-02-0139-13/+1035
| | | | | | | | | | | | | | | | | This patch implements parsing and sema for "omp declare mapper" directive. User defined mapper, i.e., declare mapper directive, is a new feature in OpenMP 5.0. It is introduced to extend existing map clauses for the purpose of simplifying the copy of complex data structures between host and device (i.e., deep copy). An example is shown below: struct S { int len; int *d; }; #pragma omp declare mapper(struct S s) map(s, s.d[0:s.len]) // Memory region that d points to is also mapped using this mapper. Contributed-by: Lingda Li <lildmh@gmail.com> Differential Revision: https://reviews.llvm.org/D56326 llvm-svn: 352906
* [libc++] Disentangle the 3 implementations of type_infoLouis Dionne2019-02-011-31/+75
| | | | | | | | | | | | | | | | | | | | | | | | Summary: We currently have effectively 3 implementations of type_info: one for the Microsoft ABI, one that does not assume that there's a unique copy of each RTTI in a progran, and one that assumes a unique copy. Those 3 implementations are entangled into the same class with nested ifdefs, which makes it very difficult to understand. Furthermore, the benefit of doing this is rather small since the code that is duplicated across implementations is just a couple of trivial lines. This patch stamps out the 3 versions of type_info explicitly to increase readability. It also explains what's going on with short comments, because it's far from obvious. Reviewers: EricWF, mclow.lists Subscribers: christof, jkorous, dexonsmith Differential Revision: https://reviews.llvm.org/D57606 llvm-svn: 352905
* [InstCombine] Extra null-checking on TFE/LWE supportMichael Liao2019-02-012-4/+10
| | | | | | | | - If that operand is not ConstantInt, skip enabling TFE/LWE. Differential Revision: https://reviews.llvm.org/D57539 llvm-svn: 352904
* Hopefully fix a couple more sphinx doc errors.James Y Knight2019-02-011-2/+10
| | | | | | | These seem to only appear on the buildbot runner, and it looks like we tried to suppress them, but it's not working. Not sure why. llvm-svn: 352903
* Fix the xcode build for r352845, attempt #2Stefan Granitz2019-02-011-0/+16
| | | | llvm-svn: 352902
* Revert "Fix the xcode build for r352845."Stefan Granitz2019-02-011-2663/+2651
| | | | | | This reverts commit 72c1213a5e901b80c0f1d2794e5088d7f71a3632. llvm-svn: 352901
* [llvm-objdump] - llvm-objdump can skip bytes at the end of a section.Sid Manning2019-02-012-1/+12
| | | | | | Differential Revision: https://reviews.llvm.org/D57549 llvm-svn: 352900
* [lldb] Relax libc++ ABI version checkingThomas Anderson2019-02-011-95/+88
| | | | | | | | | | | | | libc++ has programmable ABI versioning controllable with the _LIBCPP_ABI_VERSION macro. Currently there are at least 3 settings used in real systems (1 as the default, ndk1 for Anroid, Cr for Chromium). Only the 1 and ndk1 cases were handled. This change relaxes the check to allow any ABI version. Differential Revision: https://reviews.llvm.org/D57466 llvm-svn: 352899
* Fix a bug in the definition of isUnordered on MachineMemOperandPhilip Reames2019-02-011-7/+7
| | | | | | | | | | Background: At the moment, we record the AtomicOrdering of an access in the MMO, but also mark any atomic access as volatile in SelectionDAG. GlobalISEL keeps the two separate, but currently doesn't know how to lower an atomic G_LOAD at all. See https://reviews.llvm.org/D57601 for context. The definition used for unordered was only checking volatility, not atomicity. As noted above, all atomic MMOs are currently also volatile, so this is a latent bug only. Copy the definition used in IR, after auditing the two (2) uses of the function to be sure the desired semantics are the same. Differential Revision: https://reviews.llvm.org/D57593 llvm-svn: 352898
* test commit (add blank line) NFCRoland Froese2019-02-011-0/+1
| | | | llvm-svn: 352897
* [llvm-readobj] Add a flag to dump just the section-to-segment mapping.Matt Davis2019-02-014-41/+112
| | | | | | | | | | | | | | | | | | Summary: The following patch introduces a new function `printSectionMapping` which is responsible for dumping just the section-to-segment mapping. This patch also introduces a n option `-section-mapping` that outputs that mapping without the program headers. Previously, this functionality was controlled by `printProgramHeaders`, and the output from `-program-headers` has not been changed. I am happy to change the option name, I copied the name that was displayed when outputting the mapping table. Reviewers: khemant, jhenderson, grimar, rupprecht Reviewed By: jhenderson, grimar, rupprecht Subscribers: rupprecht, jhenderson, llvm-commits Differential Revision: https://reviews.llvm.org/D57365 llvm-svn: 352896
* [InstCombine] Refactor test checks (NFC)Evandro Menezes2019-02-011-16/+13
| | | | llvm-svn: 352895
* Fix the xcode build for r352845.Jim Ingham2019-02-011-2651/+2663
| | | | llvm-svn: 352894
* gn build: Add a missing dependency from llvm/test to llvm-litNico Weber2019-02-011-0/+1
| | | | | | | | check-llvm already listed llvm-lit as script which counts as a dep, so running check-llvm worked fine, but `ninja -C out/gn llvm/test` didn't build llvm-lit before if it wasn't already there. llvm-svn: 352893
* [InstCombine] Expand Windows test (NFC)Evandro Menezes2019-02-011-15/+44
| | | | | | Add checks for Win64 to existing cases. llvm-svn: 352892
* [llvm-nm] Report '.comment' ELF sections as 'n' instead of '?'Matt Davis2019-02-012-14/+16
| | | | | | | | | | | | | | | | | | | Summary: The previous implementation reported `.comment` sections as '?' GNU uses 'n' which means "The symbol is a debugging symbol." `.note` sections are represented as 'n' too. The test related to this change was updated to CHECK-NEXT to ensure order and that we did not miss any symbols in the dump. Reviewers: jhenderson Reviewed By: jhenderson Subscribers: rupprecht, llvm-commits Differential Revision: https://reviews.llvm.org/D57544 llvm-svn: 352891
* Update SanitizerCoverage doc regarding the issue with pc-table and gc-sections.Max Moroz2019-02-011-0/+5
| | | | | | | | | | | | | | | | | | | Summary: There is a bug for this: https://bugs.llvm.org/show_bug.cgi?id=34636 But it would be also helpful to leave a note in the docs to prevent users from running into issues, e.g. https://crbug.com/926588. Reviewers: morehouse Reviewed By: morehouse Subscribers: cfe-commits, llvm-commits, kcc Tags: #clang Differential Revision: https://reviews.llvm.org/D57474 llvm-svn: 352890
* [DWARF v5] Fix DWARF emitter and consumer to produce/expect a uleb for a ↵Wolfgang Pieb2019-02-015-12/+15
| | | | | | | | | | location description's length. Reviewer: davide, JDevliegere Differential Revision: https://reviews.llvm.org/D57550 llvm-svn: 352889
* [llvm-objcopy][NFC] More error propagation (executeObjcopyOnArchive)Jordan Rupprecht2019-02-011-14/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Replace some reportError() calls with error propagation that was missed from rL352625. Note this also adds an error check during Archive iteration that was being hidden by a different error check before: ``` for (const Archive::Child &Child : Ar.children(Err)) { Expected<std::unique_ptr<Binary>> ChildOrErr = Child.getAsBinary(); if (!ChildOrErr) // This aborts, so Err is never checked reportError(Ar.getFileName(), ChildOrErr.takeError()); ``` Err is being checked after the loop, so during happy runs, everything is fine. But when reportError is changed to return the error instead of aborting, the fact that Err is never checked is now noticed in tests that trigger an error during the loop. Reviewers: jhenderson, dblaikie, alexshap Reviewed By: dblaikie Subscribers: llvm-commits, lhames, jakehehrlich Tags: #llvm Differential Revision: https://reviews.llvm.org/D57462 llvm-svn: 352888
* Fix some sphinx doc errors.James Y Knight2019-02-013-2/+12
| | | | llvm-svn: 352887
OpenPOWER on IntegriCloud