summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [OpenMP 5.0] Codegen support for user-defined mappers.Michael Kruse2019-08-047-87/+887
| | | | | | | | | | | | | | | | This patch implements the code generation for OpenMP 5.0 declare mapper (user-defined mapper) constructs. For each declare mapper, a mapper function is generated. These mapper functions will be called by the runtime and/or other mapper functions to achieve user defined mapping. The design slides can be found at https://github.com/lingda-li/public-sharing/blob/master/mapper_runtime_design.pptx Patch by Lingda Li <lildmh@gmail.com> Differential Revision: https://reviews.llvm.org/D59474 llvm-svn: 367773
* [OpenMP 5.0] libomptarget interface for declare mapper functions.Michael Kruse2019-08-044-0/+88
| | | | | | | | | | | | | | | | | | This patch implements the libomptarget runtime interface for OpenMP 5.0 declare mapper functions. The declare mapper functions generated by Clang will call them to complete the mapping of members. kmpc_mapper_num_components gets the current number of components for a user-defined mapper; kmpc_push_mapper_component pushes back one component for a user-defined mapper. The design slides can be found at https://github.com/lingda-li/public-sharing/blob/master/mapper_runtime_design.pptx Patch by Lingda Li <lildmh@gmail.com> Differential Revision: https://reviews.llvm.org/D60972 llvm-svn: 367772
* [SelectionDAG] Add node creation debug message to getMemIntrinsicNode.Craig Topper2019-08-041-1/+3
| | | | llvm-svn: 367771
* Suppress -Wctad-maybe-unsupported on types w/o deduction guides.Eric Fiselier2019-08-039-1/+60
| | | | | | | | | | | There are a handful of standard library types that are intended to support CTAD but don't need any explicit deduction guides to do so. This patch adds a dummy deduction guide to those types to suppress -Wctad-maybe-unsupported (which gets emitted in user code). llvm-svn: 367770
* [Transforms] Do not drop !preserve.access.index metadataYonghong Song2019-08-033-3/+127
| | | | | | | | | | | | | | | Currently, when a GVN or CSE optimization happens, the llvm.preserve.access.index metadata is dropped. This caused a problem for BPF AbstructMemberOffset phase as it relies on the metadata (debuginfo types). This patch added proper hooks in lib/Transforms to preserve !preserve.access.index metadata. A test case is added to ensure metadata is preserved under CSE. Differential Revision: https://reviews.llvm.org/D65700 llvm-svn: 367769
* [DAGCombiner] Prevent the combine added in r367710 from creating illegal ↵Craig Topper2019-08-031-1/+1
| | | | | | | | | | | | types after type legalization. This is further fix for PR42880. Sanjay already disabled the X86 TLI hook for non-simple types, but we should really call isTypeLegal here if we're after type legalization. llvm-svn: 367768
* [JITLink] Fix an overly-wide read in the MachO/x86-64 test case.Lang Hames2019-08-031-1/+1
| | | | | | This should fix the build failures on some of the 32-bit bots. llvm-svn: 367767
* [x86] change free truncate hook to handle only simple types (PR42880)Sanjay Patel2019-08-032-0/+35
| | | | | | | | | | | | | This avoids the crash from: https://bugs.llvm.org/show_bug.cgi?id=42880 ...and I think it's a proper constraint for the TLI hook. But that example raises questions about what happens to get us into this situation (created i29 types) and what happens later (why does legalization die on those types), so I'm not sure if we will resolve the bug based on this change. llvm-svn: 367766
* [WebAssembly] Fix allocsize attribute in sjlj loweringKeno Fischer2019-08-032-3/+31
| | | | | | | | | | | | | Summary: The allocsize attribute refers to call parameters by index. Thus, when we add the extra parameter in sjlj lowering, we need to increment the referenced paramater in the allocsize attribute to avoid angering the Verifier. Reviewed By: aheejin Differential Revision: https://reviews.llvm.org/D65470 llvm-svn: 367765
* [JITLink] Add support for MachO/x86-64 UNSIGNED relocs with length=2.Lang Hames2019-08-033-12/+42
| | | | | | | | | MachO/x86-64 UNSIGNED relocs are almost always 64-bit (length=3), but UNSIGNED relocs of length=2 are allowed if the target resides in the low 32-bits. This patch adds support for such relocations in JITLink (previously they would have triggered an unsupported relocation error). llvm-svn: 367764
* [JITLink] Fix error message formatting.Lang Hames2019-08-031-1/+1
| | | | llvm-svn: 367763
* Revert accidental change to __member_pointer_traits_imp.Eric Fiselier2019-08-031-1/+3
| | | | | | | A previous patch accidentally made the primary template an incomplete type. This broke some C++03 constructs. llvm-svn: 367762
* Fixup r367321 "Ask confirmation when `git llvm push` will push multiple commits"Mehdi Amini2019-08-031-9/+4
| | | | | | | I unfortunately commited an obsolete revision in r367321 that didn't have all the changes the reviewers suggested. llvm-svn: 367761
* [yaml2obj][tests] Replace 8-byte `od` conversion with 1-byte conversionHubert Tong2019-08-032-8/+8
| | | | | | | | | | | | | | | | | | | Summary: `od` on AIX does not seem to implement 8-byte integer conversions. Work around this by using 1-byte conversions, which can be used in this case since the value is byte-order insensitive. Reviewers: grimar, daltenty, xingxue, jasonliu, MaskRay Reviewed By: grimar, MaskRay Subscribers: MaskRay, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65671 llvm-svn: 367760
* Use switch instead of series of comparisonsSerge Pavlov2019-08-032-7/+11
| | | | | | | | This is style correction, no functional changes. Differential Revision: https://reviews.llvm.org/D65670 llvm-svn: 367759
* IR: Cleanup after test to silence ASAN buildsTim Northover2019-08-031-0/+1
| | | | llvm-svn: 367758
* [Attributor][NFC] run clang-format on Attributor.cppStefan Stipanovic2019-08-031-4/+5
| | | | llvm-svn: 367757
* Speculative CompilationPraveen Velliengiri2019-08-0312-9/+701
| | | | | | | | | | | | | | | | | | | | | | | | | | | | [ORC] Remove Speculator Variants for Different Program Representations [ORC] Block Freq Analysis Speculative Compilation with Naive Block Frequency Add Applications to OrcSpeculation ORC v2 with Block Freq Query & Example Deleted BenchMark Programs Signed-off-by: preejackie <praveenvelliengiri@gmail.com> ORCv2 comments resolved [ORCV2] NFC ORCv2 NFC [ORCv2] Speculative compilation - CFGWalkQuery ORCv2 Adapting IRSpeculationLayer to new locking scheme llvm-svn: 367756
* IR: print value numbers for unnamed function argumentsTim Northover2019-08-03184-1122/+1258
| | | | | | | | | | For consistency with normal instructions and clarity when reading IR, it's best to print the %0, %1, ... names of function arguments in definitions. Also modifies the parser to accept IR in that form for obvious reasons. llvm-svn: 367755
* Finish moving TargetRegisterInfo::isVirtualRegister() and friends to ↵Sylvestre Ledru2019-08-032-2/+2
| | | | | | llvm::Register as started by r367614. NFC llvm-svn: 367754
* [Thumb] Fix invalid symbol redefinition due to duplicated jumptable (PR42760)Nikita Popov2019-08-032-1/+58
| | | | | | | | | | | | | | | Fix for https://bugs.llvm.org/show_bug.cgi?id=42760. A tBR_JTr instruction is duplicated by tail duplication, which results in the same jumptable with the same label being emitted twice. Fix this by marking tBR_JTr as not duplicable. The corresponding ARM/Thumb instructions are already marked as not duplicable. Additionally also mark tTBB_JT and tTBH_JT to be consistent with Thumb2, even though this shouldn't be strictly necessary. Differential Revision: https://reviews.llvm.org/D65606 llvm-svn: 367753
* [lit] Print internal env commandsJoel E. Denny2019-08-032-9/+30
| | | | | | | | | | | | Without this patch, the internal `env` command removes `env` and its args from the command line while parsing it. This patch modifies a copy instead so that the original command line is printed. Reviewed By: stella.stamenova, rnk Differential Revision: https://reviews.llvm.org/D65624 llvm-svn: 367752
* [lit] Actually run tests for internal env commandJoel E. Denny2019-08-032-1/+1
| | | | | | | | | | | Put the main test script in the right directory, and fix a python bug in a local script. Reviewed By: stella.stamenova Differential Revision: https://reviews.llvm.org/D65623 llvm-svn: 367751
* Emit diagnostic if an inline asm constraint requires an immediateBill Wendling2019-08-0321-40/+117
| | | | | | | | | | | | | | | | | | Summary: An inline asm call can result in an immediate after inlining. Therefore emit a diagnostic here if constraint requires an immediate but one isn't supplied. Reviewers: joerg, mgorny, efriedma, rsmith Reviewed By: joerg Subscribers: asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, s.egerton, MaskRay, jyknight, dylanmckay, javed.absar, fedor.sergeev, jrtc27, Jim, krytarowski, eraman, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60942 llvm-svn: 367750
* Simplify <type_traits> implementations.Eric Fiselier2019-08-031-67/+36
| | | | | | | | | | | | This patch rewrites a number of old meta-function implementations that assumed const/volatile could not be safely applied to all types. This is no longer the case, though for some types (Ex function types), the const qualifier can be ignored. The largest improvement in this patch is the reduction of is_function. Thanks to Matt Calabrese for the improved implementation. llvm-svn: 367749
* [Attributor] Fix dereferenceable callsite argument initializationHideto Ueno2019-08-031-2/+4
| | | | llvm-svn: 367748
* [InstSimplify] Add test case to show bad sign bit handling for integer abs ↵Craig Topper2019-08-031-0/+12
| | | | | | | | | | | | | | idiom in computeKnownBits. computeKnownBits will indicate the sign bit of abs is 0 if the the RHS operand returned by matchSelectPattern has the nsw flag set. For abs idioms like (X >= 0) ? X : -X, the RHS returns -X. But we can also match ((X-Y) >= 0 ? X-Y : Y-X as abs. In this case RHS will be the Y-X operand. According to Alive, the sign bit for this is only 0 if both the X-Y and Y-X operands have the nsw flag. But we're only checking the Y-X operand. llvm-svn: 367747
* Add OMPT support for teams constructHansang Bae2019-08-0312-63/+437
| | | | | | | | This change adds OMPT support for events from teams construct. Differential Revision: https://reviews.llvm.org/D64025 llvm-svn: 367746
* [ELF] Move R_*_IRELATIVE from .rel[a].plt to .rel[a].dyn unless ↵Fangrui Song2019-08-0318-69/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --pack-dyn-relocs=android[+relr] An R_*_IRELATIVE represents the address of a STT_GNU_IFUNC symbol (redirected at runtime) which is non-preemptable and is not associated with a canonical PLT (associated with a symbol with a section index of SHN_UNDEF but a non-zero st_value). .rel[a].plt [DT_JMPREL, DT_JMPREL+DT_JMPRELSZ) contains relocations that can be lazily resolved. R_*_IRELATIVE are always eagerly resolved, so conceptually they do not belong to .rela.plt. "iplt" is mostly a misnomer. glibc powerpc and powerpc64 do not resolve R_*_IRELATIVE if they are in .rela.plt. // a.o - synthesized PLT call stub has an R_*_IRELATIVE void ifunc(); int main() { ifunc(); } // b.o static void real() {} asm (".type ifunc, %gnu_indirect_function"); void *ifunc() { return &real; } The lld-linked executable crashes. ld.bfd places R_*_IRELATIVE in .rela.dyn and the executable works. glibc i386, x86_64, and aarch64 have logic (glibc/sysdeps/*/dl-machine.h:elf_machine_lazy_rel) to eagerly resolve R_*_IRELATIVE in .rel[a].plt so the lld-linked executable works. Move R_*_IRELATIVE from .rel[a].plt to .rel[a].dyn to fix the crashes on glibc powerpc/powerpc64. This also helps simplifying ifunc implementation in FreeBSD rtld-elf powerpc64. If --pack-dyn-relocs=android[+relr] is specified, the Android packed dynamic relocation format is used for .rela.dyn. We cannot name in.relaIplt ".rela.dyn" because the output section will have mixed formats. This can be improved in the future. Reviewed By: pcc Differential Revision: https://reviews.llvm.org/D65651 llvm-svn: 367745
* MCRegister/Register: DenseMapInfo should take `const T &`Daniel Sanders2019-08-032-4/+4
| | | | llvm-svn: 367744
* [clang-doc] Update documentationDiego Astiazaran2019-08-032-11/+41
| | | | | | | | | HTML generator has been included in clang-tools-extra release notes. clang-doc documentation file has been updated. Differential Revision: https://reviews.llvm.org/D65622 llvm-svn: 367743
* [ORC] Remove some old debugging output from a unit test.Lang Hames2019-08-031-2/+0
| | | | llvm-svn: 367742
* Temporarily Revert "[PowerPC][NFC][MachinePipeliner] Add some regression ↵Eric Christopher2019-08-035-386/+0
| | | | | | | | | | | | testcases" It's breaking a number of bots, e.g.: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap-msan/builds/13893/steps/check-llvm%20msan/logs/stdio This reverts commit r367732. llvm-svn: 367741
* Add brackets to remove warnings about ambiguous 'else's.Bill Wendling2019-08-031-5/+10
| | | | llvm-svn: 367740
* Re-commit "[GlobalISel] Add legalization support for non-power-2 loads and ↵Amara Emerson2019-08-025-32/+154
| | | | | | | | | | stores"" This is an old commit that exposed a bug in the GISel importer, which caused non-truncating stores to be selected for truncating store patterns. Now that's been fixed in r367737 this can go back in. llvm-svn: 367739
* [ScalarizeMaskedMemIntrin] Bitcast the mask to the scalar domain and use ↵Craig Topper2019-08-026-5667/+5304
| | | | | | | | | | scalar bit tests for the branches for expandload/compressstore. Same as what was done for gather/scatter/load/store in r367489. Expandload/compressstore were delayed due to lack of constant masking handling that has since been fixed. llvm-svn: 367738
* [GlobalISel] Check LLT size matches memory size for non-truncating stores.Amara Emerson2019-08-022-6/+29
| | | | | | | | This was causing a bug where non-truncating stores would be selected instead of truncating ones. Differential Revision: https://reviews.llvm.org/D64845 llvm-svn: 367737
* [X86] Use the pointer VT for the Scale node when lowering x86 gather/scatter ↵Craig Topper2019-08-021-4/+12
| | | | | | | | | | | intrinsics. This is consistent with the target independent intrinsic handling. Not sure this really matters since we just pull the constant out using getZExtValue later. llvm-svn: 367736
* [BPF] Handling type conversions correctly for CO-REYonghong Song2019-08-0222-184/+1812
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With newly added debuginfo type metadata for preserve_array_access_index() intrinsic, this patch did the following two things: (1). checking validity before adding a new access index to the access chain. (2). calculating access byte offset in IR phase BPFAbstractMemberAccess instead of when BTF is emitted. For (1), the metadata provided by all preserve_*_access_index() intrinsics are used to check whether the to-be-added type is a proper struct/union member or array element. For (2), with all available metadata, calculating access byte offset becomes easier in BPFAbstractMemberAccess IR phase. This enables us to remove the unnecessary complexity in BTFDebug.cpp. New tests are added for . user explicit casting to array/structure/union . global variable (or its dereference) as the source of base . multi demensional arrays . array access given a base pointer . cases where we won't generate relocation if we cannot find type name. Differential Revision: https://reviews.llvm.org/D65618 llvm-svn: 367735
* Remove support for unsupported MSVC versionsJF Bastien2019-08-023-22/+1
| | | | | | | | | | | | | | Re-land r367727 with the #if fixed. Reviewers: rnk, lebedev.ri Subscribers: hiraditya, jkorous, dexonsmith, lebedev.ri, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65662 llvm-svn: 367734
* The MinGW linker supports response filesReid Kleckner2019-08-021-1/+2
| | | | | | | | | | This affects both LLD and ld.bfd. This isn't testable with a normal driver test with -### because those command lines are printed before response file setup. I tested manually and confirmed it seems to do the right thing. llvm-svn: 367733
* [PowerPC][NFC][MachinePipeliner] Add some regression testcasesJinsong Ji2019-08-025-0/+386
| | | | | | Exposed by refactoring in https://reviews.llvm.org/D64665. llvm-svn: 367732
* Revert Fix and test inter-procedural register allocation for ARMDouglas Yung2019-08-026-227/+2
| | | | | | | | This reverts r367669 (git commit f6b00c279a5587a25876752a6ecd8da0bed959dc) This was breaking a build bot http://lab.llvm.org:8011/builders/netbsd-amd64/builds/21233 llvm-svn: 367731
* [lit] Fix 42812: lit test suite can no longer be run stand-aloneStella Stamenova2019-08-021-1/+12
| | | | | | | | | | | | | | | | | | | Summary: This change updates the lit.cfg file to use llvm_config when it is available, but when it is not, it directly modifies the config object. This makes it possible to run the lit tests standalone without having built llvm (as long as the correct binaries are present in the path such as FileCheck and not). Because the lit tests don't take a hard dependency on llvm_config, some features such as system-windows have to have definitions in lit's cfg file as well. This is a potential issue as the os features sometimes change names (for example, we went from windows to system-windows, etc.). This can cause drift between lit's tests and the rest of the llvm tests. Reviewers: probinson, mgorny Reviewed By: mgorny Subscribers: delcypher, llvm-commits, asmith Tags: #llvm Differential Revision: https://reviews.llvm.org/D65674 llvm-svn: 367730
* [clang-doc] Add flag to continue after mapping errorsDiego Astiazaran2019-08-021-2/+13
| | | | | | | | | | The tool used to stop execution if there was an error in the mapping phase. It will now show the error but continue with the files that were mapped correctly if the flag is true. Differential revision: https://reviews.llvm.org/D65627 llvm-svn: 367729
* Revert "Remove support for unsupported MSVC versions"JF Bastien2019-08-023-1/+20
| | | | | | Mismatched preprocessor, I'll fix in a follow-up. llvm-svn: 367728
* Remove support for unsupported MSVC versionsJF Bastien2019-08-023-20/+1
| | | | | | | | | | | | Reviewers: rnk, lebedev.ri Subscribers: hiraditya, jkorous, dexonsmith, lebedev.ri, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65662 llvm-svn: 367727
* Fix ClangASTContext::CreateParameterDeclaration to not call addDeclShafik Yaghmour2019-08-0210-5/+79
| | | | | | | | | Summary: The change https://reviews.llvm.org/D55575 modified ClangASTContext::CreateParameterDeclaration to call decl_ctx->addDecl(decl); this caused a regression since the existing code in DWARFASTParserClang::ParseChildParameters is called with the containing DeclContext. So when end up with cases where we are parsing a parameter for a member function and the parameter is added to the CXXRecordDecl as opposed to the CXXMethodDecl. This example is given in the regression test TestBreakpointInMemberFuncWNonPrimitiveParams.py which without this fix in a modules build leads to assert on setting a breakpoint in a member function with non primitive parameters. This scenario would be common when debugging LLDB or clang. Differential Revision: https://reviews.llvm.org/D65414 llvm-svn: 367726
* [Attributor] Using liveness in other attributes.Stefan Stipanovic2019-08-025-75/+228
| | | | | | | | | | | | Modifying other AbstractAttributes to use Liveness AA and skip dead instructions. Reviewers: jdoerfert, uenoku Subscribers: hiraditya, llvm-commits Differential revision: https://reviews.llvm.org/D65243 llvm-svn: 367725
* [BPF] annotate DIType metadata for builtin preseve_array_access_index()Yonghong Song2019-08-026-18/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, debuginfo types are annotated to IR builtin preserve_struct_access_index() and preserve_union_access_index(), but not preserve_array_access_index(). The debug info is useful to identify the root type name which later will be used for type comparison. For user access without explicit type conversions, the previous scheme works as we can ignore intermediate compiler generated type conversions (e.g., from union types to union members) and still generate correct access index string. The issue comes with user explicit type conversions, e.g., converting an array to a structure like below: struct t { int a; char b[40]; }; struct p { int c; int d; }; struct t *var = ...; ... __builtin_preserve_access_index(&(((struct p *)&(var->b[0]))->d)) ... Although BPF backend can derive the type of &(var->b[0]), explicit type annotation make checking more consistent and less error prone. Another benefit is for multiple dimension array handling. For example, struct p { int c; int d; } g[8][9][10]; ... __builtin_preserve_access_index(&g[2][3][4].d) ... It would be possible to calculate the number of "struct p"'s before accessing its member "d" if array debug info is available as it contains each dimension range. This patch enables to annotate IR builtin preserve_array_access_index() with proper debuginfo type. The unit test case and language reference is updated as well. Signed-off-by: Yonghong Song <yhs@fb.com> Differential Revision: https://reviews.llvm.org/D65664 llvm-svn: 367724
OpenPOWER on IntegriCloud