Commit Graph

351439 Commits

Author SHA1 Message Date
Jeremy Bruestle 9f3ab92ec8 [MLIR] Improve support for 0-dimensional Affine Maps.
Summary:
Modified AffineMap::get to remove support for the overload which allowed
an ArrayRef of AffineExpr but no context (and gathered the context from a
presumed first entry, resulting in bugs when there were 0 results).

Instead, we support only a ArrayRef and a context, and a version which
takes a single AffineExpr.

Additionally, removed some now needless case logic which previously
special cased which call to AffineMap::get to use.

Reviewers: flaub, bondhugula, rriddle!, nicolasvasilache, ftynse, ulysseB, mravishankar, antiagainst, aartbik

Subscribers: mehdi_amini, jpienaar, burmako, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, liufengdb, Joonsoo, bader, grosul1, frgossen, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D78226
2020-04-15 14:15:02 -07:00
Roman Lebedev 639b8da8dc
[Attributor] KindToAbstractAttributeMap: use SmallDenseMap
Summary:
While this is less efficient to allocate huge `SmallDenseMap` for each `IRPosition` in `AAMap`,
in the larger picture this is much better, since we'd eventually either fill each `IRPosition`,
with each possible attribute, or at least quert for it, which would allocate it anyway.
So we are better off pre-allocating.

Old:
```
   0.3460 ( 40.7%)   0.0183 ( 33.9%)   0.3643 ( 40.3%)   0.3644 ( 40.3%)  Deduce and propagate attributes (CGSCC pass)
   0.1135 ( 13.4%)   0.0080 ( 14.7%)   0.1215 ( 13.4%)   0.1215 ( 13.4%)  Deduce and propagate attributes
```
```
total runtime: 19.48s.
bytes allocated in total (ignoring deallocations): 575.02MB (29.51MB/s)
calls to allocation functions: 908876 (46644/s)
temporary memory allocations: 276654 (14198/s)
peak heap memory consumption: 26.68MB
peak RSS (including heaptrack overhead): 944.78MB
total memory leaked: 8.85MB
```
New:
```
   0.3223 ( 38.1%)   0.0299 ( 53.6%)   0.3522 ( 39.1%)   0.3522 ( 39.1%)  Deduce and propagate attributes (CGSCC pass)
   0.1150 ( 13.6%)   0.0037 (  6.7%)   0.1188 ( 13.2%)   0.1188 ( 13.2%)  Deduce and propagate attributes
```
```
total runtime: 19.06s.
bytes allocated in total (ignoring deallocations): 363.21MB (19.06MB/s)
calls to allocation functions: 679660 (35658/s)
temporary memory allocations: 83472 (4379/s)
peak heap memory consumption: 27.00MB
peak RSS (including heaptrack overhead): 931.66MB
total memory leaked: 8.85MB
```

Diff:
```
total runtime: -0.42s.
bytes allocated in total (ignoring deallocations): -211.81MB (498.38MB/s)
calls to allocation functions: -229216 (539331/s)
temporary memory allocations: -193182 (454545/s)
peak heap memory consumption: 321.54KB
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B
```

Reviewers: jdoerfert, sstefan1, uenoku

Reviewed By: jdoerfert

Subscribers: uenoku, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D78231
2020-04-16 00:12:45 +03:00
Roman Lebedev f54dc12e46
[MustExecute] checkForAllContext(): use pre-increment
Summary:
You'd think there is no difference, but this halves (yikes!) compiler memory usage
on `test-suite/MultiSource/Applications/SPASS/top.c` test,
because `MustBeExecutedIterator operator++()` is, well, post-increment,
it must create a duplicate of existing `MustBeExecutedIterator`,
which involves duplicating `VisitedSetTy Visited` which is `DenseSet`..

