summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [Concepts] Constraint Enforcement & DiagnosticsSaar Raz2019-12-0623-133/+1060
| | | | | | | | | Part of the C++20 concepts implementation effort. - Associated constraints (requires clauses, currently) are now enforced when instantiating/specializing templates and when considering partial specializations and function overloads. - Elaborated diagnostics give helpful insight as to why the constraints were not satisfied. Phabricator: D41569 Re-commit, after fixing some memory bugs.
* [IR] Move ctor in the NDEBUG branchFangrui Song2019-12-051-2/+1
|
* [IR] Add a default copy constructor for -Wdeprecated-copyFangrui Song2019-12-051-0/+2
|
* Properly convert all declaration non-type template arguments whenRichard Smith2019-12-054-94/+118
| | | | | | | | | | | | forming non-type template parameter values. This reverts commit 93cc9dddd82f9e971f382ade6acf6634c5914966, which reverted commit 11d10527852b4d3ed738aa90d8bec0f398160593. We now always form `&x` when forming a pointer to a function rather than trying to use function-to-pointer decay. This matches the behavior of the old code in this case, but not the intent as described by the comments.
* Add a default copy constructor for -Wdeprecated-copy warnings.Eric Christopher2019-12-051-0/+2
|
* [libomptarget][nfc] Introduce SHARED, ALIGN macrosJon Chesterfield2019-12-057-40/+44
| | | | | | | | | | | | | | | | Summary: [libomptarget][nfc] Introduce SHARED, ALIGN macros Move remaining cuda attributes behind such macros Reviewers: ABataev, jdoerfert, grokos Reviewed By: ABataev Subscribers: openmp-commits, jvesely Tags: #openmp Differential Revision: https://reviews.llvm.org/D71076
* Debug Info: Apply a default location for cleanups if none is available.Adrian Prantl2019-12-052-1/+5
| | | | | | | | | This unbreaks the debuginfo-tests testsuite by replacing the assertion with a default location. There are cleanups in helper functions that don't have a valid source location such as block copy helpers and it's not worth tracking each of them down. rdar://57630879
* DebugInfo: Fix LTO+DWARFv5 loclistsDavid Blaikie2019-12-052-1/+67
| | | | | | The loclists_table_base was being overwritten for each CU even though only one loclists contribution is made so everything but the last CU would have a label that was never defined and fail to assemble.
* Debug Info: Assert that location is available for cleanupsAdrian Prantl2019-12-054-4/+32
| | | | | | rdar://57630879 Differential Revision: https://reviews.llvm.org/D71042
* Set a source location for Objective-C accessor stubsAdrian Prantl2019-12-052-4/+29
| | | | | | | | | | | | even when there is no explicit synthesize statement. This fixes a regression introduced in https://reviews.llvm.org/D68108 that could lead to missing debug locations in cleanup code in synthesized Objective-C++ properties. rdar://57630879 Differential Revision: https://reviews.llvm.org/D71084
* [libomptarget][nfc] Move omptarget-nvptx under commonJon Chesterfield2019-12-0513-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: [libomptarget][nfc] Move omptarget-nvptx under common Almost all files depend on require omptarget-nvptx, which no longer contains any obviously architecture dependent code. Moving it under common unblocks task/loop for amdgcn, and allows moving other code. At some point there should probably be a widespread symbol renaming to replace the nvptx string. I'd prefer to get things working first. Building this (and task.cu, loop.cu) without a cuda library requires some more refactoring, e.g. wrap threadfence(), use DEVICE macro more consistently. Patches for that are orthogonal and will be posted shortly. Reviewers: jdoerfert, ABataev, grokos Reviewed By: ABataev Subscribers: mgorny, fedor.sergeev, jfb, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D71073
* [AIX] Make sure to use QualNames for external global objectsDavid Tenty2019-12-052-20/+30
| | | | | | | | | | | | | | Summary: Previously we only handled the case where the csect hadn't been set up yet, so we'd hit an assert later on. Reviewers: jasonliu, DiggerLin, stevewan Reviewed By: jasonliu Subscribers: hubert.reinterpretcast, wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71032
* Add documentation headings for the OpenCL attributes.Aaron Ballman2019-12-051-0/+5
| | | | This fixes the documentation build.
* [OpenMP50] Add parallel master constructcchen2019-12-0537-18/+2984
| | | | | | | | | | | | Reviewers: ABataev, jdoerfert Reviewed By: ABataev Subscribers: rnk, jholewinski, guansong, arphaman, jfb, cfe-commits, sandoval, dreachem Tags: #clang Differential Revision: https://reviews.llvm.org/D70726
* Use diff -b on zlib tests so they pass on WindowsAmy Huang2019-12-052-2/+2
| | | | | | | | | | Reviewers: hubert.reinterpretcast Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71036
* [clangd] Highlighting dependent types in more contextsNathan Ridge2019-12-052-1/+37
| | | | | | | | | | | | | | Fixes https://github.com/clangd/clangd/issues/214. Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70746
* [clangd] Find reference to template parameter in 'sizeof...' expressionNathan Ridge2019-12-053-146/+180
| | | | | | | | | | | | | | Fixes https://github.com/clangd/clangd/issues/213. Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70740
* Revert "[DSE] Fix for a dangling point bug in DeadStoreElimination."Florian Hahn2019-12-052-83/+17
| | | | | | | The commit causes a failure: http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/20911 This reverts commit 1847fd9d85506ecee692230cb2500e3774ec628e.
* LowerDbgDeclare: look through bitcasts.Evgenii Stepanov2019-12-052-16/+74
| | | | | | | | | | | | | | | | | | | Summary: Emit a value debug intrinsic (with OP_deref) when an alloca address is passed to a function call after going through a bitcast. This generates an FP or SP-relative location for the local variable in the following case: int x; use((void *)&x; Reviewers: aprantl, vsk, pcc Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70752
* scudo: Fix one of the C wrapper tests on Android.Peter Collingbourne2019-12-051-2/+11
| | | | | | | | | The test ScudoWrappersCTest.Realloc expects realloc of memalign to work on Android, but this relies on dealloc_type_mismatch being set to false. Commit 0d3d4d3b0 caused us to start setting it to true in the C wrapper tests, which broke the test. Set it to the correct value on Android. Differential Revision: https://reviews.llvm.org/D71078
* scudo: Fix the build of wrappers_c_test.cpp on Android.Peter Collingbourne2019-12-051-0/+2
| | | | | | | The Android headers don't provide a declaration of valloc or pvalloc, so we need to declare them ourselves. Differential Revision: https://reviews.llvm.org/D71077
* [GlobalISel] Localizer: Allow targets not to run the pass conditionallyVolkan Keles2019-12-052-1/+14
| | | | | | | | | | | | | | | | | | | Summary: Previously, it was not possible to skip running the localizer pass conditionally. This patch adds an input function to the pass which decides if the pass should run on the given MachineFunction or not. No test case as there is no upstream target needs this functionality. Reviewers: qcolombet Reviewed By: qcolombet Subscribers: rovka, hiraditya, Petar.Avramovic, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71038
* [X86] Remove ProcIntelGLM/ProcIntelGLP/ProcIntelTRM and replace them with a ↵Craig Topper2019-12-054-23/+15
| | | | | | single feature flag covers the two places they were used. Differential Revision: https://reviews.llvm.org/D71048
* Revert "[InstCombine] keep assumption before sinking calls"Bob Haarman2019-12-053-213/+47
| | | | | | | | | | | | | | | | | | | | | Summary: This reverts commit c3b06d0c393e533eab712922911d14e5a079fa5d. Reason for revert: Caused miscompiles when inserting assume for undef. Also adds a test to prevent similar breakage in future. Fixes PR44154. Reviewers: rnk, jdoerfert, efriedma, xbolva00 Reviewed By: rnk Subscribers: thakis, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70933
* [OPENMP50]Add support for if clause for simd part in distribute parallel for ↵Alexey Bataev2019-12-053-9/+39
| | | | | | | simd directive. According to OpenMP 5.0, the if clause can be applied to simd subdirective in the combined directives.
* [InstCombine] Invert `add A, sext(B) --> sub A, zext(B)` canonicalization ↵Roman Lebedev2019-12-056-25/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (to `sub A, zext B -> add A, sext B`) Summary: D68408 proposes to greatly improve our negation sinking abilities. But in current canonicalization, we produce `sub A, zext(B)`, which we will consider non-canonical and try to sink that negation, undoing the existing canonicalization. So unless we explicitly stop producing previous canonicalization, we will have two conflicting folds, and will end up endlessly looping. This inverts canonicalization, and adds back the obvious fold that we'd miss: * `sub [nsw] Op0, sext/zext (bool Y) -> add [nsw] Op0, zext/sext (bool Y)` https://rise4fun.com/Alive/xx4 * `sext(bool) + C -> bool ? C - 1 : C` https://rise4fun.com/Alive/fBl It is obvious that `@ossfuzz_9880()` / `@lshr_out_of_range()`/`@ashr_out_of_range()` (oss-fuzz 4871) are no longer folded as much, though those aren't really worrying. Reviewers: spatel, efriedma, t.p.northover, hfinkel Reviewed By: spatel Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71064
* [ELF][PPC64] Support long branch thunks with addendsFangrui Song2019-12-0510-240/+203
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes PPC64 part of PR40438 // clang -target ppc64le -c a.cc // .text.unlikely may be placed in a separate output section (via -z keep-text-section-prefix) // The distance between bar in .text.unlikely and foo in .text may be larger than 32MiB. static void foo() {} __attribute__((section(".text.unlikely"))) static int bar() { foo(); return 0; } __attribute__((used)) static int dummy = bar(); This patch makes such thunks with addends work for PPC64. AArch64: .text -> `__AArch64ADRPThunk_ (adrp x16, ...; add x16, x16, ...; br x16)` -> target PPC64: .text -> `__long_branch_ (addis 12, 2, ...; ld 12, ...(12); mtctr 12; bctr)` -> target AArch64 can leverage ADRP to jump to the target directly, but PPC64 needs to load an address from .branch_lt . Before Power ISA v3.0, the PC-relative ADDPCIS was not available. .branch_lt was invented to work around the limitation. Symbol::ppc64BranchltIndex is replaced by PPC64LongBranchTargetSection::entry_index which take addends into consideration. The tests are rewritten: ppc64-long-branch.s tests -no-pie and ppc64-long-branch-pi.s tests -pie and -shared. Reviewed By: sfertile Differential Revision: https://reviews.llvm.org/D70937
* [AArch64] Fix MUL/SUB fusingSanne Wouda2019-12-052-20/+162
| | | | | | | | | | | | | | | | | Summary: When MUL is the first operand to SUB, we can't use MLS because the accumulator should be negated. Emit a NEG of the accumulator and an MLA instead, similar to what we do for FMUL / FSUB fusing. Reviewers: dmgreen, SjoerdMeijer, fhahn, Gerolf, mstorsjo, asbirlea Reviewed By: asbirlea Subscribers: kristof.beyls, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71067
* [LLDB] Replacing use of ul suffix in GetMaxU64Bitfield since it not ↵shafik2019-12-052-12/+31
| | | | | | | | guarenteed to be 64 bit GetMaxU64Bitfield(...) uses the ul suffix but we require a 64 bit unsigned integer and ul could be 32 bit. So this replacing it with a explicit cast and refactors the code around it to use an early exit. Differential Revision: https://reviews.llvm.org/D70992
* [llvm] llvm-ifs: Support for handling empty IFS and merging weak+strong symbols.Puyan Lotfi2019-12-057-16/+89
| | | | | | | | | | The following changes enable llvm-ifs to handle the following merge conflicts: * Weak + Strong symbol merging for the same symbol * empty vs non-empty triple field * empty vs non-empty object file format Differential Revision: https://reviews.llvm.org/D70834
* [DSE] Fix for a dangling point bug in DeadStoreElimination.Ankit2019-12-052-17/+83
| | | | | | | | | | | | | | | | The patch makes sure that the LastThrowing pointer does not point to any instruction deleted by call to DeleteDeadInstruction. While iterating through the instructions the pass maintains a pointer to the lastThrowing Instruction. A call to deleteDeadInstruction deletes a dead store and other instructions feeding the original dead instruction which also become dead. The instruction pointed by the lastThrowing pointer could also be deleted by the call to DeleteDeadInstruction and thus it becomes a dangling pointer. Because of this, we see an error in the next iteration. In the patch, we maintain a list of throwing instructions encountered previously and use the last non deleted throwing instruction from the container. Patch by Ankit <quic_aankit@quicinc.com> Reviewers: fhahn, bcahoon, efriedma Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D65326
* [ELF][PPC64] Don't copy ppc64BranchltIndex in replaceWithDefinedFangrui Song2019-12-051-1/+0
| | | | | | | replaceWithDefined is used by canonical PLT and copy relocations, which imply that the symbol is preemptable. ppc64BranchltIndex is only used by non-preemptable cases, and it can only be the default value in replaceWithDefined.
* [scan-build-py] Set of small fixesGabor Horvath2019-12-052-8/+26
| | | | | | | * Unhandled exceptions * Typos Differential Revision: https://reviews.llvm.org/D70693
* [ASTImporter] Various source location and range import fixes.Balázs Kéri2019-12-057-20/+64
| | | | | | | | | | | | | | | | | | | | Summary: ASTImporter contained wrong or missing imports of SourceLocation and SourceRange for some objects. At least a part of such errors is fixed now. Source location import fixes in namespace, enum, record, class template specialization declarations and DeclRefExpr, UnresolvedLookupExpr, UnresolvedMemberExpr, NestedNameSpecifierLoc. Reviewers: martong, a.sidorin, shafik Reviewed By: shafik Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60499
* [OPENMP50]Add support for if clause for simd part in parallel master ↵Alexey Bataev2019-12-053-13/+48
| | | | | | | taskloop simd directive. According to OpenMP 5.0, the if clause can be applied to simd subdirective in the combined directives.
* [AMDGPU][HIP] Improve opt-level handlingScott Linder2019-12-055-32/+156
| | | | | | | | | | | | | | | | | Summary: The HIP toolchain invokes `llc` without an explicit opt-level, meaning it always uses the default (-O2). This makes it impossible to use -O1, for example. The HIP toolchain also coerces -Os/-Oz to -O2 even when invoking opt, and it coerces -Og to -O2 rather than -O1. Forward the opt-level to `llc` as well as `opt`, and only coerce levels where it is required. Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70987
* [InstCombine] narrow select with FP castsSanjay Patel2019-12-052-11/+33
| | | | Select doesn't change values, so truncate of extended operand cancels out.
* [InstCombine] add FMF guard to builder in fptrunc transform; NFCSanjay Patel2019-12-051-0/+5
| | | | | | | | This makes no difference currently because we don't apply FMF to FP casts, but that may change. This could also be a place to add a fold for select with fptrunc, so it will make that patch easier/smaller.
* [DebugInfo] Don't create multiple DBG_VALUEs when sinkingJeremy Morse2019-12-052-10/+180
| | | | | | | | | | | | | | | | | This patch addresses a performance problem reported in PR43855, and present in the reapplication in in 001574938e5. It turns out that MachineSink will (often) move instructions to the first block that post-dominates the current block, and then try to sink further. This means if we have a lot of conditionals, we can needlessly create large numbers of DBG_VALUEs, one in each block the sunk instruction passes through. To fix this, rather than immediately sinking DBG_VALUEs, record them in a pass structure. When sinking is complete and instructions won't be sunk any further, new DBG_VALUEs are added, avoiding lots of intermediate DBG_VALUE $noregs being created. Differential revision: https://reviews.llvm.org/D70676
* [DebugInfo] Don't reorder DBG_VALUEs when sunkJeremy Morse2019-12-052-52/+226
| | | | | | | | | | | | | | | | | | | | | | | Fix part of PR43855, resolving a problem that comes from the reapplication in 001574938e5. If we have two DBG_VALUE insts in a block that specify the location of the same variable, for example: %0 = someinst DBG_VALUE %0, !123, !DIExpression() %1 = anotherinst DBG_VALUE %1, !123, !DIExpression() if %0 were to sink, the corresponding DBG_VALUE would sink too, past the next DBG_VALUE, effectively re-ordering assignments. To fix this, I've added a SeenDbgVars set recording what variable locations have been seen in a block already (working bottom up), and now flag DBG_VALUEs that would pass a later DBG_VALUE for the same variable. NB, this only works for repeated DBG_VALUEs in the same basic block, the general case involving control flow is much harder, which I've written up in PR44117. Differential revision: https://reviews.llvm.org/D70672
* [DebugInfo] Re-apply two patches to MachineSinkJeremy Morse2019-12-054-17/+351
| | | | | | | | | | | | | These were: * D58386 / f5e1b718a67 / reverted in d382a8a768b * D58238 / ee50590e168 / reverted in a8db456b53a Of which the latter has a performance regression tracked in PR43855, fixed by D70672 / D70676, which will be committed atomically with this reapplication. Contains a minor difference to account for a change in the IsCopyInstr signature.
* [InstCombine] add tests for fpext+select+fptrunc; NFCSanjay Patel2019-12-051-0/+84
|
* [OPENMP][DOCS]Update list of the supported features, NFC.Alexey Bataev2019-12-051-3/+3
|
* [Syntax] Show input code on tests failures. NFCIlya Biryukov2019-12-051-0/+2
|
* [OPENMP50]Add support for if clause for simd part in master taskloop simd ↵Alexey Bataev2019-12-053-18/+45
| | | | | | | directive. According to OpenMP 5.0, the if clause can be applied to simd subdirective in the combined directives.
* [AArch64][SVE] Integer reduction instructions pattern/intrinsics.Danilo Carvalho Grael2019-12-057-15/+532
| | | | | | | | Added pattern matching/intrinsics for the following SVE instructions: -- saddv, uaddv -- smaxv, sminv, umaxv, uminv -- orv, eorv, andv
* [clangd] Simplify the code, NFC.Haojian Wu2019-12-054-5/+5
| | | | AST.getASTContext().getSourceManager() => AST.getSourceManager().
* gn build: Merge 7f93cb62280LLVM GN Syncbot2019-12-051-0/+1
|
* [ARM] Enable TypePromotion by defaultSam Parker2019-12-0511-13/+31
| | | | | | | | ARMCodeGenPrepare has already been generalized and renamed to TypePromotion. We've had it enabled and tested downstream for a while, so enable it by default. Differential Revision: https://reviews.llvm.org/D70998
* [AST] Traverse the class type loc inside the member type loc.Haojian Wu2019-12-054-4/+53
| | | | | | | | | | | | | | | Summary: We are missing this currently. This would fix https://github.com/clangd/clangd/issues/216. Reviewers: ilya-biryukov Subscribers: mgorny, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70849
OpenPOWER on IntegriCloud