- Oct 03, 2020
-
-
Arthur Eubanks authored
Reviewed By: asbirlea Differential Revision: https://reviews.llvm.org/D88690
-
Arthur Eubanks authored
-
Richard Smith authored
We now recognize this function as a builtin despite it having an unexpected number of parameters; make sure we don't enforce that it has only 1 argument for its 2 parameters.
-
Yaxun (Sam) Liu authored
To facilitate faster loading of device binaries and share them among processes, HIP runtime favors their alignment being 4096 bytes. HIP runtime can load unaligned device binaries, however, aligning them at 4096 bytes results in faster loading and less shared memory usage. This patch adds an option -bundle-align to clang-offload-bundler which allows bundles to be aligned at specified alignment. By default it is 1, which is NFC compared to existing format. This patch then aligns embedded fat binary and device binary inside fat binary at 4096 bytes. It has been verified this change does not cause significant overall file size increase for typical HIP applications (less than 1%). Differential Revision: https://reviews.llvm.org/D88734
-
Louis Dionne authored
For now, we still need to support older GCCs, so work around the lack of __is_constructible on older GCCs.
-
Vitaly Buka authored
Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D88519
-
Nathan Lanza authored
Summary: Motivated by the new objc_direct attribute, this change adds a new attribute that remotes metadata from Protocols that the programmer knows isn't going to be used at runtime. We simply have the frontend skip generating any protocol metadata entries (e.g. OBJC_CLASS_NAME, _OBJC_$_PROTOCOL_INSTANCE_METHDOS, _OBJC_PROTOCOL, etc) for a protocol marked with `__attribute__((objc_non_runtime_protocol))`. There are a few APIs used to retrieve a protocol at runtime. `@protocol(SomeProtocol)` will now error out of the requested protocol is marked with attribute. `objc_getProtocol` will return `NULL` which is consistent with the behavior of a non-existing protocol. Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D75574
-
Roman Lebedev authored
Currently, there is basically just one clang-tidy check to impose some sanity limits on functions - `clang-tidy-readability-function-size`. It is nice, allows to limit line count, total number of statements, number of branches, number of function parameters (not counting implicit `this`), nesting level. However, those are simple generic metrics. It is still trivially possible to write a function, which does not violate any of these metrics, yet is still rather unreadable. Thus, some additional, slightly more complicated metric is needed. There is a well-known [[ https://en.wikipedia.org/wiki/Cyclomatic_complexity | Cyclomatic complexity]], but certainly has its downsides. And there is a [[ https://www.sonarsource.com/docs/CognitiveComplexity.pdf | COGNITIVE COMPLEXITY by SonarSource ]], which is available for opensource on https://sonarcloud.io/. This check checks function Cognitive Complexity metric, and flags the functions with Cognitive Complexity exceeding the configured limit. The default limit is `25`, same as in 'upstream'. The metric is implemented as per [[ https://www.sonarsource.com/docs/CognitiveComplexity.pdf | COGNITIVE COMPLEXITY by SonarSource ]] specification version 1.2 (19 April 2017), with two notable exceptions: * `preprocessor conditionals` (`#ifdef`, `#if`, `#elif`, `#else`, `#endif`) are not accounted for. Could be done. Currently, upstream does not account for them either. * `each method in a recursion cycle` is not accounted for. It can't be fully implemented, because cross-translational-unit analysis would be needed, which is not possible in clang-tidy. Thus, at least right now, i completely avoided implementing it. There are some further possible improvements: * Are GNU statement expressions (`BinaryConditionalOperator`) really free? They should probably cause nesting level increase, and complexity level increase when they are nested within eachother. * Microsoft SEH support * ??? Reviewed By: aaron.ballman, JonasToth, lattner Differential Revision: https://reviews.llvm.org/D36836
-
Petr Hosek authored
This helper method is useful even outside of Gnu toolchains, so move it to ToolChain so it can be reused in other toolchains such as Fuchsia. Differential Revision: https://reviews.llvm.org/D88452
-
Louis Dionne authored
-
Krzysztof Parzyszek authored
Also, change i32*i32 to V6_vmpyieoh + V6_vmpyiewuh_acc, which works on V60 as well.
-
Alexey Lapshin authored
Remove usages of special error reporting functions(error(), reportError()). Errors are reported as Expected<>/Error returning values. This part is for ELF subfolder of llvm-objcopy. Testing: check-all. Differential Revision: https://reviews.llvm.org/D87987
-
Jianzhou Zhao authored
When an application does a lot of pairs of mmap and munmap, if we did not release shadoe memory used by mmap addresses, this would increase memory usage. Reviewed-by: morehouse Differential Revision: https://reviews.llvm.org/D88686
-
Tim Keith authored
The template `ListDirectedStatementState` was declared as a struct and then as a class. Fix it so they match. Differential Revision: https://reviews.llvm.org/D88711
-
Jonas Devlieghere authored
Create a "Design" section for the LLDB documentation. The goal is to have design documents that describe how the LLDB internals work. Currently similar pages are mixed together under the "Development". The existing pages describing the architecture, the reproducers, the structured data plugins, and the SB API could be housed here. I hope we'd see more pages being added here in the future. Differential revision: https://reviews.llvm.org/D88516
-
Nikita Popov authored
Next to erasing the instruction, we also always want to remove it from MSSA and MD. Use a common function to do so. This is a refactoring split out from D26739.
-
Nikita Popov authored
The removal of the cpy instruction is left to the caller of performCallSlotOptzn(), including the invalidation of MD. Both call-sites already do this. Also handle incrementation of NumMemCpyInstr consistently at the call-site. One of the call-site was already doing this, which ended up incrementing the statistic twice. This fix was part of D26739.
-
Douglas Yung authored
-
ergawy authored
This commit adds support to SPIR-V's composite specialization constants. These are specialization constants which are composed of other spec constants (whehter scalar or composite), regular constatns, or undef values. This commit adds support for parsing, printing, verification, and (De)serialization. A few TODOs are still in order: - Supporting more types of constituents; currently, only scalar spec constatns are supported. - Extending `spv._reference_of` to support composite spec constatns. Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D88568
-
Louis Dionne authored
It was used inconsistently and the name was pretty confusing, so we might as well use `#if _LIBCPP_DEBUG_LEVEL == 2` consistently everywhere.
-
Louis Dionne authored
The debug mode always had three possibilities: - _LIBCPP_DEBUG is undefined => no assertions - _LIBCPP_DEBUG == 0 => some assertions - _LIBCPP_DEBUG == 1 => some assertions + iterator checks This was documented that way, however the code did not make this clear at all. The discrepancy between _LIBCPP_DEBUG and _LIBCPP_DEBUG_LEVEL was especially confusing. I reworked how the various macros are defined without changing anything else to make the code clearer.
-
Evgenii Stepanov authored
Expand the list of targets that support cfi-icall. Add ThinLTO everywhere LTO is mentioned. AFAIK all CFI features are supported with ThinLTO. Differential Revision: https://reviews.llvm.org/D87717
-
Fangrui Song authored
Some targets have different defaults. This patch defers initialization of `TargetOptions` so that a future patch can pass `TargetOptions` to `InitTargetOptionsFromCodeGenFlags` Reviewed By: jasonliu Differential Revision: https://reviews.llvm.org/D88748
-
Amara Emerson authored
The test doesn't fail if we add opcodes to the end of the opcodes definition list, so we were missing some.
-
Louis Dionne authored
This seems to have been added a long time ago as a temporary help for debugging some <regex> issue, but it's really the same as _LIBCPP_EXTERN_TEMPLATE.
-
Nikita Popov authored
Even though that patch didn't stick, we should retain the test coverage.
-
Arthur Eubanks authored
While looping through all args or all return values, we may mark a use of a later iteration as live. Previously when we got to that later value it would ignore that and continue adding to Uses instead of marking it live. For example, when looping through arg#0 and arg#1, MarkValue(arg#0, Live) may cause some use of arg#1 to be live, but MarkValue(arg#1, MaybeLive) will not notice that and continue adding into Uses. Now MarkValue(RA, MaybeLive) will MarkLive(RA) if any use is live. Fixes PR47444. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D88529
-
Peter Collingbourne authored
Differential Revision: https://reviews.llvm.org/D88747
-
Arthur Eubanks authored
Reviewed By: davidxl Differential Revision: https://reviews.llvm.org/D88324
-
Arthur Eubanks authored
This causes ../../clang/include\clang-c/Platform.h(23,11): warning: 'CINDEX_EXPORTS' macro redefined [-Wmacro-redefined] #define CINDEX_EXPORTS
-
Arthur Eubanks authored
This reverts commit b1bf2466.
-
Arthur Eubanks authored
Reviewed By: davidxl Differential Revision: https://reviews.llvm.org/D88324
-
Simon Pilgrim authored
Revert rG3d14a1e9 - "[InstCombine] recognizeBSwapOrBitReverseIdiom - support for 'partial' bswap patterns (PR47191)" This reverts commit 3d14a1e9. This is breaking on some 2stage clang buildbots
-
Thomas Raoux authored
Add basic canonicalization patterns for the extractMap/insertMap to allow them to be folded into Transfer ops. Also mark transferRead as memory read so that it can be removed by dead code. Differential Revision: https://reviews.llvm.org/D88622
-
Simon Pilgrim authored
-
Louis Dionne authored
Tests should strive to be as minimal as possible, since it makes them relevant on platforms where <iostream> does not work.
-
Jonas Devlieghere authored
Both of the if-clauses modify the raw_path variable and only one of them was resetting the variable for the fallback. Avoid future bugs like that by always resetting the variable. Differential revision: https://reviews.llvm.org/D88704
-
Florian Hahn authored
getVPRecipeID is intended to be only used in `classof` helpers. Instead of checking it directly, use isa<> with the correct recipe type.
-
Nikita Popov authored
-
zhanghb97 authored
Based on PyAttribute and PyConcreteAttribute classes, this patch implements the bindings of Float Attribute, Integer Attribute and Bool Attribute subclasses. This patch also defines the `mlirFloatAttrDoubleGetChecked` C API which is bound with the `FloatAttr.get_typed` python method. Differential Revision: https://reviews.llvm.org/D88531
-