- Jan 24, 2020
-
-
Jonas Devlieghere authored
I guess PDB doesn't have column information?
-
aartbik authored
Summary: Rewrites get-i tup<a1,...,an> into ai Reviewers: nicolasvasilache, rriddle, andydavis1 Reviewed By: nicolasvasilache, rriddle, andydavis1 Subscribers: merge_guards_bot, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, liufengdb, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D73213
-
Florian Hahn authored
We currently use integer ranges to merge concrete function arguments. We use the ParamState range for those, but we only look up concrete values in the regular state. For concrete function arguments that are themselves arguments of the containing function, we can use the param state directly and improve the precision in some cases. Besides improving the results in some cases, this is also a small step towards switching to ValueLatticeElement, by allowing D60582 to be a NFC. Reviewers: efriedma, davide Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D71836
-
Saar Raz authored
[Concepts] Implement P1616R1 - Using unconstrained template template parameters with constrained templates Summary: Allow unconstrained template template parameters to accept constrainted templates as arguments. Reviewers: rsmith Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D73155
-
Matt Arsenault authored
-
Matt Arsenault authored
This wasn't updated for the immarg handling change. We really need a verifier for this.
-
Saar Raz authored
Proper ExpressionEvaluationContext were not being entered when instantiating constraint expressions, which caused assertion failures in certain cases, including bug #44614.
-
Teresa Johnson authored
Summary: Second patch in series to support Safe Whole Program Devirtualization Enablement, see RFC here: http://lists.llvm.org/pipermail/llvm-dev/2019-December/137543.html Summarize vcall_visibility metadata in ThinLTO global variable summary. Depends on D71907. Reviewers: pcc, evgeny777, steven_wu Subscribers: mehdi_amini, Prazek, inglorion, hiraditya, dexonsmith, arphaman, ostannard, llvm-commits, cfe-commits, davidxl Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D71911
-
Artem Belevich authored
Wrong argument order resulted in broken shfl ops for 64-bit types.
-
Evgenii Stepanov authored
This avoids a CFI-unfriendly function pointer type cast in internal_start_thread.
-
Dan Liew authored
Summary: In order to do this `FUZZER_SUPPORTED_OS` had to be pulled out of `lib/fuzzer/CMakeLists.txt` and into the main config so we can use it from the `test/fuzzer/CMakeList.txt`. `FUZZER_SUPPORTED_OS` currently has the same value of `SANITIZER_COMMON_SUPPORTED_OS` which preserves the existing behaviour but this allows us in the future to adjust the supported platforms independent of `SANITIZER_COMMON_SUPPORTED_OS`. This mirrors the other sanitizers. For non-Apple platforms `FUZZER_SUPPORTED_OS` is not defined and surprisingly this was the behaviour before this patch because `SANITIZER_COMMON_SUPPORTED_OS` was actually empty. This appears to not matter right now because the functions that take an `OS` as an argument seem to ignore it on non-Apple platforms. While this change tries to be NFC it is technically not because we now generate an iossim config whereas previously we didn't. This seems like the right thing to do because the build system was configured to compile LibFuzzer for iossim but previously we weren't generating a lit test config for it. The device/simulator testing configs don't run by default anyway so this shouldn't break testing. This change relies on the get_capitalized_apple_platform() function added in a previous commit. rdar://problem/58798733 Reviewers: kubamracek, yln Subscribers: mgorny, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D73243
-
Dan Liew authored
Summary: The previous code hard-coded platform names but compiler-rt's CMake build system actually already knows which Apple platforms TSan supports. This change uses this information to enumerate the different Apple platforms. This change relies on the `get_capitalized_apple_platform()` function added in a previous commit. rdar://problem/58798733 Reviewers: kubamracek, yln Subscribers: mgorny, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D73238
-
Dan Liew authored
Summary: The previous code hard-coded platform names but compiler-rt's CMake build system actually already knows which Apple platforms ASan supports. This change uses this information to enumerate the different Apple platforms. rdar://problem/58798733 Reviewers: kubamracek, yln Subscribers: mgorny, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D73232
-
Jim Ingham authored
calls to commonly un-overridden methods into a function that checks whether the method is overridden anywhere and if not directly dispatches to the NSObject implementation. That means if you do override any of these methods, "step-in" will not step into your code, since we hit the wrapper function, which has no debug info, and immediately step out again. Add code to recognize these functions as "trampolines" and a thread plan that will get us from the function to the user code, if overridden. <rdar://problem/54404114> Differential Revision: https://reviews.llvm.org/D73225
-
Jonas Devlieghere authored
We were incorrectly parsing the -C argument to breakpoint set as the column breakpoint, even though according to the help this should be the breakpoint command. This fixes that by renaming the option to -u, adding it to help, and adding a test case. Differential revision: https://reviews.llvm.org/D73284
-
Roman Lebedev authored
Apparently makes bots angry. This reverts commit d096f8d3.
-
Richard Smith authored
edd4398f. The documentation remains correct despite the revert of the patch.
-
Fangrui Song authored
I felt really sad to push this commit for my selfish purpose to make glibc -static-pie build with lld. Some code constructs in glibc require R_X86_64_GOTPCREL/R_X86_64_REX_GOTPCRELX referencing undefined weak to be resolved to a GOT entry not relocated by R_X86_64_GLOB_DAT (GNU ld behavior), e.g. csu/libc-start.c if (__pthread_initialize_minimal != NULL) __pthread_initialize_minimal (); elf/dl-object.c void _dl_add_to_namespace_list (struct link_map *new, Lmid_t nsid) { /* We modify the list of loaded objects. */ __rtld_lock_lock_recursive (GL(dl_load_write_lock)); Emitting a GLOB_DAT will make the address equal &__ehdr_start (true value) and cause elf/ldconfig to segfault. glibc really should move away from weak references, which do not have defined semantics. Temporarily special case --no-dynamic-linker. -
Reid Kleckner authored
Prevents API misuse described in PR44495
-
Nathan Ridge authored
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D73140
-
Nathan Ridge authored
Summary: Fixes https://github.com/clangd/clangd/issues/259 Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D73124
-
Roman Lebedev authored
Likely makes bots angry. This reverts commit a4cfb15d. # Conflicts: # clang/lib/Sema/SemaDeclAttr.cpp
-
Roman Lebedev authored
Revert "[Sema] Attempt to perform call-size-specific `__attribute__((alloc_align(param_idx)))` validation" Likely makes bots angry. This reverts commit c2a9061a.
-
Matt Arsenault authored
Since register classes go up to 1024, 32 elements, all masks bits are needed and a 32-bit shift by 32 is illegal. We didn't have any instructions theoretically using a 32 element VGPR before d1dbb5e4
-
Roman Lebedev authored
[Sema] Don't disallow placing `__attribute__((alloc_align(param_idx)))` on `std::align_val_t`-typed parameters Summary: I kind-of understand why it is restricted to integer-typed arguments, for general enum's the value passed is not nessesairly the alignment implied, although one might say that user would know best. But we clearly should whitelist `std::align_val_t`, which is just a thin wrapper over `std::size_t`, and is the C++ standard way of specifying alignment. Reviewers: erichkeane, rsmith, aaron.ballman, jdoerfert Reviewed By: erichkeane Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D73019
-
Roman Lebedev authored
[Codegen] If reasonable, materialize clang's `AllocAlignAttr` as llvm's Alignment Attribute on call-site function return value Summary: Much like with the previous patch (D73005) with `AssumeAlignedAttr` handling, results in mildly more readable IR, and will improve test coverage in upcoming patch. Note that in `AllocAlignAttr`'s case, there is no requirement for that alignment parameter to end up being an I-C-E. Reviewers: erichkeane, jdoerfert, hfinkel, aaron.ballman, rsmith Reviewed By: erichkeane Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D73006
-
Roman Lebedev authored
[Codegen] If reasonable, materialize clang's `AssumeAlignedAttr` as llvm's Alignment Attribute on call-site function return value Summary: This should be mostly NFC - we still lower the same alignment knowledge to the IR. The main reasoning here is that this somewhat improves readability of IR like this, and will improve test coverage in upcoming patch. Even though the alignment is guaranteed to always be an I-C-E, we don't always materialize it as llvm's Alignment Attribute because: 1. There may be a non-zero offset 2. We may be sanitizing for alignment Note that if there already was an IR alignment attribute on return value, we union them, and thus the alignment only ever rises. Also, there is a second relevant clang attribute `AllocAlignAttr`, so that is why `AbstractAssumeAlignedAttrEmitter` is templated. Reviewers: erichkeane, jdoerfert, hfinkel, aaron.ballman, rsmith Reviewed By: erichkeane Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D73005
-
Roman Lebedev authored
Summary: I initially encountered those assertions when trying to create this IR `alignment` attribute from clang's `__attribute__((assume_aligned(imm)))`, because until D72994 there is no sanity checking for the value of `imm`. But even then, we have `llvm::Value::MaximumAlignment` constant (which is `536870912`), which is enforced for clang attributes, and then there are some other magical constant (`0x40000000` i.e. `1073741824` i.e. `2 * 536870912`) in `Attribute::getWithAlignment()`/`AttrBuilder::addAlignmentAttr()`. I strongly suspect that `0x40000000` is incorrect, and that also should be `llvm::Value::MaximumAlignment`. Reviewers: erichkeane, hfinkel, jdoerfert, gchatelet, courbet Reviewed By: erichkeane Subscribers: hiraditya, cfe-commits, llvm-commits Tags: #llvm, #clang Differential Revision: https://reviews.llvm.org/D72998
-
Roman Lebedev authored
Summary: `alloc_align` attribute takes parameter number, not the alignment itself, so given **just** the attribute/function declaration we can't do any sanity checking for said alignment. However, at call site, given the actual `Expr` that is passed into that parameter, we //might// be able to evaluate said `Expr` as Integer Constant Expression, and perform the sanity checks. But since there is no requirement for that argument to be an immediate, we may fail, and that's okay. However if we did evaluate, we should enforce the same constraints as with `__builtin_assume_aligned()`/`__attribute__((assume_aligned(imm)))`: said alignment is a power of two, and is not greater than our magic threshold Reviewers: erichkeane, aaron.ballman, hfinkel, rsmith, jdoerfert Reviewed By: erichkeane Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D72996
-
Roman Lebedev authored
Summary: For `__builtin_assume_aligned()`, we do validate that the alignment is not greater than `536870912` (D68824), but we don't do that for `__attribute__((assume_aligned(N)))` attribute. I suspect we should. Reviewers: erichkeane, aaron.ballman, hfinkel, rsmith, jdoerfert Reviewed By: erichkeane Subscribers: cfe-commits, llvm-commits Tags: #llvm, #clang Differential Revision: https://reviews.llvm.org/D72994
-
Petr Hosek authored
conduit_uri was renamed to phabricator.uri and git-phab fails to load .arcconfig without this field. Differential Revision: https://reviews.llvm.org/D72960
-
Teresa Johnson authored
Summary: First patch to support Safe Whole Program Devirtualization Enablement, see RFC here: http://lists.llvm.org/pipermail/llvm-dev/2019-December/137543.html Always emit !vcall_visibility metadata under -fwhole-program-vtables, and not just for -fvirtual-function-elimination. The vcall visibility metadata will (in a subsequent patch) be used to communicate to WPD which vtables are safe to devirtualize, and we will optionally convert the metadata to hidden visibility at link time. Subsequent follow on patches will help enable this by adding vcall_visibility metadata to the ThinLTO summaries, and always emit type test intrinsics under -fwhole-program-vtables (and not just for vtables with hidden visibility). In order to do this safely with VFE, since for VFE all vtable loads must be type checked loads which will no longer be the case, this patch adds a new "Virtual Function Elim" module flag to communicate to GlobalDCE whether to perform VFE using the vcall_visibility metadata. One additional advantage of using the vcall_visibility metadata to drive more WPD at LTO link time is that we can use the same mechanism to enable more aggressive VFE at LTO link time as well. The link time option proposed in the RFC will convert vcall_visibility metadata to hidden (aka linkage unit visibility), which combined with -fvirtual-function-elimination will allow it to be done more aggressively at LTO link time under the same conditions. Reviewers: pcc, ostannard, evgeny777, steven_wu Subscribers: mehdi_amini, Prazek, hiraditya, dexonsmith, davidxl, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D71907
-
Alina Sbirlea authored
-
Marcello Maggioni authored
Summary: LLVMIRIntrinsicGen is using LLVM_Op as the base class for intrinsics. This works for LLVM intrinsics in the LLVM Dialect, but when we are trying to convert custom intrinsics that originate from a custom LLVM dialect (like NVVM or ROCDL) these usually have a different "cppNamespace" that needs to be applied to these dialect. These dialect specific characteristics (like "cppNamespace") are typically organized by creating a custom op (like NVVM_Op or ROCDL_Op) that passes the correct dialect to the LLVM_OpBase class. It seems natural to allow LLVMIRIntrinsicGen to take that into consideration when generating the conversion code from one of these dialect to a set of target specific intrinsics. Reviewers: rriddle, andydavis1, antiagainst, nicolasvasilache, ftynse Subscribers: jdoerfert, mehdi_amini, jpienaar, burmako, shauheen, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, llvm-commits Tags: #llvm Differential R...
-
Jonas Devlieghere authored
As explained in Pavel's previous commit message: %lldb is the proper substitution. Using "lldb" can cause us to execute the system lldb instead of the one we are testing. This happens at least in standalone builds.
-
Alina Sbirlea authored
-
Fangrui Song authored
-
Fangrui Song authored
-
Fangrui Song authored
These functions call relocateOne(). This patch is a prerequisite for making relocateOne() aware of `Symbol` (D73254). Reviewed By: grimar, nickdesaulniers Differential Revision: https://reviews.llvm.org/D73250
-
Justin Bogner authored
Calling `operator*` on a WeakVH with a null value yields a null reference, which is UB. Avoid this by implicitly converting the WeakVH to a `Value *` rather than dereferencing and then taking the address for the type conversion. Differential Revision: https://reviews.llvm.org/D73280
-