summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [InstCombine] Fix infinite loop due to bitcast <-> phi transformsNikita Popov2019-12-312-0/+148
| | | | | | | | | | | | | | Fix for https://bugs.llvm.org/show_bug.cgi?id=44245. The optimizeBitCastFromPhi() and FoldPHIArgOpIntoPHI() end up fighting against each other, because optimizeBitCastFromPhi() assumes that bitcasts of loads will get folded. This doesn't happen here, because a dangling phi node prevents the one-use fold in https://github.com/llvm/llvm-project/blob/master/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp#L620-L628 from triggering. This patch fixes the issue by adding manually removing the old phis. Differential Revision: https://reviews.llvm.org/D71164
* [mlir][Linalg] Delete unused LinalgLibraryOps.tdNicolas Vasilache2019-12-311-616/+0
| | | | | | | | | | | | Summary: This has been previously renamed to LinalgStructuredOps.td Reviewers: ftynse Subscribers: mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, llvm-commits, ftynse Tags: #llvm Differential Revision: https://reviews.llvm.org/D72013
* [llvm-exegesis] Check counters before runningMiloš Stojanović2019-12-313-8/+18
| | | | | | | Check if the appropriate counters for the specified mode are defined on the target. This is checked before any other work is done. Differential Revision: https://reviews.llvm.org/D71927
* [ARM][TypePromotion] Re-enable by defaultSam Parker2019-12-311-1/+1
| | | | Re-enable the pass after it was reverted and the bug fixed.
* Fix external-names.c test when separator is \\Michael Platings2019-12-311-3/+3
| | | | | | | | | | | | | This fixes the following failure: C:\[...]\llvm\tools\clang\test\VFS\external-names.c:34:26: error: CHECK-DEBUG-EXTERNAL: expected string not found in input // CHECK-DEBUG-EXTERNAL: ![[Num]] = !DIFile(filename: "{{[^"]*}}Inputs{{.}}external-names.h" ^ [...] <stdin>:42:54: note: possible intended match here !10 = !DIFile(filename: "C:/[...]\\llvm\\tools\\clang\\test\\VFS\\Inputs\\external-names.h", directory: "") Differential Revision: https://reviews.llvm.org/D71991
* [InstCombine] Don't rewrite phi-of-bitcast when the phi has other usersConnor Abbott2019-12-312-41/+68
| | | | | | | | | Judging by the existing comments, this was the intention, but the transform never actually checked if the existing phi's would be removed. See https://bugs.llvm.org/show_bug.cgi?id=44242 for an example where this causes much worse code generation on AMDGPU. Differential Revision: https://reviews.llvm.org/D71209
* [InstCombine] Add tests for PR44242Connor Abbott2019-12-311-0/+192
| | | | Differential Revision: https://reviews.llvm.org/D71260
* clang-tidy doc: modernize-make-unique has an autofixSylvestre Ledru2019-12-311-1/+1
|
* [Attributor] Suppress unused warnings when assertions are disabled. NFCIlya Biryukov2019-12-311-0/+2
|
* [Utils] Deal with occasionally deleted functionsJohannes Doerfert2019-12-314-4/+61
| | | | | | | | | | | | When functions exist for some but not all run lines we need to be careful when selecting the prefix. So far, a common prefix was potentially chosen as there was never a "conflict" that would have caused otherwise. With this patch we avoid common prefixes if they are used by run lines that do not emit the function. Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D68850
* [Attributor] Function signature rewrite infrastructureJohannes Doerfert2019-12-3110-30/+408
| | | | | | | | | | | | | | | As part of the Attributor manifest we want to change the signature of functions. This patch introduces a fairly generic interface to do so. As a first, very simple, use case, we remove unused arguments. A second use case, pointer privatization, will be committed with this patch as well. A lot of the code and ideas are taken from argument promotion and we run all argument promotion tests through this framework as well. Reviewed By: uenoku Differential Revision: https://reviews.llvm.org/D68765
* [X86] Slightly improve our attempted error recovery for 64-bit -mno-sse2 in ↵Craig Topper2019-12-311-2/+8
| | | | | | | | | | | | | | | LowerCallResult to use FP1 if there are two return values. If the return value is a struct of 2 doubles we need two return registers. If SSE2 is disabled we can't return in XMM registers like the ABI says. After logging an error we attempt to recover by using FP0 instead of an XMM register. But if the return needs two registers, we may have already used FP0. So if the register we were supposed to copy to is XMM1, copy to FP1 in the recovery instead. This seems to fix the assertion/crash in PR44413.
* [Utils][Fix] Minor test result changeJohannes Doerfert2019-12-311-1/+1
|
* [NFC] Style cleanupShengchen Kan2019-12-311-28/+29
| | | | | | 1. make function Is16BitMemOperand static 2. Use Doxygen features in comment 3. Rename functions to make them start with a lower case letter
* [Utils] Reuse argument variable names in the bodyJohannes Doerfert2019-12-316-5/+45
| | | | | | | | | | If we have `int foo(int a) { return a; }` and we run with --function-signature enabled, we want a single variable declaration for `a` which is reused later. Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D69722
* [Utils] Allow update_test_checks to scrub attribute annotationsJohannes Doerfert2019-12-316-1/+55
| | | | | | | | | Attribute annotations on calls, e.g., #0, are not useful on their own. This patch adds a flag to update_test_checks.py to scrub them. Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D68851
* [Attributor] Propagate known align from arguments to call sites argumentsJohannes Doerfert2019-12-315-9/+20
| | | | | | | Since the information is known we can simply use it at the call site. This is especially useful for callbacks but also helps regular calls. The test changes are mechanical.
* [Attributor] Use abstract call sites to determine associated argumentsJohannes Doerfert2019-12-319-38/+146
| | | | | | | | | | | | | | | | | | | | | | This is the second step after D67871 to make use of abstract call sites. In this patch the argument we associate with a abstract call site argument can be the one in the callback callee instead of the one in the callback broker. Caveat: We cannot allow no-alias arguments for problematic callbacks: As described in [1], adding no-alias (or restrict) to arguments could break synchronization as the synchronization effect, e.g., a barrier, does not "alias" with the pointer anymore. This disables no-alias annotation for potentially problematic arguments until we implement the fix described in [1]. Reviewed By: uenoku Differential Revision: https://reviews.llvm.org/D68008 [1] Compiler Optimizations for OpenMP, J. Doerfert and H. Finkel, International Workshop on OpenMP 2018, http://compilers.cs.uni-saarland.de/people/doerfert/par_opt18.pdf
* [Attributor] Annotate the memory behavior of call site argumentsJohannes Doerfert2019-12-3128-79/+86
| | | | | | | | | Especially for callbacks, annotating the call site arguments is important. Doing so exposed a too strong dependence of AAMemoryBehavior on AANoCapture since we handle the case of potentially captured pointers explicitly. The changes to the tests are all mechanical.
* [NFC] Make X86MCCodeEmitter::isPCRel32Branch staticShengchen Kan2019-12-311-4/+2
|
* Revert "DebugInfo: Fix rangesBaseAddress DICompileUnit bitcode ↵David Blaikie2019-12-305-7/+6
| | | | | | | | | | | | serialization/deserialization" Seeing some curious CFI failures internally - which makes little sense to me, as I don't think anyone is using this flag (even us, internally)... so sounds like a bug in my code somewhere (possibly a latent one that propagating this flag exposed, not sure). Reverting while I investigate. This reverts commit c51b45e32ef7f35c11891f60871aa9c2c04cd991.
* [NFC] Style cleanupShengchen Kan2019-12-311-389/+479
| | | | | | | 1. Remove function is64BitMode() and use STI.hasFeature(X86::Mode16Bit) directly 2. Use Doxygen features in comment 3. Rename functions to make them start with a lower case letter 4. Format the code with clang-format
* [mlir] Refactor operation results to use a single use list for all results ↵River Riddle2019-12-307-264/+365
| | | | | | | | | | of the operation. Summary: A new class is added, IRMultiObjectWithUseList, that allows for representing an IR use list that holds multiple sub values(used in this case for OpResults). This class provides all of the same functionality as the base IRObjectWithUseList, but for specific sub-values. This saves a word per operation result and is a necessary step in optimizing the layout of operation results. For now the use list is placed on the operation itself, so zero-result operations grow by a word. When the work for optimizing layout is finished, this can be moved back to being a trailing object based on memory/runtime benchmarking. Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D71955
* [TargetLowering][AMDGPU] Make scalarizeVectorLoad return a pair of SDValues ↵Craig Topper2019-12-306-27/+28
| | | | | | | | | | | instead of creating a MERGE_VALUES node. NFCI This allows us to clean up some places that were peeking through the MERGE_VALUES node after the call. By returning the SDValues directly, we can clean that up. Unfortunately, there are several call sites in AMDGPU that wanted the MERGE_VALUES and now need to create their own.
* [SelectionDAG] Fix copy/paste mistake in comment. NFCCraig Topper2019-12-301-1/+1
| | | | | I think this was copied from scalarizeVectorLoad where that is what happens.
* [NFC] Add comments in unit test aix-xcoff-toc.ll to clarify the intentjasonliu2019-12-311-0/+10
| | | | | Address David's post review comment in https://reviews.llvm.org/D71667. Add comments to clarify what we are testing in that file.
* [X86] Add test case for PR44412. NFCCraig Topper2019-12-301-0/+36
|
* [CodeGen] Use IRBuilder::CreateFNeg for __builtin_conjCraig Topper2019-12-302-6/+21
| | | | | | This replaces the fsub -0.0 idiom with an fneg instruction. We didn't see to have a test that showed the current codegen. Just some tests for constant folding and a test that was only checking the declare lines for libcalls. The latter just checked that we did not have a declare for @conj when using __builtin_conj. Differential Revision: https://reviews.llvm.org/D72012
* [CodeGen] Use CreateFNeg in buildFMulAddCraig Topper2019-12-302-11/+19
| | | | | | We have an fneg instruction now and should use it instead of the fsub -0.0 idiom. Looks like we had no test that showed that we handled the negation cases here so I've added new tests. Differential Revision: https://reviews.llvm.org/D72010
* Remove a redundant `default:` on an exhaustive switch(enum).Eric Astor2019-12-301-2/+0
|
* [OpenMP][FIX] Generalize a test check lineJohannes Doerfert2019-12-301-2/+2
| | | | | | | The new check line is compatible with the clang code generation check line as it allows a 64 and 32 bit value. I hope this makes the llvm-clang-win-x-armv7l buildbot happy.
* [libomptarget][nfc] Change unintentional target_impl prefix to kmpc_implJon Chesterfield2019-12-303-7/+7
|
* [PowerPC][docs] Update Embedded PowerPC docs in Compiler Writers Info pageJinsong Ji2019-12-301-1/+11
| | | | | | | | | | | | | | | | | | | | | Summary: Embedded PowerPC are still actively supported, especially SPE... So update some important references here: * adding EREF * adding SPE/VLE ref Delete deprecated ones into "Other documents..". Reviewers: #powerpc, jhibbits, hfinkel Reviewed By: #powerpc, jhibbits Subscribers: wuzish, merge_guards_bot, nemanjai, shchenz, steven.zhang, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D72008
* [OpenMP] Use the OpenMPIRBuilder for `omp parallel`Johannes Doerfert2019-12-307-95/+274
| | | | | | | | | | | | This allows to use the OpenMPIRBuilder for parallel regions. Code was extracted from D61953 and adapted to work with the new version (D70109). All but one feature should be supported. An update of this patch will provide test coverage and privatization other than shared. Reviewed By: fghanim Differential Revision: https://reviews.llvm.org/D70290
* [OpenMP] Use the OpenMPIRBuilder for `omp cancel`Johannes Doerfert2019-12-304-32/+237
| | | | | | | | | | | | An `omp cancel parallel` needs to be emitted by the OpenMPIRBuilder if the `parallel` was emitted by the OpenMPIRBuilder. This patch makes this possible. The cancel logic is shared with the cancel barriers. Testing is done via unit tests and the clang cancel_codegen.cpp file once D70290 lands. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D71948
* [X86][AsmParser] re-introduce 'offset' operatorEric Astor2019-12-3014-139/+274
| | | | | | | | | | | | | | | | | | | | | | | Summary: Amend MS offset operator implementation, to more closely fit with its MS counterpart: 1. InlineAsm: evaluate non-local source entities to their (address) location 2. Provide a mean with which one may acquire the address of an assembly label via MS syntax, rather than yielding a memory reference (i.e. "offset asm_label" and "$asm_label" should be synonymous 3. address PR32530 Based on http://llvm.org/D37461 Fix broken test where the break appears unrelated. - Set up appropriate memory-input rewrites for variable references. - Intel-dialect assembly printing now correctly handles addresses by adding "offset". - Pass offsets as immediate operands (using "r" constraint for offsets of locals). Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D71436
* AMDGPU/GlobalISel: Select mul24 intrinsicsMatt Arsenault2019-12-303-4/+77
|
* TableGen: Fix assert on PatFrags with predicate codeMatt Arsenault2019-12-302-5/+84
| | | | | | | | This assumed a single pattern if there was a predicate. Relax this a bit, and allow multiple patterns as long as they have the same class. This was only broken for the DAG path. GlobalISel seems to have handled this correctly already.
* [X86] Add X86ISD::PCMPGT to SimplifyMultipleUseDemandedBitsForTargetNode.Craig Topper2019-12-305-187/+194
| | | | | If only the sign bit is demanded, and the LHS is all zeroes, then we can bypass the PCMPGT.
* [test] do not parse ls output for file size; NFCIBryan Chan2019-12-302-3/+3
| | | | | | | | Parsing `ls -l` output to obtain the size of a file is unreliable; the exact output format is not specified, and some user or group names may contain multiple words, causing `cut -f5 -d' '` to extract an incorrect value. `wc -c`, on the other hand, is portable, and there are precendents of its use in test cases.
* AMDGPU/GlobalISel: Re-use MRI available in selectorMatt Arsenault2019-12-301-9/+7
|
* Ignore "no-frame-pointer-elim" and "no-frame-pointer-elim-non-leaf" in favor ↵Fangrui Song2019-12-306-13/+65
| | | | | | | | | | | | | of "frame-pointer" D56351 (included in LLVM 8.0.0) introduced "frame-pointer". All tests which use "no-frame-pointer-elim" or "no-frame-pointer-elim-non-leaf" have been migrated to use "frame-pointer". Implement UpgradeFramePointerAttributes to upgrade the two obsoleted function attributes for bitcode. Their semantics are ignored. Differential Revision: https://reviews.llvm.org/D71863
* [InstCombine] remove stale comment on test; NFCSanjay Patel2019-12-301-1/+1
|
* [MIPS GlobalISel] Select bitreverse. RecommitPetar Avramovic2019-12-306-7/+465
| | | | | | | | | | | | | | | G_BITREVERSE is generated from llvm.bitreverse.<type> intrinsics, clang genrates these intrinsics from __builtin_bitreverse32 and __builtin_bitreverse64. Add lower and narrowscalar for G_BITREVERSE. Lower G_BITREVERSE on MIPS32. Recommit notes: Introduce temporary variables in order to make sure instructions get inserted into MachineFunction in same order regardless of compiler used to build llvm. Differential Revision: https://reviews.llvm.org/D71363
* AMDGPU/GlobalISel: Select llvm.amdgcn.fmad.ftzMatt Arsenault2019-12-303-4/+242
|
* [InstCombine] propagate sign argument through nested copysignsSanjay Patel2019-12-302-2/+11
| | | | | This is another optimization suggested in PR44153: https://bugs.llvm.org/show_bug.cgi?id=44153
* [ARM][Thumb][FIX] Add unwinding information to t4Diogo Sampaio2019-12-302-0/+17
| | | | | | | | | | | | | | | | | Summary: Add missing part of patch D71361. Now that the stack-frame can be operated using a addw/subw instruction, they should appear in the unwinding list. Reviewers: dmgreen, efriedma Reviewed By: dmgreen Subscribers: kristof.beyls, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D72000
* AMDGPU/GlobalISel: Add select test for fexp2Matt Arsenault2019-12-301-0/+42
|
* GlobalISel: moreElementsVector for FP min/maxMatt Arsenault2019-12-304-57/+36
|
* AMDGPU: Improve llvm.round.f64 lowering for CI+Matt Arsenault2019-12-303-500/+158
| | | | | The path already used for f16/f32 works a lot better when v_trunc_f64 is available.
OpenPOWER on IntegriCloud