- Jun 10, 2020
-
-
Mitch Phillips authored
-
Mitch Phillips authored
-
Mitch Phillips authored
-
Mitch Phillips authored
-
Mitch Phillips authored
Summary: Fixes up two small issues with the gn build. 1 - Ensures that the correct ldflag `-pthread` is provided, not just linking the library. 2 - Ensures that libraries are linked in the same group as the dependencies. This fixes a problem where system libraries (libc) are involved in a link-order dependency that's not being fulfilled. Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D80591
-
LLVM GN Syncbot authored
-
Craig Topper authored
Similar to what some other targets have done. This information could be reused by other frontends so doesn't make sense to live in clang. -Rename CK_Generic to CK_None to better reflect its illegalness. -Move function for translating from string to enum into llvm. -Call checkCPUKind directly from the string to enum translation and update CPU kind to CK_None accordinly. Caller will use CK_None as sentinel for bad CPU. I'm planning to move all the CPU to feature mapping out next. As part of that I want to devise a better way to express CPUs inheriting features from an earlier CPU. Allowing this to be expressed in a less rigid way than just falling through a switch. Or using gotos as we've had to do lately. Differential Revision: https://reviews.llvm.org/D81439
-
Matt Arsenault authored
-
Sanjay Patel authored
As shown in PR46237: https://bugs.llvm.org/show_bug.cgi?id=46237 The size-savings win for hoisting an 8-bit ALU immediate (intentionally excluding store constants) requires extreme conditions; it may not even be possible when including REX prefix bytes on x86-64. I did draft a version of this patch that included use counts after the loop, but I suspect that accounting is not working as expected. I think that is because the number of constant uses are changing as we select instructions (for example as we transform shl/add into LEA). Differential Revision: https://reviews.llvm.org/D81468
-
Erich Keane authored
-
Matt Arsenault authored
It was annoying enough that every custom lowering needed to set the insert point, but this was made worse since now these all needed to be updated to setInstrAndDebugLoc. Consolidate these so every legalization action has the right insert position by default. This should fix dropping debug info in every custom AMDGPU legalization.
-
Louis Dionne authored
First, libc++abi doesn't need to add the no-exceptions Lit feature itself, since that is already done in the config.py for libc++, which it reuses. Specifically, config.enable_exceptions is set based on @LIBCXXABI_ENABLE_EXCEPTIONS@ in libc++abi's lit.cfg.in, and libc++'s config.py handles that correctly. Secondly, libunwind's LIBUNWIND_ENABLE_EXCEPTIONS is never set (it's probably a remnant of copy-pasting code between the runtime libraries), so the library is always built with exceptions disabled (which makes sense since it implements the runtime support for exceptions). Conversely, the test suite is always run with exceptions enabled (not sure why), but that is preserved by the default behavior of libc++'s config.py.
-
Sanjay Patel authored
-
Erich Keane authored
The ParseStructUnionBody function was separately keeping track of the field decls for historical reasons, however the "ActOn" functions add the field to the RecordDecl anyway. The "ParseStructDeclaration" function, which handles parsing fields didn't have a way of handling what happens on an anonymous field, and changing it would alter a large amount of objc code, so I chose instead to implement this by just filling the FieldDecls vector with the actual FieldDecls that were successfully added to the recorddecl .
-
Matt Arsenault authored
The current relationship between LegalizerHelper and MachineIRBuilder confuses me, because the LegalizerHelper modifies the MachineIRBuilder which it does not own. Constructing a LegalizerHelper destroys the insert point, since the constructor calls setMF, which clears all the fields. Try to separate these functions, so it's possible to construct a LegalizerHelper from an existing MachineIRBuilder without losing the insert point/debug loc.
-
Matt Arsenault authored
The construction APIs for MachineIRBuilder don't make much sense, and it's been annoying to sort through it with these trivial functions separate from the declaration.
-
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
-