- Jun 16, 2021
-
-
Diana Picus authored
Add a test to make sure the flang runtime doesn't pull in the C++ runtime libraries. This is achieved by adding a C file that calls some functions from the runtime (currently only CpuTime, but we should probably add anything complicated enough, e.g. IO-related things). We force the C compiler to use -std=c90 to make sure it's really in C mode (we don't really care which version of the standard, this one is probably more widely available). We only enable this test if CMAKE_C_COMPILER is set to something (which is probably always true in practice). This is a recommit of 7ddbf263, with 2 fixes: * Replace C++ comments with C comments * Only enable the test if libFortranRuntime.a exists (this might not be the case if e.g. BUILD_SHARED_LIBS=On) Differential Revision: https://reviews.llvm.org/D104290
-
Jay Foad authored
This does not affect codegen but might benefit llvm-mca.
-
Guillaume Chatelet authored
This reverts commit 4694321f.
-
Guillaume Chatelet authored
Resubmission of D100646 now making sure that we handle cases were `__builtin_memcpy_inline` is not available. Original commit message: Each of these elementary operations can be assembled to support higher order constructs (Overlapping access, Loop, Aligned Loop). The patch does not compile yet as it depends on other ones (D100571, D100631) but it allows to get the conversation started. A self-contained version of this code is available at https://godbolt.org/z/e1x6xdaxM
-
Raphael Isemann authored
`vwprintw` is (in theory) using the `arargs.h` va_list while `vw_printw` is using the `stdarg.h` va_list. It seems these days they can be used interchangeably but `vwprintw` is marked as deprecated.
-
Jay Foad authored
This does not affect codegen but might benefit llvm-mca.
-
Diana Picus authored
This reverts commit 7ddbf263. This doesn't work if we're not building libFortranRuntime.a. I'll recommit with a fix.
-
Nico Weber authored
Differential Revision: https://reviews.llvm.org/D104345
-
Nico Weber authored
Differential Revision: https://reviews.llvm.org/D104347
-
Konstantin Schwarz authored
During PHDR creation, the case where an output section does not require a PT_LOAD header but still occupies memory in the current VMA region was not handled. If such an output section interleaves two output sections that have the same VMA and LMA regions set, we would previously re-use the existing PT_LOAD header for the second output section. However, since the memory region is not contiguous, we need to start a new PT_LOAD segment. This fixes https://bugs.llvm.org/show_bug.cgi?id=50558 Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D103815
-
Alex Zinenko authored
Default implementations of interfaces may rely on extra class declarations, which aren't currently generated in the external model, that in turn may rely on functions defined in the main Attribute/Type class, which wouldn't be available on the external model.
-
David Green authored
Under MVE v4f32 and v8f16 vectors should be using v4i1/v8i1 predicates for the setcc result type, as they have predicated registers for those types. Setting this correctly prevents some inefficient optimizations from happening.
-
David Green authored
-
Diana Picus authored
Replace C++ comments with C-style comments (not sure why my C compiler doesn't complain about this).
-
Sjoerd Meijer authored
-
Diana Picus authored
Flang diverges from the llvm coding style in that it requires braces around the bodies of if/while/etc statements, even when the body is a single statement. This commit adds the readability-braces-around-statements check to flang's clang-tidy config file. Hopefully the premerge bots will pick it up and report violations in Phabricator. We also explicitly disable the check in the directories corresponding to the Lower and Optimizer libraries, which rely heavily on mlir and llvm and therefore follow their coding style. Likewise for the tools directory. We also fix any outstanding violations in the runtime and in lib/Semantics. Differential Revision: https://reviews.llvm.org/D104100
-
Sjoerd Meijer authored
-
James Henderson authored
This patch adds support for a new field in the FileHeader, which states the name to use for the section header string table. This also allows combining the string table with another string table in the object, e.g. the symbol name string table. The field is optional. By default, .shstrtab will continue to be used. This partially fixes https://bugs.llvm.org/show_bug.cgi?id=50506. Reviewed by: Higuoxing Differential Revision: https://reviews.llvm.org/D104035
-
James Henderson authored
There was an off-by-one error caused by an index (which included an index for the null section header) being used to check against the size of a list of sections (which didn't include the null section header). This is a partial fix for https://bugs.llvm.org/show_bug.cgi?id=50506. Reviewed by: MaskRay Differential Revision: https://reviews.llvm.org/D104098
-
Jay Foad authored
This does not affect codegen, which only tests these flags on Pseudo instructions, but might help llvm-mca which has to work with Real instructions. In particular setting LGKM_CNT on DS instructions helps with the problem identified in D104149. Differential Revision: https://reviews.llvm.org/D104293
-
Diana Picus authored
Add a test to make sure the flang runtime doesn't pull in the C++ runtime libraries. This is achieved by adding a C file that calls some functions from the runtime (currently only CpuTime, but we should probably add anything complicated enough, e.g. IO-related things). We force the C compiler to use -std=c90 to make sure it's really in C mode (we don't really care which version of the standard, this one is probably more widely available). We only enable this test if CMAKE_C_COMPILER is set to something (which is probably always true in practice). Differential Revision: https://reviews.llvm.org/D104290
-
Jay Foad authored
Factor out repeated !cast<SOP*_Pseudo>(NAME) into a new "defvar ps", just to improve readability and maintainability. Differential Revision: https://reviews.llvm.org/D104306
-
Joachim Protze authored
Commit cff21556 did not fix all unused variables in different builds, so adding back the suppression for now.
-
Sjoerd Meijer authored
Adds some bookkeeping for collecting the number of specialised functions and a test for that. Differential Revision: https://reviews.llvm.org/D104102
-
Lang Hames authored
Addresses FIXMEs in TPC-based EH-frame and debug object registration code by replacing manual argument serialization with WrapperFunction utility calls.
-
Andrzej Warzynski authored
As `external-hello-world` is not really a test, I am moving it from `flang/unittest/Runtime` to `flang/examples` (it makes a lot of sense as an example). I've not modified the source code (apart from adjusting the include paths). Differential Revision: https://reviews.llvm.org/D104320
-
Andrzej Warzynski authored
The new option will run the semantic checks and then dump the parse tree and all the symbols. This is equivalent to running the driver twice, once with `-fdebug-dump-parse-tree` and then with the `-fdebug-dump-symbols` action flag. Currently we wouldn't be able to achieve the same by simply running: ``` flang-new -fc1 -fdebug-dump-parse-tree -fdebug-dump-symbols <input-file> ``` That's because the new driver will only run one frontend action per invocation (both of the flags used here are action flags). Diverging from this design would lead to costly compromises and it's best avoided. We may want to consider re-designing our debugging actions (and action options) in the future so that there's more code re-use. For now, I'm focusing on making sure that we support all the major cases requested by our users. Differential Revision: https://reviews.llvm.org/D104305
-
Joachim Protze authored
Several variables were left unused as a result of different patches removing their use. Two variables have some use: `poll_count` is used by the KMP_BLOCKING macro only under certain conditions. Adding (void) to tell the compiler to ignore the unused variable. `padding` is a dummy stack allocation with no intent to be used. Also adding (void) to make the compiler ignore the unused variable. Differential Revision: https://reviews.llvm.org/D104303
-
Roman Lebedev authored
As per the discussion in D103818, so far, this does not appear to be worthwhile. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D103818
-
Roman Lebedev authored
As per (committed without review) @reames's rGac81cb7e change, we are now allowed to produce `ptrtoint` for non-integral pointers. This will unblock further unbreaking of SCEV regarding int-vs-pointer type confusion. Reviewed By: mkazantsev Differential Revision: https://reviews.llvm.org/D104322
-
Evgeniy Brevnov authored
Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D103954
-
Andrew Browne authored
-
Chen Zheng authored
Fix LLDB buidbot breakage due to D104291 Differential Revision: https://reviews.llvm.org/D104291
-
Rong Xu authored
We create flag variable "__llvm_fs_discriminator__" in the binary to indicate that FSAFDO hierarchical discriminators are used. This variable might be GC'ed by the linker since it is not explicitly reference. I initially added the var to the use list in pass MIRFSDiscriminator but it did not work. It turned out the used global list is collected in lowering (before MIR pass) and then emitted in the end of pass pipeline. Here I add the variable to the use list in IR level's AddDiscriminators pass. The machine level code is still keep in the case IR's AddDiscriminators is not invoked. If this is the case, this just use -Wl,--export-dynamic-symbol=__llvm_fs_discriminator__ to force the emit. Differential Revision: https://reviews.llvm.org/D103988
-
Peter Steinfeld authored
I added the only check that wasn't already tested along with tests for many valid and invalid arguments. Differential Revision: https://reviews.llvm.org/D104318
-
Fangrui Song authored
We are settled with -fsanitize-coverage-ignorelist (D101832). Just delete -fsanitize-coverage-blocklist which is also new.
-
Chen Zheng authored
Reviewed By: stuart Differential Revision: https://reviews.llvm.org/D104291
-
Saleem Abdulrasool authored
This was broken in ba1509da. The Win64 frame would not perform the setup of the Swift async context parameter but would tear down the setup in the epilogue resulting in crashes. This ensures that we do the full setup when we do the tear down. Although this is non-conforming to the Win64 calling convention, it corrects the setup and exposes the actual issue that the change introduced: incorrect frame setup. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D104246
-
Chuanqi Xu authored
The original implementation calculating UserBonus uses operator ^, which means XOR in C++ language. At the first glance of reviewing, I thought it should be power, my bad. It doesn't make sense to use XOR here. So I believe it should be a carelessness as I made. Test Plan: check-all Reviewed By: SjoerdMeijer Differential Revision: https://reviews.llvm.org/D104282
-