- Sep 08, 2021
-
-
Yuanfang Chen authored
- `this` used in lambda expression parameter declarations needs no capture. - Set up CXXThisOverride for default template arguments of a lambda. A similar fix to this is c3d2ebb6. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D102531
-
Yuanfang Chen authored
This is to make sure the pass is not skipped at O0 where optnone is applied to functions by default.
-
Philip Reames authored
The basic problem being solved is that we largely give up when encountering a trip count involving an IV which is not an addrec. We will fall back to the brute force constant eval, but that doesn't have the information about the fact that we can't cycle back through the same set of values. There's a high level design question of whether this is the right place to handle this, and if not, where that place is. The major alternative here would be to return a conservative upper bound, and then rely on two invocations of indvars to add the facts to the narrow IV, and then reconstruct SCEV. (I have not implemented the alternative and am not 100% sure this would work out.) That's arguably more in line with existing code, but I find this substantially easier to reason about. During review, no one expressed a strong opinion, so we went with this one. Differential Revision: D108651
-
David Green authored
-
Heejin Ahn authored
Both Wasm & Emscripten SjLj handling has a restriction that `setjmp` cannot be called indirectly. I thought we have been erroring out on indirect uses of `setjmp`, but some recent CL disrupted the logic and we are not erroring out anymore. We currently 1. Collect functions that contain `setjmp` calls in `SetjmpUsers`. This only counts direct calls: https://github.com/llvm/llvm-project/blob/8f77dc459e31aad6daab89a124fa92067916274c/llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp#L869-L878 2. Run `runSjLjOnFunction` only on those `SetjmpUsers`. Within `runSjLjOnFunction`, if we see an indirect use of `setjmp`, we error out: https://github.com/llvm/llvm-project/blob/8f77dc459e31aad6daab89a124fa92067916274c/llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp#L1218-L1221 So if there are only indirect setjmp calls within the module, `SetjmpUsers` will be empty, and `runSjLjOnFunction` is not even entered once. And the indirect `setjmp` call will error out at link time. So in this CL we check for the indirect uses of `setjmp` upfront before we enter `runSjLjOnFunction`. Also this currently errors out on `invoke @setjmp`, which can only occur when using Wasm EH + Wasm SjLj within a function. We recently added Wasm SjLj support but we don't support using Wasm EH + Wasm SjLj in the same function yet. We plan to add this support very soon, so I don't think it's worth creating another test file just for this. (This is an error test so it needs its own file) Reviewed By: dschuff Differential Revision: https://reviews.llvm.org/D109375
-
Arthur Eubanks authored
It's the same as unsigned, but clearer in intent.
-
Artem Dergachev authored
Low-level code may occasionally deal with direct access by concrete addresses such as 0x1234. Values at these addresses act like globals: they can change at any time. They typically wear volatile qualifiers. Suppress all warnings on loops with conditions that involve casting anything to a pointer-to-...-pointer-to-volatile type. The closely related bugprone-redundant-branch-condition check doesn't seem to be affected. Add a test just in case. Differential Revision: https://reviews.llvm.org/D108808
-
Arthur Eubanks authored
Verified that previously nothing was calling dataOperandHasImpliedAttr() with AttributeList::ReturnIndex even though we had a code path for it. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D109390
-
peter klausler authored
Adds missing semantic checks for ELEMENTAL functions and subroutines, their dummy arguments, and their results from F'2018 15.8.1 C15100-15102. Differential Revision: https://reviews.llvm.org/D109380
-
Aart Bik authored
Perhaps one of these days I will actually learn how to spell opaque.... Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D109391
-
Siva Chandra Reddy authored
-
Nico Weber authored
This reverts commit 6be7f5c3. We'll need this file eventually, but it in fact shouldn't have been in cfe02847. It's currently unreferenced.
-
Nico Weber authored
-
Rainer Orth authored
Many `flang` tests currently `FAIL` on Solaris because the module files aren't found. I could trace this to `sys::fs::getMainExecutable` not being implemented. This patch does this and fixes all affected `flang` tests. Tested on `amd64-pc-solaris2.11`. Differential Revision: https://reviews.llvm.org/D109374
-
Philip Reames authored
Follow on to D109029. I realized we had no mention of mustprogrress in the comment (as it prexisted mustprogress in the codebase). In the process of adding it, I tweaked the preconditions into something I think is more clear. Note that mustprogress is checked in the code. Differential Revision: https://reviews.llvm.org/D109091
-
Mehdi Amini authored
This prints a more helpful error for folks who aren't intrinsically familiar with the system. Differential Revision: https://reviews.llvm.org/D109378
-
Geoffrey Martin-Noble authored
Right now all but the last bullet are relying on applied "must not" that isn't there and the last bullet is a "must". Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D109389
-
Sanjay Patel authored
This could go either direction since the instruction count is the same either way, but there are a few reasons to prefer this: 1. We already do the related transform with 'and' (see just above the new code). 2. We try (too hard) to compensate for not having this and possibly other folds in transformZExtICmp(), and that leads to bugs like https://llvm.org/PR51762 . 3. Codegen looks better across a variety of targets. https://alive2.llvm.org/ce/z/uEgn4P
-
Sanjay Patel authored
-
Roman Lebedev authored
-
Roman Lebedev authored
-
Irina Dobrescu authored
This patch adds improvements for sext/zext of a vector extract in Global ISel. For example, this piece of code: define i64 @si64(<4 x i32> %0, i32 %1) { %3 = extractelement <4 x i32> %0, i64 1 %s = sext i32 %3 to i64 ret i64 %s } Used to have this lowering: si64: mov s0, v0.s[1] fmov w8, s0 sxtw x0, w8 ret Whereas this patch makes it lower to this: si64: smov x0, v0.h[0] ret Differential Revision: https://reviews.llvm.org/D108137 -
Roman Lebedev authored
-
Nico Weber authored
The public header lldb/include/lldb/Host/XML.h includes libxml/xmlreader.h, so this must be a public dep.
-
Nico Weber authored
-
Roman Lebedev authored
-
Nico Weber authored
-
Nico Weber authored
-
Louis Dionne authored
This was manually taken from https://llvm.org/D100311.
-
Nico Weber authored
This is enough to get the lit-based tests to pass on macOS. Doesn't yet add build targets for: - Any LLDB unit tests - swig bindings - various targets not needed by lit tests LLDB has many dependency cycles, something GN doesn't allow. For that reason, I've omitted some dependency edges. Hopefully we can clean up the cycles one day. LLDB has a public/private header distinction, but mostly ignores it. Many libraries include private headers from other modules. Since LLDB is the first target the LLVM/GN build that uses Objective-C++ code, add some machinery to the toolchain file to handle that. Differential Revision: https://reviews.llvm.org/D109185
-
Arthur Eubanks authored
Index is 0 when the return value has the returned attribute. But the return value cannot have the returned attribute, so the check is pointless. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D109334
-
Elliot Saba authored
On X86, the stackprobe emission code chooses the `R11D` register, which is illegal on i686. This ends up wrapping around to `EBX`, which does not get properly callee-saved within the stack probing prologue, clobbering the register for the callers. We fix this by explicitly using `EAX` as the stack probe register. Reviewed By: pengfei Differential Revision: https://reviews.llvm.org/D109203
-
Ye Luo authored
What is exactly needed is only a boolean. Pulling OFFLOAD_SUCCESS/FAIL only adds confusion. Differential Revision: https://reviews.llvm.org/D109303
-
Nikita Popov authored
Functions can have a personality function, as well as prefix and prologue data as additional operands. Unused operands are assigned a dummy value of i1* null. This patch addresses multiple issues in use-list order preservation for these: * Fix verify-uselistorder to also enumerate the dummy values. This means that now use-list order values of these values are shuffled even if there is no other mention of i1* null in the module. This results in failures of Assembler/call-arg-is-callee.ll, Assembler/opaque-ptr.ll and Bitcode/use-list-order2.ll. * The use-list order prediction in ValueEnumerator does not take into account the fact that a global may use a value more than once and leaves uses in the same global effectively unordered. We should be comparing the operand number here, as we do for the more general case. * While we enumerate all operands of a function together (which seems sensible to me), the bitcode reader would first resolve prefix data for all function, then prologue data for all functions, then personality functions for all functions. Change this to resolve all operands for a given function together instead. Differential Revision: https://reviews.llvm.org/D109282
-
Arthur Eubanks authored
-
Nikita Popov authored
Support opaque pointers in SymbolicallyEvaluateGEP() by using the value type of a GlobalValue base or falling back to i8 if there isn't one. We don't unconditionally generate i8 GEPs here because that would lose inrange attribues, and because some optimizations on globals currently rely on GEP types (e.g. the globals SROA mentioned in the comment). Differential Revision: https://reviews.llvm.org/D109297
-
Andy Kaylor authored
Copying IR during linking causes a type mismatch due to the field being missing in IRMover/Valuemapper. Adds the full range of typed attributes including elementtype attribute in the copy functions. Patch by Chenyang Liu Differential Revision: https://reviews.llvm.org/D108796
-
Fangrui Song authored
-
Maksim Panchenko authored
Print relocations interleaved with disassembled instructions for executables with relocatable sections, e.g. those built with "-Wl,-q". Differential Revision: https://reviews.llvm.org/D109016
-
Arthur Eubanks authored
We're trying to get the parameter index of sret and see if it's part of a function's varargs. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D109335
-