- Jun 10, 2020
-
-
Matt Arsenault authored
This was already checked earlier for all instructions.
-
Matt Arsenault authored
New instructions were getting printed both in createdInstr, and in the final printNewInstrs, so it made it look like the same instructions were created twice. This overall made reading the debug output harder. Stop printing the initial construction and only print new instructions in the summary at the end. This avoids printing the less useful case where instructions are sometimes initially created with no operands. I'm not sure this is the correct instance to remove; now the visible ordering is different. Now you will typically see the one erased instruction message before all the new instructions in order. I think this is the more logical view of typical legalization changes, although it's mechanically backwards from the normal insert-new-erase-old pattern.
-
Jonas Devlieghere authored
Report files opened trough ::open and ::fopen to the FileCollector.
-
Mehdi Amini authored
Having the input dumped on failure seems like a better default: I debugged FileCheck tests for a while without knowing about this option, which really helps to understand failures. Remove `-dump-input-on-failure` and the environment variable FILECHECK_DUMP_INPUT_ON_FAILURE which are now obsolete. Differential Revision: https://reviews.llvm.org/D81422
-
Louis Dionne authored
This commit adds CMake caches for the various configurations of libc++ that are tested by our build bots. Differential Revision: https://reviews.llvm.org/D81293
-
Tridacnid authored
Assignment and Inc/Dec operators wouldn't register as a mutation when Implicit Paren Casts were present Add ignoringParenImpCasts to assignment and inc/dec mutation checks in ExprMutationAnalyzer to fix clang-tidy bug PR45490. https://bugs.llvm.org/show_bug.cgi?id=45490 Reviewed By: njames93, aaron.ballman, gribozavr2 Differential Revision: https://reviews.llvm.org/D79912
-
Louis Dionne authored
The availability markup for bad_optional_access marked it as being added in MacOS 10.14 and aligned releases, however it appears to have been added in Mac OS 10.13 and aligned releases.
-
Anh Tuyen Tran authored
[NFC][LV][TEST]: extend pr45679-fold-tail-by-masking.ll with -force-vector-width=1 -force-vector-interleave=4 Summary: Add -force-vector-width=1 -force-vector-interleave=4 to pr45679-fold-tail-by-masking.ll Author: anhtuyen (Anh Tuyen Tran) Reviewers: Ayal (Ayal Zaks) Reviewed By: Ayal (Ayal Zaks) Subscribers: rkruppe (Hanna Kruppe), llvm-commits, LLVM Tag: LLVM Differential Revision: https://reviews.llvm.org/D80446
-
Fangrui Song authored
Fixes PR45594. In `ObjFile<ELFT>::initializeSymbols()`, for a defined symbol relative to a discarded section (due to section group rules), it may have been inserted as a lazy symbol. We need to demote it to an Undefined to enable the `discarded section` error happened in a later pass. Add `LazyObjFile::fetched` (if true) and `ArchiveFile::parsed` (if false) to represent that there is an ongoing lazy symbol fetch and we should replace the current lazy symbol with an Undefined, instead of calling `Symbol::resolve` (`Symbol::resolve` should be called if the lazy symbol was added by an unrelated archive/lazy object). As a side result, one small issue in start-lib-comdat.s is now fixed. The hack motivating D51892 will be unsupported: if `.gnu.linkonce.t.__i686.get_pc_thunk.bx` in an archive is referenced by another section, this will likely be errored unless the function is also defined in a regular object file. (Bringing back rL330869 would error `undefined symbol` instead of the more relevant `discarded section`.) Note, glibc i386's crti.o still works (PR31215), because `.gnu.linkonce.t.__x86.get_pc_thunk.bx` is in crti.o (one of the first regular object files in a linker command line). Reviewed By: psmith Differential Revision: https://reviews.llvm.org/D79300
-
David Green authored
If a resource can be held for multiple cycles in the schedule model then an instruction can be placed into the available queue, another instruction can be scheduled, but the first will not be taken back out if the two instructions hazard. To fix this make sure that we update the available queue even on the first MOp of a cycle, pushing available instructions back into the pending queue if they now conflict. This happens with some downstream schedules we have around MVE instruction scheduling where we use ResourceCycles=[2] to show the instruction executing over two beats. Apparently the test changes here are OK too. Differential Revision: https://reviews.llvm.org/D76909
-
Fangrui Song authored
This allows an alternative lit runner (which does not chdir to %T) to run within a read-only source tree.
-
Simon Pilgrim authored
scalarizeBinop currently folds vec_bo((inselt VecC0, V0, Index), (inselt VecC1, V1, Index)) -> inselt(vec_bo(VecC0, VecC1), scl_bo(V0,V1), Index) This patch extends this to account for cases where one of the vec_bo operands is already all-constant and performs similar cost checks to determine if the scalar binop with a constant still makes sense: vec_bo((inselt VecC0, V0, Index), VecC1) -> inselt(vec_bo(VecC0, VecC1), scl_bo(V0,extractelt(V1,Index)), Index) Fixes PR42174 Differential Revision: https://reviews.llvm.org/D80885
-
Arthur Eubanks authored
Summary: Move check inside of addHeapAllocSiteMetadata(). Change check to DebugInfo <= DebugLineTablesOnly. Reviewers: akhuang Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D81481
-
Daniel Kiss authored
Summary: It is important to emit HINT instructions instead of BTI ones when BTI is disabled. This allows compatibility with other assemblers (e.g. GAS). Still, developers of assembly code will want to write code that is compatible with both pre- and post-BTI CPUs. They could use HINT mnemonics, but the new mnemonics are a lot more readable (e.g. bti c instead of hint #34), and they will result in the same encodings. So, while LLVM should not *emit* the new mnemonics when BTI is disabled, this patch will at least make LLVM *accept* assembly code that uses them. Reviewers: pbarrio, tamas.petz, ostannard Reviewed By: pbarrio, ostannard Subscribers: ostannard, kristof.beyls, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D81257
-
Jessica Paquette authored
Same idea as for zip, uzp, etc. Teach the post-legalizer combiner to recognize G_SHUFFLE_VECTORs that are trn1/trn2 instructions. - Add G_TRN1 and G_TRN2 - Port mask matching code from AArch64ISelLowering - Produce G_TRN1 and G_TRN2 in the post-legalizer combiner - Select via importer Add select-trn.mir to test selection. Add postlegalizer-combiner-trn.mir to test the combine. This is similar to the existing arm64-trn test. Note that both of these tests contain things we currently don't legalize. I figured it would be easier to test these now rather than later, since once we legalize the G_SHUFFLE_VECTORs, it's not guaranteed that someone will update the tests. Differential Revision: https://reviews.llvm.org/D81182
-
Jonas Devlieghere authored
Color the error: and warning: part of the CommandReturnObject output, similar to how an error is printed from the driver when colors are enabled. Differential revision: https://reviews.llvm.org/D81058
-
Louis Dionne authored
This effectively implements the resolution of LWG3231, which mandates that calling year_month_day_last::day() on an invalid year_month_day_last is unspecified behavior. Before this change, it was undefined behavior. Differential Revision: https://reviews.llvm.org/D81477
-
Stephan Herhut authored
Summary: The NVVM target only provides implementations for tanh etc. on f32 and f64 operands. To also support f16, we now insert operations to extend to f32 and truncate back to f16 around the intrinsic call. Differential Revision: https://reviews.llvm.org/D81473
-
Thomas Lively authored
Summary: As specified in https://github.com/WebAssembly/simd/pull/232. These instructions are implemented as LLVM intrinsics for now rather than normal ISel patterns to make these instructions opt-in. Once the instructions are merged to the spec proposal, the intrinsics will be replaced with proper ISel patterns. Reviewers: aheejin Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D81222
-
Yuanfang Chen authored
Summary: Right now it is a '<invalid sloc>' for cases like this. CounterCoverageMappingBuilder relies on the information to decide the region for a attributed loop. Fixes PR40971 Reviewers: ABataev, jdenny, lebedev.ri, aaron.ballman Reviewed by: jdenny, aaron.ballman Differential Revision: https://reviews.llvm.org/D80944
-
Saiyedul Islam authored
Summary: __builtin_amdgcn_atomic_inc32(int *Ptr, int Val, unsigned MemoryOrdering, const char *SyncScope) __builtin_amdgcn_atomic_inc64(int64_t *Ptr, int64_t Val, unsigned MemoryOrdering, const char *SyncScope) __builtin_amdgcn_atomic_dec32(int *Ptr, int Val, unsigned MemoryOrdering, const char *SyncScope) __builtin_amdgcn_atomic_dec64(int64_t *Ptr, int64_t Val, unsigned MemoryOrdering, const char *SyncScope) First and second arguments gets transparently passed to the amdgcn atomic inc/dec intrinsic. Fifth argument of the intrinsic is set as true if the first argument of the builtin is a volatile pointer. The third argument of this builtin is one of the memory-ordering specifiers ATOMIC_ACQUIRE, ATOMIC_RELEASE, ATOMIC_ACQ_REL, or ATOMIC_SEQ_CST following C++11 memory model semantics. This is mapped to corresponding LLVM atomic memory ordering for the atomic inc/dec instruction using CLANG atomic C ABI. The fourth argument is an AMDGPU-specific synchronization scope defined as string. Reviewers: arsenm, sameerds, JonChesterfield, jdoerfert Reviewed By: arsenm, sameerds Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, jfb, kerbowa, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D80804
-
msifontes authored
Implemented a verification to ensure that the shape.assuming_all operation always has at least one operand.
-
Louis Dionne authored
This increases the Mac OS requirement for building libc++ to 10.12. Note that it doesn't change whether the *headers* still support older platforms -- it's only that macOS >= 10.12 is required to build the dylib from sources. Differential Revision: https://reviews.llvm.org/D74489
-
Fangrui Song authored
[DebugInfo] Drop unneeded format() calls (fix -Wformat-security) after 3b7ec64d
-
Henry Kao authored
Summary: Implemented in replaceZeroVectorStore(). Fixes several warnings in AArch64 SVE unit tests. Reviewers: sdesmalen, kmclaughlin, dancgr, efriedma, each, andwar, rengolin Reviewed By: sdesmalen Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D80824
-
Simon Pilgrim authored
Fixes OSS-Fuzz #23214 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=23214
-
Arthur Eubanks authored
Check that getDebugInfo() is not null, as in the first revision, before calling getDebugInfo()->addHeapAllocSiteMetadata(). Else would cause a crash with a new expression in a default arg. --- Clang marks calls to operator new as heap allocation sites, but the operator declared at global scope returns a void pointer. There is no explicit cast in the code, so the compiler has to write down the allocated type itself. Also generalize a cast to use CallBase, so that we mark heap alloc sites when exceptions are enabled. Differential Revision: https://reviews.llvm.org/D80966
-
- Jun 09, 2020
-
-
Kadir Cetinkaya authored
Summary: Instead of a notification, we make use of a CV and store the boolean on LatestPreamble by converting it into an optional. Depends on D80293. Reviewers: sammccall Subscribers: ilya-biryukov, javed.absar, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D80784
-
Aaron Puchert authored
Summary: The attribute just means that there will be no regular return, it still leaves room for exceptions to be thrown. It is easily verified: there are no direct returns and the last statement is either a throw or a call to abort. Having the annotation helps static analyzers with this code from Support/MemAlloc.h (slightly simplified): LLVM_ATTRIBUTE_RETURNS_NONNULL inline void *safe_malloc(size_t Sz) { void *Result = std::malloc(Sz); if (Result == nullptr) report_bad_alloc_error("Allocation failed"); return Result; } Were report_bad_alloc_error to return regularly, the function would return nullptr, contradicting the attribute. Reviewers: rnk, sepavloff, dblaikie, aaron.ballman Reviewed By: dblaikie, aaron.ballman Differential Revision: https://reviews.llvm.org/D81318 -
Xing GUO authored
This patch enables yaml2elf emit the .debug_line section. Test cases for emitting the dwarf64 .debug_line section and opcodes will be added later. Known issues: - We should replace `InitialLength` with `Format` and `Length` - Currently implementation of the .debug_line section only fully supports DWARFv2, some header fields in DWARFv4 and DWARFv5 is missing, e.g., `header_length` in DWARFv4, `address_size` and `segment_selector_size` in DWARFv5. - Some opcodes relies on the .debug_info section, we should warn user about it. These issues will be addressed in a follow-up patch. Reviewed By: jhenderson, grimar Differential Revision: https://reviews.llvm.org/D81450
-
Tamás Koller authored
-
Florian Hahn authored
I couldn't find a generic intrinsic with 6 arguments in tree for a unit test, but soon there will be one.
-
Florian Hahn authored
This re-generates some check lines, after the naming of values got improved, to reduce the size of diffs in follow-on patches.
-
Louis Dionne authored
This reverts commit 0c148430, which added an assertion in day(). The Standard doesn't allow day() to crash -- instead it says that the result is unspecified. Differential Revision: https://reviews.llvm.org/D70346
-
Sanjay Patel authored
If fmul and fadd are separated by an fma, we can fold them together to save an instruction: fadd (fma A, B, (fmul C, D)), N1 --> fma(A, B, fma(C, D, N1)) The fold implemented here is actually a specialization - we should be able to peek through >1 fma to find this pattern. That's another patch if we want to try that enhancement though. This transform was guarded by the TLI hook enableAggressiveFMAFusion(), so it was done for some in-tree targets like PowerPC, but not AArch64 or x86. The hook is protecting against forming a potentially more expensive computation when fma takes longer to execute than a single fadd. That hook may be needed for other transforms, but in this case, we are replacing fmul+fadd with fma, and the fma should never take longer than the 2 individual instructions. 'contract' FMF is all we need to allow this transform. That flag corresponds to -ffp-contract=fast in Clang, so we are allowed to form fma ops freely across expressions. Differential Revision: https://reviews.llvm.org/D80801
-
Sanjay Patel authored
-
Bruno Ricci authored
`32 - 8 - 1 - NumExprBits` is now only equal to 6, which is way too small. Add a test so that this does not happen again.
-
Bruno Ricci authored
This mirrors what is done for built-in operators.
-
LLVM GN Syncbot authored
-
LLVM GN Syncbot authored
-