- Dec 01, 2020
-
-
Amy Huang authored
The existing code handles this correctly and I checked that the code in NativeInlineSiteSymbol also handles this correctly, but it was wrong in the NativeFunctionSymbol code. Differential Revision: https://reviews.llvm.org/D92134
-
Joachim Protze authored
-
Duncan P. N. Exon Smith authored
Change the `InputFile` class to store `Optional<FileEntryRef>` instead of `FileEntry*`. This paged in a few API changes: - Added `FileManager::getVirtualFileRef`, and converted `getVirtualFile` to a wrapper of it. - Updated `SourceManager::bypassFileContentsOverride` to take `FileEntryRef` and return `Optional<FileEntryRef>` (`ASTReader::getInputFile` is the only caller). Differential Revision: https://reviews.llvm.org/D90053
-
Todd Erdner authored
With the change to using shared memory, there were a few problems that need to be fixed. - The previous filename that was used for SHM only used process id. Given that process is usually based on 16bit number, this was causing some conflicts on machines. Thus we add UID to the name to prevent this. - It appears under some conditions (SIGTERM, etc) the shared memory files were not getting cleaned up. Added a call to clean up the shm files under those conditions. For this user needs to set envirable KMP_HANDLE_SIGNALS to true. Patch by Erdner, Todd <todd.erdner@intel.com> Differential Revision: https://reviews.llvm.org/D91869
-
AndreyChurbanov authored
Once __kmp_task_finish is not executed for proxy tasks, move mutexinoutset dependency code to __kmp_release_deps which is executed for all task kinds. Differential Revision: https://reviews.llvm.org/D92326
-
Nico Weber authored
They've been implemented since D87856 but since they still were HelpHidden, the driver still warned claiming they were implemented. Remove HelpHidden. Use -fatal_warnings to test that the flags now don't warn. The test depends on D91894 and D91891 to pass. Differential Revision: https://reviews.llvm.org/D91971
-
Nico Weber authored
Now, new mach-o lld no longer warns if the isysroot has just usr/lib and System/Library/Frameworks but is missing usr/local/lib and System/Frameworks. This matches ld64 and old mach-o lld and fixes a regression from D85992. It also fixes the only test failure in `check-lld` when running it on an M1 Mac. Differential Revision: https://reviews.llvm.org/D91891
-
Aaron En Ye Shi authored
On Windows, lld is instead named lld.exe, therefore a few HIP tests are failing. Instead the wildcard should be modified to .*lld.* to handle .exe. This fixes the bug: https://bugs.llvm.org/show_bug.cgi?id=48289. Differential Revision: https://reviews.llvm.org/D92342
-
Fangrui Song authored
After D17993, with -fno-delete-null-pointer-checks we add the dereferenceable attribute to the `this` pointer. We have observed that one internal target which worked before fails even with -fno-delete-null-pointer-checks. Switching to dereferenceable_or_null fixes the problem. dereferenceable currently does not always respect NullPointerIsValid and may imply nonnull and lead to aggressive optimization. The optimization may be related to `CallBase::isReturnNonNull`, `Argument::hasNonNullAttr`, or `Value::getPointerDereferenceableBytes`. See D66664 and D66618 for some discussions. Reviewed By: bkramer, rsmith Differential Revision: https://reviews.llvm.org/D92297
-
Florian Hahn authored
This adjusts the tests to cover more scenarios.
-
Paul Robinson authored
Now that we flush the local value map for every instruction, we don't need any extra flushes for specific cases. Also, LastFlushPoint is not used for anything. Follow-ups to #dc35368c (D91734). Differential Revision: https://reviews.llvm.org/D92338
-
Tom Stellard authored
-
Yitzhak Mandelbaum authored
A number of declarations were leftover after the move from `clang::tooling` to `clang::transformer`. This patch removes those declarations and upgrades the handful of references to the deprecated declarations. Differential Revision: https://reviews.llvm.org/D92340
-
Eric Astor authored
Differential Revision: https://reviews.llvm.org/D89741
-
Matt Arsenault authored
-
Mircea Trofin authored
Enable performing mandatory inlinings upfront, by reusing the same logic as the full inliner, instead of the AlwaysInliner. This has the following benefits: - reduce code duplication - one inliner codebase - open the opportunity to help the full inliner by performing additional function passes after the mandatory inlinings, but before th full inliner. Performing the mandatory inlinings first simplifies the problem the full inliner needs to solve: less call sites, more contextualization, and, depending on the additional function optimization passes run between the 2 inliners, higher accuracy of cost models / decision policies. Note that this patch does not yet enable much in terms of post-always inline function optimization. Differential Revision: https://reviews.llvm.org/D91567
-
Nikita Popov authored
Apart from getting the entry in the table (which is already a separate function), the remaining logic is different for all alignment types and is better combined with getAlignment(). This is a minor efficiency improvement, and should make further improvements like using separate storage for different alignment types simpler.
-
Nick Lewycky authored
Creating a named struct requires only a Context and a name, but looking up a struct by name requires a Module. The method on Module merely accesses the LLVMContextImpl and no data from the module itself, so this patch moves getTypeByName to a static method on StructType that takes a Context and a name. There's a small number of users of this function, they are all updated. This updates the C API adding a new method LLVMGetTypeByName2 that takes a context and a name. Differential Revision: https://reviews.llvm.org/D78793
-
Eric Astor authored
If prefaced with a %, expand text macros and macro functions in any statement. Also, prevent expanding text macros in the message of an ECHO directive unless expanded explicitly by the statement expansion operator. Reviewed By: thakis Differential Revision: https://reviews.llvm.org/D89740
-
Sanjay Patel authored
-
Sjoerd Meijer authored
The model was committed in 4b8ade83 but not yet enabled to allow for a few fix ups. This adds a few of these fixes, and also a LLVM MCA test to check most instructions. While I do have plans to look into some more tuning, it's time to enable this as it better than using the A53 schedule. Differential Revision: https://reviews.llvm.org/D88017
-
Hongtao Yu authored
Disabling a pseudo probe test on non-x86 platforms since it's not fully tested there.
-
Paul Robinson authored
This option is not used for anything after #dc35368c (D91734).
-
Harald van Dijk authored
For LP64 mode, this has no effect as pointers are already 64 bits. For ILP32 mode (x32), this extension is specified by the ABI. Reviewed By: pengfei Differential Revision: https://reviews.llvm.org/D91338
-
Leonard Chan authored
Under the relative vtables ABI, __dynamic_cast will not work since it assumes the vtable pointer is 2 ptrdiff_ts away from the start of the vtable (8-byte offset to top + 8-byte pointer to typeinfo) when it is actually 8 bytes away (4-byte offset to top + 4-byte offset to typeinfo). This adjusts the logic under __dynamic_cast and other areas vtable calculations are done to support this ABI when it's used. Differential Revision: https://reviews.llvm.org/D77606
-
Simon Pilgrim authored
Pass through the demanded elts mask to the source operands. The next step will be to add support for folding to add/sub if we only demand odd/even elements.
-
LLVM GN Syncbot authored
-
Hongtao Yu authored
This change introduces a new clang switch `-fpseudo-probe-for-profiling` to enable AutoFDO with pseudo instrumentation. Please refer to https://reviews.llvm.org/D86193 for the whole story. One implication from pseudo-probe instrumentation is that the profile is now sensitive to CFG changes. We perform the pseudo instrumentation very early in the pre-LTO pipeline, before any CFG transformation. This ensures that the CFG instrumented and annotated is stable and optimization-resilient. The early instrumentation also allows the inliner to duplicate probes for inlined instances. When a probe along with the other instructions of a callee function are inlined into its caller function, the GUID of the callee function goes with the probe. This allows samples collected on inlined probes to be reported for the original callee function. Reviewed By: wmi Differential Revision: https://reviews.llvm.org/D86502
-
Hongtao Yu authored
This change introduces a pseudo probe instrumentation pass for block instrumentation. Please refer to https://reviews.llvm.org/D86193 for the whole story. Given the following LLVM IR: ``` define internal void @foo2(i32 %x, void (i32)* %f) !dbg !4 { bb0: %cmp = icmp eq i32 %x, 0 br i1 %cmp, label %bb1, label %bb2 bb1: br label %bb3 bb2: br label %bb3 bb3: ret void } ``` The instrumented IR will look like below. Note that each llvm.pseudoprobe intrinsic call represents a pseudo probe at a block, of which the first parameter is the GUID of the probe’s owner function and the second parameter is the probe’s ID. ``` define internal void @foo2(i32 %x, void (i32)* %f) !dbg !4 { bb0: %cmp = icmp eq i32 %x, 0 call void @llvm.pseudoprobe(i64 837061429793323041, i64 1) br i1 %cmp, label %bb1, label %bb2 bb1: call void @llvm.pseudoprobe(i64 837061429793323041, i64 2) br label %bb3 bb2: call void @llvm.pseudoprobe(i64 837061429793323041, i64 3) br label %bb3 bb3: call void @llvm.pseudoprobe(i64 837061429793323041, i64 4) ret void } ``` Reviewed By: wmi Differential Revision: https://reviews.llvm.org/D86499
-
Fangrui Song authored
Continue the work started at D50989. The code has been long dead since the triple has been removed (D75494). Reviewed By: nickdesaulniers, void Differential Revision: https://reviews.llvm.org/D91836
-
Simon Pilgrim authored
Also fix a copy+paste typo in the elts_addsub_v4f32 demanded elts test from the godbolt reference
-
Kazushi (Jam) Marukawa authored
Update comments. I forgot to update it previously when I modified code.
-
Francesco Petrogalli authored
The mapping between registers and relative size has been updated to use TypeSize to account for the size of scalable EVTs. The patch is a NFCI, if not for the fact that with this change the function `getUnderlyingArgRegs` does not raise a warning for implicit conversion of `TypeSize` to `unsigned` when generating machine code from the test added to the patch. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D92096
-
Kazushi (Jam) Marukawa authored
Optimize prologue/epilogue instructions if a given function use GOT but do not call other functions by eliminating FP. Previously, we had wrong implementations taken from other architectures. Update regression tests also. Reviewed By: simoll Differential Revision: https://reviews.llvm.org/D92313
-
Kazushi (Jam) Marukawa authored
Previously, these check routines accepted non-generatble instructions. This time, I clean them and add assert for those non-generatable instructions. Reviewed By: simoll Differential Revision: https://reviews.llvm.org/D92254
-
Zarko Todorovski authored
-
Balazs Benics authored
The fd parameter of ``` void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset) ``` should be constrained to the range [0, IntMax] as that is of type int. Constraining to the range [0, Off_tMax] would result in a crash as that is of a signed type with the value of 0xff..f (-1). The crash would happen when we try to apply the arg constraints. At line 583: assert(Min <= Max), as 0 <= -1 is not satisfied The mmap64 is fixed for the same reason. Reviewed By: martong, vsavchenko Differential Revision: https://reviews.llvm.org/D92307
-
Kevin P. Neal authored
Currently clang is not correctly retrieving from the AST the metadata for constrained FP builtins. This patch fixes that for the non-target specific builtins. Differential Revision: https://reviews.llvm.org/D92122
-
Gabor Marton authored
CXXDeductionGuideDecl is a FunctionDecl, but its constructor should be called appropriately, at least to set the kind variable properly. Differential Revision: https://reviews.llvm.org/D92109
-
Praveen G authored
Add the semantic checks for the OpenMP 4.5 - 2.15.3.3 Private clause. 1. Pointers with the INTENT(IN) attribute may not appear in a private clause. 2. Variables that appear in namelist statements may not appear in a private clause. A flag 'InNamelist' is added to the Symbol::Flag to identify the symbols in Namelist statemnts. Test cases : omp-private01.f90, omp-private02.f90 Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D90210
-