- Aug 27, 2021
-
-
LLVM GN Syncbot authored
-
Lang Hames authored
This reapplies e256445b, which was reverted in 45ac5f54 due to bot errors (e.g. https://lab.llvm.org/buildbot/#/builders/112/builds/8599). The issue that caused the bot failure was fixed in 2e6a4fce.
-
Lang Hames authored
This should fix the bot error in https://lab.llvm.org/buildbot/#/builders/112/builds/8599 which forced reversion of the ELFNixPlatform in 45ac5f54. This should allow us to re-enable the ELFNixPlatform in a follow-up patch.
-
Matt Arsenault authored
-
Matt Arsenault authored
-
Matt Arsenault authored
In a future patch, a new set of amdgpu-no-* attributes will be introduced to indicate when a function does not need an implicitly passed input. This pass introduces new instances of these intrinsic calls, and should remove the attributes if they were present before.
-
Matt Arsenault authored
-
Chen Zheng authored
Reviewed By: jsji Differential Revision: https://reviews.llvm.org/D105271
-
Matt Arsenault authored
Switch to using BitIntegerState for each of the inputs, and invert their meanings. This now diverges more from the old AMDGPUAnnotateKernelFeatures, but this isn't used yet anyway.
-
Matt Arsenault authored
-
Matt Arsenault authored
The DAG version has this, and is necessary for call lowering to take advantage of any attributes at the call site.
-
Matt Arsenault authored
We only really want this to add the custom attributes. Theoretically the regular transforms were already run at this point. Touching undefined behavior breaks a lot of tests when this is enabled by default, many of which are expecting to test handling of undef operations.
-
George Rokos authored
[libomptarget][NFC] Replaced obsolete name "getOrAllocTgtPtr" with new "getTargetPointer" in debug messages.
-
Matt Arsenault authored
amdgpu-calls and amdgpu-stack-objects don't really belong as attributes, and are currently a hacky way of passing an analysis into the DAG. These don't really belong in the IR, and don't really fit in with the other attributes. Remove these to facilitate inverting the pass. I don't exactly understand the indirect call test changes. These tests are using calls which are trivially replacable with a direct call, so I'm not sure what the point is.
-
Matt Arsenault authored
We no longer use this intrinsic outside of the backend and no longer support using it outside of kernels.
-
Heejin Ahn authored
When doing Emscritpen EH, if SjLj is also enabled and used and if the thrown exception has a possiblity being a longjmp instead of an exception, we shouldn't swallow it; we should rethrow, or relay it. It was done in D106525 and the code is here: https://github.com/llvm/llvm-project/blob/8441a8eea8007b9eaaaabf76055949180a702d6d/llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp#L858-L898 Here is the pseudocode of that part: (copied from comments) ``` if (%__THREW__.val == 0 || %__THREW__.val == 1) goto %tail else goto %longjmp.rethrow longjmp.rethrow: ;; This is longjmp. Rethrow it %__threwValue.val = __threwValue emscripten_longjmp(%__THREW__.val, %__threwValue.val); tail: ;; Nothing happened or an exception is thrown ... Continue exception handling ... ``` If the current BB (where the `invoke` is created) has successors that has the current BB as its PHI incoming node, now that has to change to `tail` in the pseudocode, because `tail` is the latest BB that is connected with the next BB, but this was missing. Reviewed By: tlively Differential Revision: https://reviews.llvm.org/D108785
-
David Blaikie authored
-
Vitaly Buka authored
qsort can reuse qsort_r if available. bsearch always passes key as the first comparator argument, so we can use it to wrap the original comparator. Differential Revision: https://reviews.llvm.org/D108751
-
Matt Arsenault authored
This avoids spuriously breaking the test in a future change
-
Matt Arsenault authored
This was calling a regular C function from amdgpu_gfx, which isn't defined to have all of the necessary implicit arguments.
-
Jez Ng authored
-
Artem Belevich authored
-
Matt Arsenault authored
This was trying to insert the used marker into a declaration.
-
Jez Ng authored
This is what ld64 does. Deviating in behavior here can result in some subtle duplicate symbol errors, as detailed in the objc.s test. Differential Revision: https://reviews.llvm.org/D108781
-
Jez Ng authored
The previous logic was duplicated between symbol-initiated archive loads versus flag-initiated loads (i.e. `-force_load` and `-ObjC`). This resulted in code duplication as well as redundant work -- we would create Archive instances twice whenever we had one of those flags; once in `getArchiveMembers` and again when we constructed the ArchiveFile. This was motivated by an upcoming diff where we load archive members containing ObjC-related symbols before loading those containing ObjC-related sections, as well as before performing symbol resolution. Without this refactor, it would be difficult to do that while avoiding loading the same archive member twice. Differential Revision: https://reviews.llvm.org/D108780
-
Jez Ng authored
This was missed by {D107035}. This fix addresses the following warning: loop variable 'personality' has type 'const uint32_t &' (aka 'const unsigned int &') but is initialized with type 'const unsigned long long' resulting in a copy [-Wrange-loop-analysis] In addition to fixing the size, I also removed the const reference, since there's no performance benefit to avoiding copies of integer-sized values. -
Butygin authored
Differential Revision: https://reviews.llvm.org/D108516
-
Benson Chu authored
Clang currently picks the second tentative definition when VarDecl::getActingDefinition is called. This can lead to attributes being dropped if they are attached to tentative definitions that appear after the second one. This is because VarDecl::getActingDefinition loops through VarDecl::redecls assuming that the last tentative definition is the last element in the iterator. However, it is the second element that would be the last tentative definition. This changeset modifies getActingDefinition to iterate through the declaration chain in reverse, so that it can immediately return when it encounters a tentative definition. Originally the unit test for this changeset did not have a -triple flag for the clang invocation, leading to this test being broken on MacOS, since Mach-O does not support the section attribute. Differential Revision: https://reviews.llvm.org/D99732
-
Arthur Eubanks authored
Differential Revision: https://reviews.llvm.org/D108789
-
Yonghong Song authored
Generate btf_tag annotations for DILocalVariable. The annotations are represented as an DINodeArray in DebugInfo. Differential Revision: https://reviews.llvm.org/D106620
-
Fangrui Song authored
LLVM_ENABLE_NEW_PASS_MANAGER is set to ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER, so -DLLVM_ENABLE_NEW_PASS_MANAGER=off has no effect. Change the cache variable to LLVM_ENABLE_NEW_PASS_MANAGER instead. A user opting out the new PM needs to switch from -DENABLE_EXPERIMENTAL_NEW_PASS_MANAGER=off to -DLLVM_ENABLE_NEW_PASS_MANAGER=off. Also give a warning that -DLLVM_ENABLE_NEW_PASS_MANAGER=off is deprecated. Reviewed By: aeubanks, phosek Differential Revision: https://reviews.llvm.org/D108775
-
Yonghong Song authored
Generate btf_tag annotations for function parameters. A field "annotations" is introduced to DILocalVariable, and annotations are represented as an DINodeArray, similar to DIComposite elements. The following example illustrates how annotations are encoded in IR: distinct !DILocalVariable(name: "info",, arg: 1, ..., annotations: !10) !10 = !{!11, !12} !11 = !{!"btf_tag", !"a"} !12 = !{!"btf_tag", !"b"} Differential Revision: https://reviews.llvm.org/D106620 -
Artem Dergachev authored
The previous behavior was to deduplicate reports based on md5 of the html file. This algorithm might have worked originally but right now HTML reports contain information rich enough to make them virtually always distinct which breaks deduplication entirely. The new strategy is to (finally) take advantage of IssueHash - the stable report identifier provided by clang that is the same if and only if the reports are duplicates of each other. Additionally, scan-build no longer performs deduplication on its own. Instead, the report file name is now based on the issue hash, and clang instances will silently refuse to produce a new html file when a duplicate already exists. This eliminates the problem entirely. The '-analyzer-config stable-report-filename' option is deprecated because report filenames are no longer unstable. A new option is introduced, '-analyzer-config verbose-report-filename', to produce verbose file names that look similar to the old "stable" file names. The old option acts as an alias to the new option. Differential Revision: https://reviews.llvm.org/D105167
-
Kirill Stoimenov authored
Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D108377
-
Kirill Stoimenov authored
Looks like the NoRegister has some effect on the final code that is generated. My guess is that some optimization kicks in at the end? When I use -S to dump the assembly I get the correct version with 'shrq $3, %r8': movq %r9, %r8 shrq $3, %r8 movsbl 2147450880(%r8), %r8d But, when I disassemble the final binary I get RAX in stead of R8: mov %r9,%r8 shr $0x3,%rax movsbl 0x7fff8000(%r8),%r8d Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D108745 -
Rob Suderman authored
Needed to switch to extract to support tosa.reverse using dynamic shapes. Reviewed By: NatashaKnk Differential Revision: https://reviews.llvm.org/D108744
-
Alexey Bataev authored
Reworked reordering algorithm. Originally, the compiler just tried to detect the most common order in the reordarable nodes (loads, stores, extractelements,extractvalues) and then fully rebuilding the graph in the best order. This was not effecient, since it required an extra memory and time for building/rebuilding tree, double the use of the scheduling budget, which could lead to missing vectorization due to exausted scheduling resources. Patch provide 2-way approach for graph reodering problem. At first, all reordering is done in-place, it doe not required tree deleting/rebuilding, it just rotates the scalars/orders/reuses masks in the graph node. The first step (top-to bottom) rotates the whole graph, similarly to the previous implementation. Compiler counts the number of the most used orders of the graph nodes with the same vectorization factor and then rotates the subgraph with the given vectorization factor to the most used order, if it is not empty. Then repeats the same procedure for the subgraphs with the smaller vectorization factor. We can do this because we still need to reshuffle smaller subgraph when buildiong operands for the graph nodes with lasrger vectorization factor, we can rotate just subgraph, not the whole graph. The second step (bottom-to-top) scans through the leaves and tries to detect the users of the leaves which can be reordered. If the leaves can be reorder in the best fashion, they are reordered and their user too. It allows to remove double shuffles to the same ordering of the operands in many cases and just reorder the user operations instead. Plus, it moves the final shuffles closer to the top of the graph and in many cases allows to remove extra shuffle because the same procedure is repeated again and we can again merge some reordering masks and reorder user nodes instead of the operands. Also, patch improves cost model for gathering of loads, which improves x264 benchmark in some cases. Gives about +2% on AVX512 + LTO (more expected for AVX/AVX2) for {625,525}x264, +3% for 508.namd, improves most of other benchmarks. The compile and link time are almost the same, though in some cases it should be better (we're not doing an extra instruction scheduling anymore) + we may vectorize more code for the large basic blocks again because of saving scheduling budget. Differential Revision: https://reviews.llvm.org/D105020 -
Nikita Popov authored
If a clobbering call happens before all loads, that shouldn't block the transform.
-
Arthur Eubanks authored
-
Vitaly Buka authored
-