- Oct 12, 2020
-
-
Nicolas Vasilache authored
This revision introduces support for buffer allocation for any named linalg op. To avoid template instantiating many ops, a new ConversionPattern is created to capture the LinalgOp interface. Some APIs are updated to remain consistent with MLIR style: `OwningRewritePatternList * -> OwningRewritePatternList &` `BufferAssignmentTypeConverter * -> BufferAssignmentTypeConverter &` Differential revision: https://reviews.llvm.org/D89226
-
Sam McCall authored
Differential Revision: https://reviews.llvm.org/D89131
-
Sam McCall authored
Currently the idiom for mapping optional fields is: ObjectMapper O(Val, P); if (!O.map("required1", Out.R1) || !O.map("required2", Out.R2)) return false; O.map("optional1", Out.O1); // ignore result return true; If `optional1` is present but malformed, then we won't detect/report that error. We may even leave `Out` in an incomplete state while returning true. Instead, we'd often prefer to ignore `optional1` if it is absent, but otherwise behave just like map(). Differential Revision: https://reviews.llvm.org/D89128 -
Simon Pilgrim authored
Revert rGb97093e5 - "[InstCombine] matchFunnelShift - fold or(shl(a,x),lshr(b,sub(bw,x))) -> fshl(a,b,x) iff x < bw" This reverts commit b97093e5. Funnel shift argument commutation isn't working correctly
-
Kazushi (Jam) Marukawa authored
VE doesn't have fneg or frem instruction, so change them to expand. Add regression tests also. Reviewed By: simoll Differential Revision: https://reviews.llvm.org/D89205
-
Kazushi (Jam) Marukawa authored
VE doesn't have BRCOND instruction, so need to expand it. Also add a regression test. Reviewed By: simoll Differential Revision: https://reviews.llvm.org/D89173
-
Haojian Wu authored
-
Evgeny Leviant authored
-
sstefan1 authored
Summary: Since willreturn will soon be added as default attribute, we can end up with both noreturn and willreturn on the same intrinsic. This was exposed by llvm.wasm.throw which has IntrNoReturn. Reviewers: jdoerfert, arsenm Differential Revision: https://reviews.llvm.org/D88644
-
Haojian Wu authored
The dependent mechanism for C error-recovery is mostly finished, this is the only place we have missed. Differential Revision: https://reviews.llvm.org/D89045
-
Haojian Wu authored
See whole context: https://reviews.llvm.org/D85025 Reviewed By: sammccall Differential Revision: https://reviews.llvm.org/D84304
-
Georgii Rymar authored
Specification for `SHT_HASH` table says (https://refspecs.linuxbase.org/elf/gabi4+/ch5.dynamic.html#hash) that it contains `Elf32_Word` entries for both `32/64` bit objects. But there is a problem with `EM_S390` and `ELF::EM_ALPHA` platforms: they use 8-bytes entries. (see the issue reported: https://bugs.llvm.org/show_bug.cgi?id=47681). Currently we might infer the size of the dynamic symbols table from hash table, but because of the issue mentioned, the calculation is wrong. And also we don't dump the hash table properly. I am not sure if we want to support 8-bytes entries as they violates specification and also the `.hash` table is kind of deprecated by itself (the `.gnu.hash` table is used nowadays). So, the solution this patch suggests is to ban using of the hash table on `EM_S390/EM_ALPHA` platforms. Differential revision: https://reviews.llvm.org/D88817
-
Haojian Wu authored
Given the following VarTemplateDecl AST, ``` VarTemplateDecl col:26 X |-TemplateTypeParmDecl typename depth 0 index 0 `-VarDecl X 'bool' cinit `-CXXBoolLiteralExpr 'bool' true ``` previously, we returned the VarDecl as the top-level decl, which was not correct, the top-level decl should be VarTemplateDecl. Differential Revision: https://reviews.llvm.org/D89098
-
Nicolas Vasilache authored
This reverts commit df295fac. Reactivates a spuriously rolled back change.
-
Alexander Belyaev authored
The buffer placement preparation tests in test/Transforms/buffer-placement-preparation* are using Linalg as a test dialect which leads to confusion and "copy-pasta", i.e. Linalg is being extended now and when TensorsToBuffers.cpp is changed, TestBufferPlacement is sometimes kept in-sync, which should not be the case. This has led to the unnoticed bug, because the tests were in a different directory and the patterns were slightly off. Differential Revision: https://reviews.llvm.org/D89209
-
David Sherwood authored
-
Roman Lebedev authored
While we indeed can't treat them as no-ops, i believe we can/should do better than just modelling them as `unknown`. `inttoptr` story is complicated, but for `ptrtoint`, it seems straight-forward to model it just as a zext-or-trunc of unknown. This may be important now that we track towards making inttoptr/ptrtoint casts not no-op, and towards preventing folding them into loads/etc (see D88979/D88789/D88788) Reviewed By: mkazantsev Differential Revision: https://reviews.llvm.org/D88806
-
David Sherwood authored
I have introduced a new template PolySize class, where the template parameter determines the type of quantity, i.e. for an element count this is just an unsigned value. The ElementCount class is now just a simple derivation of PolySize<unsigned>, whereas TypeSize is more complicated because it still needs to contain the uint64_t cast operator, since there are still many places in the code that rely upon this implicit cast. As such the class also still needs some of it's own operators. I've tried to minimise the amount of code in the base PolySize class, which led to a couple of changes: 1. In some places we were relying on '==' operator comparisons between ElementCounts and the scalar value 1. I didn't put this operator in the new PolySize class, and thought it was actually clearer to use the isScalar() function instead. 2. I removed the isByteSized function and replaced it with calls to isKnownMultipleOf(8). I've also renamed NextPowerOf2 to be coefficientNextPowerOf2 so that it's more consistent with coefficientDivideBy. Differential Revision: https://reviews.llvm.org/D88409
-
Kito Cheng authored
Let user able to know which -tune-cpu are used now. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D88951
-
Vitaly Buka authored
-
John McCall authored
This reverts commit b5a034e7. This feature was added without following the proper process.
-
Fangrui Song authored
-
Jonas Devlieghere authored
This reverts commit 849c6054 because it results in a stage 2 build failure: llvm-project/clang/include/clang/AST/ExternalASTSource.h:409:20: error: definition with same mangled name '_ZN5clang25LazyGenerationalUpdatePtrIPKNS_4DeclEPS1_XadL_ZNS_17ExternalASTSource19CompleteRedeclChainES3_EEE9makeValueERKNS_10ASTContextES4_' as another definition static ValueType makeValue(const ASTContext &Ctx, T Value);
-
Qiu Chaofan authored
fp-strict-conv-f128.ll is generated by script, but some manual MIR tests exist in it. Move them to another file to satisfy script when updating.
-
Valentin Clement authored
This patch introduces the acc.enter_data operation that represents an OpenACC Enter Data directive. Operands and attributes are dervied from clauses in the spec 2.6.6. Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D88941
-
Richard Smith authored
parameter in its notion of template argument identity. We already did this for all the other kinds of non-type template argument. We're still missing the type from the mangling, so we continue to be able to see collisions at link time; that's an open ABI issue.
-
Craig Topper authored
[ValueTracking] Use KnownBits::countMaxLeadingZeros/countMaxTrailingZeros to make code more readable. NFC
-
Richard Smith authored
This avoids diffs being applied in the work tree to files that are supposed to be excluded (clang tests), allows arc to properly provide interactive feedback for the formatting fixes, and reduces the number of files that we format, in a change affecting N files, from N^2 to N.
-
Christian Iversen authored
In ELF/InputFiles.cpp, getBitcodeMachineKind() is limited to uint8_t return type. This works as long as EM_xxx is < 256, which is true for common architectures, but not for some newly assigned or unofficial EM_* values. The corresponding ELF field (e_machine) can hold uint16_t. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D89185
-
Tres Popp authored
This is required or broadcasting with operands of different ranks will lead to failures as the select op requires both possible outputs and its output type to be the same. Differential Revision: https://reviews.llvm.org/D89134
-
Nathan Ridge authored
Fixes https://github.com/clangd/clangd/issues/510 Differential Revision: https://reviews.llvm.org/D87256
-
Roman Lebedev authored
And another step towards transforms not introducing inttoptr and/or ptrtoint casts that weren't there already. As we've been establishing (see D88788/D88789), if there is a int<->ptr cast, it basically must stay as-is, we can't do much with it. I've looked, and the most source of new such casts being introduces, as far as i can tell, is this transform, which, ironically, tries to reduce count of casts.. On vanilla llvm test-suite + RawSpeed, @ `-O3`, this results in -33.58% less `IntToPtr`s (19014 -> 12629) and +76.20% more `PtrToInt`s (18589 -> 32753), which is an increase of +20.69% in total. However just on RawSpeed, where i know there are basically none `IntToPtr` in the original source code, this results in -99.27% less `IntToPtr`s (2724 -> 20) and +82.92% more `PtrToInt`s (4513 -> 8255). which is again an increase of 14.34% in total. To me this does seem like the step in the right direction, we end up with strictly less `IntToPtr`, but strictly more `PtrToInt`, which seems like a reasonable trade-off. See https://reviews.llvm.org/D88860 / https://reviews.llvm.org/D88995 for some more discussion on the subject. (Eventually, `CastInst::isNoopCast()`/`CastInst::isEliminableCastPair` should be taught about this, yes) Reviewed By: nlopes, nikic Differential Revision: https://reviews.llvm.org/D88979
-
Fangrui Song authored
GCC 11 will define this macro. In LLVM, the feature flag only applies to 64-bit mode and we always define the macro in 32-bit mode. This is different from GCC -m32 in which -mno-sahf can suppress the macro. The discrepancy can unlikely cause trouble. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D89198
-
- Oct 11, 2020
-
-
David Green authored
This expands upon the inloop reductions added in e9761688e41cb9e976, allowing them to be inserted into tail folded loops. Reductions are generates with the form: x = select(mask, vecop, zero) v = vecreduce.add(x) c = add chain, v Where zero here is chosen as the identity value for add reductions. The backend is then expected to fold the select and the vecreduce into a single predicated instruction. Most of the code is fairly straight forward, except for the creation of blockmasks which need to ensure they are created in dominance order. The order they are added is altered to be after any phis, keeping the requirements for the underlying IR. Differential Revision: https://reviews.llvm.org/D84451
-
Zinovy Nis authored
Fix for https://bugs.llvm.org/show_bug.cgi?id=47779 Differential Revision: https://reviews.llvm.org/D89194
-
Nikita Popov authored
Test the case where a lifetime intrinsic may alias the memcpy source. Other cases test must or no alias.
-
David Green authored
-
Nikita Popov authored
Test read/write clobbers and the the non-local case.
-
Sanjay Patel authored
-
Sanjay Patel authored
As shown in the affected test, we could increase instruction count without this limitation. There's another test with extra use that shows we still convert directly to a real "sext" if possible.
-