Old
```
   0.3573 ( 42.9%)   0.0264 ( 33.7%)   0.3837 ( 42.1%)   0.3837 ( 42.1%)  Deduce and propagate attributes (CGSCC pass)
   0.1011 ( 12.1%)   0.0199 ( 25.4%)   0.1210 ( 13.3%)   0.1210 ( 13.3%)  Deduce and propagate attributes
```
```
total runtime: 20.04s.
bytes allocated in total (ignoring deallocations): 1.09GB (54.63MB/s)
calls to allocation functions: 1142410 (57020/s)
temporary memory allocations: 500538 (24983/s)
peak heap memory consumption: 26.68MB
peak RSS (including heaptrack overhead): 944.85MB
total memory leaked: 8.85MB
```
New:
```
   0.3309 ( 39.8%)   0.0164 ( 33.3%)   0.3473 ( 39.5%)   0.3473 ( 39.5%)  Deduce and propagate attributes (CGSCC pass)
   0.1152 ( 13.9%)   0.0076 ( 15.5%)   0.1229 ( 14.0%)   0.1229 ( 14.0%)  Deduce and propagate attributes
```
```
total runtime: 19.49s.
bytes allocated in total (ignoring deallocations): 575.07MB (29.51MB/s)
calls to allocation functions: 909059 (46651/s)
temporary memory allocations: 276923 (14211/s)
peak heap memory consumption: 26.68MB
peak RSS (including heaptrack overhead): 942.90MB
total memory leaked: 8.85MB
```
Diff:
```
total runtime: -0.55s.
bytes allocated in total (ignoring deallocations): -519.41MB (946.11MB/s)
calls to allocation functions: -233351 (425047/s)
temporary memory allocations: -223615 (407313/s)
peak heap memory consumption: 0B
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B
```

Reviewers: jdoerfert

Reviewed By: jdoerfert

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D78225
2020-04-16 00:12:17 +03:00
Francesco Petrogalli 89680f25e8 [llvm][CodeGen] Rename SVE gather prefetch intrinsics. [NFC]
Summary:
The renaming is necessary to make the naming scheme uniform with other
gather/scatter load/stores SVE intrinsics.

The naming of variables and functions have been adapted to make it
explicit whether we are dealing with a scalar offset (which is
unscaled) or an index (which is scaled according to the data type of
the lanes of the vector).

Reviewers: andwar, sdesmalen, rengolin

Reviewed By: andwar

Subscribers: tschuett, hiraditya, arphaman, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77839
2020-04-15 21:49:16 +01:00
Jonas Devlieghere 1349ca4359 [lldb/Docs] Split testing in running and debugging
Separate running the tests from debugging the test. This is preparatory
for a new section coming soon.
2020-04-15 13:48:58 -07:00
Nemanja Ivanovic c196e2ca48 [PowerPC] Clear the set of symbols that need to be updated in MCTargetStreamer
We have added code to correct the .localentry values on assignments. However, we
never clear the set so presumably it will still contain the (now dangling)
MCSymbol pointers across a call to finish() and reset() in the streamer.

This is based on my speculation that it is the reason we are getting
segmentation faults mentioned in https://bugs.llvm.org/show_bug.cgi?id=45366

Fixes: https://bugs.llvm.org/show_bug.cgi?id=45366

Differential revision: https://reviews.llvm.org/D78196
2020-04-15 15:42:02 -05:00
Nate Voorhies 0b21f15e14 [NFC] Correcting minor typo.
Summary: Hande -> Handle

Reviewers: xazax.hun

Reviewed By: xazax.hun

Subscribers: rnkovacs, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D78233
2020-04-15 13:36:22 -07:00
Richard Smith 30853cd689 Attempt to fix build with MSVC.
MSVC appears to instantiate the virtual members of FoldingSet when
instantiating the class definition, thereby requiring the element type
to be defined so that its hash function is known.

This is intended to be a temporary fix; ideally, FoldingSet should not
require this.
2020-04-15 13:28:24 -07:00
Richard Smith 57acbaece1 Improve diagnostic when constant-evaluating a std::initializer_list with
an unexpected form.
2020-04-15 13:28:24 -07:00
Craig Topper 592d8e7d75 [CallSite removal][SimpleLoopUnswitch] Use CallBase instead of CallSite. NFC
Differential Revision: https://reviews.llvm.org/D78227
2020-04-15 13:25:02 -07:00
Sam Kerner 10070e31a5 Fix DataFlowSanitizer implementation of strchr() so that strchr(..., '\0') returns a pointer to '\0'.
Summary:

Fixes https://bugs.llvm.org/show_bug.cgi?id=22392

Reviewers: pcc, morehouse

Reviewed By: morehouse

Subscribers: morehouse, #sanitizers

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D77996
2020-04-15 13:08:47 -07:00
Ismail Pazarbasi f1f37b7f01 [pstl] Added missing double-underscore prefixes to some types
Summary:
Some of the `move_` types were used with leading double-underscores, but
they were declared without `__` prefix.

