- Aug 27, 2021
-
-
Roman Lebedev authored
Latency for MULX isn't right
-
Yaron Keren authored
Since Visual Studio 2017 the DIA libs are not registered by default, see: https://docs.microsoft.com/en-us/visualstudio/extensibility/breaking-changes-2017?view=vs-2019#change-reduce-registry-impact LLDB building instruction already specify registering these DLLs, required both the LLVM PDB tests and LLDB build. Differential Revision: https://reviews.llvm.org/D108811
-
Balazs Benics authored
Not only global variables can hold references to dead stack variables. Consider this example: void write_stack_address_to(char **q) { char local; *q = &local; } void test_stack() { char *p; write_stack_address_to(&p); } The address of 'local' is assigned to 'p', which becomes a dangling pointer after 'write_stack_address_to()' returns. The StackAddrEscapeChecker was looking for bindings in the store which referred to variables of the popped stack frame, but it only considered global variables in this regard. This patch relaxes this, catching stack variable bindings as well. --- This patch also works for temporary objects like: struct Bar { const int &ref; explicit Bar(int y) : ref(y) { // Okay. } // End of the constructor call, `ref` is dangling now. Warning! }; void test() { Bar{33}; // Temporary object, so the corresponding memregion is // *not* a VarRegion. } --- The return value optimization aka. copy-elision might kick in but that is modeled by passing an imaginary CXXThisRegion which refers to the parent stack frame which is supposed to be the 'return slot'. Objects residing in the 'return slot' outlive the scope of the inner call, thus we should expect no warning about them - except if we explicitly disable copy-elision. Reviewed By: NoQ, martong Differential Revision: https://reviews.llvm.org/D107078 -
Sylvestre Ledru authored
-
Sylvestre Ledru authored
Currently, it is a bit buried in the file even if this is pretty important for distro. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D108533
-
Chuanqi Xu authored
-
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"...
-
Kirill Stoimenov authored
Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D108377
-