- Jan 24, 2020
-
-
Saar Raz authored
Concepts will be available with Clang 10 - update cxx_status.html to reflect the papers that have been implemented.
-
Michael Spencer authored
Differential Revision: https://reviews.llvm.org/D70268 This is a recommit of f978ea49 with a fix for the PowerPC failure. The issue was that: * `CompilerInstance::ExecuteAction` calls `getTarget().adjust(getLangOpts());`. * `PPCTargetInfo::adjust` changes `LangOptions::HasAltivec`. * This happens after the first few calls to `getModuleHash`. There’s even a FIXME saying: ``` // FIXME: We shouldn't need to do this, the target should be immutable once // created. This complexity should be lifted elsewhere. ``` This only showed up on PowerPC because it's one of the few targets that almost always changes a hashed langopt. I looked into addressing the fixme, but that would be a much larger change, and it's not the only thing that happens in `ExecuteAction` that can change the module context hash. Instead I changed the code to not call `getModuleHash` until after it has been modified in `ExecuteAction`.
-
Changpeng Fang authored
Summary: RCP has the accuracy limit. If FDIV fpmath require high accuracy rcp may not meet the requirement. However, in DAG lowering, fpmath information gets lost, and thus we may generate either inaccurate rcp related computation or slow code for fdiv. In patch implements fdiv optimizations in the AMDGPUCodeGenPrepare, which could exactly know !fpmath. FastUnsafeRcpLegal: We determine whether it is legal to use rcp based on unsafe-fp-math, fast math flags, denormals and fpmath accuracy request. RCP Optimizations: 1/x -> rcp(x) when fast unsafe rcp is legal or fpmath >= 2.5ULP with denormals flushed. a/b -> a*rcp(b) when fast unsafe rcp is legal. Use fdiv.fast: a/b -> fdiv.fast(a, b) when RCP optimization is not performed and fpmath >= 2.5ULP with denormals flushed. 1/x -> fdiv.fast(1,x) when RCP optimization is not performed and fpmath >= 2.5ULP with denormals. Reviewers: arsenm Differential Revision: https://reviews.llvm.org/D71293 -
Johannes Doerfert authored
When we use information only to short-cut deduction or improve it, we can use OPTIONAL dependences instead of REQUIRED ones to avoid cascading pessimistic fixpoints. We also need to track dependences only when we use assumed information, e.g., we act on assumed liveness information.
-
Johannes Doerfert authored
If we use assumed information from AAValueSimplify we need to record an OPTIONAL dependence, otherwise we do not.
-
Johannes Doerfert authored
It can happen that we have instructions in the ToBeDeletedInsts set which are deleted earlier already. To avoid dangling pointers we use weak tracking handles.
-
Johannes Doerfert authored
When we follow uses, e.g., in AAMemoryBehavior or AANoCapture, we need to make sure the value is a pointer before we ask for abstract attributes only valid for pointers. This happens because we follow pointers through calls that do not capture but may return the value.
-
Johannes Doerfert authored
We might accidentally ask AAValueSimplify to simplify a void value. That can lead to very interesting, and very wrong, results. We now handle this case gracefully.
-
Jonas Devlieghere authored
Because of the way the Python hash function works, it's not guaranteed to be the same. This was causing a lot of reproducers to be generated for the same tests, even though the CWD or arguments didn't change. Switching to an MD5 hash should fix that.
-
Teresa Johnson authored
Fix bot failure by loosening up the register matching on new test: http://lab.llvm.org:8011/builders/clang-x86_64-debian-new-pass-manager-fast/builds/2423
-
Dmitry Polukhin authored
Summary: Clang releases include static libraries for clang-tidy but corresponding headers are missing in the tarball so these libraries are almost useless. Clang-tidy libraries can be useful for build custom clang-tidy with custom checks outside of llvm repo. List of clang-tidy libraries included in clang 9.0.1 release: lib/libclangTidyMPIModule.a lib/libclangTidyPlugin.a lib/libclangTidyBoostModule.a lib/libclangTidyCERTModule.a lib/libclangTidyAndroidModule.a lib/libclangTidyPortabilityModule.a lib/libclangTidyPerformanceModule.a lib/libclangTidyOpenMPModule.a lib/libclangTidyBugproneModule.a lib/libclangTidyZirconModule.a lib/libclangTidyCppCoreGuidelinesModule.a lib/libclangTidyGoogleModule.a lib/libclangTidyUtils.a lib/libclangTidyHICPPModule.a lib/libclangTidyModernizeModule.a lib/libclangTidyLLVMModule.a lib/libclangTidyAbseilModule.a lib/libclangTidyReadabilityModule.a lib/libclangTidyFuchsiaModule.a lib/libclangTidyMiscModule.a lib/libclangTidy.a lib/libclangTidyObjCModule.a Reviewers: smeenai, jdoerfert, alexfh, hokein, aaron.ballman Subscribers: mgehre, mgorny, xazax.hun, cfe-commits Tags: #clang-tools-extra, #clang Differential Revision: https://reviews.llvm.org/D73236 -
Alina Sbirlea authored
Create a utility wrapper for the RecursivelyDeleteTriviallyDeadInstructions utility method, which sets to nullptr the instructions that are not trivially dead. Use the new method in LoopStrengthReduce. Alternative: add a bool to the same method; this option adds a marginal amount of overhead to the other callers, and the method needs to be updated to return a bool status when it removes/doesn't remove instructions.
-
Saar Raz authored
As per P1980R0, constraint expressions are unevaluated operands, and their constituent atomic constraints only become constant evaluated during satisfaction checking. Change the evaluation context during parsing and instantiation of constraints to unevaluated.
-
Johannes Doerfert authored
If alignment was manifested but it is actually only as good as the data-layout provided one we should not report it as a change. For testing purposes we still manifest the information.
-
Johannes Doerfert authored
-
Johannes Doerfert authored
-
Johannes Doerfert authored
`byval` introduces a local copy of the argument. That copy cannot alias anything.
-
Johannes Doerfert authored
We accidentally used the store alignment for the value operand as well, which is incorrect and crashed the SPASS application in the test suite.
-
Teresa Johnson authored
Summary: Third part in series to support Safe Whole Program Devirtualization Enablement, see RFC here: http://lists.llvm.org/pipermail/llvm-dev/2019-December/137543.html This patch adds type test metadata under -fwhole-program-vtables, even for classes without hidden visibility. It then changes WPD to skip devirtualization for a virtual function call when any of the compatible vtables has public vcall visibility. Additionally, internal LLVM options as well as lld and gold-plugin options are added which enable upgrading all public vcall visibility to linkage unit (hidden) visibility during LTO. This enables the more aggressive WPD to kick in based on LTO time knowledge of the visibility guarantees. Support was added to all flavors of LTO WPD (regular, hybrid and index-only), and to both the new and old LTO APIs. Unfortunately it was not simple to split the first and second parts of this part of the change (the unconditional emission of type tests and the upgrading of the vcall visiblity) as I needed a way to upgrade the public visibility on legacy WPD llvm assembly tests that don't include linkage unit vcall visibility specifiers, to avoid a lot of test churn. I also added a mechanism to LowerTypeTests that allows dropping type test assume sequences we now aggressively insert when we invoke distributed ThinLTO backends with null indexes, which is used in testing mode, and which doesn't invoke the normal ThinLTO backend pipeline. Depends on D71907 and D71911. Reviewers: pcc, evgeny777, steven_wu, espindola Subscribers: emaste, Prazek, inglorion, arichardson, hiraditya, MaskRay, dexonsmith, dang, davidxl, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D71913
-
Alina Sbirlea authored
The utility method RecursivelyDeleteTriviallyDeadInstructions receives as input a vector of Instructions, where all inputs are valid instructions. This same vector is used as a scratch storage (per the header comment) to recursively delete instructions. If an instruction is added as an operand of multiple other instructions, it may be added twice, then deleted once, then the second reference in the vector is invalid. Switch to using a Vector<WeakTrackingVH>. This change facilitates a clean-up in LoopStrengthReduction.
-
Reid Kleckner authored
MSVC 2013 would refuse to pass highly aligned things (typically vectors and aggregates) by value. Users would receive this error: t.cpp(11) : error C2719: 'w': formal parameter with __declspec(align('32')) won't be aligned t.cpp(11) : error C2719: 'q': formal parameter with __declspec(align('32')) won't be aligned However, in MSVC 2015, this behavior was changed, and highly aligned things are now passed indirectly. To avoid breaking backwards incompatibility, objects that do not have a *required* high alignment (i.e. double) are still passed directly, even though they are not naturally aligned. This change implements the new behavior of passing things indirectly. The new behavior is: - up to three vector parameters can be passed in [XYZ]MM0-2 - remaining arguments with required alignment greater than 4 bytes are passed indirectly Previously, MSVC never passed things truly indirectly, meaning clang would always apply the byval attribute to indirect arguments. We had to go to the trouble of adding inalloca so that non-trivially copyable C++ types could be passed in place without copying the object representation. When inalloca was added, we asserted that all arguments passed indirectly must use byval. With this change, that assert no longer holds, and I had to update inalloca to handle that case. The implicit sret pointer parameter was already handled this way, and this change generalizes some of that logic to arguments. There are two cases that this change leaves unfixed: 1. objects that are non-trivially copyable *and* overaligned 2. vectorcall + inalloca + vectors For case 1, I need to touch C++ ABI code in MicrosoftCXXABI.cpp, so I want to do it in a follow-up. For case 2, my fix is one line, but it will require updating IR tests to use lots of inreg, so I wanted to separate it out. Related to D71915 and D72110 Fixes most of PR44395 Reviewed By: rjmccall, craig.topper, erichkeane Differential Revision: https://reviews.llvm.org/D72114 -
Amara Emerson authored
When I cached this a long time ago it seems I forgot to remove the locally declared variable of the same name in select(), so the caching wasn't having any compile time benefit. Doh.
-
aartbik authored
Summary: Rationale: Some examples were using "offsets : [0, 2]" syntax which should use a "=" instead. The same examples were referring to the integer attribute array as k-dimensional, which is a bit confusing (it is 1-dimensional, with k elements). Changed to "k-sized". Reviewers: nicolasvasilache, andydavis1, ftynse Reviewed By: nicolasvasilache Subscribers: merge_guards_bot, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, liufengdb, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D73293
-
Dominik Adamski authored
Scope of changes: 1) Moved RecordedAssumptions vector to ScopBuilder. RecordedAssumptions are used only for Scop constructions. 2) Moved definition of RecordedAssumptionsTy to ScopHelper. It is required both by ScopBuilder and SCEVAffinator. 3) Add new function recordAssumption to ScopHelper. One of its argument is a reference to RecordedAssumption vector. This function is used by ScopBuilder and SCEVAffinator. 4) All RecordedAssumptions are created by ScopBuilder. isl::pw_aff objects for corresponding SCEVs are created inside ScopBuilder. Scop functions do not record any assumptions. Scop can use isl::pw_aff objects which were created by ScopBuilder. 5) Removed functions for handling RecordedAssumptions from Scop class. 6) Removed constness from getScopArrayInfo functions. 7) Replaced SCEVVisitor struct from SCEVAffinator with taylored version, which allow to pass pointer to RecordedAssumptions as function argument. Differential Revision: https://reviews.llvm.org/D68056
-
Hubert Tong authored
Summary: This patch applies D60551 to an additional file. In particular, the test is currently marked XFAIL for a number of big-endian targets; however, the failure is actually dependent on the host endianness instead. The test actually specifies a specific target triple. Reviewers: rampitec, xingxue, daltenty Reviewed By: rampitec Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, fedor.sergeev, kerbowa, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D73192
-
Saar Raz authored
Now with concepts support merged and mostly complete, we do not need -fconcepts-ts (which was also misleading as we were not implementing the TS) and can enable concepts features under C++2a. A warning will be generated if users still attempt to use -fconcepts-ts.
-
shafik authored
We ran into an assert when debugging clang and performing an expression on a class derived from DeclContext. The assert was indicating we were getting the offsets wrong for RecordDeclBitfields. We were getting both the size and offset of unnamed bit-field members wrong. We could fix this case with a quick change but as I extended the test suite to include more combinations we kept finding more cases that were being handled incorrectly. A fix that handled all the new cases as well as the cases already covered required a refactor of the existing technique. Differential Revision: https://reviews.llvm.org/D72953
-
Amara Emerson authored
Works around PR44246.
-
Jonas Devlieghere authored
Explicitly disallow using lldb instead of %lldb in the shell tests. This is a clever trick that is used by Swift to achieve the same results. Differential revision: https://reviews.llvm.org/D73289
-
Mitch Phillips authored
Using the same strategy as c38e4252. D69825 revealed (introduced?) a problem when building with ASan, and some memory leaks somewhere. More details are available in the original patch. Looks like we missed one failing tests, this patch adds the workaround to this test as well.
-
Jonas Devlieghere authored
I guess PDB doesn't have column information?
-
aartbik authored
Summary: Rewrites get-i tup<a1,...,an> into ai Reviewers: nicolasvasilache, rriddle, andydavis1 Reviewed By: nicolasvasilache, rriddle, andydavis1 Subscribers: merge_guards_bot, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, liufengdb, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D73213
-
Florian Hahn authored
We currently use integer ranges to merge concrete function arguments. We use the ParamState range for those, but we only look up concrete values in the regular state. For concrete function arguments that are themselves arguments of the containing function, we can use the param state directly and improve the precision in some cases. Besides improving the results in some cases, this is also a small step towards switching to ValueLatticeElement, by allowing D60582 to be a NFC. Reviewers: efriedma, davide Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D71836
-
Saar Raz authored
[Concepts] Implement P1616R1 - Using unconstrained template template parameters with constrained templates Summary: Allow unconstrained template template parameters to accept constrainted templates as arguments. Reviewers: rsmith Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D73155
-
Matt Arsenault authored
-
Matt Arsenault authored
This wasn't updated for the immarg handling change. We really need a verifier for this.
-
Saar Raz authored
Proper ExpressionEvaluationContext were not being entered when instantiating constraint expressions, which caused assertion failures in certain cases, including bug #44614.
-
Teresa Johnson authored
Summary: Second patch in series to support Safe Whole Program Devirtualization Enablement, see RFC here: http://lists.llvm.org/pipermail/llvm-dev/2019-December/137543.html Summarize vcall_visibility metadata in ThinLTO global variable summary. Depends on D71907. Reviewers: pcc, evgeny777, steven_wu Subscribers: mehdi_amini, Prazek, inglorion, hiraditya, dexonsmith, arphaman, ostannard, llvm-commits, cfe-commits, davidxl Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D71911
-
Artem Belevich authored
Wrong argument order resulted in broken shfl ops for 64-bit types.
-
Evgenii Stepanov authored
This avoids a CFI-unfriendly function pointer type cast in internal_start_thread.
-