Commit Graph

414622 Commits

Author SHA1 Message Date
Yuanfang Chen f927021410 Reland "[clang-cl] Support the /JMC flag"
This relands commit b380a31de0.

Restrict the tests to Windows only since the flag symbol hash depends on
system-dependent path normalization.
2022-02-10 15:16:17 -08:00
Shilei Tian aca33b0b37 [OpenMP][CUDA] Remove the hard team limit
Currently we have a hard team limit, which is set to 65536. It says no matter whether the device can support more teams, or users set more teams, as long as it is larger than that hard limit, the final number to launch the kernel will always be that hard limit. It is way less than the actual hardware limit. For example, my workstation has GTX2080, and the hardware limit of grid size is 2147483647, which is exactly the largest number a `int32_t` can represent. There is no limitation mentioned in the spec. This patch simply removes it.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D119313
2022-02-10 18:07:46 -05:00
YASHASVI KHATAVKAR 93d1a623ce Reverting an entire stack of changes causing build failures 2022-02-10 17:58:22 -05:00
David Blaikie f3a2cfc103 DebugInfo: Don't simplify any template referencing a lambda
Lambda names aren't entirely canonical (as demonstrated by the
cross-project-test added here) at the moment (we should fix that for a
bunch of reasons) - even if the template referencing them is
non-simplified, other names referencing /that/ template can't be
simplified either because type units might cause a different template to
be picked up that would conflict with the expected name.

(other than for roundtripping precision, it'd be OK to simplify types
that reference types that reference lambdas - but best be consistent
between the roundtrip/verify mode and the actual simplified template
names mode)
2022-02-10 14:56:54 -08:00
LLVM GN Syncbot 37c02c14a4 [gn build] Port 290e5722e8 2022-02-10 22:52:25 +00:00
Stanislav Mekhanoshin 290e5722e8 [AMDGPU] Improve clobbering checks in the kernel argument promotion
Use same MSSA clobbering checks as in the AMDGPUAnnotateUniformValues.
Kernel argument promotion needs exactly the same information so factor
out utility function isClobberedInFunction.

Differential Revision: https://reviews.llvm.org/D119480
2022-02-10 14:51:47 -08:00
LLVM GN Syncbot 6dbae1f7d9 [gn build] Port b380a31de0 2022-02-10 22:24:30 +00:00
Roman Lebedev c94ec7997a
[NFC][SCEV] `createNodeForSelectOrPHIViaUMinSeq()`: use sub instead of add
For booleans, xor/add/sub are interchangeable:
https://alive2.llvm.org/ce/z/ziav3d

But for larger bitwidths, we'll need sub, so change it now.
2022-02-11 01:21:45 +03:00
Roman Lebedev c3e9e1ac48
[NFC][LSR] Harden lsr-expand-quadratic.ll against smarter SCEV
We can analyse that `select`, and after that
the test no longer does what it's supposed to.
2022-02-11 01:21:45 +03:00
Roman Lebedev c2bbf7637a
[NFC][CodeGen][X86] Autogenerate checklines in a test to simplify further updates 2022-02-11 01:21:45 +03:00
Roman Lebedev 9ff087598e
[NFC][CodeGen][PPC] Autogenerate checklines in a test to simplify further updates 2022-02-11 01:21:45 +03:00
Roman Lebedev 6ebd16a9ff
[NFC][LSR] Autogenerate checklines in a test to simplify further updates 2022-02-11 01:21:45 +03:00
Roman Lebedev 8df8b488e3
[NFC][SCEV] Autogenerate checklines in a test to simplify further updates 2022-02-11 01:21:45 +03:00
Nikolas Klauser 8df7ff48e1 [libc++] Add LWG-issues from february 2022 plenary meeting
Reviewed By: ldionne, Quuxplusone, Mordante, #libc

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D119443
2022-02-10 23:21:28 +01:00
Yuanfang Chen b380a31de0 Revert "[clang-cl] Support the /JMC flag"
This reverts commit bd3a1de683.