This patch adds double-underscores to all `move_` types, and their uses.

Reviewers: MikeDvorskiy, ldionne, EricWF, rodgert, #libc

Reviewed By: MikeDvorskiy, ldionne, #libc

Subscribers: dexonsmith, libcxx-commits

Tags: #libc

Differential Revision: https://reviews.llvm.org/D78040
2020-04-15 22:06:58 +02:00
Eli Friedman 7c10541e56 [SelectionDAG] Fix usage of Align constructing MachineMemOperands.
The "Align" passed into getMachineMemOperand etc. is the alignment of
the MachinePointerInfo, not the alignment of the memory operation.
(getAlign() on a MachineMemOperand automatically reduces the alignment
to account for this.)

We were passing on wrong (overconservative) alignment in a bunch of
places. Fix a bunch of these, mostly in legalization.  And while I'm
here, switch to the new Align APIs.

The test changes are all scheduling changes: the biggest effect of
preserving large alignments is that it improves alias analysis, so the
scheduler has more freedom.

(I was originally just trying to do a minor cleanup in
SelectionDAGBuilder, but I accidentally went deeper down the rabbit
hole.)

Differential Revision: https://reviews.llvm.org/D77687
2020-04-15 13:01:41 -07:00
Melanie Blower 2ba4e3a459 Move BinaryOperators.FPOptions to trailing storage
Reviewers: rjmccall

Differential Revision: https://reviews.llvm.org/D76384
2020-04-15 12:57:31 -07:00
Jan Korous 14d89bfbe0 [ASTMatchers] Fix isDerivedFrom for recursive templates
Differential Revision: https://reviews.llvm.org/D77612
2020-04-15 12:49:01 -07:00
Craig Topper 7b6ff8bf1f [CallSite removal][SampleProfile] Use CallBase instead of CallSite. NFC
Differential Revision: https://reviews.llvm.org/D78219
2020-04-15 12:47:17 -07:00
Haojian Wu 6a78c55e3a [clangd] Fix a crash for accessing a null field decl returned by findExplicitReferences.
Reviewers: sammccall

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D78181
2020-04-15 21:42:27 +02:00
Louis Dionne e98c2733d2 [libc++] Remove the ability to run using the internal Lit shell
The new format requires using an external shell, and as we transition
and we can simplify config.py as we transition to the new format. Also,
frankly, I'd be quite surprised if that setting was still working anyway
because we have several .sh.cpp tests that likely don't work in Lit's
internal shell.
2020-04-15 15:37:41 -04:00
Sam Clegg 2a68573a35 Enable finding bitcode in wasm objects
This commit fixes using functions in `IRObjectFile` to load bitcode from
wasm objects by recognizing the file magic for wasm and also inheriting
the default implementation of classifying sections as bitcode.

Patch By: alexcrichton

Differential Revision: https://reviews.llvm.org/D78199
2020-04-15 12:33:33 -07:00
Davide Italiano 5f87415efc [LICM] Try to merge debug locations when sinking.
The current strategy LICM uses when sinking for debuginfo is
that of picking the debug location of one of the uses.
This causes stepping to be wrong sometimes, see, e.g. PR45523.

This patch introduces a generalization of getMergedLocation(),
that operates on a vector of locations instead of two, and try
to merge all them together, and use the new API in LICM.

