- Dec 09, 2022
-
-
Jeff Niu authored
This patch removes the `arg_attrs` and `res_attrs` named attributes as a requirement for FunctionOpInterface and replaces them with interface methods for the getters, setters, and removers of the relevent attributes. This allows operations to use their own storage for the argument and result attributes. Depends on D139471 Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D139472
-
Jeff Niu authored
The remove*Attr methods were not being generated with the correct camelcase method. Depends on D139470 Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D139471
-
Jeff Niu authored
Depends on D139447 Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D139470
-
Jeff Niu authored
This patch removes the concept of a `function_type`-named type attribute as a requirement for implementors of FunctionOpInterface. Instead, this type should be provided through two interface methods, `getFunctionType` and `setFunctionTypeAttr` (*Attr because functions may use different concrete function types), which should be automatically implemented by ODS for ops that define a `$function_type` attribute. This also allows FunctionOpInterface to materialize function types if they don't carry them in an attribute, for example. Importantly, all the function "helper" still accept an attribute name to use in parsing and printing functions, for example. Reviewed By: rriddle, lattner Differential Revision: https://reviews.llvm.org/D139447
-
Leonard Chan authored
[compiler-rt] Add opt-in -ftrivial-auto-var-init flag for writing over uninitialized stack variiables This might allow lsan to find more leaks that would have gone undetected. When lsan searches for leaked pointers on the stack, if a leaked pointer that was pushed to the stack in a prior function call would not be scrubbed on a future function call, then the scan will see the pointer on the stack and not mark it as leaked. Such holes can exist in the lsan runtime where there may be uninitialized data. Adding auto-var-init can scrub some of that data and might be able to catch more leaks that would've gone undetected this way. See https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=111351 for more details. Differential Revision: https://reviews.llvm.org/D135716
-
Sanjay Patel authored
-
Sanjay Patel authored
This reverts commit e71b81ca. As discussed in the planned follow-on to this patch (D138874), this and the subsequent patches in this set can cause trouble for the backend, and there's probably no quick fix. We may even want to canonicalize in the opposite direction (towards insertelt).
-
Sanjay Patel authored
This reverts commit b7c7fe3d. As discussed in the planned follow-on to this patch (D138874), this and the previous patch in this set can cause trouble for the backend, and there's probably no quick fix. We may even want to canonicalize in the opposite direction (towards insertelt).
-
Corentin Jabot authored
This patch causes another link error, reverting until I can investigate. This reverts commit a96a6ed8.
-
Vlad Serebrennikov authored
P1787: //[[ https://cplusplus.github.io/CWG/issues/418.html | CWG418 ]] is resolved by trivial rephrasing along with that necessary for the new using-declaration interpretation.// Wording: see changes to [dcl.fct.default]/9 and [over.match.best]/4. [over.match.best]/4 includes [[ https://eel.is/c++draft/over.match.best#general-example-8 | an example ]] that is not properly diagnosed by Clang. Reviewed By: #clang-language-wg, shafik Differential Revision: https://reviews.llvm.org/D139429
-
Joseph Huber authored
Summary: Building with `lld` now errors on undefined symbols by default now. This was causing `libomp` to think that the compiler didn't support version scripts when checking linker features. This patch adds a new script that exports all symbols to be used for testing. We also remove the old workarounds for undefined versions now that it's no longer necessary.
-
Paul Walker authored
-
Aaron Ballman authored
This includes tests for DR085 and DR259.
-
Alexander Belyaev authored
Differential Revision: https://reviews.llvm.org/D139650
-
Paul Kirth authored
This reverts commit 071c39df. One of the new runtimes tests causes a failure with MSVC, so I'm reverting until the test can be fixed.
-
Philip Reames authored
We already have this rule encoded elsewhere in the file - which is why we don't see any test changes. I'm adding it here for completionism. This is not technically NFC since there could be a test case which isn't caught by the specific rules, but is handled by the generic logic. I don't have such an example.
-
Kazu Hirata authored
This patch updates the test for the streaming operator for llvm::Optional to use std::nullopt instead of llvm::None. This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716 Differential Revision: https://reviews.llvm.org/D139513
-
Arthur Eubanks authored
Without checking template parameters, we would sometimes lookup the wrong type definition for a type declaration because different instantiations of the same template class had the same debug info name. The added GetForwardDeclarationDIETemplateParams() shouldn't need a cache because we'll cache the results of the declaration -> definition lookup anyway. (DWARFASTParserClang::ParseStructureLikeDIE() is_forward_declaration branch) Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D138834
-
Paul Kirth authored
In many cases, we can use an alias to avoid a symbolic relocations, instead of using the public, interposable symbol. When the instrumented function is in a COMDAT, we can use a hidden alias, and still avoid references to discarded sections. Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D137982
-
Roman Lebedev authored
[SROA] For non-speculatable `load`s of `select`s -- split block, insert then/else blocks, form two-entry PHI node, take 2 Currently, SROA is CFG-preserving. Not doing so does not affect any pipeline test. (???) Internally, SROA requires Dominator Tree, and uses it solely for the final `-mem2reg` call. By design, we can't really SROA alloca if their address escapes somehow, but we have logic to deal with `load` of `select`/`PHI`, where at least one of the possible addresses prevents promotion, by speculating the `load`s and `select`ing between loaded values. As one would expect, that requires ensuring that the speculation is actually legal. Even ignoring complexity bailouts, that logic does not deal with everything, e.g. `isSafeToLoadUnconditionally()` does not recurse into hands of `select`. There can also be cases where the load is genuinely non-speculate. So if we can't prove that the load can be speculated, unfold the select, produce two-entry phi node, and perform predicated load. Now, that transformation must obviously update Dominator Tree, since we require it later on. Doing so is trivial. Additionally, we don't want to do this for the final SROA invocation (D136806). In the end, this ends up having negative (!) compile-time cost: https://llvm-compile-time-tracker.com/compare.php?from=c6d7e80ec4c17a415673b1cfd25924f98ac83608&to=ddf9600365093ea50d7e278696cbfa01641c959d&stat=instructions:u Though indeed, this only deals with `select`s, `PHI`s are still using speculation. Should we update some more analysis? Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D138238 This reverts commit 73961187, and recommits 03e6d9d9 with a fixed assertion - we should check that DTU is there, not just assert false...
-
Michael Buch authored
**Summary** Older versions of `make` would occasionally fail to realize that a pre-requisite for the `a.out` target has changed. This resulted in roughly 1 out of 10 test runs to fail. Instead of relying on `make` to resolve this dependency simply remove the file before rebuilding; this will give make no option but to remake `a.out`. **Testing** * Confirmed that the test passes on the host for 100 runs where without the patch it would fail after ~10 **Details** Adding `-d` to lldbtest's `make` invocation and running the test without this patch sometimes yielded: ``` Removing child 0x600000308ff0 PID 19915 from chain. Successfully remade target file `rebuild.o'. Finished prerequisites of target file `a.out'. Prerequisite `rebuild.o' is newer than target `a.out'. No need to remake target `a.out'. ``` Differential Revision: https://reviews.llvm.org/D139643 -
Roman Lebedev authored
Revert "[SROA] For non-speculatable `load`s of `select`s -- split block, insert then/else blocks, form two-entry PHI node" The assertion about not modifying the CFG seems to not hold, will recommit in a bit. https://lab.llvm.org/buildbot#builders/139/builds/32412 This reverts commit 03e6d9d9. This reverts commit 4f90f4ad.
-
bixia1 authored
Reviewed By: Peiming Differential Revision: https://reviews.llvm.org/D139636
-
Roman Lebedev authored
-
Peter Klausler authored
Rework the recursive I/O error check on I/O units so that threads again hold a lock on a unit throughout an I/O statement. Add an API to the runtime's Lock class implementation for pthreads to allow detection of solf-deadlock without depending on EDEADLK or recursive mutexes. This should fix I/O from OpenMP threads. Differential Revision: https://reviews.llvm.org/D139477
-
Jakub Kuderski authored
-
Brett Wilson authored
Reads template information from the AST and adds template parameters and specialization information to the corresponding clang-doc structures. Add a "QualName" to the Reference struct which includes the full qualified type name. The Reference object represents a link in the HTML/MD generators so is based on the unqualified name. But this does not encode C-V qualifiers or template information that decorate the name. The new QualName member encodes all of this information and also makes it easier for the generators or downsteam YAML consumers to generate the full name (before they had to process the "Path"). In test code that was changed, remove made-up paths to built-in types like "int". In addition to slightnly cleaning up the code, these types do not have paths in real execution, and generating incorrect references to nonexistant data may complicate future changes in the generators. Convert llvm::Optional to std::optional (YAML library requires this for the new usage,...
-
- Dec 08, 2022
-
-
bixia1 authored
Reviewed By: aartbik, wrengr Differential Revision: https://reviews.llvm.org/D139591
-
Haojian Wu authored
To make the lit test print-header-json.c passed on a file-content-hash file system.
-
Sanjay Patel authored
This reverts commit dd8d0d21. As discussed in the planned follow-on to this patch (D138874), this and the previous patch in this set can cause trouble for the backend, and there's probably no quick fix. We may even want to canonicalize in the opposite direction (towards insertelt).
-
Krzysztof Parzyszek authored
-
Guillaume Chatelet authored
-
Roman Lebedev authored
[SROA] For non-speculatable `load`s of `select`s -- split block, insert then/else blocks, form two-entry PHI node Currently, SROA is CFG-preserving. Not doing so does not affect any pipeline test. (???) Internally, SROA requires Dominator Tree, and uses it solely for the final `-mem2reg` call. By design, we can't really SROA alloca if their address escapes somehow, but we have logic to deal with `load` of `select`/`PHI`, where at least one of the possible addresses prevents promotion, by speculating the `load`s and `select`ing between loaded values. As one would expect, that requires ensuring that the speculation is actually legal. Even ignoring complexity bailouts, that logic does not deal with everything, e.g. `isSafeToLoadUnconditionally()` does not recurse into hands of `select`. There can also be cases where the load is genuinely non-speculate. So if we can't prove that the load can be speculated, unfold the select, produce two-entry phi node, and perform predicated load. Now, that transformation must obviously update Dominator Tree, since we require it later on. Doing so is trivial. Additionally, we don't want to do this for the final SROA invocation (D136806). In the end, this ends up having negative (!) compile-time cost: https://llvm-compile-time-tracker.com/compare.php?from=c6d7e80ec4c17a415673b1cfd25924f98ac83608&to=ddf9600365093ea50d7e278696cbfa01641c959d&stat=instructions:u Though indeed, this only deals with `select`s, `PHI`s are still using speculation. Should we update some more analysis? Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D138238
-
Simon Pilgrim authored
Similar to what we've done for HasMFence - this puts into place a pseudo-predicate for CLFLUSH instructions that separates it from HasSSE2 to make it easier to use CLFLUSH even when SSE/fpmath has been disabled - technically CLFLUSH has its own CPUID bit, so could be available on x86 cores entirely without SSE, but I don't think thats ever happened or likely to happen.
-
Nico Weber authored
I tried `-undefined suppress` without `-flat_namespace`. lld printed `'-undefined suppress' only valid with '-flat_namespace'` followed by many many screenfuls of error messages about undefined symbols, making the original diag hard to see. This is probably the common case when using `-undefined`, so let's just abort the link immediately when there's an invalid `-undefined` arg. Differential Revision: https://reviews.llvm.org/D139559
-
Sebastian Neubauer authored
Add a test to show a deficit in the current wwm/spilling code that creates double saves and restores for v40 and v41. This case came up in D124193. Differential Revision: https://reviews.llvm.org/D139626
-
Luke Lau authored
These passes were lying around but weren't initialized, so they weren't showing up in -print-after-all. Differential Revision: https://reviews.llvm.org/D139440
-
Haojian Wu authored
-
Alexandros Lamprineas authored
This reverts commit 42c2dc40. This broke some buildbots: undefined reference to `llvm::createBitTrackingDCEPass()' undefined reference to `llvm::createAlignmentFromAssumptionsPass()' undefined reference to `llvm::createLoopUnrollPass(int, bool, bool, int, int, int, int, int, int)' undefined reference to `llvm::createLICMPass(unsigned int, unsigned int, bool)' undefined reference to `llvm::createWarnMissedTransformationsPass()' undefined reference to `llvm::createAlignmentFromAssumptionsPass()' undefined reference to `llvm::createCallSiteSplittingPass()' undefined reference to `llvm::createCFGSimplificationPass(llvm::SimplifyCFGOptions, std::function<bool (llvm::Function const&)>)' undefined reference to `llvm::createFloat2IntPass()' undefined reference to `llvm::createLowerConstantIntrinsicsPass()' undefined reference to `llvm::createLoopRotatePass(int, bool)' undefined reference to `llvm::createLoopDistributePass()' undefined reference to `llvm::createLoopSinkPass()' undefined reference to `llvm::createInstSimplifyLegacyPass()' undefined reference to `llvm::createDivRemPairsPass()' undefined reference to `llvm::createCFGSimplificationPass(llvm::SimplifyCFGOptions, std::function<bool (llvm::Function const&)>)' undefined reference to `llvm::SetLicmMssaOptCap' undefined reference to `llvm::SetLicmMssaNoAccForPromotionCap' undefined reference to `llvm::ForgetSCEVInLoopUnroll'
-
Alexandros Lamprineas authored
This reverts commit 877a9f9a. It depends on the parent revision 42c2dc40 which needs to be reverted as it broke some buildbots, so reverting both.
-