Break bots:
https://luci-milo.appspot.com/ui/p/fuchsia/builders/toolchain.ci/clang-windows-x64/b8822587673277278177/overview
2022-02-10 14:17:37 -08:00
Ye Luo 59ad9650cf [Libomptarget][AMDGCN] add gfx90c target
Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D119478
2022-02-10 15:55:44 -06:00
Reid Kleckner 64037afe01 [CodeView] Avoid integer overflow while parsing long version strings
This came up on a funny vendor-provided version string that didn't have
a standard dotted quad of numbers.
2022-02-10 13:52:11 -08:00
Shubham Sandeep Rastogi a18d06a0f8 Add support to dsymutil for dumping out new swift5 reflection sections
This change adds support for dsymutil to be able to dump out the new swift5 reflection sections called swift5_proto and swift5_protos. The test is also updated to check for this.

Differential Revision: https://reviews.llvm.org/D119310
2022-02-10 13:51:46 -08:00
Douglas Yung 98504fbb3d Make shtest-format.py CHECK lines more flexible
The test sometimes fails on Windows due to a warning emitted by bash about not
being able to find the /tmp directory causing this test to randomly fail. This
update makes the test more flexible to account for this possibility and should
hopefully make it more reliable.

Reviewed By: probinson

Differential Revision: https://reviews.llvm.org/D118691
2022-02-10 13:50:10 -08:00
Shubham Sandeep Rastogi 957b24ca9f Fix the build errors when enabling -DLLVM_ENABLE_MODULES=On and change e53e6ec6ef
Build Failure: https://green.lab.llvm.org/green/job/lldb-cmake/41267/

Differential Revision: https://reviews.llvm.org/D119473
2022-02-10 13:36:55 -08:00
Aart Bik 719b865be2 [mlir][sparse][pytaco] add SDDMM test with two different ways of defining kernel
Reviewed By: bixia

Differential Revision: https://reviews.llvm.org/D119465
2022-02-10 13:33:06 -08:00
Teresa Johnson dd3f483335 [ThinLTO][WPD] LICM set lookup (NFC)
Minor efficiency fix. There is no reason to perform the same set lookup
repeatedly in the inner loop as it is invariant there.

Differential Revision: https://reviews.llvm.org/D119474
2022-02-10 13:16:31 -08:00
Aaron Ballman e9e55acd1b Use functions with prototypes when appropriate; NFC
A significant number of our tests in C accidentally use functions
without prototypes. This patch converts the function signatures to have
a prototype for the situations where the test is not specific to K&R C
declarations. e.g.,

  void func();

becomes

  void func(void);

This is the seventh batch of tests being updated (there are a
significant number of other tests left to be updated).
2022-02-10 16:06:03 -05:00
David Green bb362d890f [AArch64] Add extra fptoint_sat tests for larger than legal types. NFC 2022-02-10 21:04:41 +00:00
Simon Pilgrim 1211c41805 [FileCheck] Fix initialized but never used static analyzer warning. NFC.
Remove superfluous variable initialization, the variable is assigned by both paths immediately afterward.
2022-02-10 21:03:45 +00:00
River Riddle faf42264e5 [PDLL] Add support for user defined constraint and rewrite functions
These functions allow for defining pattern fragments usable within the `match` and `rewrite` sections of a pattern. The main structure of Constraints and Rewrites functions are the same, and are similar to functions in other languages; they contain a signature (i.e. name, argument list, result list) and a body:

```pdll
// Constraint that takes a value as an input, and produces a value:
Constraint Cst(arg: Value) -> Value { ... }

// Constraint that returns multiple values:
Constraint Cst() -> (result1: Value, result2: ValueRange);
```

When returning multiple results, each result can be optionally be named (the result of a Constraint/Rewrite in the case of multiple results is a tuple).

These body of a Constraint/Rewrite functions can be specified in several ways:

* Externally
In this case we are importing an external function (registered by the user outside of PDLL):

```pdll
Constraint Foo(op: Op);
Rewrite Bar();
```

* In PDLL (using PDLL constructs)
In this case, the body is defined using PDLL constructs:

