summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [PDB] Support dumping injected sources via the DIA reader.Zachary Turner2018-03-1319-0/+435
| | | | | | | | | | | | | | | | | | Injected sources are basically a way to add actual source file content to your PDB. Presumably you could use this for shipping your source code with your debug information, but in practice I can only find this being used for embedding natvis files inside of PDBs. In order to effectively test LLVM's natvis file injection, we need a way to dump the injected sources of a PDB in a way that is authoritative (i.e. based on Microsoft's understanding of the PDB format, and not LLVM's). To this end, I've added support for dumping injected sources via DIA. I made a PDB file that used the /natvis option to generate a test case. Differential Revision: https://reviews.llvm.org/D44405 llvm-svn: 327428
* Revert "[mips] Guard traps for microMIPS correctly"Simon Dardis2018-03-1317-626/+120
| | | | | | | | | This appears to have broken the expensive checks bot in a strange fashion. Reverting until I can investigate. This reverts r327409. llvm-svn: 327427
* [analyzer] Fix the matcher for GCDAntipattern to look for "signal" call in ↵George Karpenkov2018-03-132-2/+17
| | | | | | | | all parameters rdar://38405904 llvm-svn: 327426
* [llvm-mca] Remove the logic that computes the reciprocal throughput, and ↵Andrea Di Biagio2018-03-136-53/+39
| | | | | | | | | | | | | | | | | make the SummaryView independent from the Backend. NFCI Since r327420, the tool can query the MCSchedModel interface to obtain the reciprocal throughput information. As a consequence, method `ResourceManager::getRThroughput`, and method `Backend::getRThroughput` are no longer needed. This patch simplifies the code by removing the custom RThroughput computation. This patch also refactors class SummaryView by removing the dependency with the Backend object. No functional change intended. llvm-svn: 327425
* [DAGCombine] visitREM - Don't assume that one divrem isn't driving anotherSimon Pilgrim2018-03-132-3/+33
| | | | | | | | | | | Under some circumstances the divrems won't have been combined together before getting to this code. So replace the assertion with a if() guard to not expand to X-((X/C)*C) to give the other combine chance to happen. Reduced from OSS-Fuzz #6883 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6883 llvm-svn: 327424
* Build system changes for RISCVAzharuddin Mohammed2018-03-131-0/+4
| | | | | | | | | | | | | | Summary: Build system changes for RISCV. Makes it possible to build just the RISCV target alone. Reviewers: asb, apazos, mgrang, beanz Reviewed By: asb Subscribers: mgorny, kito-cheng, shiva0217, llvm-commits Differential Revision: https://reviews.llvm.org/D44153 llvm-svn: 327423
* [lit] - Allow 1 test to report multiple micro-test results to provide ↵Brian Homerding2018-03-137-0/+201
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | support for microbenchmarks. Summary: These changes are to allow to a Result object to have nested Result objects in order to support microbenchmarks. Currently lit is restricted to reporting one result object for one test, this change provides support tests that want to report individual timings for individual kernels. This revision is the result of the discussions in https://reviews.llvm.org/D32272#794759, https://reviews.llvm.org/D37421#f8003b27 and https://reviews.llvm.org/D38496. It is a separation of the changes purposed in https://reviews.llvm.org/D40077. This change will enable adding LCALS (Livermore Compiler Analysis Loop Suite) collection of loop kernels to the llvm test suite using the google benchmark library (https://reviews.llvm.org/D43319) with tracking of individual kernel timings. Previously microbenchmarks had been handled by using macros to section groups of microbenchmarks together and build many executables while still getting a grouped timing (MultiSource/TSVC). Recently the google benchmark library was added to the test suite and utilized with a litsupport plugin. However the limitation of 1 test 1 result limited its use to passing a runtime option to run only 1 microbenchmark with several hand written tests (MicroBenchmarks/XRay). This runs the same executable many times with different hand-written tests. I will update the litsupport plugin to utilize the new functionality (https://reviews.llvm.org/D43316). These changes allow lit to report micro test results if desired in order to get many precise timing results from 1 run of 1 test executable. Reviewers: MatzeB, hfinkel, rengolin, delcypher Differential Revision: https://reviews.llvm.org/D43314 llvm-svn: 327422
* [SelectionDAGBuilder] Replace deprecated calls to ↵Daniel Neilson2018-03-131-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MemoryIntrinsic::getAlignment() (NFCI) Summary: This change is part of step five in the series of changes to remove alignment argument from memcpy/memmove/memset in favour of alignment attributes. In particular, this changes the SelectionDAGBuilder to cease using the old getAlignment() API of MemoryIntrinsic in favour of getting source & dest specific alignments through the new API. Steps: Step 1) Remove alignment parameter and create alignment parameter attributes for memcpy/memmove/memset. ( rL322965, rC322964, rL322963 ) Step 2) Expand the IRBuilder API to allow creation of memcpy/memmove with differing source and dest alignments. ( rL323597 ) Step 3) Update Clang to use the new IRBuilder API. ( rC323617 ) Step 4) Update Polly to use the new IRBuilder API. ( rL323618 ) Step 5) Update LLVM passes that create memcpy/memmove calls to use the new IRBuilder API, and those that use use MemIntrinsicInst::[get|set]Alignment() to use [get|set]DestAlignment() and [get|set]SourceAlignment() instead. ( rL323886, rL323891, rL324148, rL324273, rL324278, rL324384, rL324395, rL324402, rL324626, rL324642, rL324653, rL324654, rL324773, rL324774, rL324781, rL324784, rL324955, rL324960, rL325816, rL327398 ) Step 6) Remove the single-alignment IRBuilder API for memcpy/memmove, and the MemIntrinsicInst::[get|set]Alignment() methods. Reference http://lists.llvm.org/pipermail/llvm-dev/2015-August/089384.html http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20151109/312083.html llvm-svn: 327421
* [MC] Move the reciprocal throughput computation from TargetSchedModel to ↵Andrea Di Biagio2018-03-133-29/+34
| | | | | | | | | | | | | | MCSchedModel. The goal is to make the reciprocal throughput computation accessible through the MCSchedModel interface. This is particularly important for llvm-mca because it can only query the MCSchedModel interface. No functional change intended. Differential Revision: https://reviews.llvm.org/D44392 llvm-svn: 327420
* [ELF} - Fix build bots.George Rimar2018-03-132-2/+2
| | | | llvm-svn: 327419
* [X86] Remove SplitBinaryOpsAndApply and use SplitOpsAndApply by adding curly ↵Craig Topper2018-03-131-43/+34
| | | | | | | | | | | | | | | | braces around the ops. Summary: Unless you were intentionally avoiding this syntax? I saw you mentioned makeArrayRef in your commit that added SplitOpsAndApply. Reviewers: RKSimon Reviewed By: RKSimon Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44403 llvm-svn: 327418
* [ELF] - Fix mistype in comment. NFC.George Rimar2018-03-131-1/+1
| | | | llvm-svn: 327417
* [ELF] - Rename test cases to *.test.George Rimar2018-03-1328-0/+0
| | | | | | This is a follow-up for r327410. llvm-svn: 327416
* [llvm-mca] Simplify code that computes the latency of an instruction inAndrea Di Biagio2018-03-131-30/+5
| | | | | | | | | InstrBuilder. NFCI This was possible because of r327406, which added function`computeInstrLatency` to MCSchedModel. llvm-svn: 327415
* Revert r327397 [CodeView] Omit forward references for unnamed structs and ...Brock Wyma2018-03-134-337/+38
| | | | | | This reverts commit r327397 to investigate a buildbot failure. llvm-svn: 327414
* include locale.h in IOHandler.cppPavel Labath2018-03-131-0/+1
| | | | | | | This is needed for the setlocale() call, and it seems that it is not transitively pulled in for some build configurations. llvm-svn: 327413
* test commit: fix formatting of a commentZaara Syeda2018-03-131-3/+3
| | | | | | This is a simple change to do the test commit. llvm-svn: 327412
* [dsymutil] Unify error handling outside DwarfLinker.Jonas Devlieghere2018-03-138-52/+79
| | | | | | | | This is a follow-up to r327137 where we unified error handling for the DwarfLinker. This replaces calls to errs() and outs() with the appropriate ostream wrapper everywhere in dsymutil. llvm-svn: 327411
* [ELF] - Represent tests as linker scripts instead of asm.George Rimar2018-03-1328-200/+232
| | | | | | | | | This follows recently started direction and sometimes allows to fully get rid from `echo` calls. I'll rename changed files to *.test in a follow-up. llvm-svn: 327410
* [mips] Guard traps for microMIPS correctlySimon Dardis2018-03-1317-120/+626
| | | | | | | | | | This is part of fixing the instruction predicates for MIPS. Reviewers: atanasyan, abeserminji Differential Revision: https://reviews.llvm.org/D44212 llvm-svn: 327409
* [ThinLTO] Clear dllimport when setting dso_local.Rafael Espindola2018-03-133-1/+25
| | | | | | | | | | This is PR36686. If a user of a library is LTOed with that library we take the opportunity to set dso_local, but we don't clear dllimport, which creates an invalid IR. llvm-svn: 327408
* [X86][Btver2] Split i8/i16/i32/i64 div/idiv costsSimon Pilgrim2018-03-132-20/+59
| | | | | | We were assuming a mixture of 32/64 division costs. llvm-svn: 327407
* [MC] Move the instruction latency computation from TargetSchedModel to ↵Andrea Di Biagio2018-03-133-9/+23
| | | | | | | | | | | | | | | MCSchedModel. The goal is to make the latency information accessible through the MCSchedModel interface. This is particularly important for tools like llvm-mca that only have access to the MCSchedModel API. This partially fixes PR36676. No functional change intended. Differential Revision: https://reviews.llvm.org/D44383 llvm-svn: 327406
* Reland "[Attr] Fix parameter indexing for several attributes"Joel E. Denny2018-03-1317-153/+418
| | | | | | | | | Relands r326602 (reverted in r326862) with new test and fix for PR36620. Differential Revision: https://reviews.llvm.org/D43248 llvm-svn: 327405
* [InstCombine] fix fmul reassociation to avoid creating an extra fdivSanjay Patel2018-03-132-19/+33
| | | | | | | | | | | | | This was supposed to be an NFC refactoring that will eventually allow eliminating the isFast() predicate, but there's a rare possibility that we would pessimize the code as shown in the test case because we failed to check 'hasOneUse()' properly. This version also removes an inefficiency of the old code; we would look for: (X * C) * C1 --> X * (C * C1) ...but that pattern is always handled by SimplifyAssociativeOrCommutative(). llvm-svn: 327404
* [mips] Fix the definitions of the EVA instructionsSimon Dardis2018-03-1315-143/+266
| | | | | | | | | | Correct their availability to their respective ISAs. Reviewers: atanasyan Differential Revision: https://reviews.llvm.org/D44209 llvm-svn: 327403
* fix some user facing typos / in the commentsSylvestre Ledru2018-03-135-8/+8
| | | | llvm-svn: 327402
* [clangd] Use the macro name range as the definition range.Haojian Wu2018-03-132-5/+4
| | | | | | | | | | | | | | Summary: This also aligns with the behavior of declarations. Reviewers: sammccall Reviewed By: sammccall Subscribers: klimek, ilya-biryukov, jkorous-apple, ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D44423 llvm-svn: 327401
* [dsymutil] Remove old error/warn functions. NFC.Jonas Devlieghere2018-03-131-11/+0
| | | | | | | This removes the old error and warn functions that were still present in the dwarf linker. llvm-svn: 327400
* [dsymutil] Perform analyzeContextInfo and CloneDIEs in parallelJonas Devlieghere2018-03-132-70/+141
| | | | | | | | | | | | | | | | | | This patch makes dsymutil perform analyzeContextInfo and CloneDIEs in parallel. For the same object file, there is a dependency between the two. However, we can do analyzeContextInfo for the next object file while cloning DIEs for the current. This is exactly the approach taken in this patch. For WebCore, this leads to a performance improvement of 29% and for clang we see similar results with at 32% improvement. A big thanks to Pete Cooper who came up with the original idea and the PoC. Differential revision: https://reviews.llvm.org/D43945 llvm-svn: 327399
* [SROA] Take advantage of separate alignments for memcpy source and destinationDaniel Neilson2018-03-132-20/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change is part of step five in the series of changes to remove alignment argument from memcpy/memmove/memset in favour of alignment attributes. In particular, this changes the SROA pass to cease using the old getAlignment() & setAlignment() APIs of MemoryIntrinsic in favour of getting source & dest specific alignments through the new API. This allows us to enhance visitMemTransferInst to be more aggressive setting the alignment in memcpy calls that it creates, as well as to only change the alignment of a memcpy/memmove argument that it replaces. Steps: Step 1) Remove alignment parameter and create alignment parameter attributes for memcpy/memmove/memset. ( rL322965, rC322964, rL322963 ) Step 2) Expand the IRBuilder API to allow creation of memcpy/memmove with differing source and dest alignments. ( rL323597 ) Step 3) Update Clang to use the new IRBuilder API. ( rC323617 ) Step 4) Update Polly to use the new IRBuilder API. ( rL323618 ) Step 5) Update LLVM passes that create memcpy/memmove calls to use the new IRBuilder API, and those that use use MemIntrinsicInst::[get|set]Alignment() to use [get|set]DestAlignment() and [get|set]SourceAlignment() instead. ( rL323886, rL323891, rL324148, rL324273, rL324278, rL324384, rL324395, rL324402, rL324626, rL324642, rL324653, rL324654, rL324773, rL324774, rL324781, rL324784, rL324955, rL324960, rL325816 ) Step 6) Remove the single-alignment IRBuilder API for memcpy/memmove, and the MemIntrinsicInst::[get|set]Alignment() methods. Reference http://lists.llvm.org/pipermail/llvm-dev/2015-August/089384.html http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20151109/312083.html Reviewers: chandlerc, bollu, efriedma Reviewed By: efriedma Subscribers: efriedma, eraman, llvm-commits Differential Revision: https://reviews.llvm.org/D42974 llvm-svn: 327398
* [CodeView] Omit forward references for unnamed structs and unionsBrock Wyma2018-03-134-38/+337
| | | | | | | | | | Codeview references to unnamed structs and unions are expected to refer to the complete type definition instead of a forward reference so Visual Studio can resolve the type properly. Differential Revision: https://reviews.llvm.org/D32498 llvm-svn: 327397
* [llvm-mca] Use a const ArrayRef in a few places. NFCAndrea Di Biagio2018-03-132-15/+16
| | | | llvm-svn: 327396
* [TTI] Fix a typo in the commentHaicheng Wu2018-03-131-1/+1
| | | | llvm-svn: 327395
* [llvm-mca] Fix unused variable warning in opt mode.Clement Courbet2018-03-131-1/+1
| | | | llvm-svn: 327394
* [Hexagon] Clang side of r327302 in LLVMKrzysztof Parzyszek2018-03-132-24/+38
| | | | | | | Add option -m[no-]packets to control generation of instruction packets (enabled by default). llvm-svn: 327393
* [WebAssembly] Demangle symbol names for use by the browser debuggerNicholas Wilson2018-03-133-3/+75
| | | | | | Differential Revision: https://reviews.llvm.org/D44316 llvm-svn: 327392
* [WebAssembly] Use helper macro from ELF/Options.td to tidy. NFCNicholas Wilson2018-03-131-15/+9
| | | | | | Differential Revision: https://reviews.llvm.org/D44394 llvm-svn: 327391
* [WebAssembly] Add missing --demangle argNicholas Wilson2018-03-133-0/+27
| | | | | | | | | Previously, Config->Demangle was uninitialised (not hooked up to commandline handling) Differential Revision: https://reviews.llvm.org/D44301 llvm-svn: 327390
* [llvm-mca] Refactor event listeners to make the backend agnostic to event types.Clement Courbet2018-03-1312-137/+162
| | | | | | | | | | Summary: This is a first step towards making the pipeline configurable. Subscribers: llvm-commits, andreadb Differential Revision: https://reviews.llvm.org/D44309 llvm-svn: 327389
* [mips] Don't create nested CALLSEQ_START..CALLSEQ_END nodes.Simon Dardis2018-03-132-8/+473
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the MIPS O32 ABI, the current call lowering logic naively lowers each call, creating the reserved argument area to hold the argument spill areas for $a0..$a3 and the outgoing parameter area if one is required at each call site. In the case of a sufficently large byval argument, a call to memcpy is used to write the start+16..end of the argument into the outgoing parameter area. This is done within the CALLSEQ_START..CALLSEQ_END of the callee. The CALLSEQ nodes are responsible for performing the necessary stack adjustments. Since the O32/N32/N64 MIPS ABIs do not have a red-zone and writing below the stack pointer and reading the values back is unpredictable, the call to memcpy cannot be hoisted out of the callee's CALLSEQ nodes. However, for the O32 ABI requires the reserved argument area for functions which have parameters. The naive lowering of calls will then create nested CALLSEQ sequences. For N32 and N64 these nodes are also created, but with zero stack adjustments as those ABIs do not have a reserved argument area. This patch addresses the correctness issue by recognizing the special case of lowering a byval argument that uses memcpy. By recognizing that the incoming chain already has a CALLSEQ_START node on it when calling memcpy, the CALLSEQ nodes are not created. For the N32 and N64 ABIs, this is not an issue, as no stack adjustment has to be performed. For the O32 ABI, the correctness reasoning is different. In the case of a sufficently large byval argument, registers a0..a3 are going to be used for the callee's arguments, mandating the creation of the reserved argument area. The call to memcpy in the naive case will also create its own reserved argument area. However, since the reserved argument area consists of undefined values, both calls can use the same reserved argument area. Reviewers: abeserminji, atanasyan Differential Revision: https://reviews.llvm.org/D44296 llvm-svn: 327388
* [clangd] Fix irrelevant declaratations in goto definition (on macros).Haojian Wu2018-03-132-0/+19
| | | | | | | | | | | | | | | Summary: DeclrationAndMacrosFinder will find some declarations (not macro!) that are referened inside the macro somehow, isSearchedLocation() is not sufficient, we don't know whether the searched source location is macro or not. Reviewers: ilya-biryukov Subscribers: klimek, jkorous-apple, ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D44293 llvm-svn: 327387
* [clangd] Remove extra ";", NFC.Haojian Wu2018-03-131-1/+1
| | | | llvm-svn: 327386
* [X86][SSE41] createVariablePermute v2X64 - PCMPEQQ can test for index 0/1 ↵Simon Pilgrim2018-03-132-15/+22
| | | | | | and select between them. llvm-svn: 327385
* [dsymutil] Unbreak non-Darwin bots.Jonas Devlieghere2018-03-131-3/+3
| | | | | | BinaryHolder -> BinHolder llvm-svn: 327384
* clang-import-test: fix build with clang-3.8Pavel Labath2018-03-131-1/+1
| | | | | | | | clang-3.8 complains that constructor for '...' must explicitly initialize the const object. Newer clangs and gcc seem to be fine with this, but explicitly initializing the variable does not hurt. llvm-svn: 327383
* [dsymutil] Introduce LinkContext. NFC.Jonas Devlieghere2018-03-132-219/+338
| | | | | | | | This patch introduces the LinkContext which is necessary to have dsymutil perform analysis and cloning of DIEs in parallel. As requested in D43945, I'm landing this as two separate commits. llvm-svn: 327382
* [Evaluator] Evaluate load/store with bitcastEugene Leviant2018-03-134-46/+95
| | | | | | Differential revision: https://reviews.llvm.org/D43457 llvm-svn: 327381
* Fix clang-3.8 buildPavel Labath2018-03-131-1/+1
| | | | | | | | clang-3.8 complains that constructor for '...' must explicitly initialize the const member. Newer clangs and gcc seem to be fine with this, but explicitly initializing the member does not hurt. llvm-svn: 327380
* Fix linux s390x build (pr36694)Pavel Labath2018-03-131-1/+1
| | | | llvm-svn: 327379
OpenPOWER on IntegriCloud