- Nov 03, 2020
-
-
Mircea Trofin authored
-
Momchil Velikov authored
The `LiveRegUnits` utility (as well as `LivePhysRegs`) considers callee-saved registers to be alive at the point after the return instruction in a block. In the ARM backend, the `LR` register is classified as callee-saved, which is not really correct (from an ARM eABI or just common sense point of view). These two conditions cause the `MachineOutliner` to overestimate the liveness of `LR`, which results in unnecessary saves/restores of `LR` around calls to outlined sequences. It also causes the `MachineVerifer` to crash in some cases, because the save instruction reads a dead `LR`, for example when the following program: int h(int, int); int f(int a, int b, int c, int d) { a = h(a + 1, b - 1); b = b + c; return 1 + (2 * a + b) * (c - d) / (a - b) * (c + d); } int g(int a, int b, int c, int d) { a = h(a - 1, b + 1); b = b + c; return 2 + (2 * a + b) * (c - d) / (a - b) * (c + d); } is compiled with `-target arm-eabi -march=armv7-m -Oz`. This patch computes the liveness of `LR` in return blocks only, while taking into account the few ARM instructions, which read `LR`, but nevertheless the register is not mentioned (explicitly or implicitly) in the instruction operands. Differential Revision: https://reviews.llvm.org/D89189 -
Fangrui Song authored
[ELF] --emit-relocs: fix st_value of STT_SECTION in the presence of a gap before the first input section In the presence of a gap, the st_value field of a STT_SECTION symbol is the address of the first input section (incorrect if there is a gap). Set it to the output section address instead. In -r mode, this bug can cause an incorrect non-zero st_value of a STT_SECTION symbol (while output sections have zero addresses, input sections may have non-zero outSecOff). The non-zero st_value can cause the final link to have incorrect relocation computation (both GNU ld and LLD add st_value of the STT_SECTION symbol to the output section address). Reviewed By: grimar Differential Revision: https://reviews.llvm.org/D90520
-
Louis Dionne authored
The new script keeps the results sorted, which is why the ABI lists appear to have changed so much. However, this commit makes no actual ABI change.
-
Louis Dionne authored
Instead of having to remember the command-line to use every time, this commit adds a CMake target to generate the ABI list in the current configuration, if it is supported. As a fly-by change, remove scripts that are now unused (sym_match.py and sym_extract.py).
-
Frederik Gossen authored
This reverts commit dbae3d50. Cannot build with gcc/g++ 7.5.0.
-
Frederik Gossen authored
This reverts commit 56299b1e. Cannot build with gcc/g++ 7.5.0.
-
Fangrui Song authored
Preemptively switch 2 tests to the new PM Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D90365
-
Louis Dionne authored
-
- Nov 02, 2020
-
-
Nico Weber authored
-
Nico Weber authored
-
Kirstóf Umann authored
ReturnPtrRange checker emits a report if a function returns a pointer which points out of the buffer. However, end() iterator of containers is always such a pointer, so this always results a false positive report. This false positive case is now eliminated. This patch resolves these tickets: https://bugs.llvm.org/show_bug.cgi?id=20929 https://bugs.llvm.org/show_bug.cgi?id=25226 https://bugs.llvm.org/show_bug.cgi?id=27701 Patch by Tibor Brunner! Differential Revision: https://reviews.llvm.org/D83678
-
Florian Hahn authored
This reverts the revert commit 408c4408. This version of the patch includes a fix for a crash caused by treating ICmp/FCmp constant expressions as instructions. Original message: On some targets, like AArch64, vector selects can be efficiently lowered if the vector condition is a compare with a supported predicate. This patch adds a new argument to getCmpSelInstrCost, to indicate the predicate of the feeding select condition. Note that it is not sufficient to use the context instruction when querying the cost of a vector select starting from a scalar one, because the condition of the vector select could be composed of compares with different predicates. This change greatly improves modeling the costs of certain compare/select patterns on AArch64. I am also planning on putting up patches to make use of the new argument in SLPVectorizer & LV.
-
Louis Dionne authored
This makes it cleaner to add more instantiations without cluttering the actual implementation of ios.
-
Pavel Labath authored
This is similar in spirit to what D90313 did for server tests.
-
Nico Weber authored
This reverts commit 43a38a65, and follow-up 5a7bc5e2. The commit breaks check-clang-tools, the test added in the change does not pass.
-
Matt Arsenault authored
-
Louis Dionne authored
-
Aaron Ballman authored
-
Nico Weber authored
-
Matt Arsenault authored
-
Frank Derry Wanye authored
The altera kernel name restriction check finds kernel files and include directives whose filename is "kernel.cl", "Verilog.cl", or "VHDL.cl". Such kernel file names cause the Altera Offline Compiler to generate intermediate design files that have the same names as certain internal files, which leads to a compilation error. As per the "Guidelines for Naming the Kernel" section in the "Intel FPGA SDK for OpenCL Pro Edition: Programming Guide."
-
Dávid Bolvanský authored
-
Pavel Labath authored
the binary can contain more than three compile units if the compiler support files (crtbegin/end, etc.) come with their own debug info.
-
Evgeny Leviant authored
Patch fixes case when sched class has write and read variants belonging to different processor models. Differential revision: https://reviews.llvm.org/D89777
-
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.
-