- May 21, 2020
-
-
Ehud Katz authored
In case the then-path of an if-region is empty, then merging with the else-path should be handled with the inverse of the condition (leading to that path). Fix PR37662 Differential Revision: https://reviews.llvm.org/D78881
-
Kirstóf Umann authored
The patch aims to use CallEvents interface in a more principled manner, and also to highlight what this checker really does. It in fact checks for 5 different kinds of errors (from checkPreCall, that is): * Invalid function pointer related errors * Call of methods from an invalid C++ this object * Function calls with incorrect amount of parameters * Invalid arguments for operator delete * Pass of uninitialized values to pass-by-value parameters In a previous patch I complained that this checker is responsible for emitting a lot of different diagnostics all under core.CallAndMessage's name, and this patch shows where we could start to assign different diagnostics to different entities. Differential Revision: https://reviews.llvm.org/D77846
-
Simon Pilgrim authored
We don't need anything specifically from GlobalValue.h
-
Roman Lebedev authored
Summary: Currently, `rewriteLoopExitValues()`'s logic is roughly as following: > Loop over each incoming value in each PHI node. > Query whether the SCEV for that incoming value is high-cost. > Expand the SCEV. > Perform sanity check (`isValidRewrite()`, D51582) > Record the info > Afterwards, see if we can drop the loop given replacements. > Maybe perform replacements. The problem is that we interleave SCEV cost checking and expansion. This is A Problem, because `isHighCostExpansion()` takes special care to not bill for the expansions that were already expanded, and we can reuse. While it makes sense in general - if we know that we will expand some SCEV, all the other SCEV's costs should account for that, which might cause some of them to become non-high-cost too, and cause chain reaction. But that isn't what we are doing here. We expand *all* SCEV's, unconditionally. So every next SCEV's cost will be affected by the already-performed expansions for previous SCEV's. Even if we are not planning on keeping some of the expansions we performed. Worse yet, this current "bonus" depends on the exact PHI node incoming value processing order. This is completely wrong. As an example of an issue, see @dmajor's `pr45835.ll` - if we happen to have a PHI node with two(!) identical high-cost incoming values for the same basic blocks, we would decide first time around that it is high-cost, expand it, and immediately decide that it is not high-cost because we have an expansion that we could reuse (because we expanded it right before, temporarily), and replace the second incoming value but not the first one; thus resulting in a broken PHI. What we instead should do for now, is not perform any expansions until after we've queried all the costs. Later, in particular after `isValidRewrite()` is an assertion (D51582) we could improve upon that, but in a more coherent fashion. See [[ https://bugs.llvm.org/show_bug.cgi?id=45835 | PR45835 ]] Reviewers: dmajor, reames, mkazantsev, fhahn, efriedma Reviewed By: dmajor, mkazantsev Subscribers: smeenai, nikic, hiraditya, javed.absar, llvm-commits, dmajor Tags: #llvm Differential Revision: https://reviews.llvm.org/D79787
-
Sjoerd Meijer authored
This is split off from D80316, slightly tightening the definition of overloaded hardwareloop intrinsic llvm.loop.decrement.reg specifying that both operands its result have the same type.
-
Nicolas Vasilache authored
Summary: Also expose some more vector ops to EDSCs. Differential Revision: https://reviews.llvm.org/D80333
-
Paula Toth authored
Summary: I found that because `--system-headers` flag was not included when running clang-tidy, errors produced from compiler provided headers were being suppressed. After passing this flag I realized that by including headers like stdint.h we were indirectly including headers from the system libc. To prevent this we pass `-ffreestanding`. We don't want to pass `--system-headers` for all checks just the `llvmlibc-restrict-system-libc-headers` therefore we do a separate invocation of clang-tidy for this check. Reviewers: abrachet, sivachandra Reviewed By: sivachandra Subscribers: mgorny, aheejin, tschuett, ecnelises, libc-commits Tags: #libc-project Differential Revision: https://reviews.llvm.org/D80178
-
Denis Antrushin authored
We do not have any special handling for constant FP deopt arguments. They are just spilled to stack or generated in register by MOVS instruction. This is inefficient and, when we have too many such constant arguments, may result in register allocation failure. Instead, we can bitcast such constant FP operands to appropriately sized integer and record as constant into statepoint and later, into StackMap. Reviewed By: skatkov Differential Revision: https://reviews.llvm.org/D80318
-
Benjamin Kramer authored
NFC.
-
Haojian Wu authored
getField() may return a nullptr, we already did that in BodyIndexer::VisitDesignatedInitExpr, but missed one place.
-
David Sherwood authored
I have refactored the code so that we no longer need the ScalableVecArgument descriptor - the scalable property of vectors is now encoded using the ElementCount class in IITDescriptor. This means that when matching intrinsics we know precisely how to match the arguments and return values. Differential Revision: https://reviews.llvm.org/D80107
-
Chen Zheng authored
Reviewed By: steven.zhang Differential Revision: https://reviews.llvm.org/D80097
-
Sam Parker authored
With the two getIntrinsicInstrCosts folded into one, now fold in the scalar/code-size orientated getIntrinsicCost. This involved sinking cost of the TTIImpl into the base implementation, as it performs no target checks. The opcodes remaining were memcpy, cttz and ctlz which now have special handling in the BasicTTI implementation. getInstructionThroughput can now directly return the result of getUserCost. This had required a change in the AMDGPU backend for fabs and its always 'free'. I've also changed the X86 backend to return '1' for any intrinsic when the CostKind isn't RecipThroughput. Though this intended to be a non-functional change, there are many paths being combined here so I would be very surprised if this didn't have an effect. Differential Revision: https://reviews.llvm.org/D80012
-
Jonas Devlieghere authored
Fixes or skips tests in the python_api subdirectory that were failing with passive replay.
-
Jonas Devlieghere authored
This reverts commit ef210318 because it breaks the Windows bot: http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/16447 Failing Tests (2): ... lldb-unit :: API/./APITests.exe/failed_to_discover_tests_from_gtest
-
Sam Parker authored
This has not been implemented by any backends which appear to cover the functionality through getCastInstrCost. Sink what there is in the default implementation into BasicTTI. Differential Revision: https://reviews.llvm.org/D78922
-
Igor Kudrin authored
The function does not need an MCStreamer per se; it was used only to get access to the MCContext. Differential Revision: https://reviews.llvm.org/D80205
-
Yevgeny Rouban authored
Hide the method that allows setting probability for particular edge and introduce a public method that sets probabilities for all outgoing edges at once. Setting individual edge probability is error prone. More over it is difficult to check that the total probability is 1.0 because there is no easy way to know when the user finished setting all the probabilities. Related bug is fixed in BranchProbabilityInfo::calcMetadataWeights(). Changing unreachable branch probabilities to raw(1) and distributing the rest (oldProbability - raw(1)) over the reachable branches could introduce total probability inaccuracy bigger than 1/numOfBranches. Reviewers: yamauchi, ebrevnov Tags: #llvm Differential Revision: https://reviews.llvm.org/D79396
-
Craig Topper authored
[LegalizeDAG] Modify ExpandLegalINT_TO_FP to swap data for little/big endian instead of the pointers. Will make it easier to pass the pointer info and alignment correctly to the loads/stores. While there also make the i32 stores independent and use a token factor to join before the load.
-
Mehdi Amini authored
This reverts commit cdb6f05e. The build is broken with: You have called ADD_LIBRARY for library obj.MLIRGPUtoCUDATransforms without any source files. This typically indicates a problem with your CMakeLists.txt file
-
Mehdi Amini authored
-
Julian Lettner authored
The oldest supported deployment target currently is 10.7 [1]. We can remove a few outdated checks. [1] https://github.com/llvm/llvm-project/blob/3db893b3712a5cc98ac0dbc88e08df70069be216/compiler-rt/cmake/config-ix.cmake#L397 Reviewed By: delcypher Differential Revision: https://reviews.llvm.org/D79958
-
Juneyoung Lee authored
-
LLVM GN Syncbot authored
-
Juneyoung Lee authored
Summary: If an induction variable is frozen and used, SCEV yields imprecise result because it doesn't say anything about frozen variables. Due to this reason, performance degradation happened after https://reviews.llvm.org/D76483 is merged, causing SCEV yield imprecise result and preventing LSR to optimize a loop. The suggested solution here is to add a pass which canonicalizes frozen variables inside a loop. To be specific, it pushes freezes out of the loop by freezing the initial value and step values instead & dropping nsw/nuw flags from instructions used by freeze. This solution was also mentioned at https://reviews.llvm.org/D70623 . Reviewers: spatel, efriedma, lebedev.ri, fhahn, jdoerfert Reviewed By: fhahn Subscribers: nikic, mgorny, hiraditya, javed.absar, llvm-commits, sanwou01, nlopes Tags: #llvm Differential Revision: https://reviews.llvm.org/D77523
-
Jake Merdich authored
Summary: The predefined styles that clang-format supports are listed in two places, and neither is up-to-date. GNU style isn't mentioned at all! Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D80309
-
Kirstóf Umann authored
-
Eli Friedman authored
The offsets were wrong. The result is now the same as what the compiler would generate for a function that spills lr normally. Differential Revision: https://reviews.llvm.org/D80238
-
Eli Friedman authored
If we don't know anything about the alignment of a pointer, Align(1) is still correct: all pointers are at least 1-byte aligned. Included in this patch is a bugfix for an issue discovered during this cleanup: pointers with "dereferenceable" attributes/metadata were assumed to be aligned according to the type of the pointer. This wasn't intentional, as far as I can tell, so Loads.cpp was fixed to stop making this assumption. Frontends may need to be updated. I updated clang's handling of C++ references, and added a release note for this. Differential Revision: https://reviews.llvm.org/D80072
-
Reid Kleckner authored
Summary: This is a pre-requisite to parallelizing PDB symbol and type merging. Currently this timer usage would not be thread safe. Reviewers: aganea, MaskRay Subscribers: jfb, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D80298
-
Kirstóf Umann authored
-
Francis Visoiu Mistrih authored
With the new SVE stack layout, we now need to provide a Darwin variant for all the calling conventions based on the main AAPCS CSR save order. This also changes APCS_SwiftError to have a Darwin and a non-Darwin version, assuming it could be used on other platforms these days, and restricts the AArch64_CXX_TLS calling convention to Darwin. Differential Revision: https://reviews.llvm.org/D73805
-
Stanislav Mekhanoshin authored
Even though series of cmd/cndmask can produce quite a lot of code that is still better than a loop. In case of doubles we would even produce two loops. Differential Revision: https://reviews.llvm.org/D80032
-
Craig Topper authored
Previously this code just used a default constructed MachinePointerInfo. But we know the accesses are to a fixed stack object or at least somewhere on the stack. While there fix the alignment passed to the full vector load/stores. I don't think this function is currently exercised in tree so I don't know how to test it. I just noticed it when I removed non-constant index support in this function. Differential Revision: https://reviews.llvm.org/D80058
-
- May 20, 2020
-
-
Nicolas Vasilache authored
-
Wen-Heng (Jack) Chung authored
Summary: Consolidate interfaces adding workgroup and private buffer attributions in GPU dialect. Note all private buffer attributions must follow workgroup buffer attributions. Reviewers: herhut Subscribers: mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, nicolasvasilache, csigg, arpith-jacob, mgester, lucyrfox, liufengdb, stephenneuendorffer, Joonsoo, grosul1, frgossen, Kayjukh, llvm-commits Tags: #llvm, #mlir Differential Revision: https://reviews.llvm.org/D79508
-
Wen-Heng (Jack) Chung authored
Due to similar APIs between CUDA and ROCm (HIP), ConvertGpuLaunchFuncToCudaCalls pass could be used on both platforms with some refactoring. In this commit: - Migrate ConvertLaunchFuncToCudaCalls from GPUToCUDA to GPUCommon, and rename. - Rename runtime wrapper APIs be platform-neutral. - Let GPU binary annotation attribute be specifiable as a PassOption. - Naming changes within the implementation and tests. Subsequent patches would introduce ROCm-specific tests and runtime wrapper APIs. Differential Revision: https://reviews.llvm.org/D80167
-
Jonas Devlieghere authored
On Windows the line must match: Use 'lldb.exe --help' for a complete list of options.
-
Nicolas Vasilache authored
-