- Apr 04, 2021
-
-
Craig Topper authored
As long as it's a constant we can directly pattern match it without any problems. It's only when it isn't a constant that we need to add an AND. In theory this should allow more target independent optimizations to remain active.
-
Timm Bäder authored
Set the source ranges for parsed GNU-style attributes in ParseGNUAttributes(), the same way that ParseCXX11Attributes() does it. Differential Revision: https://reviews.llvm.org/D75844
-
Juneyoung Lee authored
This patch fixes llvm.org/pr49688 by conditionally folding select i1 into and/or: ``` select cond, cond2, false -> and cond, cond2 ``` This is not safe if cond2 is poison whereas cond isn’t. Unconditionally disabling this transformation affects later pipelines that depend on and/or i1s. To minimize its impact, this patch conservatively checks whether cond2 is an instruction that creates a poison or its operand creates a poison. This approach is similar to what InstSimplify's SimplifyWithOpReplaced is doing. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D99674
-
Juneyoung Lee authored
This is to fix https://reviews.llvm.org/D93990#2666922
-
Juneyoung Lee authored
This is going to be fixed by D99674
-
Juneyoung Lee authored
-
Thomas Preud'homme authored
Commit f495de43 forgot two lines when removing checks for strong and weak equality, resulting in the use of an undefined FileCheck variable. Reviewed By: Quuxplusone Differential Revision: https://reviews.llvm.org/D99838
-
David Blaikie authored
-
David Blaikie authored
-
David Blaikie authored
-
David Blaikie authored
-
Mircea Trofin authored
This was prompted by D95727, which had the side-effect to break the 'release' mode build bot for ML-driven policies. The problem is that now the pre-compiled object files don't get transitively carried through as 'source' anymore; that being said, the previous way of consuming them was problematic, because it was only working for static builds; in dynamic builds, the whole tf_xla_runtime was linked, which is undesirable. The alternative is to treat tf_xla_runtime as an archive, which then leads to the desired effect. Differential Revision: https://reviews.llvm.org/D99829
-
Roman Lebedev authored
At least on all three Zen's, all such instructions cleanly map into this new class with no overrides needed.
-
Craig Topper authored
-
Philip Reames authored
New pass manager and old pass manager appear to differ on whether declarations are included in SCCs. For some reason, which you get appears to depend on build configuration.
-
- Apr 03, 2021
-
-
Jez Ng authored
-
Jez Ng authored
Summary: Follow-up to D99633.
-
Nico Weber authored
This reverts commit eabd55b1. Speculative, for crbug.com/1195545
-
Nikita Popov authored
This is a followup to D98145: As far as I know, tracking of kill flags in FastISel is just a compile-time optimization. However, I'm not actually seeing any compile-time regression when removing the tracking. This probably used to be more important in the past, before FastRA was switched to allocate instructions in reverse order, which means that it discovers kills as a matter of course. As such, the kill tracking doesn't really seem to serve a purpose anymore, and just adds additional complexity and potential for errors. This patch removes it entirely. The primary changes are dropping the hasTrivialKill() method and removing the kill arguments from the emitFast methods. The rest is mechanical fixup. Differential Revision: https://reviews.llvm.org/D98294
-
Christian Sigg authored
NDEBUG builds currently warn because it's only used inside an assert. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D99721
-
Nikita Popov authored
Test the case where the type size doesn't equal the store size, as suggested by bjope.
-
Simon Pilgrim authored
Fixes PR47603 This should probably be transferable to DAGCombine - the main limitation with the existing trunc(logicop) DAG fold is we don't know if legalization has tried to promote truncated logicops already. We might be able to peek through extensions as well.
-
Simon Pilgrim authored
-
Simon Pilgrim authored
Use the getTargetShuffleInputs helper for all shuffle decoding Reapplied (after reversion in rGfa0aff6d) with fix+test for subvector splitting - we weren't accounting for peeking through bitcasts changing the vector element count of the shuffle sources.
-
Bjorn Pettersson authored
Started to see build errors like this ../lib/Support/Z3Solver.cpp:19:10: fatal error: 'z3.h' file not found #include <z3.h> ^~~~~~ 1 error generated. after commit 43ceb74e. The -isystem path to the Z3_INCLUDE_DIR wen't missing in the compile commands. No idea why target_include_directories stopped working with that commit, but using include_directories seem to work better. -
Nikita Popov authored
InstCombine performs simple forwarding from stores to loads, but currently only handles the case where the load and store have the same size. This extends it to also handle a store of a constant with a larger size followed by a load with a smaller size. This is implemented through ConstantFoldLoadThroughBitcast() which is fairly primitive (e.g. does not allow storing a large integer and then loading a small one), but at least can forward the first element of a vector store. Unfortunately it seems that we currently don't have a generic helper for "read a constant value as a different type", it's all tangled up with other logic in either ConstantFolding or VNCoercion. Differential Revision: https://reviews.llvm.org/D98114
-
Nikita Popov authored
The AAMDNodes part of the MemoryLocation is not used by the BasicAA cache, so don't store it. This reduces the size of each cache entry from 112 bytes to 48 bytes.
-
Nikita Popov authored
BasicAA itself doesn't make use of AA metadata, but passes it through to recursive queries and makes it part of the cache key. Aliasing decisions that are based on AA metadata (i.e. TBAA and ScopedAA) are based *only* on AA metadata, so checking them with different pointer values or sizes is not useful, the result will always be the same. While this change is a mild compile-time improvement by itself, the actual goal here is to reduce the size of AA cache keys in a followup change. Differential Revision: https://reviews.llvm.org/D90098
-
Thomas Preud'homme authored
Reviewed By: xur Differential Revision: https://reviews.llvm.org/D99821
-
Craig Topper authored
These all pass 1 type to getIntrinsic. So rather than assigning IntrinsicTypes for each builtin which invokes the SmallVector constructor, just select the intrinsic ID with a switch and share a single assignment of IntrinsicTypes.
-
David Blaikie authored
-
Matheus Izvekov authored
Differential Revision: https://reviews.llvm.org/D99826
-
Fangrui Song authored
-
Craig Topper authored
Shows the sext.w at the end that would show up in C code. I'm thinking orc.b would preserve sign bits from it's input, but I'm not sure.
-
Nico Weber authored
Mostly just works already.
-
Jez Ng authored
The main challenge was handling the different on-disk structures (e.g. `mach_header` vs `mach_header_64`). I tried to strike a balance between sprinkling `target->wordSize == 8` checks everywhere (branchy = slow, and ugly) and templatizing everything (causes code bloat, also ugly). I think I struck a decent balance by judicious use of type erasure. Note that LLD-ELF has a similar architecture, though it seems to use more templating. Linking chromium_framework takes about the same time before and after this change: N Min Max Median Avg Stddev x 20 4.52 4.67 4.595 4.5945 0.044423204 + 20 4.5 4.71 4.575 4.582 0.056344803 No difference proven at 95.0% confidence Reviewed By: #lld-macho, oontvoo Differential Revision: https://reviews.llvm.org/D99633 -
Nico Weber authored
-
Nico Weber authored
This reverts commit 9be8f8b3. This breaks tsan on Ubuntu 16.04: $ cat tiny_race.c #include <pthread.h> int Global; void *Thread1(void *x) { Global = 42; return x; } int main() { pthread_t t; pthread_create(&t, NULL, Thread1, NULL); Global = 43; pthread_join(t, NULL); return Global; } $ out/gn/bin/clang -fsanitize=thread -g -O1 tiny_race.c --sysroot ~/src/chrome/src/build/linux/debian_sid_amd64-sysroot/ $ docker run -v $PWD:/foo ubuntu:xenial /foo/a.out FATAL: ThreadSanitizer CHECK failed: ../../compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp:447 "((thr_beg)) >= ((tls_addr))" (0x7fddd76beb80, 0xfffffffffffff980) #0 <null> <null> (a.out+0x4960b6) #1 <null> <null> (a.out+0x4b677f) #2 <null> <null> (a.out+0x49cf94) #3 <null> <null> (a.out+0x499bd2) #4 <null> <null> (a.out+0x42aaf1) #5 <null> <null> (libpthread.so.0+0x76b9) #6 <null> <null> (libc.so.6+0x1074dc) (Get the sysroot from here: https://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/500976182686961e34974ea7bdc0a21fca32be06/debian_sid_amd64_sysroot.tar.xz) Also reverts follow-on commits: This reverts commit 58c62fd9. This reverts commit 31e541e3.
-
Jinsong Ji authored
The case start to fail since https://reviews.llvm.org/D99351. Looks like to me that the node order within Context Profile Tree depends on the implmementation of std::hash<std::string>. Unfortunately, the current clang implementation generate different values on AIX (or for all big-endian systems?) On Linux: main: 2408804140(0x8f936f2c) external: 896680882(0x357243b2) externalA: 620231129(0x24f7f9d9) On AIX: main: 994322777(0x3b442959) external: 3548191215(0xd37d19ef) externalA: 1390365101(0x52df49ad) XFAIL it first while we discuss and seek for a fix. Reviewed By: wenlei Differential Revision: https://reviews.llvm.org/D99815
-
Muhammad Omair Javaid authored
This increases sleep time to 5 seconds as the test still fails intermittently. If failure persists then we will disable/fix the test.
-