summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [XRay][test] Fix xray-empty-firstmbb.mir and delete incorrect ↵Fangrui Song2020-01-012-14/+1
| | | | | | | | | | | xray-empty-function.mir xray-empty-firstmbb.mir does not test the intended code path. Change xray-instruction-threshold to 0 to exercise the code path. Delete xray-empty-function.mir . Empty MachineFunction does not work. Various passes (e.g. MachineDominatorTree) assume the presence of an entry block.
* [mlir][spirv] NFC: Move shader ABI attributes to a new fileLei Zhang2020-01-018-73/+113
| | | | | | | | | This allows us to include the definitions of these attributes in other files without pulling in all dependencies for lowering. Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D72054
* [mlir][spirv] Fix links in docs and update dialect docsLei Zhang2020-01-012-27/+29
| | | | | | | | | | | Summary: This commit fixes links to code directories and uses doc links on mlir.llvm.org where possible. The docs in TableGen dialect definition is also updated to reflect recent developments. Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D72051
* [X86] Add x86_regcallcc calling convention to function declaration recently ↵Craig Topper2020-01-011-8/+3
| | | | | | added in a test. The callsite had the calling convention, but not the function itself.
* [gn build] (manually) merge 68a235d07f9e70Nico Weber2020-01-015-12/+8
|
* [Coroutines] const-ify internal helpers (NFC)Brian Gesiak2020-01-013-11/+13
| | | | | Several helpers internal to llvm/Transforms/Coroutines do not use 'const' for parameters that are not modified. Add const where possible.
* [X86] Add test cases for regcall function that takes a long double as a ↵Craig Topper2020-01-011-0/+80
| | | | | | | parameter, but does not return a long double. I believe we are incorrectly doing some FP stack manipulations after the call.
* [RegisterClassInfo] Use SmallVector::assign instead of resize to make sure ↵Craig Topper2020-01-011-1/+1
| | | | | | | | | | | | we erase previous contents from all entries of the vector. resize only writes to elements that get added. Any elements that already existed maintain their previous value. In this case we're trying to erase cached information so we should use assign which will write to every element. Found while trying to add new tests to an existing X86 test and noticed register allocation changing in other functions.
* [Coroutines] Rename "legacy" passes (NFC)Brian Gesiak2020-01-018-59/+60
| | | | | | | | | | | | | | | | | | A series of patches beginning with https://reviews.llvm.org/D71898 propose to add an implementation of the coroutine passes to the new pass manager. As part of these changes, the coroutine passes that implement the legacy pass manager interface are renamed, to `<PassName>Legacy`. This mirrors similar changes that have been made to many other passes in LLVM as they've been transitioned to support both old and new pass managers. This commit splits out the renaming portion of that patch and commits it in advance as an NFC (no functional change intended) commit. It renames: * `CoroEarly` => `CoroEarlyLegacy` * `CoroSplit` => `CoroSplitLegacy` * `CoroElide` => `CoroElideLegacy` * `CoroCleanup` => `CoroCleanupLegacy`
* build: make `LLVM_ENABLE_ZLIB` a tri-bool for usersSaleem Abdulrasool2020-01-013-7/+20
| | | | | | Treat the flag `LLVM_ENABLE_ZLIB` as a tri-bool, `FORCE_ON` being `ON`, and `ON` being an auto-detect. This is needed as many of the builders enable the flag without having zlib available.
* build: reduce CMake handling for zlibSaleem Abdulrasool2020-01-0115-58/+18
| | | | | | | | | Rather than handling zlib handling manually, use `find_package` from CMake to find zlib properly. Use this to normalize the `LLVM_ENABLE_ZLIB`, `HAVE_ZLIB`, `HAVE_ZLIB_H`. Furthermore, require zlib if `LLVM_ENABLE_ZLIB` is set to `YES`, which requires the distributor to explicitly select whether zlib is enabled or not. This simplifies the CMake handling and usage in the rest of the tooling.
* [mlir] Fix -Wrange-loo-analysis warningsFangrui Song2020-01-017-9/+9
| | | | | | | | | | | | for (const auto &x : llvm::zip(..., ...)) -> for (auto x : llvm::zip(..., ...)) The return type of zip() is a wrapper that wraps a tuple of references. > warning: loop variable 'p' is always a copy because the range of type 'detail::zippy<detail::zip_shortest, ArrayRef<long> &, ArrayRef<long> &>' does not return a reference [-Wrange-loop-analysis]
* [lld] Fix -Wrange-loop-analysis warningsFangrui Song2020-01-015-14/+5
| | | | | | | | | | One instance looks like a false positive: lld/ELF/Relocations.cpp:1622:14: note: use reference type 'const std::pair<ThunkSection *, uint32_t> &' (aka 'cons t pair<lld::elf::ThunkSection *, unsigned int> &') to prevent copying for (const std::pair<ThunkSection *, uint32_t> ts : isd->thunkSections) It is not changed in this commit.
* [polly][Support] Un-break polly testsAlexandre Ganea2020-01-013-2/+4
| | | | | | Previously, the polly unit tests were stuck in a infinite loop. There was an edge case in StringRef::count() introduced by 9f6b13e5cce96066d7262d224c971d93c2724795, where an empty 'Str' would cause the function to never exit. Also fixed usage in polly.
* [mlir] Fix compilation warningsAlexandre Ganea2020-01-012-3/+7
| | | | | | Fixes: - (MSVC) F:\llvm-project\mlir\lib\Dialect\Linalg\Analysis\DependenceAnalysis.cpp(103): warning C4551: function call missing argument list - (Clang) tools\mlir\lib\Dialect\SPIRV\SPIRVCanonicalization.inc(232,1): warning: unused function 'populateWithGenerated' [-Wunused-function]
* [mlir] Fix linking with LLDAlexandre Ganea2020-01-011-1/+1
| | | | The issue is that /WHOLEARCHIVE is interpreted differently in LLD, which needs the same exact path as the .lib; whereas link.exe can take the library name, withoutout a path or extension, if that was already supplied on the cmd-line. I'll write a follow-up patch to fix the issue in LLD.
* [mlir] Fix warnings when compiling with Clang 9.0Alexandre Ganea2020-01-011-2/+2
| | | | Fixes: warning: comparison of integers of different signs: 'const unsigned int' and '(anonymous namespace)::OperationPrinter::(anonymous enum at F:\llvm-project\mlir\lib\IR\AsmPrinter.cpp:1444:3)' [-Wsign-compare]
* tests: XFAIL/UNSUPPORTED tests on WindowsSaleem Abdulrasool2020-01-015-4/+12
| | | | | | | | | Now that we are building the python bindings on Windows once more, the extended testsuite is running. Mark a few failing tests and skip a few tests which hang. This should at least bring the bot back to green without reverting the Python changes which are an improvement for the build system and enable another ~35% of the test suite which was previously disabled.
* [InstCombine] Preserve inbounds when merging with zero-index GEP (PR44423)Nikita Popov2020-01-012-5/+14
| | | | | | | | This addresses https://bugs.llvm.org/show_bug.cgi?id=44423. If one of the GEPs is inbounds and the other is zero-index, we can also preserve inbounds. Differential Revision: https://reviews.llvm.org/D72060
* [lldb][NFC] Simplify CompilerType constructors/destructors and fix unused ↵Raphael Isemann2020-01-013-14/+5
| | | | | | | | | variable warning CompilerType has no virtual functions and no statements in its constructors, so we can simplify this code. This also allows Clang to emit unused variable warnings for CompilerType, so I also removed one unused variable that otherwise causes -Werror builds to fail.
* Revert "Adds -Wrange-loop-analysis to -Wall"Mark de Wever2020-01-013-5/+2
| | | | | | The sanitizer-x86_64-linux buildbot failed to build lld with -Werror. This reverts commit d8117542ac57f6051674ca70ea14c0e0d7d9b046.
* [InstCombine] Fix incorrect inbounds on GEP of GEP (PR44425)Nikita Popov2020-01-014-3/+4
| | | | | | | | This fixes https://bugs.llvm.org/show_bug.cgi?id=44425. We need to drop inbounds if one of the GEPs is not inbounds. This was already done when creating a new GEP, but not when modifying in place. Differential Revision: https://reviews.llvm.org/D72059
* [MachineScheduler] improve reuse of 'releaseNode'methodLorenzo Casalino2020-01-012-21/+26
| | | | | | | | | | | | | | | | The 'SchedBoundary::releaseNode' is merely invoked for releasing the Top/Bottom root nodes. However, 'SchedBoundary::releasePending' uses its same logic to check if the Pending queue has any releasable SUnit. It is possible to slightly modify the body of the two, allowing re-use of the former ('releaseNode') in the latter. Patch by Lorenzo Casalino <lorenzo.casalino93@gmail.com> Reviewers: MatzeB, fhahn, atrick Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D65506
* [InstCombine] Add tests for PR44423 and PR44425; NFCNikita Popov2020-01-011-0/+40
|
* [InstCombine] Regenerate test checks; NFCNikita Popov2020-01-012-307/+520
|
* [InstCombine] Add tests for sub nuw of geps; NFCNikita Popov2020-01-011-0/+101
| | | | Tests for PR44419.
* [X86] Call SimplifyMultipleUseDemandedBits from combineVSelectToBLENDV if ↵Craig Topper2020-01-012-27/+45
| | | | | | | | the condition is used by something other than select conditions. We might be able to bypass some nodes on the condition path. Differential Revision: https://reviews.llvm.org/D71984
* Adds -Wrange-loop-analysis to -WallMark de Wever2020-01-013-2/+5
| | | | | | | | This makes the range loop warnings part of -Wall. Fixes PR32823: Warn about accidental coping of data in range based for Differential Revision: https://reviews.llvm.org/D68912
* Improve Wrange-loop-analyses for rvalue referenceMark de Wever2020-01-012-3/+113
| | | | | | | | | | The Wrange-loop-analyses warns if a copy is made. Suppress this warning when a temporary is bound to a rvalue reference. While fixing this issue also found a copy-paste error in test6, which is also fixed. Differential Revision: https://reviews.llvm.org/D71806
* Adds fixit hints to the -Wrange-loop-analysisMark de Wever2020-01-014-3/+57
| | | | Differential Revision: https://reviews.llvm.org/D68913
* [NFC] Fixes -Wrange-loop-analysis warningsMark de Wever2020-01-0137-54/+55
| | | | | | This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. Differential Revision: https://reviews.llvm.org/D71857
* [lldb][NFC] Make some checks more readable in Variable::PrivateAutoCompleteRaphael Isemann2020-01-011-3/+3
|
* [ARM] Add +mve feature to mve tests. NFCDavid Green2020-01-013-3/+3
|
* clang-tidy doc: Remove severities as they don't make consensusSylvestre Ledru2020-01-011-392/+388
| | | | | | | | | | | | Reviewers: jdoerfert, aaron.ballman Reviewed By: aaron.ballman Subscribers: whisperity, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D72049
* add strict float for round operationLiu, Chen32020-01-0110-41/+956
| | | | Differential Revision: https://reviews.llvm.org/D72026
* [MC][TargetMachine] Delete MCTargetOptions::MCPIECopyRelocationsFangrui Song2020-01-016-166/+9
| | | | | | | | | | | | clang/lib/CodeGen/CodeGenModule performs the -mpie-copy-relocations check and sets dso_local on applicable global variables. We don't need to duplicate the work in TargetMachine shouldAssumeDSOLocal. Verified that -mpie-copy-relocations can still emit PC relative relocations for external variable accesses. clang -target x86_64 -fpie -mpie-copy-relocations -c => R_X86_64_PC32 clang -target aarch64 -fpie -mpie-copy-relocations -c => R_AARCH64_ADR_PREL_PG_HI21+R_AARCH64_LDST64_ABS_LO12_NC
* [ELF][RISCV][test] Test absolute/PC-relative/branch relocations to undefined ↵Fangrui Song2019-12-311-0/+79
| | | | weak symbols
* [Attributor] AAValueConstantRange: Value range analysis using constant rangeHideto Ueno2020-01-019-39/+1456
| | | | | | | | | | | | | | | | | | | | | This patch introduces `AAValueConstantRange`, which answers a possible range for integer value in a specific program point. One of the motivations is propagating existing `range` metadata. (I think we need to change the situation that `range` metadata cannot be put to Argument). The state is a tuple of `ConstantRange` and it is initialized to (known, assumed) = ([-∞, +∞], empty). Currently, AAValueConstantRange is created when AAValueSimplify cannot simplify the value. Supported - BinaryOperator(add, sub, ...) - CmpInst(icmp eq, ...) - !range metadata `AAValueConstantRange` is not intended to extend to polyhedral range value analysis. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D71620
* [X86] Fix typo in getCMovOpcode.Craig Topper2019-12-311-1/+1
| | | | | | The 64-bit HasMemoryOperand line was using CMOV32rm instead of CMOV64rm. Not sure how to test this. We have no test coverage that passes true for HasMemoryOperand.
* [X86] Add X87 FCMOV support to X86FlagsCopyLowering.Craig Topper2019-12-312-0/+120
| | | | Fixes PR44396
* DAG: Stop trying to fold FP -(x-y) -> y-x in getNode with nszMatt Arsenault2019-12-314-15/+16
| | | | | | | | | | | | | | This was increasing the number of instructions when fsub was legalized on AMDGPU with no signed zeros enabled. This fold should be guarded by hasOneUse, and I don't think getNode should be doing that. The same fold is already done as a regular combine through isNegatibleForFree. This does require duplicating, even though isNegatibleForFree does this combine already (and properly checks hasOneUse) to avoid one PPC regression. In the regression, the outer fneg has nsz but the fsub operand does not. isNegatibleForFree only sees the operand, and doesn't see it's used from a nsz context. A nsz parameter needs to be added and threaded through isNegatibleForFree to avoid this.
* [ELF][RISCV] Improve error message for unknown relocationsFangrui Song2019-12-311-16/+15
| | | | Like rLLD354040.
* [X86] Constant fold KSHIFT of an all zeros vector to just an all zeros vector.Craig Topper2019-12-312-12/+3
|
* [X86][InstCombine] Add constant folding and simplification support for pdep ↵Craig Topper2019-12-312-0/+190
| | | | | | | | | | | | and pext The instructions use a mask to either pack disjoint bits together(pext) or spread bits to disjoint locations(pdep). If the mask is all 0s then no bits are extracted or deposited. If the mask is all ones, then the source value is written to the result since no compression or expansion happens. Otherwise if both the source and mask are constant we can walk the bits in the source/mask and calculate the result. There other crazier things we could do like computeKnownBits or turning pext into shift/and if only a single contiguous range of bits is extracted. Fixes PR44389 Differential Revision: https://reviews.llvm.org/D71952
* [X86] Use carry flag from add for (seteq (add X, -1), -1).Craig Topper2019-12-312-16/+35
| | | | | | | | If we just subtracted 1 and are checking if the result is -1. We can use the carry flag from the ADD instead of an explicit CMP. I'm using the same checks for the add users as EmitTest. Fixes one case from PR44412 Differential Revision: https://reviews.llvm.org/D72019
* [LegalizeVectorOps][AArch64] Stop asking for v4f16 fp_round and fp_extend to ↵Craig Topper2019-12-312-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | be promoted. These operations are needed as building blocks for promoting so they can't be promoted themselves. This appeared to work because the fp_extend query type for operation actions is the result type, not the input type so it never triggered in the legalizer. For fp_round, the vector op legalizer just ended up creating a nop fp_extend that was elided by getNode, followed by a nop fp_round that was also elided by getNode. This was followed by a final fp_round from v4f32 back to vf416 which was CSEd to the original node. Then legalize vector ops just believed that node legalized to itself. LegalizeDAG took another crack at promoting it, but didn't have a handler so just skipped it with a debug message saying it wasn't promoted. This patch just removes the operation actions to avoid this non-sense. Found while trying to refactor LegalizeVectorOps to handle multiple result nodes better.
* AMDGPU: Precommit test showing extra instructions are introducedMatt Arsenault2019-12-311-0/+27
|
* Revert "[Diagnostic] Add ftabstop to -Wmisleading-indentation"Martin Storsjö2019-12-312-119/+5
| | | | | | | | | This reverts commit b47b35ff51b355a446483777155290541ab64fae. This caused failed asserts (Assertion `FIDAndOffset.second > ColNo && "Column number smaller than file offset?"' failed.) on a source file with a single line containing "int main (void) { for( int i = 0; i < 9; i++ ); return 0; }".
* [amdgpu] Fix scoreboard updating on `s_waitcnt_vscnt`.Michael Liao2019-12-312-1/+18
| | | | | | | | | | Summary: - Other counters are accidentally cleared. Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71866
* [OPENMP]Emit artificial threprivate vars as threadlocal, if possible.Alexey Bataev2019-12-317-26/+26
| | | | It may improve performance for declare reduction constructs.
OpenPOWER on IntegriCloud