- Apr 16, 2020
-
-
Richard Smith authored
Summary: Previously, we treated CXXUuidofExpr as quite a special case: it was the only kind of expression that could be a canonical template argument, it could be a constant lvalue base object, and so on. In addition, we represented the UUID value as a string, whose source form we did not preserve faithfully, and that we partially parsed in multiple different places. With this patch, we create an MSGuidDecl object to represent the implicit object of type 'struct _GUID' created by a UuidAttr. Each UuidAttr holds a pointer to its 'struct _GUID' and its original (as-written) UUID string. A non-value-dependent CXXUuidofExpr behaves like a DeclRefExpr denoting that MSGuidDecl object. We cache an APValue representation of the GUID on the MSGuidDecl and use it from constant evaluation where needed. This allows removing a lot of the special-case logic to handle these expressions. Unfortunately, many parts of Clang assume there are only a couple of interesting kinds of ValueDecl, so the total amount of special-case logic is not really reduced very much. This fixes a few bugs and issues: * PR38490: we now support reading from GUID objects returned from __uuidof during constant evaluation. * Our Itanium mangling for a non-instantiation-dependent template argument involving __uuidof no longer depends on which CXXUuidofExpr template argument we happened to see first. * We now predeclare ::_GUID, and permit use of __uuidof without any header inclusion, better matching MSVC's behavior. We do not predefine ::__s_GUID, though; that seems like a step too far. * Our IR representation for GUID constants now uses the correct IR type wherever possible. We will still fall back to using the {i32, i16, i16, [8 x i8]} layout if a definition of struct _GUID is not available. This is not ideal: in principle the two layouts could have different padding. Reviewers: rnk, jdoerfert Subscribers: arphaman, cfe-commits, aeubanks Tags: #clang Differential Revision: https://reviews.llvm.org/D78171 -
Craig Topper authored
This moves v32i16/v64i8 to a model consistent with how we treat integer types with avx1. This does change the ABI for types vXi16/vXi8 vectors larger than 512 bits to pass in multiple zmms instead of multiple ymms. We'd already hacked some code to make v64i8/v32i16 pass in zmm. Cost model is still a bit of a mess. In some place I tried to match existing behavior. But really we need to account for splitting and concating costs. Cost model for shuffles is especially pessimistic. Differential Revision: https://reviews.llvm.org/D76212
-
Louis Dionne authored
When running the tests through `lit` directly instead of through `check-cxx`, it is required to manually build the `cxx` (and often `cxx_experimental`) targets. Instead of having to do that manually, this commit adds a new target `check-cxx-deps` that does that for you.
-
Uday Bondhugula authored
This revision introduces a utility to unswitch affine.for/parallel loops by hoisting affine.if operations past surrounding affine.for/parallel. The hoisting works for both perfect/imperfect nests and in the presence of else blocks. The hoisting is currently to as outermost a level as possible. Uses a test pass to test the utility. Add convenience method Operation::getParentWithTrait<Trait>. Depends on D77487. Differential Revision: https://reviews.llvm.org/D77870
-
Fangrui Song authored
Since we are going to touch so many lines, do some other cleanups. Delete Inputs/map-file3.s and Inputs/map-file4.s which are tiny.
-
Kim Viggedal authored
Addresses post-commit review feedback from https://reviews.llvm.org/D70265
-
Huihui Zhang authored
clang/unittests/AST/ASTImporterFixtures.h:70:5: warning: suggest braces around initialization of subobject [-Wmissing-braces] ArgVector(), ArgVector{"-fdelayed-template-parsing"}, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { -
Matt Arsenault authored
Ideally types without a corresponding register class wouldn't reach here, but we're currently missing some (in particular a 192-bit class is missing).
-
Simon Pilgrim authored
Baseline for any change due to D75567
-
Dimitry Andric authored
Summary: Since a full run of test-release.sh takes many hours (at least on my poor systems), we might as well spend some extra time compressing the tarball, in return for a quite a bit of gains for uploading and downloading it. As an example, the 10.0.0-rc4 .tar.xz tarball shrinks from 465MiB to 306MiB, about 52% smaller. Reviewers: hans, tstellar, rovka Reviewed By: hans Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D76192
-
Dimitry Andric authored
Summary: Some of the regression tests, such as those for the various sanitizers, use huge shadow memory maps (showing up in top as 20 TiB). If any of those ever crashes, your test system's disk will be filled up until everything falls over. Set the ulimit for core dumps to 0 to prevent this problem. Reviewers: hans, tstellar, rovka Reviewed By: hans Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D76191
-
Louis Dionne authored
When building these tests without modules in the whole test suite, the __config_site macro definitions are not included anymore in the %{compile_flags}. This causes the _LIBCPP_HAS_NO_THREADS define not to be picked up, and the test to XPASS on single-threaded systems. This is a stop-gap measure to fix the build bots, however the proper solution would be to always pass the __config_site defines as compiler macros, whether we build with modules or not. -
-
Nico Weber authored
There's been some back and forth if the cfg paths in the config_map should be normcase()d. The argument for is that it allows using all-lower spelling in cmd on Windows, the argument against that doing so is lossy. Before the relative-paths-in-generated-lit.site.cfg.py work, there was no downside to calling normcase(), but with it we need a hack to recover the original case. This time, normcase() the hashtable key, but store the original cased key in addition to the value. This fixes both cons, at the cost of a few bytes more memory. Differential Revision: https://reviews.llvm.org/D78169
-
Sam McCall authored
Summary: Do line/col to byte conversions on the python side rather than relying on vim. Its calculations are off when text annotations are present: - https://github.com/vim/vim/issues/5930 - https://github.com/vim/vim/issues/3718 (fixed, but vim 8.1 is still common) Reviewers: hokein Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D78198
-
George Burgess IV authored
There are some inline builtin definitions that we can't emit (isTriviallyRecursive & callers go into why). Marking these nobuiltin is only useful if we actually emit the body, so don't mark these as such unless we _do_ plan on emitting that. This suboptimality was encountered in Linux (see some discussion on D71082, and https://github.com/ClangBuiltLinux/linux/issues/979). Differential Revision: https://reviews.llvm.org/D78162
-
Nico Weber authored
I believe this call is unneeded after https://reviews.llvm.org/D34855. Reviewed as part of https://reviews.llvm.org/D78169
-
Nikita Popov authored
MCExpr has a bunch of free space that is currently going to waste. Repurpose it as 24 bits of subclass data, which is enough to reduce the size of all subclasses by 8 bytes. This gives us some respectable savings for debuginfo builds. Here are the max-rss reductions for the fat LTO link step: kc.link 238MiB 231MiB (-2.82%) sqlite3.link 258MiB 250MiB (-3.27%) consumer-typeset.link 152MiB 148MiB (-2.51%) bullet.link 197MiB 192MiB (-2.30%) tramp3d-v4.link 578MiB 567MiB (-1.92%) pairlocalalign.link 92MiB 90MiB (-1.98%) clamscan.link 230MiB 223MiB (-2.81%) lencod.link 242MiB 235MiB (-2.67%) SPASS.link 235MiB 230MiB (-2.23%) 7zip-benchmark.link 450MiB 435MiB (-3.25%) Differential Revision: https://reviews.llvm.org/D77939 -
Craig Topper authored
-Consistently name the functions as split* -Add a helper for doing the two extractSubvector calls and determining the size of the split -Use getSplitDestVTs to get the result type for the split node. -Move the binary and unary helper to one place in the file near the extractSubvector functions. Left the VSETCC one near LowerVSETCC since that's its only caller. -Remove the 256/512 wrappers that just had asserts. I don't think they provided a lot of value and now with the routines called split* the call sites are more obvious what they do. -Make the unary routine support different source and dest types to support D76212. -Add some weaker asserts into the helpers to make up for losing the very specific asserts from the 256/512 wrappers. Differential Revision: https://reviews.llvm.org/D78176
-
Jonas Devlieghere authored
Script to replay reproducers in parallel using the command line driver. This is used for active replay (stage 1 as described in the RFC on lldb-dev [1]). [1] http://lists.llvm.org/pipermail/lldb-dev/2020-April/016100.html Differential revision: https://reviews.llvm.org/D77608
-
Sterling Augustine authored
-
Nico Weber authored
See also r267736.
-
Amara Emerson authored
We generally only combine starting from users to defs in the artifact combiner, but this doesn't catch cases where at the point of combining a G_UNMERGE we don't yet have the opposite G_MERGE on input yet since we haven't legalized that far. This change adds the users of a G_MERGE to the artifact combiner worklist if one of the uses is a G_UNMERGE or G_TRUNC. Differential Revision: https://reviews.llvm.org/D77931
-
Craig Topper authored
Reviewers: mtrofin, dblaikie Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D78182
-
Louis Dionne authored
Instead of using .sh.cpp tests for the modules tests, use .compile.pass.cpp and add the -fmodules additional flag.
-
Dominik Montada authored
This reverts commit bddac41b.
-
Louis Dionne authored
-
Louis Dionne authored
Avoid using <sys/types.h> in those tests so that we can run them on non-AIX systems (otherwise this test is basically dead-code on all the build bots I'm aware of). Also, split up the test to allow using .compile.pass.cpp tests instead of .sh.cpp tests, since that is the last test referencing the %{compile} substitution explicitly. -
Pierre Oechsel authored
Summary: ModelBuilder was missing an api to easily generate yield-for-loops. This diffs implements an interface allowing to write: ``` %2:2 = loop.for %i = %start to %end step %step iter_args(%arg0 = %init0, %arg1 = %init1) -> (f32, f32) { %sum = addf %arg0, %arg1 : f32 loop.yield %arg1, %sum : f32, f32 } %3 = addf %2#0, %2#1 : f32 ``` as ``` auto results = LoopNestBuilder(&i, start, end, step, {&arg0, &arg1}, {init0, init1})([&] { auto sum = arg0 + arg1; loop_yield(ArrayRef<ValueHandle>{arg1, sum}); }); // Add the two values accumulated by the yield-for-loop: ValueHandle(results[0]) + ValueHandle(results[1]); ``` Differential Revision: https://reviews.llvm.org/D78093 -
Louis Dionne authored
As a fly-by fix, improve/fix the comments explaining the tests. This is a step towards removing references to the %{compile} substitution. -
Louis Dionne authored
Instead of being ShTests that use clang-verify (and without the proper REQUIRES annotation), create .verify.cpp tests instead with the right REQUIRES annotation.
-
Nico Weber authored
-
- Apr 15, 2020
-
-
Vince Bridgers authored
Summary: This patch adds support for importing fixed point literals, following up to https://reviews.llvm.org/D46915 specifically for importing AST. Reviewers: martong, leonardchan, ebevhan, a.sidorin, shafik Reviewed By: martong Subscribers: balazske, rnkovacs, teemperor, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D77721
-
Dominik Montada authored
Summary: The combine for unmerge(cast(merge)) is only valid for vectors, but was missing a corresponding check. Add a check that the operands are vectors to avoid an invalid combine. Without this check, the combiner would emit incorrect code for scalars and pointers because the artifact cast (trunc/ext) only affects bits at the end of the type, while this combine assumes that the casted bits appear between meaningful bits. This also uncovered a segmentation fault in the AMDGPU InstructionSelector. The tests triggering this bug have been moved to their own file and a check for the segmentation fault has been added. Reviewers: arsenm, dsanders, aemerson, paquette, aditya_nandakumar Reviewed By: arsenm Subscribers: tpr, jvesely, wdng, nhaehnle, rovka, kerbowa, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D78191
-
Fangrui Song authored
Reviewed By: broadwaylamb, russell.gallop Differential Revision: https://reviews.llvm.org/D78153
-
Fangrui Song authored
GCC collect2 passes several options to the linker even if LTO is not used (note, lld does not support GCC LTO). The lto-wrapper may be a relative path (especially during development, when gcc is in a build directory), e.g. -plugin-opt=relative/path/to/lto-wrapper We need to ignore such options, which are currently interpreted by cl::ParseCommandLineOptions() and will fail with `error: --plugin-opt: ld.lld: Unknown command line argument 'relative/path/to/lto-wrapper'` because the path is apparently not an option registered by an `llvm::cl::opt`. See lto-plugin-ignore.s for how we interpret various -plugin-opt= options now. Reviewed By: grimar, tejohnson Differential Revision: https://reviews.llvm.org/D78158
-
Louis Dionne authored
By renaming .fail.cpp tests that don't need clang-verify to .compile.fail.cpp, the new test format will not try to compile these tests with clang-verify, and the old test format will work just the same. However, this allows removing a workaround that requires parsing each test looking for clang-verify markup. After this change, a .fail.cpp test should always have clang-verify markup. When clang-verify is not supported by the compiler, we will just check that these tests fail to compile. When clang-verify is supported, these tests will be compiled with clang-verify whether they have markup or not (so they should have markup, or they will fail). This simplifies the test suite and also ensures that all of our .fail.cpp tests provide clang-verify markup. If it's impossible for a test to have clang-verify markup, it can be moved to a .compile.fail.cpp test, which are unconditionally just checked for compilation failure.
-
Dominik Montada authored
Summary: As a follow up to https://reviews.llvm.org/D29014, add translation support for freeze. Introduce a new generic instruction G_FREEZE and translate freeze to it. Reviewers: dsanders, aqjune, arsenm, aditya_nandakumar, t.p.northover, lebedev.ri, paquette, aemerson Reviewed By: aqjune, arsenm Subscribers: fhahn, lebedev.ri, wdng, rovka, hiraditya, jfb, volkan, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77795
-
Hubert Tong authored
Summary: Update `latest_release` to reflect the release of Clang 10. Reviewed By: rsmith Differential Revision: https://reviews.llvm.org/D78172
-
Florian Hahn authored
Currently the alloca does not escape and all stores and the memset can be removed. Adding a use of the alloca ensures not all stores are eliminated.
-