- Dec 18, 2020
-
-
Tomas Matheson authored
Redundant Copy Elimination was eliminating a MOVi32imm -1 when it determined that the value of the destination register is already -1. However, it didn't take into account that the MOVi32imm zeroes the upper 32 bits (which are FFFFFFFF) and therefore cannot be eliminated. Reviewed By: paulwalker-arm Differential Revision: https://reviews.llvm.org/D93100
-
Paul Walker authored
During isel there's no need to protect illegal types. Patch also adds a missing unit test for tbl2 intrinsic using bfloat types. Differential Revision: https://reviews.llvm.org/D93404
-
LLVM GN Syncbot authored
-
Aaron Ballman authored
We currently reject this valid C construct by claiming it declares a non-local variable: for (struct { int i; } s={0}; s.i != 0; s.i--) ; We expected all declaration in the clause-1 declaration statement to be a local VarDecl, but there can be other declarations involved such as a tag declaration. This fixes PR35757. -
David Zarzycki authored
9e08e51a introduced a new enum case.
-
Frank Derry Wanye authored
This lint check is a part of the FLOCL (FPGA Linters for OpenCL) project out of the Synergy Lab at Virginia Tech. FLOCL is a set of lint checks aimed at FPGA developers who write code in OpenCL. The altera single work item barrier check finds OpenCL kernel functions that call a barrier function but do not call an ID function. These kernel functions will be treated as single work-item kernels, which could be inefficient or lead to errors. Based on the "Altera SDK for OpenCL: Best Practices Guide."
-
Aleksandr Platonov authored
This patch fixes the following problem: - open a file with references to the symbol `Foo` - remove all references to `Foo` (from the dynamic index). - `MergedIndex::refs()` result will contain positions of removed references (from the static index). The idea of this patch is to keep a set of files which were used during index build inside the index. Thus at processing the static index references we can check if the file of processing reference is a part of the dynamic index or not. Reviewed By: sammccall Differential Revision: https://reviews.llvm.org/D93393
-
Pavel Labath authored
Nearly all of our lldb-server tests have two flavours (lldb-server and debugserver). Each of them is tagged with an appropriate decorator, and each of them starts with a call to a matching "init" method. The init calls are mandatory, and it's not possible to meaningfully combine them with a different decorator. This patch leverages the existing decorators to also tag the tests with the appropriate debug server tag, similar to how we do with debug info flavours. This allows us to make the "init" calls from inside the common setUp method.
-
Kerry McLaughlin authored
This patch extends LowerMGATHER/MSCATTER to make use of the vector + reg/immediate addressing modes for scalable masked gathers & scatters. selectGatherScatterAddrMode checks if the base pointer is null, in which case we can swap the base pointer and the index, e.g. getelementptr nullptr, <vscale x N x T> (splat(%offset)) + %indices) -> getelementptr %offset, <vscale x N x T> %indices Reviewed By: david-arm Differential Revision: https://reviews.llvm.org/D93132 -
Simon Pilgrim authored
[X86][AVX] Replace extract_subvector(broadcast(), 0) folds with generic SimplifyDemandedVectorEltsForTargetNode handling. Simplifies a few more cases, notably shuffle demanded elts cases.
-
Carl Ritson authored
-
Lucas Prates authored
This is an addition to the existing Statistical Profiling extension, which introduces an extra system register that is enabled by the new 'spe-eef' subtarget feature. Patch written by Simon Tatham. Reviewed By: ostannard Differential Revision: https://reviews.llvm.org/D92391
-
Lucas Prates authored
This introduces asm support for the Branch Record Buffer extension, through the new 'brbe' subtarget feature. It consists of a new set of system registers that enable the handling of branch records. Patch written by Simon Tatham. Reviewed By: ostannard Differential Revision: https://reviews.llvm.org/D92389
-
Carl Ritson authored
-
Cullen Rhodes authored
This is split off from D91718 and adds a new target hook supportsScalableVectors that can be queried to check if scalable vectors are supported by the backend. For AArch64 this returns true if SVE is enabled. Reviewed By: david-arm Differential Revision: https://reviews.llvm.org/D93060
-
Sam McCall authored
When querying the CDB, we stat the underlying file to check it hasn't changed. We don't do this every time, but only if we didn't check within 5 seconds. This behavior only exists for compile_commands.json and compile_flags.txt. The CDB plugin system doesn't expose enough information to handle others. Slight behavior change: we now only look for `build/compile_commands.json` rather than trying every CDB strategy under `build` subdirectories. Differential Revision: https://reviews.llvm.org/D92663
-
Bjorn Pettersson authored
This patch adds support for the fptoui.sat and fptosi.sat intrinsics, which provide basically the same functionality as the existing fptoui and fptosi instructions, but will saturate (or return 0 for NaN) on values unrepresentable in the target type, instead of returning poison. Related mailing list discussion can be found at: https://groups.google.com/d/msg/llvm-dev/cgDFaBmCnDQ/CZAIMj4IBAAJ The intrinsics have overloaded source and result type and support vector operands: i32 @llvm.fptoui.sat.i32.f32(float %f) i100 @llvm.fptoui.sat.i100.f64(double %f) <4 x i32> @llvm.fptoui.sat.v4i32.v4f16(half %f) // etc On the SelectionDAG layer two new ISD opcodes are added, FP_TO_UINT_SAT and FP_TO_SINT_SAT. These opcodes have two operands and one result. The second operand is an integer constant specifying the scalar saturation width. The idea here is that initially the second operand and the scalar width of the result type are the same, but they may change during type legalization. For example: i19 @llvm.fptsi.sat.i19.f32(float %f) // builds i19 fp_to_sint_sat f, 19 // type legalizes (through integer result promotion) i32 fp_to_sint_sat f, 19 I went for this approach, because saturated conversion does not compose well. There is no good way of "adjusting" a saturating conversion to i32 into one to i19 short of saturating twice. Specifying the saturation width separately allows directly saturating to the correct width. There are two baseline expansions for the fp_to_xint_sat opcodes. If the integer bounds can be exactly represented in the float type and fminnum/fmaxnum are legal, we can expand to something like: f = fmaxnum f, FP(MIN) f = fminnum f, FP(MAX) i = fptoxi f i = select f uo f, 0, i # unnecessary if unsigned as 0 = MIN If the bounds cannot be exactly represented, we expand to something like this instead: i = fptoxi f i = select f ult FP(MIN), MIN, i i = select f ogt FP(MAX), MAX, i i = select f uo f, 0, i # unnecessary if unsigned as 0 = MIN It should be noted that this expansion assumes a non-trapping fptoxi. Initial tests are for AArch64, x86_64 and ARM. This exercises all of the scalar and vector legalization. ARM is included to test float softening. Original patch by @nikic and @ebevhan (based on D54696). Differential Revision: https://reviews.llvm.org/D54749
-
Yevgeny Rouban authored
Differential Revision: https://reviews.llvm.org/D93521 Reviewed By: skatkov
-
Andrzej Warzynski authored
The behaviour triggered with this flag is consistent with `-fparse-only` in `flang` (i.e. the throwaway driver). This new spelling is consistent with Clang and gfortran, and was proposed and agreed on for the new driver in [1]. This patch also adds some minimal logic to communicate whether the semantic checks have failed or not. When semantic checks fail, a frontend driver error is generated. The return code from the frontend driver is then determined by checking the driver diagnostics - the presence of driver errors means that the compilation has failed. This logic is consistent with `clang -cc1`. [1] http://lists.llvm.org/pipermail/flang-dev/2020-November/000588.html Differential Revision: https://reviews.llvm.org/D92854
-
Jan Svoboda authored
Depends on D84668 Reviewed By: Bigcheese Original patch by Daniel Grumberg. Differential Revision: https://reviews.llvm.org/D84669
-
Martin Storsjö authored
The directory_iterator.cpp file did contain an incomplete, non-working implementation for windows. Change it to use the wchar version of the APIs. Don't set the windows specific errors from GetLastError() as code in the generic category; remap the errors to the std::errc values. Error out cleanly on empty paths. Invoke FindFirstFile on <directoryname>/* to actually list the entries of the directory. If the first entry retured by FindFirstFile is to be skipped (e.g. being "." or ".."), call advance() (which calls FindNextFile and loops) which doesn't return until a valid entry is found (or the end is reached). Differential Revision: https://reviews.llvm.org/D91140
-
Martin Storsjö authored
On windows, the narrow, char based paths normally don't use utf8, but can use many different native code pages, and this is what system functions that operate on files, taking such paths/file names, interpret them as. Differential Revision: https://reviews.llvm.org/D91137
-
Martin Storsjö authored
Differential Revision: https://reviews.llvm.org/D91136
-
Martin Storsjö authored
Also set the preferred separator to backslash. libc++ doesn't compile successfully for windows prior to this change, and this change on its own isn't enough to make it compile successfully either, but is the first stepping stone towards making it work correctly. Most of operations.cpp will need to be touched, both for calling functions that take wchar paths, but also for using other windows specific functions instead of the posix functions used so far; that is handled in later commits. Changing parts of operations.cpp to generalize the string type handling in code that doesn't touch system functions. Differential Revision: https://reviews.llvm.org/D91135
-
Richard Smith authored
expressions. Fixes a regression in the clang-tidy test suite from making DeclRefExprs referring to dependent declarations be instantiation-dependent.
-
Richard Smith authored
-
Jan Svoboda authored
Depends on D84189 Reviewed By: dexonsmith Original patch by Daniel Grumberg. Differential Revision: https://reviews.llvm.org/D84190
-
Jan Svoboda authored
Depends on D84671 Reviewed By: Bigcheese Original patch by Daniel Grumberg. Differential Revision: https://reviews.llvm.org/D84672
-
Jan Svoboda authored
Depends on D84670 Reviewed By: Bigcheese Original patch by Daniel Grumberg. Differential Revision: https://reviews.llvm.org/D84671
-
Jan Svoboda authored
Depends on D84190 Reviewed By: Bigcheese Original patch by Daniel Grumberg. Differential Revision: https://reviews.llvm.org/D84668
-
Kazu Hirata authored
This patch adds an alternative cost metric for the inliner to take into account both the cost (i.e. size) and cycle count savings into account. Without this patch, we decide to inline a given call site if the size of inlining the call site is below the threshold that is computed according to the hotness of the call site. This patch adds a new cost metric, turned off by default, to take over the handling of hot call sites. Specifically, with the new cost metric, we decide to inline a given call site if the ratio of cycle savings to size exceeds a threshold. The cycle savings are computed from call site costs, parameter propagation, folded conditional branches, etc, all weighted by their respective profile counts. The size is primarily the callee size, but we subtract call site costs and the size of basic blocks that are never executed. The new cost metric implicitly takes advantage of the machine function splitter recently introduced by Snehasish Kumar, which dramatically reduces the cost of duplicating (e.g. inlining) cold basic blocks by placing cold basic blocks of hot functions in the .text.split section. We evaluated the new cost metric on clang bootstrap and SPECInt 2017. For clang bootstrap, we observe 0.69% runtime improvement. For SPECInt we report the change in IntRate the C/C++ benchmarks. All benchmarks apart from perlbench and omnetpp improve, on average by 0.21% with the max for mcf at 1.96%. Benchmark % Change 500.perlbench_r -0.45 502.gcc_r 0.13 505.mcf_r 1.96 520.omnetpp_r -0.28 523.xalancbmk_r 0.49 525.x264_r 0.00 531.deepsjeng_r 0.00 541.leela_r 0.35 557.xz_r 0.21 Differential Revision: https://reviews.llvm.org/D92780
-
Jan Svoboda authored
Depends on D84669 Reviewed By: Bigcheese Original patch by Daniel Grumberg. Differential Revision: https://reviews.llvm.org/D84670
-
Siva Chandra Reddy authored
This reverts commit 352cba24. "add back math.h #include utils/FPUtil/ManipulationFunctions.h". Using `<math.h>` correct so downstream setup should be fixed.
-
Jan Svoboda authored
Depends on D84185 Reviewed By: dexonsmith Original patch by Daniel Grumberg. Differential Revision: https://reviews.llvm.org/D84186
-
Richard Smith authored
to dependent declarations. Treat an id-expression that names a local variable in a templated function as being instantiation-dependent. This addresses a language defect whereby a reference to a dependent declaration can be formed without any construct being value-dependent. Fixing that through value-dependence turns out to be problematic, so instead this patch takes the approach (proposed on the core reflector) of allowing the use of pointers or references to (but not values of) dependent declarations inside value-dependent expressions, and instead treating template arguments as dependent if they evaluate to a constant involving such dependent declarations. This ends up affecting a bunch of OpenMP tests, due to OpenMP imprecisely handling instantiation-dependent constructs, bailing out early instead of processing dependent constructs to the extent possible when handling the template.
-
QingShan Zhang authored
The LD/STD likewise instruction are selected only when the alignment in the load/store >= 4 to deal with the case that the offset might not be known(i.e. relocations). That means we have to select the X-Form load for %0 = load i64, i64* %arrayidx, align 2 In fact, we can still select the D-Form load if the offset is known. So, we only query the load/store alignment when we don't know if the offset is a multiple of 4. Reviewed By: jji, Nemanjai Differential Revision: https://reviews.llvm.org/D93099
-
Richard Smith authored
they're only instantiation-dependent.
-
Richard Smith authored
dependent until it's been converted to match its parameter. The type of a non-type template parameter can in general affect whether the template argument is dependent. Note that this is not always possible. For template arguments that name static local variables in templates, the type of the template parameter affects whether the argument is dependent, so the query is imprecise until we know the parameter type. For example, in: template<typename T> void f() { static const int n = 5; typename T::template X<n> x; } ... we don't know whether 'n' is dependent until we know whether the corresponding template parameter is of type 'int' or 'const int&'. -
Richard Smith authored
if E is merely instantiation-dependent.
-
Siva Chandra Reddy authored
This is a continuation of the previous CL which did a similar change in other tests. To elaborate a little about why we need this - under C++ compilation with headers not from LLVM libc, libraries like libc++ and libstdc++ provide their own math.h which undefine macros like `isnan` and provide the overloaded C++ isnan functions which return a boolean value instead of an integer value returned by the isnan macro.
-