summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [AMDGPU] Drop Reg32 and use regular AsmNameStanislav Mekhanoshin2019-07-183-25/+21
| | | | | | | | This allows to reduce generated AMDGPUGenAsmWriter.inc by ~100Kb. Differential Revision: https://reviews.llvm.org/D64952 llvm-svn: 366505
* [WebAssembly] Use passive segments by default when memory is sharedThomas Lively2019-07-187-27/+23
| | | | | | | | | | | | | | | | | | Summary: This change makes it so that passing --shared-memory is all a user needs to do to get proper multithreaded code. This default can still be explicitly overridden for any reason using --passive-segments and --active-segments. Reviewers: sbc100, quantum Subscribers: dschuff, jgravelle-google, aheejin, sunfish, jfb, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64950 llvm-svn: 366504
* [GlobalISel][AArch64] Add support for base register + offset register loadsJessica Paquette2019-07-182-0/+183
| | | | | | | | | | | | | | | | | | | | Add support for folding G_GEPs into loads of the form ``` ldr reg, [base, off] ``` when possible. This can save an add before the load. Currently, this is only supported for loads of 64 bits into 64 bit registers. Add a new addressing mode function, `selectAddrModeRegisterOffset` which performs this folding when it is profitable. Also add a test for addressing modes for G_LOAD. Differential Revision: https://reviews.llvm.org/D64944 llvm-svn: 366503
* CodeGen: Allow !associated metadata to point to aliases.Peter Collingbourne2019-07-182-3/+9
| | | | | | | | | | This is a small extension of !associated, mostly useful for the implementation convenience of instrumentation passes that RAUW globals with aliases, such as LowerTypeTests. Differential Revision: https://reviews.llvm.org/D64951 llvm-svn: 366502
* Revert [X86] EltsFromConsecutiveLoads - support common source loadsReid Kleckner2019-07-183-179/+249
| | | | | | | | This reverts r366441 (git commit 48104ef7c9c653bbb732b66d7254957389fea337) This causes clang to fail to compile some file in Skia. Reduction soon. llvm-svn: 366501
* [WebAssembly] fix bug in finding .tdata segmentGuanzhong Chen2019-07-182-5/+6
| | | | | | | | | | | | | | | | Summary: Fix bug in `wasm-ld`'s `Writer::createInitTLSFunction` that only finds `.tdata` if it's the first section. Reviewers: tlively, aheejin, sbc100 Reviewed By: sbc100 Subscribers: dschuff, jgravelle-google, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64947 llvm-svn: 366500
* [WebAssembly] Fix __builtin_wasm_tls_base intrinsicGuanzhong Chen2019-07-183-2/+13
| | | | | | | | | | | | | | | | | | | Summary: Properly generate the outchain for the `__builtin_wasm_tls_base` intrinsic. Also marked the intrinsic pure, per @sunfish's suggestion. Reviewers: tlively, aheejin, sbc100, sunfish Reviewed By: tlively Subscribers: dschuff, jgravelle-google, hiraditya, cfe-commits, llvm-commits, sunfish Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D64949 llvm-svn: 366499
* [cmake] Only run llvm-codesign if targetting apple on an apple hostNathan Lanza2019-07-181-1/+1
| | | | | | | | | | | | | | | | | Summary: Other platforms don't have the capability to perform llvm_codesign step. If LLVM_CODESIGNING_IDENTITY is set then this chunk of code would attempt to codesign if the target was Apple. But when cross compiling to Darwin from Linux, for example, this step would fail. So test if the host is Apple as well. Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64942 llvm-svn: 366498
* Fix typo in r366494. Spotted by Yuanfang Chen.Peter Collingbourne2019-07-181-1/+1
| | | | llvm-svn: 366497
* Remove the static initialize introduced in r365099Steven Wu2019-07-181-9/+11
| | | | | | | | | | | | | | | | | | Summary: Some polish for r365099 which adds a static initializer to MachOObjectFile. Remove it by moving it to file scope. Reviewers: smeenai, alexshap, compnerd, mtrent, anushabasana Reviewed By: smeenai Subscribers: hiraditya, jkorous, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64873 llvm-svn: 366496
* [Breakpoint] Replace use of ClangASTContext with TypeSystemAlex Langford2019-07-181-2/+3
| | | | llvm-svn: 366495
* IR: Teach Constant::needsRelocation() that relative pointers don't need to ↵Peter Collingbourne2019-07-182-11/+44
| | | | | | | | | | | be relocated. This causes sections with relative pointers to be marked as read only, which means that they won't end up sharing pages with writable data. Differential Revision: https://reviews.llvm.org/D64948 llvm-svn: 366494
* Fall back to dyld's _dyld_start when no LC_MAIN / main() func can be foundJason Molenda2019-07-185-30/+84
| | | | | | | | | | | | | | | | | | | | | | | | | The new DriverKit user-land kernel drivers in macOS 10.15 / Catalina do not have a main() function or an LC_MAIN load command. lldb uses the address of main() as the return address for inferior function calls; it puts a breakpoint on main, runs the inferior function call, and when the main() breakpoint is hit, lldb knows unambiguously that the inferior function call ran to completion - no other function calls main. This change hoists the logic for finding the "entry address" from ThreadPlanCallFunction to Target. It changes the logic to first try to get the entry address from the main executable module, but if that module does not have one, it will iterate through all modules looking for an entry address. The patch also adds code to ObjectFileMachO to use dyld's _dyld_start function as an entry address. <rdar://problem/52343958> Differential Revision: https://reviews.llvm.org/D64897 llvm-svn: 366493
* [NFC][pstl] Run clang-format on the sources, including the testsLouis Dionne2019-07-1836-118/+108
| | | | llvm-svn: 366492
* [pstl] Fix test that checked the version number after version bumpLouis Dionne2019-07-181-2/+2
| | | | llvm-svn: 366491
* [pstl] Declare main() as returning int, not int32_tLouis Dionne2019-07-1859-59/+59
| | | | llvm-svn: 366490
* [FileSpecList] Add EmplaceBack method (NFC)Jonas Devlieghere2019-07-186-9/+18
| | | | | | | | Instead of having to write FileSpecList::Append(FileSpec(args)) you can now call FileSpecList::EmplaceBack(args), similar to std::vector<>::emplace_back. llvm-svn: 366489
* [ASan] Support `{f}puts(NULL)` on Darwin, part 2Julian Lettner2019-07-181-2/+4
| | | | | | | Add braces around macro `{ MACRO(); }` to guard against macros that expand to multiple statements. llvm-svn: 366488
* gn build: Merge r366458.Peter Collingbourne2019-07-181-0/+1
| | | | llvm-svn: 366487
* FileSystem: Check for DTTOIF alone, not _DIRENT_HAVE_D_TYPEJordan Rose2019-07-181-1/+4
| | | | | | | | | | | | | | | | | | | | | | | While 'd_type' is a non-standard extension to `struct dirent`, only glibc signals its presence with a macro '_DIRENT_HAVE_D_TYPE'. However, any platform with 'd_type' also includes a way to convert to mode_t values using the macro 'DTTOIF', so we can check for that alone and still be confident that the 'd_type' member exists. (If this turns out to be wrong, I'll go back and set up an actual CMake check.) I couldn't think of how to write a test for this, because I couldn't think of how to test that a 'stat' call doesn't happen without controlling the filesystem or intercepting 'stat', and there's no good cross-platform way to do that that I know of. Follow-up (almost a year later) to r342089. rdar://problem/50592673 https://reviews.llvm.org/D64940 llvm-svn: 366486
* [ORC] Suppress an ORCv1 deprecation warning.Lang Hames2019-07-181-1/+2
| | | | llvm-svn: 366485
* [libc++] Add C++17 deduction guides for std::functionLouis Dionne2019-07-184-0/+337
| | | | | | | | | | | | Summary: http://llvm.org/PR39606 Reviewers: Quuxplusone Subscribers: christof, dexonsmith, libcxx-commits Differential Revision: https://reviews.llvm.org/D54410 llvm-svn: 366484
* [OPENMP]Fix sharing of threadprivate variables with TLS support.Alexey Bataev2019-07-182-4/+30
| | | | | | | | | If the threadprivate variable is used in the copyin clause on inner parallel directive with TLS support, we capture this variable in all outer OpenMP scopes. It leads to the fact that in all scopes we're working with the original variable, not the threadprivate copies. llvm-svn: 366483
* [compiler-rt] Complete revert of r366413Matthew Voss2019-07-181-42/+0
| | | | | | | Incomplete revert. Mea culpa. This test is failing on sanitizer-x86_64-linux and our internal CI. llvm-svn: 366482
* Fix C++ modules buildRaphael Isemann2019-07-181-0/+1
| | | | | | | llvm-svn: 366344 missed an include that broke the LLVM_ENABLE_MODULES build. llvm-svn: 366481
* [RISCV] Hard float ABI supportAlex Bradbury2019-07-1814-33/+1474
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The RISC-V hard float calling convention requires the frontend to: * Detect cases where, once "flattened", a struct can be passed using int+fp or fp+fp registers under the hard float ABI and coerce to the appropriate type(s) * Track usage of GPRs and FPRs in order to gate the above, and to determine when signext/zeroext attributes must be added to integer scalars This patch attempts to do this in compliance with the documented ABI, and uses ABIArgInfo::CoerceAndExpand in order to do this. @rjmccall, as author of that code I've tagged you as reviewer for initial feedback on my usage. Note that a previous version of the ABI indicated that when passing an int+fp struct using a GPR+FPR, the int would need to be sign or zero-extended appropriately. GCC never did this and the ABI was changed, which makes life easier as ABIArgInfo::CoerceAndExpand can't currently handle sign/zero-extension attributes. Re-landed after backing out 366450 due to missed hunks. Differential Revision: https://reviews.llvm.org/D60456 llvm-svn: 366480
* [COFF] Change a variable type to be const in the HeapAllocSite map.Amy Huang2019-07-185-9/+11
| | | | llvm-svn: 366479
* [lldb][swig] Fix autodocs flag parsingJordan Rupprecht2019-07-181-1/+1
| | | | | | | | r366471 added "-features autodoc" without a trailing comment, leading to `Unrecognized option -features autodoc-threads` due to implicit string concatenation. Add a comma to fix that. Also separate into "-features" and "autodoc", otherwise it gets parsed as a single "-features autodoc" flag which is also not recognized (it must be two separate CLI args). llvm-svn: 366478
* [FPEnv] Teach the IRBuilder about constrained FPTrunc and FPExtKevin P. Neal2019-07-182-0/+44
| | | | | | | | | | | | The IRBuilder doesn't know that FPTrunc and FPExt have constrained equivalents. Add the support by building on the strict FP mode now present in the IRBuilder. Reviewed by: John McCall Approved by: John McCall Differential Revision: https://reviews.llvm.org/D64934 llvm-svn: 366477
* Add offsetof support to expression evaluator.Raphael Isemann2019-07-187-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: We currently don't support offsetof in the expression evaluator as it is implemented as a macro (which then calls __builtin_offsetof) in stddef.h. The best solution would be to include that header (or even better, import Clang's builtin module), but header-parsing and (cross-platform) importing modules is not ready yet. Until we get this working with modules I would say we add the macro to our existing macro list as we already do with other macros from stddef.h/stdint.h. We should be able to drop all of them once we can import the relevant modules by default. rdar://26040641 Reviewers: shafik, davide Reviewed By: davide Subscribers: clayborg, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D64917 llvm-svn: 366476
* [WebAssembly] Implement __builtin_wasm_tls_base intrinsicGuanzhong Chen2019-07-186-0/+42
| | | | | | | | | | | | | | | | Summary: Add `__builtin_wasm_tls_base` so that LeakSanitizer can find the thread-local block and scan through it for memory leaks. Reviewers: tlively, aheejin, sbc100 Subscribers: dschuff, jgravelle-google, hiraditya, sunfish, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D64900 llvm-svn: 366475
* [OPENMP]Provide correct data sharing attributes for loop controlAlexey Bataev2019-07-1821-105/+130
| | | | | | | | | | | | variables. Loop control variables are private in loop-based constructs and we shall take this into account when generate the code for inner constructs. Currently, those variables are reported as shared in many cases. Moved the analysis of the data-sharing attributes of the loop control variable to an early semantic stage to correctly handle their attributes. llvm-svn: 366474
* [LibTooling] Relax Transformer to allow rewriting macro expansionsYitzhak Mandelbaum2019-07-182-56/+108
| | | | | | | | | | | | | | | | | | | | Summary: Currently, Transformer rejects any changes to source locations inside macro expansions. This change relaxes that constraint to allow rewrites when the entirety of the expansion is replaced, since that can be mapped to replacing the entirety of the expansion range in the file source. This change makes Transformer consistent with the handling of edit ranges in `clang::edit::Commit` (which is used, for example, for applying `FixItHint`s from diagnostics). Reviewers: ilya-biryukov Subscribers: gribozavr, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64518 llvm-svn: 366473
* Revert "Fix asan infinite loop on undefined symbol"Matthew Voss2019-07-181-7/+2
| | | | | | | | | | | This reverts commit 63719119c78ca965b5d80e5c20fcfe81ba28f896. The tests in this commit were failing on a Linux sanitizer bot and our internal CI. http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/22401/steps/test%20standalone%20compiler-rt%20with%20symbolizer/logs/stdio llvm-svn: 366472
* [swig] Enable autodoc featureJonas Devlieghere2019-07-181-0/+1
| | | | | | | | | This patch enables the SWIG `autodoc` feature so that the generated Python reference [1] includes class properties. [1] https://lldb.llvm.org/python_reference/index.html llvm-svn: 366471
* [LAA] Re-check bit-width of pointers after stripping.Michael Liao2019-07-182-1/+27
| | | | | | | | | | | | | | | | Summary: - As the pointer stripping now tracks through `addrspacecast`, prepare to handle the bit-width difference from the result pointer. Reviewers: jdoerfert Subscribers: jvesely, nhaehnle, hiraditya, arphaman, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64928 llvm-svn: 366470
* [LibTooling] Add function to translate and validate source range for editingYitzhak Mandelbaum2019-07-183-2/+155
| | | | | | | | | | | | | | | | | Summary: Adds the function `getRangeForEdit` to validate that a given source range is editable and, if needed, translate it into a range in the source file (for example, if it's sourced in macro expansions). Reviewers: ilya-biryukov Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64924 llvm-svn: 366469
* [clangd] Remove dead code from BackgroundIndexKadir Cetinkaya2019-07-181-3/+0
| | | | llvm-svn: 366468
* [clangd] BackgroundIndex stores shards to the closest projectKadir Cetinkaya2019-07-1810-69/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Changes persistance logic to store shards at the directory of closest CDB. Previously we were storing all shards to directory of the CDB that triggered indexing, it had its downsides. For example, if you had two TUs coming from a different CDB but depending on the same header foo.h, we will store the foo.h only for the first CDB, and it would be missing for the second and we would never persist it since it was actually present in the memory and persisted before. This patch still stores only a single copy of a shard, but makes the directory a function of the file name. So that the shard place will be unique even with multiple CDBs accessing the file. This directory is determined as the first directory containing a CDB in the file's parent directories, if no such directory exists we make use of the home directory. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64745 llvm-svn: 366467
* ELF: Add support for remaining R_AARCH64_MOVW* relocations.Peter Collingbourne2019-07-183-0/+167
| | | | | | Differential Revision: https://reviews.llvm.org/D64685 llvm-svn: 366466
* [LLDB] Remove lldb-miJonas Devlieghere2019-07-18196-35601/+0
| | | | | | | | | | | | | | As discussed on the mailing list [1], this patch removes the lldb-mi tool and its tests from the LLDB repository. We moved lldb-mi into a separate repository on GitHub [2] for downstream users or maintainers to build and package. [1] http://lists.llvm.org/pipermail/lldb-dev/2019-July/015103.html [2] https://github.com/lldb-tools/lldb-mi Differential revision: https://reviews.llvm.org/D64255 llvm-svn: 366465
* [NFC][llvm-readobj] Refactor dynamic string table indexing into a function.Yuanfang Chen2019-07-182-38/+34
| | | | | | | | | | | | | Restore printDynamicString removed in rL363868. It provides better error handling whenever indexing dynamic string table is needed. Reviewers: jhenderson, MaskRay, grimar Reviewed by: jhenderson, MaskRay, grimar Differential Revision: https://reviews.llvm.org/D64674 llvm-svn: 366464
* ELF: Simplify test. NFCI.Peter Collingbourne2019-07-182-10/+6
| | | | | | | | | | Avoid splitting the test into multiple files and use zero for the value of the symbol with addends at relocations so that it's clear what value is being used at relocations. Differential Revision: https://reviews.llvm.org/D64684 llvm-svn: 366463
* MC: AArch64: Add support for prel_g* relocation specifiers.Peter Collingbourne2019-07-185-15/+82
| | | | | | Differential Revision: https://reviews.llvm.org/D64683 llvm-svn: 366462
* AArch64: Unify relocation restrictions between MOVK/MOVN/MOVZ.Peter Collingbourne2019-07-184-158/+51
| | | | | | | | | | | | | | | | | | | | | | | There doesn't seem to be a practical reason for these instructions to have different restrictions on the types of relocations that they may be used with, notwithstanding the language in the ELF AArch64 spec that implies that specific relocations are meant to be used with specific instructions. For example, we currently forbid the first instruction in the following sequence, despite it currently being used by clang to generate a global reference under -mcmodel=large: movz x0, #:abs_g0_nc:foo movk x0, #:abs_g1_nc:foo movk x0, #:abs_g2_nc:foo movk x0, #:abs_g3:foo Therefore, allow MOVK/MOVN/MOVZ to accept the union of the set of relocations that they currently accept individually. Differential Revision: https://reviews.llvm.org/D64466 llvm-svn: 366461
* ELF: Allow forward references to linked sections.Peter Collingbourne2019-07-182-17/+44
| | | | | | | | | | | It's possible to create IR that uses !associated to refer to a global that appears later in the module, which can result in these types of forward references being generated. Unfortunately our assembler does not currently accept the resulting .s so I needed to use yaml2obj to test this. Differential Revision: https://reviews.llvm.org/D64880 llvm-svn: 366460
* [CMake] Polish folders in generated Xcode projectStefan Granitz2019-07-183-2/+7
| | | | | | | | | | | | | | Summary: Group plugins by subfolder. Move liblldb-resource-headers to `lldb misc`. Avoid install-distribution related targets in IDE-enabled builds. Reviewers: jingham, mib, stella.stamenova Subscribers: mgorny, lldb-commits, #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D64865 llvm-svn: 366459
* [clangd] Refactor background-index shard loadingKadir Cetinkaya2019-07-188-173/+299
| | | | | | | | | | | | Reviewers: sammccall Subscribers: mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64712 llvm-svn: 366458
* [ASTUnit] Attempt to unbreak Windows buildbots after r366448Ilya Biryukov2019-07-181-2/+2
| | | | llvm-svn: 366457
* Minor styling fix. NFC.Michael Liao2019-07-181-2/+1
| | | | llvm-svn: 366456
OpenPOWER on IntegriCloud