summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix leaks in LLVMCreateDisasmCPUFeaturesScott Linder2019-06-262-31/+31
| | | | | | Differential Revision: https://reviews.llvm.org/D63795 llvm-svn: 364444
* [dotest] Add the ability to set environment variables for the inferior.Jonas Devlieghere2019-06-264-0/+15
| | | | | | | | | | | This patch adds a dotest flag for setting environment variables for the inferior. This is different from the current --env flag, which sets variables in the debugger's environment. This allows us to set things like LD_LIBRARY_PATH for testing. Differential revision: https://reviews.llvm.org/D63790 llvm-svn: 364443
* [clang-tidy] Generalize TransformerClangTidyCheck to take a rule generator.Yitzhak Mandelbaum2019-06-263-15/+105
| | | | | | | | | | | | | | Summary: Tidy check behavior often depends on language and/or clang-tidy options. This revision allows a user of TranformerClangTidyCheck to pass rule _generator_ in place of a rule, where the generator takes both the language and clang-tidy options. Additionally, the generator returns an `Optional` to allow for the case where the check is deemed irrelevant/disable based on those options. Reviewers: gribozavr Subscribers: xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63288 llvm-svn: 364442
* [InstCombine] simplify code for inserts -> splat; NFCSanjay Patel2019-06-261-25/+17
| | | | llvm-svn: 364441
* Fix build in shared lib mode.Michael Liao2019-06-262-1/+22
| | | | | | | - The newly added GSYM misses LLVMBuild.txt. Add a barely one to pass the build. llvm-svn: 364440
* [xray] Remove usage of procid_tAlexandre Ganea2019-06-262-12/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D61946 llvm-svn: 364439
* [LLD][COFF] Case insensitive compares for /nodefaultlibAlexandre Ganea2019-06-263-4/+11
| | | | | | Differential Revision: https://reviews.llvm.org/D63775 llvm-svn: 364438
* [InstCombine] regenerate test checks; NFCSanjay Patel2019-06-261-37/+75
| | | | llvm-svn: 364437
* [CodeGen] Improve formatting of jump tables (NFC)Evandro Menezes2019-06-262-31/+33
| | | | | | Split jump tables into individual lines and fix spacing. llvm-svn: 364436
* [clang-tidy] Fix ClangTidyTest to initialize context before checks.Yitzhak Mandelbaum2019-06-261-21/+27
| | | | | | | | | | | | | | | | | | | | | Summary: Currently, `clang::tidy::test::runCheckOnCode()` constructs the check instances *before* initializing the ClangTidyContext. This ordering causes problems when the check's constructor accesses the context, for example, through `getLangOpts()`. This revision moves the construction to after the context initialization, which follows the pattern used in the clang tidy tool itself. Reviewers: gribozavr Subscribers: xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63784 llvm-svn: 364435
* [X86][SSE] X86TargetLowering::isCommutativeBinOp - add PMULDQSimon Pilgrim2019-06-261-3/+1
| | | | | | Allows narrowInsertExtractVectorBinOp to reduce vector size instead of the more restricted SimplifyDemandedVectorEltsForTargetNode llvm-svn: 364434
* [NFC][InstCombine] Revisit one-use tests in ↵Roman Lebedev2019-06-261-14/+114
| | | | | | shift-amount-reassociation-in-bittest.ll llvm-svn: 364433
* [X86][SSE] X86TargetLowering::isCommutativeBinOp - add PCMPEQSimon Pilgrim2019-06-269-1207/+1231
| | | | | | Allows narrowInsertExtractVectorBinOp to reduce vector size llvm-svn: 364432
* [X86][SSE] X86TargetLowering::isBinOp - add PCMPGTSimon Pilgrim2019-06-2615-318/+321
| | | | | | Allows narrowInsertExtractVectorBinOp to reduce vector size llvm-svn: 364431
* [NFC][InstCombine] Add shift amount reassociation in bittest tests (PR42399)Roman Lebedev2019-06-261-0/+420
| | | | | | | | https://bugs.llvm.org/show_bug.cgi?id=42399 https://rise4fun.com/Alive/kBb https://rise4fun.com/Alive/1SB llvm-svn: 364430
* [X86] shouldScalarizeBinop - never scalarize target opcodes.Simon Pilgrim2019-06-261-2/+9
| | | | | | We have (almost) no target opcodes that have scalar/vector equivalents - for now assume we can't scalarize them (we can add exceptions if we need to). llvm-svn: 364429
* Make CodeGen depend on ASTMatchersMichael Liao2019-06-261-0/+1
| | | | | | - Shared library builds are broken due to the missing dependency. llvm-svn: 364428
* Add GSYM utility files along with unit tests.Greg Clayton2019-06-2614-0/+1047
| | | | | | | | | | | | | | | | | | | | | | | | The full GSYM patch started with: https://reviews.llvm.org/D53379 In that patch we wanted to split up getting GSYM into the LLVM code base so we are not committing too much code at once. This is a first in a series of patches where I only add the foundation classes along with complete unit tests. They provide the foundation for encoding and decoding a GSYM file. File entries are defined in llvm::gsym::FileEntry. This class splits the file up into a directory and filename represented by uniqued string table offsets. This allows all files that are referred to in a GSYM file to be encoded as 1 based indexes into a global file table in the GSYM file. Function information in stored in llvm::gsym::FunctionInfo. This object represents a contiguous address range that has a name and range with an optional line table and inline call stack information. Line table entries are defined in llvm::gsym::LineEntry. They store only address, file and line information to keep the line tables simple and allows the information to be efficiently encoded in a subsequent patch. Inline information is defined in llvm::gsym::InlineInfo. These structs store the name of the inline function, along with one or more address ranges, and the file and line that called this function. They also contain any child inline information. There are also utility classes for address ranges in llvm::gsym::AddressRange, and string table support in llvm::gsym::StringTable which are simple classes. The unit tests test all the APIs on these simple classes so they will be ready for the next patches where we will create GSYM files and parse GSYM files. Differential Revision: https://reviews.llvm.org/D63104 llvm-svn: 364427
* AMDGPU: Fix unused variableMatt Arsenault2019-06-261-1/+0
| | | | llvm-svn: 364426
* AMDGPU: Check MRI for callee saved regs instead of TRIMatt Arsenault2019-06-264-7/+5
| | | | | | | This should the same, but MRI does allow dynamically changing the CSR set, although currently not used. llvm-svn: 364425
* [clang/DIVar] Emit the flag for params that have unmodified valueDjordje Todorovic2019-06-263-0/+55
| | | | | | | | | | | | | | | Emit the debug info flag that indicates that a parameter has unchanged value throughout a function. ([5/13] Introduce the debug entry values.) Co-authored-by: Ananth Sowda <asowda@cisco.com> Co-authored-by: Nikola Prica <nikola.prica@rt-rk.com> Co-authored-by: Ivan Baev <ibaev@cisco.com> Differential Revision: https://reviews.llvm.org/D58035 llvm-svn: 364424
* [OpenCL] Improve diagnostic for placement newSven van Haastregt2019-06-263-2/+9
| | | | | | | | | | | | | Without an explicit declaration for placement new, clang would reject uses of placement new with "'default new' is not supported in OpenCL C++". This may mislead users into thinking that placement new is not supported, see e.g. PR42060. Clarify that placement new requires an explicit declaration. Differential Revision: https://reviews.llvm.org/D63561 llvm-svn: 364423
* [InlineCost] cleanup calculations of Cost and ThresholdFedor Sergeev2019-06-266-28/+30
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Doing better separation of Cost and Threshold. Cost counts the abstract complexity of live instructions, while Threshold is an upper bound of complexity that inlining is comfortable to pay. There are two parts: - huge 15K last-call-to-static bonus is no longer subtracted from Cost but rather is now added to Threshold. That makes much more sense, as the cost of inlining (Cost) is not changed by the fact that internal function is called once. It only changes the likelyhood of this inlining being profitable (Threshold). - bonus for calls proved-to-be-inlinable into callee is no longer subtracted from Cost but added to Threshold instead. While calculations are somewhat different, overall InlineResult should stay the same since Cost >= Threshold compares the same. Reviewers: eraman, greened, chandlerc, yrouban, apilipenko Reviewed By: apilipenko Tags: #llvm Differential Revision: https://reviews.llvm.org/D60740 llvm-svn: 364422
* [clangd] Added functionality for getting semantic highlights for variable ↵Johan Vikstrom2019-06-265-0/+186
| | | | | | and function declarations llvm-svn: 364421
* [X86][Codegen] X86DAGToDAGISel::matchBitExtract(): consistently capture ↵Roman Lebedev2019-06-261-7/+6
| | | | | | lambdas by value llvm-svn: 364420
* [X86] X86DAGToDAGISel::matchBitExtract(): pattern c: truncation awarenessRoman Lebedev2019-06-263-34/+21
| | | | | | | | | | | | | | | | | | | | | | | | Summary: The one thing of note here is that the 'bitwidth' constant (32/64) was previously pessimistic. Given `x & (-1 >> (C - z))`, we were taking `C` to be `bitwidth(x)`, but in reality we want `(-1 >> (C - z))` pattern to mean "low z bits must be all-ones". And for that, `C` should be `bitwidth(-1 >> (C - z))`, i.e. of the shift operation itself. Last pattern D does not seem to exhibit any of these truncation issues. Although it has the opposite problem - if we extract low bits (no shift) from i64, and then truncate to i32, then we fail to shrink this 64-bit extraction into 32-bit extraction. Reviewers: RKSimon, craig.topper, spatel Reviewed By: RKSimon Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62806 llvm-svn: 364419
* [X86] X86DAGToDAGISel::matchBitExtract(): pattern b: truncation awarenessRoman Lebedev2019-06-265-54/+45
| | | | | | | | | | | | | | | | | | Summary: (Not so) boringly identical to pattern a (D62786) Not yet sure how do deal with the last pattern c. Reviewers: RKSimon, craig.topper, spatel Reviewed By: RKSimon Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62793 llvm-svn: 364418
* [X86] X86DAGToDAGISel::matchBitExtract(): pattern a: truncation awarenessRoman Lebedev2019-06-263-68/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Finally tying up loose ends here. The problem is quite simple: If we have pattern `(x >> start) & (1 << nbits) - 1`, and then truncate the result, that truncation will be propagated upwards, into the `and`. And that isn't currently handled. I'm only fixing pattern `a` here, the same fix will be needed for patterns `b`/`c` too. I *think* this isn't missing any extra legality checks, since we only look past truncations. Similary, i don't think we can get any other truncation there other than i64->i32. Reviewers: craig.topper, RKSimon, spatel Reviewed By: craig.topper Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62786 llvm-svn: 364417
* Revert "r364412 [ExpandMemCmp][MergeICmps] Move passes out of CodeGen into ↵Clement Courbet2019-06-2640-2025/+3360
| | | | | | | | | | | | | | opt pipeline." Breaks sanitizers: libFuzzer :: cxxstring.test libFuzzer :: memcmp.test libFuzzer :: recommended-dictionary.test libFuzzer :: strcmp.test libFuzzer :: value-profile-mem.test libFuzzer :: value-profile-strcmp.test llvm-svn: 364416
* [HardwareLoops] NFC - move loop with irreducible control flow checking logic ↵Chen Zheng2019-06-263-10/+17
| | | | | | to HarewareLoopInfo. llvm-svn: 364415
* Fix the build after r364401Hans Wennborg2019-06-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | It was failing with: /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/lib/Target/X86/X86ISelLowering.cpp:18772:66: error: call of overloaded 'makeArrayRef(<brace-enclosed initializer list>)' is ambiguous scaleShuffleMask<int>(Scale, makeArrayRef<int>({ 0, 2, 1, 3 }), Mask); ^ /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/lib/Target/X86/X86ISelLowering.cpp:18772:66: note: candidates are: In file included from /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/include/llvm/CodeGen/MachineFunction.h:20:0, from /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/include/llvm/CodeGen/CallingConvLower.h:19, from /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/lib/Target/X86/X86ISelLowering.h:17, from /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/lib/Target/X86/X86ISelLowering.cpp:14: /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/include/llvm/ADT/ArrayRef.h:480:15: note: llvm::ArrayRef<T> llvm::makeArrayRef(const std::vector<_RealType>&) [with T = int] ArrayRef<T> makeArrayRef(const std::vector<T> &Vec) { ^ /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/include/llvm/ADT/ArrayRef.h:485:37: note: llvm::ArrayRef<T> llvm::makeArrayRef(const llvm::ArrayRef<T>&) [with T = int] template <typename T> ArrayRef<T> makeArrayRef(const ArrayRef<T> &Vec) { ^ llvm-svn: 364414
* [clangd] Disable failing unittest on non-x86 platformsKadir Cetinkaya2019-06-261-0/+1
| | | | llvm-svn: 364413
* [ExpandMemCmp][MergeICmps] Move passes out of CodeGen into opt pipeline.Clement Courbet2019-06-2640-3360/+2025
| | | | | | | | | This allows later passes (in particular InstCombine) to optimize more cases. One that's important to us is `memcmp(p, q, constant) < 0` and memcmp(p, q, constant) > 0. llvm-svn: 364412
* gn build: Merge r364387Nico Weber2019-06-261-0/+1
| | | | llvm-svn: 364411
* [docs][llvm-symbolizer] Improve llvm-symbolizer documentationJames Henderson2019-06-261-99/+271
| | | | | | | | | | | | | | | | | | | | | | | | | As detailed in https://bugs.llvm.org/show_bug.cgi?id=42253, there were a number of issues in the llvm-symbolizer documentation. This patch fixes them by: 1. Adding [addresses...] to the synopsis, and matching the formatting of other tools. 2. Rewriting the description to fix grammar issues and mention other usage options. 3. Rewriting the examples to be easier to read. 4. Re-ordering the options into alphabetical order. 5. Improving the text of some of the option descriptions, and adding some examples to individual options. 6. Splitting the Mach-O options into a separate section of the document. 7. Standardizing on double dashes for long options throughout the file. 8. Adding a reference to the llvm-addr2line document. Reviewed by: mtrent, ikudrin Differential Revision: https://reviews.llvm.org/D63651 llvm-svn: 364410
* gn build: Merge r364386Nico Weber2019-06-261-0/+1
| | | | llvm-svn: 364409
* gn build: Merge r364389Nico Weber2019-06-261-0/+1
| | | | llvm-svn: 364408
* [X86][AVX] combineExtractSubvector - 'little to big' ↵Simon Pilgrim2019-06-269-91/+109
| | | | | | | | extract_subvector(bitcast()) support Ideally this needs to be a generic combine in DAGCombiner::visitEXTRACT_SUBVECTOR but there's some nasty regressions in aarch64 due to neon shuffles not handling bitcasts at all..... llvm-svn: 364407
* [IR/DIVar] Add the flag for params that have unmodified valueDjordje Todorovic2019-06-265-2/+26
| | | | | | | | | | | | | | | | Introduce the debug info flag that indicates that a parameter has unchanged value throughout a function. This info will be used to emit the expressions with DW_OP_entry_value. ([4/13] Introduce the debug entry values.) Co-authored-by: Ananth Sowda <asowda@cisco.com> Co-authored-by: Nikola Prica <nikola.prica@rt-rk.com> Co-authored-by: Ivan Baev <ibaev@cisco.com> Differential Revision: https://reviews.llvm.org/D58034 llvm-svn: 364406
* [DAGCombine] visitEXTRACT_SUBVECTOR - add TODO for ↵Simon Pilgrim2019-06-261-0/+1
| | | | | | | | extract_subvector(bitcast()) support We support 'big to little' (e.g. extract_subvector(v16i8 bitcast(v2i64))) but not 'little to big' cases (e.g. extract_subvector(v2i64 bitcast(v16i8))) llvm-svn: 364405
* [ARM] Handle fixup_arm_pcrel_9 correctly on big-endian targetsMikhail Maltsev2019-06-262-0/+19
| | | | | | | | | | | | | | | | | | | | | | Summary: The getFixupKindContainerSizeBytes function returns the size of the instruction containing a given fixup. Currently fixup_arm_pcrel_9 is not handled in this function, this causes an assertion failure in the debug build and incorrect codegen in the release build. This patch fixes the problem. Reviewers: ostannard, simon_tatham Reviewed By: ostannard Subscribers: javed.absar, kristof.beyls, hiraditya, pbarrio, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63778 llvm-svn: 364404
* [RISCV] Add pseudo instruction for calls with explicit registerLewis Revill2019-06-266-11/+53
| | | | | | | | | | | | | | This patch adds the PseudoCALLReg instruction which allows using an explicit register operand as the destination for the return address. GCC can successfully parse this form of the call instruction, which would be used for calls to functions which do not use ra as the return address register, such as the __riscv_save libcalls. This patch forms the first part of an implementation of -msave-restore for RISC-V. Differential Revision: https://reviews.llvm.org/D62685 llvm-svn: 364403
* [clang] Fix test failures after the rL364399Djordje Todorovic2019-06-261-4/+4
| | | | llvm-svn: 364402
* [X86][AVX] truncateVectorWithPACK - avoid bitcasted shufflesSimon Pilgrim2019-06-264-26/+5
| | | | | | | | truncateVectorWithPACK is often used in conjunction with ComputeNumSignBits which struggles when peeking through bitcasts. This fix tries to avoid bitcast(shuffle(bitcast())) patterns in the 256-bit 64-bit sublane shuffles so we can still see through at least until lowering when the shuffles will need to be bitcasted to widen the shuffle type. llvm-svn: 364401
* Revert r364332 "[scudo][standalone] Introduce the C & C++ wrappers"Hans Wennborg2019-06-2611-909/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makes the build fail with e.g. llvm/projects/compiler-rt/lib/scudo/standalone/wrappers_c.inc:20:68: error: declaration of 'void* calloc(size_t, size_t)' has a different exception specifier INTERFACE WEAK void *SCUDO_PREFIX(calloc)(size_t nmemb, size_t size) { ^ See llvm-commits thread. > Summary: > This CL adds C & C++ wrappers and associated tests. Those use default > configurations for a Scudo combined allocator that will likely be > tweaked in the future. > > This is the final CL required to have a functional C & C++ allocator > based on Scudo. > > The structure I have chosen is to define the core C allocation > primitives in an `.inc` file that can be customized through defines. > This allows to easily have 2 (or more) sets of wrappers backed by > different combined allocators, as demonstrated by the `Bionic` > wrappers: one set for the "default" allocator, one set for the "svelte" > allocator. > > Currently all the tests added have been gtests, but I am planning to > add some more lit tests as well. > > Reviewers: morehouse, eugenis, vitalybuka, hctim, rengolin > > Reviewed By: morehouse > > Subscribers: srhines, mgorny, delcypher, jfb, #sanitizers, llvm-commits > > Tags: #llvm, #sanitizers > > Differential Revision: https://reviews.llvm.org/D63612 llvm-svn: 364400
* [CC1Option] Add the option to enable the debug entry valuesDjordje Todorovic2019-06-266-1/+28
| | | | | | | | | | | | | | | | | | | | | The option enables debug info about parameter's entry values. The example of using the option: clang -g -O2 -Xclang -femit-debug-entry-values test.c In addition, when the option is set add the flag all_call_sites in a subprogram in order to support GNU extension as well. ([3/13] Introduce the debug entry values.) Co-authored-by: Ananth Sowda <asowda@cisco.com> Co-authored-by: Nikola Prica <nikola.prica@rt-rk.com> Co-authored-by: Ivan Baev <ibaev@cisco.com> Differential Revision: https://reviews.llvm.org/D58033 llvm-svn: 364399
* [LoopUnroll] Add support for loops with exiting headers and uncond latches.Florian Hahn2019-06-266-64/+523
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch generalizes the UnrollLoop utility to support loops that exit from the header instead of the latch. Usually, LoopRotate would take care of must of those cases, but in some cases (e.g. -Oz), LoopRotate does not kick in. Codesize impact looks relatively neutral on ARM64 with -Oz + LTO. Program master patch diff External/S.../CFP2006/447.dealII/447.dealII 629060.00 627676.00 -0.2% External/SPEC/CINT2000/176.gcc/176.gcc 1245916.00 1244932.00 -0.1% MultiSourc...Prolangs-C/simulator/simulator 86100.00 86156.00 0.1% MultiSourc...arks/Rodinia/backprop/backprop 66212.00 66252.00 0.1% MultiSourc...chmarks/Prolangs-C++/life/life 67276.00 67312.00 0.1% MultiSourc...s/Prolangs-C/compiler/compiler 69824.00 69788.00 -0.1% MultiSourc...Prolangs-C/assembler/assembler 86672.00 86696.00 0.0% Reviewers: efriedma, vsk, paquette Reviewed By: paquette Differential Revision: https://reviews.llvm.org/D61962 llvm-svn: 364398
* [HardwareLoops] NFC - move loop with irreducible control flow checking logic ↵Chen Zheng2019-06-263-11/+12
| | | | | | to isHardwareLoopProfitable() llvm-svn: 364397
* [clang][Tooling] Fix windows build-bots after rL364386Kadir Cetinkaya2019-06-261-2/+2
| | | | llvm-svn: 364396
* [TargetOption] Add option to ebanble the debug entry valuesDjordje Todorovic2019-06-262-1/+11
| | | | | | | | | | | | | | The option enables debug info about parameter's entry values. ([2/13] Introduce the debug entry values.) Co-authored-by: Ananth Sowda <asowda@cisco.com> Co-authored-by: Nikola Prica <nikola.prica@rt-rk.com> Co-authored-by: Ivan Baev <ibaev@cisco.com> Differential Revision: https://reviews.llvm.org/D60961 llvm-svn: 364395
OpenPOWER on IntegriCloud