```pdll
Rewrite BuildFooOp() {
  // The result type of the Rewrite is inferred from the return.
  return op<my_dialect.foo>;
}
// Constraints/Rewrites can also implement a lambda/expression
// body for simple one line bodies.
Rewrite BuildFooOp() => op<my_dialect.foo>;
```

* In PDLL (using a native/C++ code block)
In this case the body is specified using a C++(or potentially other language at some point) code block. When building PDLL in AOT mode this will generate a native constraint/rewrite and register it with the PDL bytecode.

```pdll
Rewrite BuildFooOp() -> Op<my_dialect.foo> [{
  return rewriter.create<my_dialect::FooOp>(...);
}];
```

Differential Revision: https://reviews.llvm.org/D115836
2022-02-10 12:48:59 -08:00
River Riddle 3d8b906012 [PDLL] Add support for single line lambda-like patterns
This allows for defining simple patterns in a single line. The lambda
body of a Pattern expects a single operation rewrite statement:

```
Pattern => replace op<my_dialect.foo>(operands: ValueRange) with operands;
```

Differential Revision: https://reviews.llvm.org/D115835
2022-02-10 12:48:58 -08:00
Martin Storsjö 8cffea061a [libcxx] Silence -Wformat-nonliteral warnings in the Windows support code
This brings the mingw build back to zero build warnings as it was
at some earlier time.

Differential Revision: https://reviews.llvm.org/D119134
2022-02-10 22:44:51 +02:00
Simon Pilgrim 46359424bb [llvm-libtool-darwin] Use cast<> instead of dyn_cast<> to avoid dereference of nullptr
The pointer is dereferenced immediately, so assert the cast is correct instead of returning nullptr
2022-02-10 20:44:25 +00:00
Simon Pilgrim 6af7c1371a [LoopVectorize] getStepVector - reduce scope of local variable. NFC. 2022-02-10 20:44:25 +00:00
Nikolas Klauser dcffa7d3e1 [libc++] Prepare string.modifiers tests for constexpr
Reviewed By: ldionne, #libc

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D119329
2022-02-10 21:43:18 +01:00
Philip Reames e43b1ce4d5 [SCEV] Constify some uses of SCEVUnionPredicate* [NFC]
This exploits the immutability introduced in d334fec.
2022-02-10 12:42:19 -08:00
Huihui Zhang 19302cd7a4 [NFC] Simplify pairwise store test mir to drop stack accesses.
Test simplified:
 test/CodeGen/AArch64/stp-opt-with-renaming-undef-assert.mir
2022-02-10 12:40:32 -08:00
YASHASVI KHATAVKAR ac15cd7af6 Modified SourceLevelDebugging.rst to include information about memory location exp 2022-02-10 15:24:51 -05:00
YASHASVI KHATAVKAR e4f9d4a5ee updated local branch to incorporate latest changes 2022-02-10 15:24:51 -05:00
YASHASVI KHATAVKAR 0e7341b7b1 worked on review comments 2022-02-10 15:24:51 -05:00
YASHASVI KHATAVKAR c26a0d1cda Updated the test to include proper string get functions 2022-02-10 15:24:50 -05:00
YASHASVI KHATAVKAR 929499eb64 Updated the test to include addtional details 2022-02-10 15:24:50 -05:00
YASHASVI KHATAVKAR 99f990be64 Added StringLocationExp to the new apis 2022-02-10 15:24:50 -05:00
YASHASVI KHATAVKAR 2c5dfeed2f Addressed review comments 2022-02-10 15:24:50 -05:00
YASHASVI KHATAVKAR 43d421cda3 Adding DIBuilder interface for assumed length string 2022-02-10 15:24:50 -05:00
serge-sans-paille e72c195fdc Cleanup LLVMObject headers
Most notably,

llvm/Object/Binary.h no longer includes llvm/Support/MemoryBuffer.h
llvm/Object/MachOUniversal*.h no longer include llvm/Object/Archive.h
llvm/Object/TapiUniversal.h no longer includes llvm/Object/TapiFile.h

