- May 11, 2020
-
-
Lang Hames authored
MaterializationResponsibility. MaterializationResponsibility objects provide a connection between a materialization process (compiler, jit linker, etc.) and the JIT state held in the ExecutionSession and JITDylib objects. Switching to shared ownership extends the lifetime of JITDylibs to ensure they remain accessible until all materializers targeting them have completed. This will allow (in a follow-up patch) JITDylibs to be removed from the ExecutionSession and placed in a pending-destruction state while they are kept alive to communicate errors to/from any still-runnning materialization processes. The intent is to enable JITDylibs to be safely removed even if they have running compiles targeting them.
-
Fangrui Song authored
Defaulting to -Xclang -coverage-version='407*' makes .gcno/.gcda compatible with gcov [4.7,8) In addition, delete clang::CodeGenOptionsBase::CoverageExtraChecksum and GCOVOptions::UseCfgChecksum. We can infer the information from the version. With this change, .gcda files produced by `clang --coverage a.o` linked executable can be read by gcov 4.7~7. We don't need other -Xclang -coverage* options. There may be a mismatching version warning, though. (Note, GCC r173147 "split checksum into cfg checksum and line checksum" made gcov 4.7 incompatible with previous versions.)
-
- May 10, 2020
-
-
Ricky Zhou authored
Commit 1e68724d removed the alignment argument from the memset intrinsic. Update the BrainF example to match. Reviewed By: jyknight Differential Revision: https://reviews.llvm.org/D79601
-
Matt Arsenault authored
-
Richard Smith authored
-
Richard Smith authored
Objective-C++11 and under MS extensions. This matches the MSVC behavior, and means that Objective-C behaves as a set of extensions to the base language, rather than replacing the base language rule with a different one.
-
Richard Smith authored
-
Martin Storsjö authored
This fixes an accidental breakage of exporting symbols using def files, when the symbol name contains a period, since commit 0ca06f79, mixing up a symbol name containing a period with the case of exporting a symbol as a forward to another dll. Differential Revision: https://reviews.llvm.org/D79619
-
Richard Smith authored
The 'class' or 'struct' keyword is only permitted as part of either an enum definition or a standalone opaque-enum-declaration, not as part of an elaborated type specifier. We previously failed to diagnose this, and generally didn't properly implement the restrictions on elaborated type specifiers for enumeration types. In passing, also fixed incorrect parsing for enum-bases, which we previously parsed as a type-name, but are actually a type-specifier-seq. This matters for cases like 'enum E : int *p;', which is valid as a Microsoft extension. Plus some minor parse diagnostic improvements. Bumped the recently-added ExtWarn for 'enum E : int x;' to be DefaultError; this is not an intentional extension, so producing an error by default seems appropriate, but the warning flag to disable it may still be useful for code written against old Clang. The same treatment is given here to the diagnostic for 'enum class E x;', which we similarly have incorrectly accepted for many years. These diagnostics continue to be suppressed under -fms-extensions and when compiling Objective-C code. We will need to decide separately whether Objective-C should follow the C++ rules or the (older) MSVC rules.
-
Fangrui Song authored
rL144865 incorrectly wrote function names for GCOV_TAG_FUNCTION (this might be part of the reasons the header says "We emit files in a corrupt version of GCOV's "gcda" file format"). rL176173 and rL177475 realized the problem and introduced -coverage-no-function-names-in-data to work around the issue. (However, the description is wrong. libgcov never writes function names, even before GCC 4.2). In reality, the linker command line has to look like: clang --coverage -Xclang -coverage-version='407*' -Xclang -coverage-cfg-checksum -Xclang -coverage-no-function-names-in-data Failing to pass -coverage-no-function-names-in-data can make gcov 4.7~7 either produce wrong results (for one gcov-4.9 program, I see "No executable lines") or segfault (gcov-7). (gcov-8 uses an incompatible format.) This patch deletes -coverage-no-function-names-in-data and the related function names support from libclang_rt.profile
-
Craig Topper authored
Mostly found by asserting on tests that have undef operands. I'm sure this isn't an exhaustive list.
-
Tyker authored
Summary: The assume builder was non-deterministic when working on unamed values. this patch fixes this. Reviewers: jdoerfert Reviewed By: jdoerfert Subscribers: hiraditya, mgrang, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D78616
-
Andrea Di Biagio authored
This fixes a bug reported by Alex Renda on LLVMDev where mca did not correctly mark a resource group as "reserved". (See http://lists.llvm.org/pipermail/llvm-dev/2020-May/141485.html). The issue was caused by a wrong check in function `initializeUsedResources`. As a consequence of this, a resource group was left unreserved, and its field `NumUnits` incorrectly reported an unrealistic number of consumed resource units. This patch fixes the issue with the handling of reserved resources in the InstrBuilder class, and adds a simple test for it. Ideally, as suggested by Andy Trick, most of these problems will disappear if in the future we will introduce a (optional) DelayCycles vector for SchedWriteRes.
-
Fangrui Song authored
-
Fangrui Song authored
This is needed to make 5a9b792d "[gcov] Temporarily unsupport host-byteorder-big-endian" work.
-
Fangrui Song authored
llvm-cov gcov does not support host-byteorder-big-endian yet.
-
Tyker authored
Summary: with this patch the assume salvageKnowledge will not generate assume if all knowledge is already available in an assume with valid context. assume bulider can also in some cases update an existing assume with better information. Reviewers: jdoerfert Reviewed By: jdoerfert Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D78014
-
Fangrui Song authored
Even a 2003 version of gcov_read_string does not have the behavior described by rL204881. The wrong impression might come from libclang_rt.profile (GCDAProfiling.c)'s corrupted output (since the initial import rL144865). Note, the corrupted output crashes gcov.
-
Fangrui Song authored
GCDAProfiling.c unnecessarily writes function names to .gcda files. GCC 4.2 gcc/libgcov.c (now renamed to libgcc/libgcov*) did not write function names. gcov-7 (compatible) crashes on .gcda produced by libclang_rt.profile rL176173 realized the problem and introduced a mode to remove function names. llvm-cov code apparently takes GCDAProfiling.c output format as truth and tries to decode function names. Additionally, llvm-cov tries to decode tags in certain order which does not match libgcov emitted .gcda files. This patch fixes the .gcda decoder and makes it work with GCC 8 and 9 (10 is compatible with 9). Note, line statistics are broken and not fixed by this patch. Add test/tools/llvm-cov/gcov-{4.7,8,9}.c to test compatibility.
-
Florian Hahn authored
Currently LAA's uses of ScalarEvolutionExpander blocks moving the expander from Analysis to Transforms. Conceptually the expander does not fit into Analysis (it is only used for code generation) and runtime-check generation also seems to be better suited as a transformation utility. Reviewers: Ayal, anemet Reviewed By: Ayal Differential Revision: https://reviews.llvm.org/D78460
-
Simon Pilgrim authored
-
Simon Pilgrim authored
-
Simon Pilgrim authored
-
Sanjay Patel authored
We have a transform in the opposite direction only for the x86 MMX type, Other types are not handled either way before this patch. The motivating case from PR45748: https://bugs.llvm.org/show_bug.cgi?id=45748 ...is the last test diff. In that example, we are triggering an existing bitcast transform, so we reduce the number of casts, and that should give us the ideal x86 codegen. Differential Revision: https://reviews.llvm.org/D79171
-
Sanjay Patel authored
This test would break with the proposed change to IR canonicalization in D79171. The test tried to do the right thing by only using -mem2reg with opt, but it was using -O3 before that step, so the opt part was meaningless.
-
Sanjay Patel authored
This test would break with the proposed change to IR canonicalization in D79171. The raw unoptimized IR from clang is massive, so I've replaced -instcombine with -mem2reg to make it more manageable, but still be unlikely to break with unrelated changed to optimization.
-
Simon Pilgrim authored
Fold or(zext(bitreverse(x)),shl(zext(bitreverse(y)),bw/2) -> bitreverse(or(zext(x),shl(zext(y),bw/2)) Practically this is the same as the BSWAP pattern so we might as well handle it.
-
Florian Hahn authored
The failing assertion has been fixed and the problematic test case has been added. This reverts the revert commit fc44617f.
-
Simon Pilgrim authored
-
Simon Pilgrim authored
-
Simon Pilgrim authored
-
Simon Pilgrim authored
Exposes implicit dependency in ModuleSymbolTable.h - added missing Module forward declaration.
-
Simon Pilgrim authored
We have to include LegacyPassManagers.h where its defined.
-
Florian Hahn authored
This reverts commit c28114c8. This causes some bots to fail: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-android/builds/30596/steps/build%20android%2Faarch64/logs/stdio
-
Alex Zinenko authored
Functions checking whether an SSA value is a valid dimension or symbol for affine operations can be called on values defined in a detached region (a region that is not yet attached to an operation), for example, during parsing or operation construction. These functions will attempt to uncondtionally dereference a pointer to the parent operation of a region, which may be null (as fixed by the previous commit, uninitialized before that). Since one cannot know to which operation a region will be attached, conservatively this operation would not be a valid affine scope and act accordingly, instead of crashing.
-
Alex Zinenko authored
Region has a default constructor that is called when a region is constructed while an operation is being created, and therefore before the region can be attached to this operation. The `container` field is uninitialized, which makes it impossible to check programmatically if a Region is attached to an operation or not, leading to sly memory errors when this field is read. Initialize it to nullptr by default and thus make sure one can check if a region is attached to an operation or not.
-
Florian Hahn authored
In order to reduce the API surface area (preparation for D78460), remove a addRuntimeChecks() function and do the additional check in the single caller. Reviewers: Ayal, anemet Reviewed By: Ayal Differential Revision: https://reviews.llvm.org/D79679
-
Sanjay Patel authored
We can combine a floating-point extension cast with a conversion from integer if we know the earlier cast is exact. This is an optimization suggested in PR36617: https://bugs.llvm.org/show_bug.cgi?id=36617#c19 However, this patch does not change the example suggested there. This patch only uses the existing analysis to handle cases where the integer source value magnitude is narrower than the intermediate FP mantissa (guarantees that the conversion to FP is exact). Follow-up patches to the analysis function can enable more cases. Differential Revision: https://reviews.llvm.org/D79116
-
LLVM GN Syncbot authored
-
Kadir Cetinkaya authored
Summary: PCH format is unstable, hence using a preamble built with a different version of clang (or even worse, a different compiler) might result in unexpected behaviour. PCH creation on the other hand is something clangd wouldn't want to perform, as it doesn't generate any output files. This patch makes sure clangd drops any PCH related compile commands after parsing the command line args. Fixes https://github.com/clangd/clangd/issues/248 Reviewers: sammccall Subscribers: mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D79669
-