- Mar 01, 2023
-
-
Jim Ingham authored
hold an error should: (a) return false for IsValid, since that's the current behavior and is a convenient way to check "should I get the value for this". (b) preserve the error when an SBValue is made from it, and print the error in the ValueObjectPrinter. Make that happen. Differential Revision: https://reviews.llvm.org/D144664 -
Shoaib Meenai authored
32-bit targets don't build these by default, but e.g. armv7 and x86 can build them just fine, and it's useful to have the int128 routines available for certain applications. Add a CMake option to let us include the int128 routines for architectures which would otherwise lack them. Reviewed By: compnerd, MaskRay, phosek Differential Revision: https://reviews.llvm.org/D145003
-
Kazu Hirata authored
Without this patch, the control height reduction pass would combine a "poison" branch with an earlier well-defined branch, turning the earlier branch into a "poison" branch also. This patch fixes the problem by rejecting "poison" conditional branches. Differential Revision: https://reviews.llvm.org/D145008
-
Jim Ingham authored
The latter only checks built-in commands. I also added some docs to make the distinction clear and a test. Differential Revision: https://reviews.llvm.org/D144929
-
Alan Hu authored
The OCaml bindings currently return pointers to LLVM objects as-is to OCaml. These "naked pointers" end up appearing as values of local variables in OCaml code, stored as part of other OCaml values, etc. The safety of this design relies on the OCaml runtime system's ability to distinguish these pointers from pointers to memory on the OCaml garbage collected heap. In particular, when the OCaml GC encounters a pointer to memory known to not be part of the OCaml heap, it does not follow it. In OCaml 4.02 an optimized "no naked pointers" mode was introduced where the runtime system does not perform such checks and requires that no such naked pointers be passed to OCaml code, instead one of several encodings needs to be used. In OCaml 5, the no naked pointers mode is now the only mode. This diff uses one of the potential encodings to eliminate naked pointers, making the LLVM OCaml bindings compatible with the "no naked pointers" mode of OCaml >= 4.02 ...
-
Haohai Wen authored
The previous Alderlake P-Core model prefer data from uops.info than intel doc. Some measures latency from uops.info is larger than real latency. e.g. addpd latency is 3 in uops.info while 2 in intel doc. This patch adjust the priority of those two data source so that intel doc is more preferable. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D144388
-
Wei Wang authored
We shouldn't access coro frame after returning from `await_suspend()` and before `llvm.coro.suspend()`. Make sure we always hoist conditional cleanup markers when inside the `await.suspend` block. Fix https://github.com/llvm/llvm-project/issues/59181 Reviewed By: ChuanqiXu Differential Revision: https://reviews.llvm.org/D144680
-
Haowei Wu authored
This patch enables LLVM_USE_RELATIVE_PATHS_IN_FILES when building the bootstrap toolchain for 2 stages build. Differential Revision: https://reviews.llvm.org/D145010
-
Kazu Hirata authored
Without this patch: %cmp = icmp eq i32 %a, %b %cond = select i1 %cmp, i32 1, i32 2 is compiled as: 31 c9 xor %ecx,%ecx 39 f7 cmp %esi,%edi 0f 94 c1 sete %cl b8 02 00 00 00 mov $0x2,%eax 29 c8 sub %ecx,%eax With this patch, the compiler generates: 31 c0 xor %eax,%eax 39 f7 cmp %esi,%edi 0f 95 c0 setne %al ff c0 inc %eax saving 5 bytes while reducing register usage. This patch transforms C - setcc into inverted_setcc + (C-1) if C is a nonzero constant. This patch fixes: https://github.com/llvm/llvm-project/issues/60854 Differential Revision: https://reviews.llvm.org/D144449
-
Mitch Phillips authored
AllocMeta could be null when returned from __gwp_asan_get_metadata() for a bad access into the GuardedPagePool that was never allocated. Currently, then we dereference the null pointer, oops. Hoist the check up and print a message (only once in recoverable mode) about the bad memory access. Reviewed By: fmayer Differential Revision: https://reviews.llvm.org/D144973
-
ManuelJBrito authored
This reverts commit 9e58182d.
-
ManuelJBrito authored
Ignoring freeze(undef) if it has multiple uses in LowerAVXCONCAT_VECTORS causes the custom INSERT_SUBVECTOR for vector widening to be ignored. Differential Revision: https://reviews.llvm.org/D14490
-
Jason Molenda authored
Also a few small fixes for building debugserver on iOS in c++17.
-
Jakub Kuderski authored
This defines the iterator tuple based on the storage type of `zippy`, instead of its type arguments. This way, we can support temporaries that gets passed in and allow for them to be modified during iteration. Because the iterator types to the tuple storage can have different types when the storage is and isn't const, this defines a const iterator type and non-const `begin`/`end` functions. This way we avoid unintentional casts, e.g., trying to cast `vector<bool>::reference` to `vector<bool>::const_reference`, which may be unrelated types that are not convertible. This patch is a general and free-standing improvement but my primary use is in the implemention a version of `enumerate` that accepts multiple ranges: D144583. Reviewed By: dblaikie, zero9178 Differential Revision: https://reviews.llvm.org/D144834
-
Joseph Huber authored
The patch in D136100 added custom handling for pragmas to assist in formatting OpenMP clauses correctly. One of these changes added extra indentation. This is desirable for OpenMP pragmas as they are several complete tokens that would otherwise we on the exact same line. However, this is not desired for the other pragmas. This solution is extremely hacky, I'm not overly familiar with the `clang-format` codebase. A better solution would probably require actually parsing these as tokens, but I just wanted to propose a solution. Fixes https://github.com/llvm/llvm-project/issues/59473 Reviewed By: HazardyKnusperkeks Differential Revision: https://reviews.llvm.org/D144884
-
Peiming Liu authored
While dense tensors support random accesses, it is critical to visit them in a row-major order for better cache locality. However, we previously consider dense inputs and outputs together when computing constraints for building iteration graph, it could lead us to less efficient iteration graphs. This patch adds a new `SortMask::kIncludeDenseInput` to treat dense inputs/outputs separately when building iteration graph, thus increasing the chance for use to construct a better iteration graph. A more fine-grained approach is to treat each input separately. Note, related to: https://github.com/llvm/llvm-project/issues/51651 Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D144932
-
Med Ismail Bennani authored
Signed-off-by:Med Ismail Bennani <medismail.bennani@gmail.com>
-
Siva Chandra Reddy authored
This is in preparation for the transition to a solution to make libc tests hermetic with respect to their use of errno. The implementation of strdup has been switched over to libc_errno as an example of what the code looks like in the new way. See #61037 for more information. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D144928
-
Alexey Bataev authored
If use_device_ptr/use_device_addr clauses are used on target data directive and no device was specified during the compilation, only host part should be emitted. But it still required to emit captured decls for partially mapped data fields. Differential Revision: https://reviews.llvm.org/D144993
-
Fangrui Song authored
Otherwise clang may invoke ld. If ld is a shell script using `~`, the command will fail since `HOME` is changed.
-
Fangrui Song authored
Follow-up to D144914. -mcpu=help seems fine as a Clang extension not in GCC, because llc supports -mcpu=help. -mcpu=? is a bad choice as ? may be expanded by the shell.
-
Anshil Gandhi authored
Reviewed By: sameerds Differential Revision: https://reviews.llvm.org/D144162
-
Mehdi Amini authored
This is UB, but we shouldn't crash the compiler either. Fixes #61056 Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D144978
-
Med Ismail Bennani authored
In order to run a {break,watch}point command, lldb can resolve to the script interpreter to run an arbitrary piece of code or call into a user-provided function. To do so, we will generate a wrapping function, where we first copy lldb's internal dictionary keys into the interpreter's global dictionary, copied inline the user code before resetting the global dictionary to its previous state. However, {break,watch}point commands can optionally return a value that would tell lldb whether we should stop or not. This feature was only implemented for breakpoint commands and since we inlined the user code directly into the wrapping function, introducing an early return, that caused lldb to let the interpreter global dictionary tinted with the internal dictionary keys. This patch fixes that issue while also adding the stopping behaviour to watchpoint commands. To do so, this patch refactors the {break,watch}point command creation method, to let the lldb wrapper function generator know if the user code is a function call or a arbitrary expression. Then the wrapper generator, if the user input was a function call, the wrapper function will call the user function and save the return value into a variable. If the user input was an arbitrary expression, the wrapper will inline it into a nested function, call the nested function and save the return value into the same variable. After resetting the interpreter global dictionary to its previous state, the generated wrapper function will return the varible containing the return value. rdar://105461140 Differential Revision: https://reviews.llvm.org/D144688 Signed-off-by:Med Ismail Bennani <medismail.bennani@gmail.com>
-
Valery N Dmitriev authored
Removed unnecessary warning workaround. Differential Revision: https://reviews.llvm.org/D144992
-
Sanjay Patel authored
(C - X) + Y --> (Y - X) + C Moving the constant operand to an 'add' gives more flexibility to subsequent reassociation patterns, and it may be better for codegen on targets that don't have subtract-from-immediate instructions.
-
Sanjay Patel authored
Even within this file, the usual spelling is 'Opcode', so make it consistent.
-
Sanjay Patel authored
This is too conservative as noted in the TODO comment.
-
Craig Topper authored
It appears that ICK_Zero_Queue_Conversion was inserted into the ICK enum without updating this table. Easy to do since the table size was set to ICK_Num_Conversion_Kinds. I've used ICR_Exact_Match to match what was previously done for ICK_Zero_Event_Conversion that last time someone noticed this had happened. To prevent this from happening again, I've removed the explicit size and used a static_assert to check the size against ICK_Num_Conversion_Kinds. Differential Revision: https://reviews.llvm.org/D144990
-
Mark de Wever authored
This fixes the Clang modular CI, but breaks other CIs. This reverts commit 2ae39902.
-
Michael Jones authored
Differential Revision: https://reviews.llvm.org/D144991
-
Yitzhak Mandelbaum authored
When building the set of referenced fields for the `DataflowAnalysisContext`, include fields referenced only in default member initializers. These initializers are visited in the CFGs of constructors and so the fields must be included when analysing constructor bodies. Differential Revision: https://reviews.llvm.org/D144987
-
Michael Jones authored
The internal implementation of the string to float function previously used pointer arguments for returning several values. Additionally it set errno in several unexpected places. Now all of that goes through return structs. For readability I also moved the function away from raw pointer arithmetic towards proper indexing. I also added support for rounding modes. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D144597
-
Michael Maitland authored
Clang currently uses `-mcpu=?` and `-mtune=?`. The `?` causes errors on some shells such as zsh since it is a special character. In order for it to work on shells such as zsh, the option must be passed in quotes or escaped. This patch adds `-mcpu=help` and `-mtune=help` as another alias for `--print-supported-cpus`. In llc, `-mcpu=help` is an alias to print supported cpus. Differential Revision: https://reviews.llvm.org/D144914
-
Mark de Wever authored
This commits breaks the libc++ modular build in the precommit CI. This reverts commit 74565c3a.
-
Nikolas Klauser authored
Reviewed By: ldionne, Mordante, #libc Spies: libcxx-commits, arichardson Differential Revision: https://reviews.llvm.org/D143333
-
V Donaldson authored
A block construct is an execution control construct that supports declaration scopes contained within a parent subprogram scope or another block scope. (blocks may be nested.) This is implemented by applying basic scope processing to the block level. Name uniquing/mangling is extended to support this. The term "block" is heavily overloaded in Fortran standards. Prior name uniquing used tag `B` for common block objects. Existing tag choices were modified to free up `B` for block construct entities, and `C` for common blocks, and resolve additional issues with other tags. The "old tag -> new tag" changes can be summarized as: -> B -- block construct -> new B -> C -- common block C -> YI -- intrinsic type descriptor; not currently generated CT -> Y -- nonintrinsic type descriptor; not currently generated G -> N -- namelist group L -> -- block data; not needed -> deleted Existing name uniquing components consist of a tag followed by a name from user source ... -
Yaxun (Sam) Liu authored
Currently SimplifyCFG hoists/sink common instructions in then/else basic blocks when certain options are enabled, which is the case for default clang optimization pipelines for -O3. It tries to hoist/sink convergent function calls in divergent control flow, which causes incorrect ISA generated for GPU, e.g. https://github.com/ROCm-Developer-Tools/HIP/issues/3172 This patch fixes that by conservatively disable hoisting/sinking common convergent function calls in then/else blocks. Reviewed by: Artem Belevich Differential Revision: https://reviews.llvm.org/D144756
-
Arthur Eubanks authored
-
Mark de Wever authored
3782. Should <math.h> declare ::lerp? Libc++ doesn't declare ::lerp, adds tests to validate the requirement. Reviewed By: #libc, philnik Differential Revision: https://reviews.llvm.org/D142817
-