- Jun 16, 2021
-
-
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
-
Kevin Athey authored
Unnecessary with -fsanitize-address-use-after-return=never. for issue: https://github.com/google/sanitizers/issues/1394 Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D104154
-
Andrew Browne authored
Before this change, DFSan was relying fallback cases when getting origin address. Differential Revision: https://reviews.llvm.org/D104266
-
Louis Dionne authored
Also, fix the last issue that prevented GCC 11 from passing the test suite. Thanks to everyone else who fixed issues. Differential Revision: https://reviews.llvm.org/D104315
-
Jim Ingham authored
Instead dial it up explicitly. This test started failing recently and I'm not sure why. It also doesn't make sense to me the replacing "run" with "process launch -X 1 --" should make any difference - run is an alias for the latter. But it does pass with the change, and unless we are testing for the exact run alias, it's better to ask for what we want explicitly.
-
Wenlei He authored
This allows overriding the `CMAKE_CXX_VISIBILITY_PRESET` on the command line. For example, setting the value to `default` lets PIC LLVM static libraries be converted to DSOs, without the need to rebuild LLVM with BUILD_SHARED_LIBS=ON. Reviewed By: wenlei Differential Revision: https://reviews.llvm.org/D104168
-
Aart Bik authored
Reviewed By: gussmith23 Differential Revision: https://reviews.llvm.org/D104277
-
Jim Ingham authored
cfb96d84.
-
Fangrui Song authored
-
MaheshRavishankar authored
Differential Revision: https://reviews.llvm.org/D104273
-
Zequan Wu authored
Verifying opaque pointer as function parameter when using with `byval`, `byref`, `inalloca`, `preallocated`. Differential Revision: https://reviews.llvm.org/D104309
-
Aart Bik authored
This is a very careful start with alllowing sparse tensors at the left-hand-side of tensor index expressions (viz. sparse output). Note that there is a subtle difference between non-annotated tensors (dense, remain n-dim, handled by classic bufferization) and all-dense annotated "sparse" tensors (linearized to 1-dim without overhead storage, bufferized by sparse compiler, backed by runtime support library). This revision gently introduces some new IR to facilitate annotated outputs, to be generalized to truly sparse tensors in the future. Reviewed By: gussmith23, bixia Differential Revision: https://reviews.llvm.org/D104074
-
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. In this patch, we use a "common" linkage for this variable so that it will be GC'ed by the linker. Differential Revision: https://reviews.llvm.org/D103988
-
Jim Ingham authored
This is an NFC cleanup. Many of the API's that returned BreakpointOptions always returned valid ones. Internally the BreakpointLocations usually have null BreakpointOptions, since they use their owner's options until an option is set specifically on the location. So the original code used pointers & unique_ptr everywhere for consistency. But that made the code hard to reason about from the outside. This patch changes the code so that everywhere an API is guaranteed to return a non-null BreakpointOption, it returns it as a reference to make that clear. It also changes the Breakpoint to hold a BreakpointOption member where it previously had a UP. Since we were always filling the UP in the Breakpoint constructor, having the UP wasn't helping anything. Differential Revision: https://reviews.llvm.org/D104162
-
Peyton, Jonathan L authored
* Add GOMP versioned pause functions * Add GOMP versioned affinity format functions To do the affinity format functions, only attach versioned symbols to the APPEND Fortran entries (e.g., omp_set_affinity_format_) since GOMP only exports two symbols (one for Fortran, one for C). Our affinity format functions have three symbols. e.g., with omp_set_affinity_format: 1) omp_set_affinity_format (Fortran interface) 2) omp_set_affinity_format_ (Fortran interface) 3) ompc_set_affinity_format (C interface) Have the GOMP version of the C symbol alias the ompc_* 3) version instead of the Fortran unappended version 1). Differential Revision: https://reviews.llvm.org/D103647
-
Peyton, Jonathan L authored
Remove strange checks for syscall() arguments where mask is NULL. Valgrind reports these as error usages for the syscall. Instead, just check if CACHE_LINE bytes is long enough. If not, then search for the size. Also, by limiting the first size detection attempt to CACHE_LINE bytes, instead of 1MB, we don't use more than one cache line for the mask size. Before this patch, sometimes the returned mask size was 640 bytes (10 cache lines) because the initial call to getaffinity() was limited only by the internal kernel mask size which can be very large. Differential Revision: https://reviews.llvm.org/D103637
-