- Nov 25, 2022
-
-
Manuel Klimek authored
Move print functions to start of UnwarppedLineParser so they can be used from everywhere in the file. Pull out function that doesn't hard-code the stream.
-
Louis Dionne authored
When we define the const-correct overloads of <string.h> functions in libc++ itself, use builtins whenever possible. This avoids depending on the presence of these functions in the C library headers. Also, as a fly-by, improve the tests for these functions since we basically didn't check anything but their signature. We could have used the wrong builtin (as long as the signature matched) without ever noticing, which was quite scary. Differential Revision: https://reviews.llvm.org/D138684
-
Florian Hahn authored
This reverts commit 5577207d. This breaks building LLVM on recent macOS. Error messages below: llvm/lib/Support/Threading.cpp:190:3: error: use of undeclared identifier 'sysctlbyname' sysctlbyname("hw.physicalcpu", &count, &len, NULL, 0); ^ llvm/lib/Support/Threading.cpp:193:13: error: use of undeclared identifier 'CTL_HW' nm[0] = CTL_HW; ^ llvm/lib/Support/Threading.cpp:194:13: error: use of undeclared identifier 'HW_AVAILCPU' nm[1] = HW_AVAILCPU; ^ llvm/lib/Support/Threading.cpp:195:5: error: use of undeclared identifier 'sysctl' sysctl(nm, 2, &count, &len, NULL, 0); ^
-
Jamie Schmeiser authored
Summary: Refactor loop peeling code by moving code for calculating phi invariance into a separate class that does the calculation. Redescribe and rework the algorithm in preparation for adding increased functionality. Add test case that does not exhibit peeling that will be subsequently supported. Author: Jamie Schmeiser <schmeise@ca.ibm.com> Reviewed By: mkazantsev (Max Kazantsev) Differential Revision: https://reviews.llvm.org/D138232
-
Manuel Klimek authored
The unused variable fix also remove the test output of the tokens that do not match, making debugging tests harder. Undo the semantic changes of the build fix.
-
Valentin Clement authored
This patch relaxes the verifier for the fir.rebox operation to allow reboxing to unlimited polymoprhic box. Reviewed By: jeanPerier, PeteSteinfeld Differential Revision: https://reviews.llvm.org/D138695
-
LLVM GN Syncbot authored
-
Tiezhu Yang authored
Use the same register layout as Linux kernel, implement the related read and write operations. Reviewed By: SixWeining, xen0n, DavidSpickett Differential Revision: https://reviews.llvm.org/D138407
-
Sam McCall authored
This reverts commit 8bed59c7. Breaks bots e.g. https://lab.llvm.org/buildbot/#/builders/216/builds/13282
-
Nicolas Vasilache authored
Differential Revision: https://reviews.llvm.org/D134722
-
Archibald Elliott authored
This change is focussed on simplifying `Support/Host.h` to only do target detection. In this case, this function is close in usage to existing functions in `Support/Threading.h`, so I moved it into there. The function is also renamed to `llvm::get_physical_cores()` to match the style of threading's functions. Differential Revision: https://reviews.llvm.org/D137836
-
Pavel Labath authored
-
Valentin Clement authored
The dynamic type of an unlimited polymorphic entity has the derived category but does not have derived type spec. This leads to a crash for a nullptr dereference. This patch avoids this crash by checking if that the dynamic type is not unlimited polymorphic before dereferencing the derived type spec. Reviewed By: PeteSteinfeld Differential Revision: https://reviews.llvm.org/D138691
-
LiaoChunyu authored
[RISCV] Branchless lowering for (select (x < 0), TrueConstant, FalseConstant) and (select (x >= 0), TrueConstant, FalseConstant) This patch reduces the number of unpredictable branches (select (x < 0), y, z) -> x >> (XLEN - 1) & (y - z) + z (select (x >= 0), y, z) -> x >> (XLEN - 1) & (z - y) + y Reviewed By: craig.topper, reames Differential Revision: https://reviews.llvm.org/D137949
-
Sam McCall authored
Targets and Refs are 1:1, so merge them. Don't sort Refs array we keep indices into. (Currently we're done using those indices by the time we sort, but this is fragile)
-
Alex Richardson authored
This used to be required, but the difference between asserts/!asserts builds no longer exists for %clang_cc1 (only for %clang), so they pass just fine without this flag.
-
Alex Richardson authored
Use a dyn_cast<> to IntrinsicInst and an enum compare instead. While touching this code also re-generate the test to use positive check lines instead of negative ones and remove some unneeded metadata. Reviewed By: yonghong-song Differential Revision: https://reviews.llvm.org/D138565
-
Archibald Elliott authored
This should live with the Arm targets, given they have target-specific target parsers. Differential Revision: https://reviews.llvm.org/D137835
-
Simon Pilgrim authored
[X86] combineScalarAndWithMaskSetcc - handle (concat_vectors (and (vYi1 setcc, vYi1 x), undef)) patterns If one of the AND operands is a setcc then we're implicitly zeroing the upper mask bits Similar pattern to regressions identified in D127115 (masked comparisons)
-
Simon Pilgrim authored
[X86] Add test case for (any_extend (bitcast (concat_vectors (and (vYi1 setcc, vYi1 x), undef)))) pattern Similar pattern to a regression identified in D127115
-
Sam McCall authored
Demo: https://htmlpreview.github.io/?https://gist.githubusercontent.com/sam-mccall/9730f933a2cf2e003365520b6636f731/raw/7911d8251ceab7c244e0510285105027cd0a9403/PathMapping.cpp.html Header insertion doesn't actually work that well (not this patch's fault): - we don't have ranking of locations/headers yet, so inserted header is pretty random - on my system, we get a lot of absolute "/usr/bin/../include/..." paths. This is a HeaderSearch bug introduced in D60873 that I'll send a fix for Differential Revision: https://reviews.llvm.org/D138676
-
Pavel Labath authored
The stale cache directory can cause compilation to fail when ast serialization changes.
-
Pavel Labath authored
A malformed qMemoryRegionInfo response can easily trigger an infinite loop if regions end (base + size) wraps the address space. A particularly interesting is the case where base+size=0, which a stub could use to say that the rest of the memory space is unmapped, even though lldb expects 0xff... in this case. One could argue which behavior is more correct (technically, the current behavior does not say anything about the last byte), but unless we stop using 0xff... to mean "invalid address", that discussion is very academic. This patch truncates address ranges which wraps the address space, which handles the zero case as well as other kinds of malformed packets.
-
Thomas Preud'homme authored
Summary: This reverts commit ad485b71. Reviewers: Subscribers:
-
Benjamin Maxwell authored
This allows DemandedBits to see that the SVE count intrinsics (CNTB, CNTH, CNTW, CNTD) sans multiplier will only ever produce small positive integers. The maximum value you could get here is 256, which is CNTB on a machine with a 2048bit vector size (the maximum for SVE). Using this various redundant operations (zexts, sexts, ands, ors, etc) can be eliminated. Differential Revision: https://reviews.llvm.org/D138424
-
Benjamin Kramer authored
-
Benjamin Kramer authored
Avoids unused variables in NDEBUG builds.
-
Sam McCall authored
Since D60873 we remove dotdots from the search path entries, but not the filenames we're matching against, so do the latter too. Since this also removes (single) dots, drop the logic to skip over them. (Some of this was already dead, some is newly dead). See D138676 for motivation. Differential Revision: https://reviews.llvm.org/D138677
-
Phoebe Wang authored
-
Qiu Chaofan authored
-
Balazs Benics authored
By default, clang assumes that all trailing array objects could be a FAM. So, an array of undefined size, size 0, size 1, or even size 42 is considered as FAMs for optimizations at least. One needs to override the default behavior by supplying the `-fstrict-flex-arrays=<N>` flag, with `N > 0` value to reduce the set of FAM candidates. Value `3` is the most restrictive and `0` is the most permissive on this scale. 0: all trailing arrays are FAMs 1: only incomplete, zero and one-element arrays are FAMs 2: only incomplete, zero-element arrays are FAMs 3: only incomplete arrays are FAMs If the user is happy with consdering single-element arrays as FAMs, they just need to remove the `consider-single-element-arrays-as-flexible-array-members` from the command line. Otherwise, if they don't want to recognize such cases as FAMs, they should specify `-fstrict-flex-arrays` anyway, which will be picked up by CSA. Any use of the deprecated analyzer-config value will trigger a warning explaining what to use instead. The `-analyzer-config-help` is updated accordingly. Depends on D138657 Reviewed By: xazax.hun Differential Revision: https://reviews.llvm.org/D138659
-
Balazs Benics authored
According to my measurement in https://reviews.llvm.org/D108230#3933232, it seems like there is no drawback to enabling this analyzer-config by default. Actually, enabling this by default would make it consistent with the codegen of clang, which according to `-fstrict-flex-arrays`, assumes by default that all trailing arrays could be FAMs, let them be of size undefined, zero, one, or anything else. Speaking of `-fstrict-flex-arrays`, in the next patch I'll deprecate the analyzer-config FAM option in favor of that flag. That way, CSA will always be in sync with what the codegen will think of FAMs. So, if a new codebase sets `-fstrict-flex-arrays` to some value above 0, CSA will also make sure that only arrays of the right size will be considered as FAMs. Reviewed By: xazax.hun Differential Revision: https://reviews.llvm.org/D138657
-
Kazushi (Jam) Marukawa authored
This flag should be used for instructions which create constant values. So, remove the flag from not proper instructions. Only LEA, LEASL, and OR instructions have the flag now. Reviewed By: efocht Differential Revision: https://reviews.llvm.org/D138544
-
Lorenzo Chelini authored
This commit is a first step toward removing inconsistencies between dynamic and static attributes (i64 v. index) by dropping `I64ArrayAttr` and using `DenseI64ArrayAttr` in Tensor, Memref and Linalg Transform ops. In Linalg Transform ops only `TileToScfForOp` and `TileOp` have been updated. See related discussion: https://discourse.llvm.org/t/rfc-inconsistency-between-dynamic-and-static-attributes-i64-v-index/66612/1 Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D138567
-
Jean Perier authored
hlfir.concat codegen happens in the "bufferization" pass: the pass that place hlfir.expr in memory and transform all operations producing or accepting hlfir.expr arguments into operations operating on memory. Since this pass gets rid of the hlfir.expr type, this is a full translation pass. So far hlfir.concat codegen re-uses the current concatenation lowering helper and only supports concatenation of two strings at a time. This matches what lowering to HLFIR without any optimization produces. More optimized versions will be developed later. Differential Revision: https://reviews.llvm.org/D138673
-
Jean Perier authored
Differential Revision: https://reviews.llvm.org/D138664
-
Jean Perier authored
This operation represents scalar character concatenation. This is added as part of flang lowering update described in https://github.com/llvm/llvm-project/blob/main/flang/docs/HighLevelFIR.md A notable difference with Fortran concatenation is that hlfir.concat can take two or more operands. This will be used to optimize concatenation chains. Differential Revision: https://reviews.llvm.org/D138650
-
Valentin Clement authored
Remove debug option added by mistake in D138587
-
Evgeniy Brevnov authored
Differential Revision: https://reviews.llvm.org/D137149
-
Anton Sidorenko authored
When a module contains more than one function, we should update debugify metadata by increasing the number of variables in the function rather than overwritting it. Previous revert issue is fixed: I forgot to strip all x86-related info from the test. Differential Revision: https://reviews.llvm.org/D136949
-