- Nov 02, 2020
-
-
Ben Dunbobbin authored
For PS4 development we support dllimport/export annotations in source code. This patch enables the dllimport/export attributes on PS4 by adding a new function to query the triple for whether dllimport/export are used and using that function to decide whether these attributes are supported. This replaces the current method of checking if the target is Windows. This means we can drop the use of "TargetArch" in the .td file (which is an improvement as dllimport/export support isn't really a function of the architecture). I have included a simple codgen test to show that the attributes are accepted and have an effect on codegen for PS4. I have also enabled the DLLExportStaticLocal and DLLImportStaticLocal attributes, which we support downstream. However, I am unable to write a test for these attributes until other patches for PS4 dllimport/export handling land upstream. Whilst writing this patch I noticed that, as these attributes are internal, they do not need to be target specific (when these attributes are added internally in Clang the target specific checks have already been run); however, I think leaving them target specific is fine because it isn't harmful and they "really are" target specific even if that has no functional impact. Differential Revision: https://reviews.llvm.org/D90442
-
Nico Weber authored
-
Clement Courbet authored
_fxsave64 is not available on some buildbots. This reverts commit 274de447.
-
Caroline Concatto authored
This patch implements the first frontend action for the Flang parser (i.e. Fortran::parser). This action runs the preprocessor and is invoked with the `-E` flag. (i.e. `flang-new -E <input-file>). The generated output is printed to either stdout or the output file (specified with `-` or `-o <output-file>`). Note that currently there is no mechanism to map options for the frontend driver (i.e. Fortran::frontend::FrontendOptions) to options for the parser (i.e. Fortran::parser::Options). Instead, Frotran::parser::options are hard-coded to: ``` std::vector<std::string> searchDirectories{"."s}; searchDirectories = searchDirectories; isFixedForm = false; _encoding(Fortran::parser::Encoding::UTF_8); ``` These default settings are compatible with the current Flang driver. Further work is required in order for CompilerInvocation to read and map clang::driver::options to Fortran::parser::options. Co-authored-by: Andrzej Warzynski <andrz... -
Clement Courbet authored
Some benchmarked instructions might set target state. Preserve this state. See PR26418. Differential Revision: https://reviews.llvm.org/D90592
-
Jay Foad authored
-
Jay Foad authored
-
Jay Foad authored
-
David Sanders authored
Now that clang-tidy supports the --use-color command line option, it's a better user experience to use --use-color in run-clang-tidy.py and preserving the colored output.
-
Louis Dionne authored
-
Simon Pilgrim authored
Reduce diff in D90554
-
Simon Pilgrim authored
As suggested on D90445 - the AVX512F test case alone won't handle 128/256-bit vector gather pattern very well
-
Simon Pilgrim authored
As discussed on D90322, some MSVC builds are failing with is_trivially_copyable static asserts (see D86126) - we can avoid this by not using the std::pair<unsigned,unsigned> which held both the FP+DP Registers, just handle the FP register and convert to DP on the fly.
-
Andrzej Warzynski authored
As per point 3 in [1]: ``` Accessor member functions are named with the non-public data member's name, less the trailing underscore. Mutator member functions are named set_... ``` Originally we just followed the LLVM's style, which is incompatible with Flang. This patch renames the accessors and mutators accordingly. `getDiagnostics` and `GetDiagnostics` are replaced with one accessor: `diagnostics`. `SetDiagnostics` was neither implemented nor used, so it's deleted. [1] https://github.com/llvm/llvm-project/blob/master/flang/docs/C++style.md#naming Differential Revision: https://reviews.llvm.org/D90300
-
Kadir Cetinkaya authored
We were default initializing SymbolIDs before, which would leave indeterminate values in underlying std::array. This patch updates the underlying data initalization to be value-init and adds a way to check for validness of a SymbolID. Differential Revision: https://reviews.llvm.org/D90397
-
Andrzej Warzynski authored
Use `--match-full-lines` to make sure that FileCheck doesn't match the output against the `CHECK` lines (which, like other comments, are also printed). More specifically, we want to make sure that the following `check` in the input file: ``` ! CHECK: <some-fortran-input> ``` is matched by FileCheck with `<some-fortran-input>` in the generated output. Without `--match-full-lines`, that check-line will be matched with `!CHECK: <some-fortran-input>` instead (which is also printed together with other contents of the file). Adding `--match-full-lines` makes the tests stricter and this change revealed that some `check`s were passing only because that flag was missing. These are updated accordingly. Reviewed By: CarolineConcatto, sameeranjoshi Differential Revision: https://reviews.llvm.org/D90306
-
Kirill Bobyrev authored
Introduce a separate thread that will kill `clangd-index-server` after 10 seconds regardless. This helps shut down the test if the server hangs and `stderr.readline()` does not contain inititalizatiton message. It prevents "necessary" waiting delay for the server warm-up and only introduces additional delay if the test fails. It also makes use of `subprocess.Popen.kill()` which is a portable way of handling process shutdown and avoids using signals. Reviewed By: kadircet Differential Revision: https://reviews.llvm.org/D90590
-
Clement Courbet authored
Differential Revision: https://reviews.llvm.org/D90453
-
Georgii Rymar authored
These sections are implicit and handled a bit differently. Currently the "Offset" is ignored for them. This patch fixes an issue. Differential revision: https://reviews.llvm.org/D90446
-
Caroline Concatto authored
This reverts commit 8b281bfa.
-
Caroline Concatto authored
Only the aliases 'xzr' and 'sp' exist for the physical register x31. The reason for wanting to remove the alias 'x31' is because it allows users to write invalid asm that is not accepted by the GNU assembler. Is there any objection to removing this alias? Or do we want to keep this for compatibility with existing code that uses w31/x31? Differential Revision: https://reviews.llvm.org/D90153
-
Kirill Bobyrev authored
Reviewed By: kadircet Differential Revision: https://reviews.llvm.org/D90291
-
Ilya Golovenko authored
Google test matcher `DeclKind` uses `NamedDecl::getDeclKindName()` to compare its result with expected declaration name. Both, returned value of this function and the expected kind name argument have type `const char *`, so this matcher effectively compares two pointers instead of the respective strings. The test was passing on most platforms because compilers mostly were able to coalesce these string literals. Patch By: Ilya Golovenko Reviewed By: hokein Differential Revision: https://reviews.llvm.org/D90384
-
Wang, Pengfei authored
-
Craig Topper authored
When validating C3 in (sext_inreg (or (shl X, C2), (shr (and Y, C3), C1)), i32) we are truncating it to 32 bits before checking its value. We need to check all 64 bits.
-
Qiu Chaofan authored
Variable InnerIsSel references FalseRes, while FalseRes might be zext/sext. So InnerIsSel should reference SetOrSelCC, otherwise a crash will happen. Reviewed By: steven.zhang Differential Revision: https://reviews.llvm.org/D90142
-
Jim Lin authored
-
Craig Topper authored
The function is matching (sext_inreg (or (shl X, C2), (shr (and Y, C3), C1))), with appropriate checks for the constants to be a rotate. But it fails to check that X and Y are the same which is also necessary.
-
Craig Topper authored
fshl/fshr intrinsics turn into rotl/rotr ISD opcodes and we don't have a complete set of patterns. We pattern match rotl, but we have a custom match for rori that gets priority. We don't pattern match rotr and we don't have patterns or custom code for rori from rotr.
-
Wang, Pengfei authored
Not needed after 22626135.
-
Stella Laurenzo authored
-
Teresa Johnson authored
Fix failure in new test from 0949f96d: Don't match exact file path separator. Should fix: http://lab.llvm.org:8011/#/builders/119/builds/437/steps/9/logs/FAIL__Clang__memory-profile-filename_c
-
Stella Laurenzo authored
* Finishes support for Context, InsertionPoint and Location to be carried by the thread using context managers. * Introduces type casters and utilities so that DefaultPyMlirContext and DefaultPyLocation in method signatures does the right thing (allows explicit or gets from the thread context). * Extend the rules for the thread context stack to handle nesting, appropriately inheriting and clearing depending on whether the context is the same. * Refactors all method signatures to follow the new convention on trailing parameters for defaulting parameters (loc, ip, context). When the objects are carried in the thread context, this allows most explicit uses of these values to be elided. * Removes the style guide section on putting accessors to construct global objects on the PyMlirContext: this style fails to make good use of the new facility since it is often the only thing remaining needing an MlirContext. * Moves Module parse/creation from mlir.ir.Context to static methods on mlir.ir.Module. * Moves Context.create_operation to a static Operation.create method. * Moves Type parsing from mlir.ir.Context to static methods on mlir.ir.Type. * Moves Attribute parsing from mlir.ir.Context to static methods on mlir.ir.Attribute. * Move Location factory methods from mlir.ir.Context to static methods on mlir.ir.Location. * Refactors the std dialect fake "ODS" generated code to take advantage of the new scheme. Differential Revision: https://reviews.llvm.org/D90547
-
Nico Weber authored
Before 6db314e8, when running cmake with clang, libcxx, and compiler-rt enabled, building `ninja all` would run the generate-cxx-headers target, due to the sanitizers depending on it. After 6db314e8, if LIBCXX_ENABLE_SHARED and LIBCXX_ENABLE_STATIC and LIBCXX_INCLUDE_TESTS and LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY are disabled (https://reviews.llvm.org/D82702#2153627), `ninja all` no longer copies the libcxx headers, which means clang can't compile programs like `#include <string>` on macOS. Explicitly add the copy target to the all target to restore the old behavior.
-
Chen Zheng authored
Reviewed By: qcolombet Differential Revision: https://reviews.llvm.org/D86864
-
QingShan Zhang authored
We have added a new load/store cluster algorithm in D85517. However, AArch64 see some compiling deg with the new algorithm as the IsReachable() is not cheap if the DAG is complex. O(M+N) See https://bugs.llvm.org/show_bug.cgi?id=47966 So, this patch added a heuristic to switch to old cluster algorithm if the DAG is too complex. Reviewed By: Owen Anderson Differential Revision: https://reviews.llvm.org/D90144
-
Teresa Johnson authored
Similar to -fprofile-generate=, add -fmemory-profile= which takes a directory path. This is passed down to LLVM via a new module flag metadata. LLVM in turn provides this name to the runtime via the new __memprof_profile_filename variable. Additionally, always pass a default filename (in $cwd if a directory name is not specified vi the = form of the option). This is also consistent with the behavior of the PGO instrumentation. Since the memory profiles will generally be fairly large, it doesn't make sense to dump them to stderr. Also, importantly, the memory profiles will eventually be dumped in a compact binary format, which is another reason why it does not make sense to send these to stderr by default. Change the existing memprof tests to specify log_path=stderr when that was being relied on. Depends on D89086. Differential Revision: https://reviews.llvm.org/D89087
-
Nikita Popov authored
Strengthening nowrap flags is relatively expensive. Make sure we only do it if we're actually going to use the flags -- we don't use them for many recursive invocations. Additionally, if we're reusing an existing SCEV node, there's no point in trying to strengthen the flags if we don't have any new baseline facts. This change falls slightly short of being NFC, because the way flags during add+addrec / mul+addrec folding are handled may be more precise (as less operands are included in the calculation).
-