- Sep 11, 2020
-
-
Peter Collingbourne authored
An upcoming change to Scudo will change how we use the TLS slot in tsd_shared.h, which will be a little easier to deal with if we can remove the code path that calls pthread_getspecific and pthread_setspecific. The only known user of this code path is Fuchsia. We can't eliminate this code path by making Fuchsia use ELF TLS because although Fuchsia supports ELF TLS, it is not supported within libc itself. To address this, Roland McGrath on the Fuchsia team has proposed that Scudo will optionally call a platform-provided function to access a TLS slot reserved for Scudo. Android also has a reserved TLS slot, but the code that accesses the TLS slot lives in Scudo. We can eliminate some complexity and duplicated code by having Android use the same mechanism that was proposed for Fuchsia, which is what this change does. A separate change to Android implements it. Differential Revision: https://reviews.llvm.org/D87420
-
MaheshRavishankar authored
Differential Revision: https://reviews.llvm.org/D87307
-
Jonas Devlieghere authored
This fixes the following assertion in TestPlatformPython.py. Assertion failed: (id != 0 && "Forgot to add function to registry?")
-
Xing GUO authored
This patch adds support for dumping the .debug_ranges section to elf2yaml. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D87429
-
Zarko Todorovski authored
failures with -Werror on.
-
Reid Kleckner authored
-
Amara Emerson authored
With optimizations we leave the decision to eliminate fallthrough branches to bock placement, but at -O0 we should do it in the selector to save code size. This regressed -O0 with a recent change to a combiner.
-
Reid Kleckner authored
Halide users reported this here: https://llvm.org/pr46176 I reported the issue to MSVC here: https://developercommunity.visualstudio.com/content/problem/1179643/msvc-copies-overaligned-non-trivially-copyable-par.html This codepath is apparently not covered by LLVM's unit tests, so I added coverage in a unit test. If we want to support this configuration going forward, it means that is in general not safe to pass a SmallVector<T, N> by value if alignof(T) is greater than 4. This doesn't appear to come up often because passing a SmallVector by value is inefficient and not idiomatic: it copies the inline storage. In this case, the SmallVector<LLT,4> is captured by value by a lambda, and the lambda is passed by value into std::function, and that's how we hit the bug. Differential Revision: https://reviews.llvm.org/D87475
-
Peter Steinfeld authored
When we define a derived type that extends another derived type, we can then create a structure constructor that contains values for the fields of both the child type and its parent. The compiler's internal representation of that value contains the name of the parent type where a component name would normally appear. This caused an assert during contant folding. There are three cases for components that appear in structure constructors. The first is the normal case of a component appearing in a structure constructor for its type. The second is a component of the parent (or grandparent) type appearing in a structure constructor for the child type. The third is the parent type component, which can appear in the structure constructor of its child. There are also cases where the component can be arrays. I created the test case folding12.f90 that covers all of these cases and modified the code to handle them. Most of my changes were to th...
-
Fangrui Song authored
Why are they mutable? :)
-
Florian Hahn authored
The tests have been updated and I plan to move them from the MSSA directory up. Some end-to-end tests needed small adjustments. One difference to the legacy DSE is that legacy DSE also deletes trivially dead instructions that are unrelated to memory operations. Because MemorySSA-backed DSE just walks the MemorySSA, we only visit/check memory instructions. But removing unrelated dead instructions is not really DSE's job and other passes will clean up. One noteworthy change is in llvm/test/Transforms/Coroutines/ArgAddr.ll, but I think this comes down to legacy DSE not handling instructions that may throw correctly in that case. To cover this with MemorySSA-backed DSE, we need an update to llvm.coro.begin to treat it's return value to belong to the same underlying object as the passed pointer. There are some minor cases MemorySSA-backed DSE currently misses, e.g. related to atomic operations, but I think those can be implemented after the switch. This has been discussed on llvm-dev: http://lists.llvm.org/pipermail/llvm-dev/2020-August/144417.html For the MultiSource/SPEC2000/SPEC2006 the number of eliminated stores goes from ~17500 (legayc DSE) to ~26300 (MemorySSA-backed). More numbers and details in the thread on llvm-dev. Impact on CTMark: ``` Legacy Pass Manager exec instrs size-text O3 + 0.60% - 0.27% ReleaseThinLTO + 1.00% - 0.42% ReleaseLTO-g. + 0.77% - 0.33% RelThinLTO (link only) + 0.87% - 0.42% RelLO-g (link only) + 0.78% - 0.33% ``` http://llvm-compile-time-tracker.com/compare.php?from=3f22e96d95c71ded906c67067d75278efb0a2525&to=ae8be4642533ff03803967ee9d7017c0d73b0ee0&stat=instructions ``` New Pass Manager exec instrs. size-text O3 + 0.95% - 0.25% ReleaseThinLTO + 1.34% - 0.41% ReleaseLTO-g. + 1.71% - 0.35% RelThinLTO (link only) + 0.96% - 0.41% RelLO-g (link only) + 2.21% - 0.35% ``` http://195.201.131.214:8000/compare.php?from=3f22e96d95c71ded906c67067d75278efb0a2525&to=ae8be4642533ff03803967ee9d7017c0d73b0ee0&stat=instructions Reviewed By: asbirlea, xbolva00, nikic Differential Revision: https://reviews.llvm.org/D87163
-
Bryan Chan authored
DenseMap<SimpleValue> assumes that, if its isEqual method returns true for two elements, then its getHashValue method must return the same value for them. This invariant is broken when one SELECT node is a min/max operation, and the other can be transformed into an equivalent min/max by inverting its predicate and swapping its operands. This patch fixes an assertion failure that would occur intermittently while compiling the following IR: define i32 @t(i32 %i) { %cmp = icmp sle i32 0, %i %twin1 = select i1 %cmp, i32 %i, i32 0 %cmpinv = icmp sgt i32 0, %i %twin2 = select i1 %cmpinv, i32 0, i32 %i %sink = add i32 %twin1, %twin2 ret i32 %sink } Differential Revision: https://reviews.llvm.org/D86843 -
Siva Chandra Reddy authored
This makes SqrtLongDoubleX86.h includable by itself.
-
Lang Hames authored
Making MaterializationResponsibility instances immovable allows their associated VModuleKeys to be updated by the ExecutionSession while the responsibility is still in-flight. This will be used in the upcoming removable code feature to enable safe merging of resource keys even if there are active compiles using the keys being merged.
-
Nikita Popov authored
Add DemandedBits / BDCE support for min/max intrinsics: If the low bits are not demanded in the result, they also aren't demanded in the operands. Differential Revision: https://reviews.llvm.org/D87161
-
Nikita Popov authored
While the if only contains a single statement, it happens to be a huge switch. Add braces to make this code easier to read.
-
Nikita Popov authored
-
Nikita Popov authored
-
-
Yaxun (Sam) Liu authored
Currently AMDGPU does not support sanitizer. Disable sanitizer options for now until they are supported. Differential Revision: https://reviews.llvm.org/D87461
-
Siva Chandra Reddy authored
-
Anna Thomas authored
The PointerReg arg was passed into the dependence function for an assertion which no longer exists. So, this patch updates the dependence functions to avoid the PointerReg in the signature. Tests-Run: make check
-
Christopher Tetreault authored
Bail from maskIsAllZeroOrUndef and maskIsAllOneOrUndef prior to iterating over the number of elements for scalable vectors. Assert that the mask type is not scalable in possiblyDemandedEltsInMask . Assert that the types are correct in all three functions. Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D87424
-
Krzysztof Parzyszek authored
-
Federico Lebrón authored
Currently the global operator!=(bool, bool) is selected due to the implicit bool conversion operator. Since this is never the desired semantics, we give it a standard operator!= and make the bool conversion explicit. Depends On D86809 Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D86810
-
Nico Weber authored
-
Federico Lebrón authored
This allows Dialect to follow the MLIR style of nullable objects, and in fact is expected by `Dialect::operator bool() const` which already tests whether `def == nullptr`. This just wasn't a reachable situation, because the constructor was dereferencing the pointer unconditionally. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D86807
-
Federico Lebrón authored
Also make the behavior of getting a dialect more forgiving, in the case where there isn't a dialect associated with an attribute. Depends On D86807 Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D86809
-
Dominic Chen authored
Currently, using llvm-objdump to disassemble a function containing unreachable will trigger an assertion while decoding the opcode, since both unreachable and debug_unreachable have the same encoding. To avoid this, set unreachable as the canonical decoding. Differential Revision: https://reviews.llvm.org/D87431
-
Lang Hames authored
This reverts commit d9c8b025. Some MSVC std::packaged_task implementations are not compatible with move-only types. This caused failures on some of the Windows builders (e.g. http://lab.llvm.org:8011/builders/sanitizer-windows/builds/69412). Reverting until I can come up with a workaround.
-
Craig Topper authored
Previously we could match fcmp+select to a reduction if the fcmp had the nonans fast math flag. But if the select had the nonans fast math flag, InstCombine would turn it into a fminnum/fmaxnum intrinsic before SLP gets to it. Seems fairly likely that if one of the fcmp+select pair have the fast math flag, they both would. My plan is to start vectorizing the fmaxnum/fminnum version soon, but I wanted to get this code out as it had some of the strangest fast math flag behaviors.
-
Kamil Rytarowski authored
Sync with NetBSD 9.99.72.
-
Kamil Rytarowski authored
Sync with NetBSD 9.99.72.
-
Fangrui Song authored
PGOInstrumentation runs `SplitIndirectBrCriticalEdges` but some IndirectBrInst critical edge cannot be split. `getInstrBB` will crash when calling `SplitCriticalEdge`, e.g. int foo(char *p) { void *targets[2]; targets[0] = &&indirect; targets[1] = &&end; for (;; p++) if (*p == 7) { indirect: goto *targets[p[1]]; // the self loop is critical in -O } end: return 0; } Skip such critical edges to prevent a crash. Reviewed By: davidxl, lebedev.ri Differential Revision: https://reviews.llvm.org/D87435 -
Jordan Rupprecht authored
-
Lang Hames authored
This will allow non-copyable function objects (e.g. lambdas that capture unique_ptrs) to be used with ThreadPool. Differential Revision: https://reviews.llvm.org/D87467
-
Anna Thomas authored
This is the first in a series of patches to make implicit null checks more general. This patch identifies instructions that preserves zero value of a register and considers that as a valid instruction to hoist along with the faulting load. See added testcases. Reviewed-By: reames, dantrushin Differential Revision: https://reviews.llvm.org/D87108
-
Kamil Rytarowski authored
No functional change.
-
Kamil Rytarowski authored
Add dev/iscsi/iscsi_ioctl.h fallback ioctl(2) operations.
-
Sourabh Singh Tomar authored
This reverts commit f787c9a9, this was causing some build issues.
-