llvm-project preprocessed size:
before: 1068185081
after:  1068324320

Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup
Differential Revision: https://reviews.llvm.org/D119457
2022-02-10 21:13:44 +01:00
Louis Dionne 4ae83bb2b1 Update all LLVM documentation mentioning runtimes in LLVM_ENABLE_PROJECTS
We are moving away from building the runtimes with LLVM_ENABLE_PROJECTS,
however the documentation was largely outdated. This commit updates all
the documentation I could find to use LLVM_ENABLE_RUNTIMES instead of
LLVM_ENABLE_PROJECTS for building runtimes.

Note that in the near future, libcxx, libcxxabi and libunwind will stop
supporting being built with LLVM_ENABLE_PROJECTS altogether. I don't know
what the plans are for other runtimes like libc, openmp and compiler-rt,
so I didn't make any changes to the documentation that would imply
something for those projects.

Once this lands, I will also cherry-pick this on the release/14.x branch
to make sure that LLVM's documentation is up-to-date and reflects what
we intend to support in the future.

Differential Revision: https://reviews.llvm.org/D119351
2022-02-10 15:05:23 -05:00
Evgenii Stepanov eeb6be144f Sign-extend addresses in CompactRingBuffer.
Summary:
This is neccessary to support solaris/sparc9 where some userspace
addresses have all top bits set, as well as, potentially, kernel memory
on aarch64.

This change does not update the compiler side (HWASan IR pass) which
needs to be done separately for the affected targets.

Reviewers: ro, vitalybuka

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D91827
2022-02-10 11:59:15 -08:00
Johannes Doerfert dd75c0ea64 [Attributor][NFC] Expose new API in AAPointerInfo
New users might want to check bins without a load or store instruction
at hand. Since we use those instructions only to find the offset and
size of the access anyway, we can expose an offset and size interface
to the outside world as well.

This commit mainly moves code around and exposes a class (OffsetAndSize)
as well as a method forallInterferingAccesses in AAPointerInfo.

Differential Revision: https://reviews.llvm.org/D119249
2022-02-10 13:52:24 -06:00
Johannes Doerfert d1387a26a5 [Attributor][FIX] Reachability needs to account for readonly callees
The oversight caused us to ignore call sites that are effectively dead
when we computed reachability (or more precise the call edges of a
function). The problem is that loads in the readonly callee might depend
on stores prior to the callee. If we do not track the call edge we
mistakenly assumed the store before the call cannot reach the load.
The problem is nicely visible in:
  `llvm/test/Transforms/Attributor/ArgumentPromotion/basictest.ll`

Caused by D118673.

Fixes https://github.com/llvm/llvm-project/issues/53726
2022-02-10 13:52:24 -06:00
Johannes Doerfert e39b419312 [Attributor][FIX] Honor alloca address space in AAPrivatizablePtr
When we privatize a pointer (~argument promotion) we introduce new
private allocas as replacement. These need to be placed in the alloca
address space as later passes cannot properly deal with them otherwise.

Fixes https://github.com/llvm/llvm-project/issues/53725
2022-02-10 13:52:24 -06:00
Vitaly Buka 24b30ec1ea
[sanitizer] Try to enable test on Android
#53721 suggests that it should work after https://reviews.llvm.org/D119461
2022-02-10 11:51:29 -08:00
Krzysztof Drewniak 1ce314ce6b [MLIR][GPU][lld] Use LLD bundled in ROCm, removing workaround
Having clarified that executing the SerializeToHsaco pass can
depend on a ROCm installation, switch from calling lld as a library to
using the copy of lld guaranteed to be included in a ROCm install.

This removes the workaround introduced in D119277

Reviewed By: whchung

Differential Revision: https://reviews.llvm.org/D119463
2022-02-10 19:37:30 +00:00
Peter Klausler 82dbe82585 [flang] Refine pointer/target test for ASSOCIATED intrinsic
The second argument to the ASSOCIATED intrinsic must be a valid pointer
or target. The test for this property only checked the last symbol
in a data-reference, but any symbol in the reference with the
POINTER or TARGET attribute will do.

Differential Revision: https://reviews.llvm.org/D119450
2022-02-10 11:32:21 -08:00