<rdar://problem/61750950>
2020-04-15 12:29:34 -07:00
Pavel Iliin b2dff0dbea [AArch64][NFC]Autogenerated checks. 2020-04-15 20:25:00 +01:00
Richard Smith bab6df86ae Rework how UuidAttr, CXXUuidofExpr, and GUID template arguments and constants are represented.
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
2020-04-15 12:20:42 -07:00
Craig Topper 8dfb9627b7 [X86] Make v32i16/v64i8 legal types without avx512bw. Use custom splitting instead.
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
2020-04-15 12:17:18 -07:00
Louis Dionne 3fbc9c7b51 [libc++] Add a new target check-cxx-deps to build dependencies of the test suite
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.
2020-04-15 15:11:27 -04:00
Uday Bondhugula af5e83f569 [MLIR] Introduce utility to hoist affine if/else conditions
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
2020-04-16 00:32:34 +05:30
Fangrui Song cece7af586 [ELF][test] Add --match-full-lines to map-file.s to check leading and trailing spaces
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.
2020-04-15 11:49:52 -07:00
Kim Viggedal b2d8c89ea4 Remove false positive in AvoidNonConstGlobalVariables.
Addresses post-commit review feedback from https://reviews.llvm.org/D70265
2020-04-15 14:48:06 -04:00
Huihui Zhang 25db295756 [NFC] Silence compiler warning [-Wmissing-braces].
clang/unittests/AST/ASTImporterFixtures.h:70:5: warning: suggest braces around initialization of subobject [-Wmissing-braces]
    ArgVector(), ArgVector{"-fdelayed-template-parsing"},
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    {
2020-04-15 11:46:05 -07:00
Matt Arsenault 588bd7be36 AMDGPU/GlobalISel: Work around a selector crash
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).
2020-04-15 14:38:50 -04:00
Simon Pilgrim 2bcbf1319e [X86] Add generic cpu target for the slow division tests
Baseline for any change due to D75567
2020-04-15 19:38:29 +01:00
Dimitry Andric 7fb79105fe Use maximum compression when packaging release tarballs.
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
2020-04-15 20:30:26 +02:00
Dimitry Andric 9daadcec81 Turn off core dumps before starting the main body of test-release.sh.
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
2020-04-15 20:29:40 +02:00
Louis Dionne 91f110f50e [libc++] Adjust XFAIL markup for modules tests on single-threaded systems
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.
2020-04-15 14:28:07 -04:00
Jon Roelofs 6c9d52885d Add FileCheck colons missed in D76210
https://reviews.llvm.org/D76210#inline-715185
2020-04-15 12:26:53 -06:00
Nico Weber bc3f54de18 [lit] Keep original cfg file case around.
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
2020-04-15 14:18:11 -04:00
Sam McCall 591be7ec50 [Format] Work around current vim bugs in clang-format.py
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
2020-04-15 20:11:14 +02:00
George Burgess IV 2dd17ff081 [CodeGen] only add nobuiltin to inline builtins if we'll emit them
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
2020-04-15 11:05:22 -07:00
Nico Weber f42baaab4f Remove an apparently unneeded normcase() call.
I believe this call is unneeded after https://reviews.llvm.org/D34855.

Reviewed as part of https://reviews.llvm.org/D78169
2020-04-15 14:02:48 -04:00
Nikita Popov 8e7d771cf9 [MC] Use subclass data for MCExpr to reduce memory usage
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
2020-04-15 20:02:11 +02:00
Craig Topper a916e81927 [X86] Various improvements to our vector splitting helpers for lowering. NFC
-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
2020-04-15 10:57:53 -07:00
Jonas Devlieghere 7ce1a93efd [lldb/Scripts] Add script to replay multiple reproducers
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
2020-04-15 10:55:41 -07:00
Sterling Augustine bf94c96007 Write ignored output to stdout, so this test runs on read-only filesystems. 2020-04-15 10:45:14 -07:00
Nico Weber 99e4061bd8 Try to fix clang-tidy/infrastructure/config-files.cpp on Win after cb1ee34e9d.
See also r267736.
2020-04-15 13:38:03 -04:00
Amara Emerson c22cb5bd31 [GlobalISel] Enable artifact combiner to combine starting from a G_MERGE_VALUES.
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
2020-04-15 10:34:13 -07:00
Craig Topper a0d92248ea [CallSite removal][PruneEH] Use CallBase instead of CallSite. NFC
Reviewers: mtrofin, dblaikie

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D78182
2020-04-15 10:11:41 -07:00
Louis Dionne e87c46b162 [libc++] Remove the need for the %{build_module} substitution
Instead of using .sh.cpp tests for the modules tests, use .compile.pass.cpp
and add the -fmodules additional flag.
2020-04-15 13:01:26 -04:00
Dominik Montada 1265899c5f Revert "[GlobalISel] Fix invalid combine of unmerge(merge) with intermediate cast"
This reverts commit bddac41b9f.
2020-04-15 18:47:39 +02:00
Louis Dionne 2bed2facdb [libc++] NFC: Remove the %{compile} substitution, which is not used anymore 2020-04-15 12:43:35 -04:00
Louis Dionne 40515b19b0 [libc++] Split up tests for <stdint.h> on AIX and make them AIX-independent
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.
2020-04-15 12:43:35 -04:00
Pierre Oechsel efcf0985ee [mlir] [EDSC] Add interface for yield-for loops.
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
2020-04-15 18:39:30 +02:00