summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [POWER9][NFC] update testcase check statementsLei Huang2018-03-211-39/+39
| | | | llvm-svn: 328147
* [OpenMP][libomptarget] Fix master warp checkGheorghe-Teodor Bercea2018-03-213-13/+24
| | | | | | | | | | | | | | Summary: The check for the master warp must take into consideration the actual number of warps: the master warp is equal to the last active warp not necessarily WARPSIZE - 1. Reviewers: grokos, carlo.bertolli, ABataev, caomhin Reviewed By: grokos Subscribers: guansong, openmp-commits Differential Revision: https://reviews.llvm.org/D44537 llvm-svn: 328146
* Revert r328119 "[InstCombine] add folds for xor-of-icmp signbit tests (PR36682)"Reid Kleckner2018-03-213-54/+29
| | | | | | | This asserts when compiling safe_numerics_unittest.cpp in Chromium with MSan. llvm-svn: 328145
* [OpenMP][libomptarget] Enable globalization for workersGheorghe-Teodor Bercea2018-03-211-33/+35
| | | | | | | | | | | | | | | | Summary: This patch allows worker to have a global memory stack managed by the runtime. This patch is needed for completeness and consistency with the globalization policy: if a worker-side variable escapes the current context it then needs to be globalized. Until now, only the master thread was allowed to have such a stack. These global values can now potentially be shared amongst workers if the semantics of the OpenMP program require it. Reviewers: ABataev, grokos, carlo.bertolli, caomhin Reviewed By: grokos Subscribers: guansong, openmp-commits Differential Revision: https://reviews.llvm.org/D44487 llvm-svn: 328144
* [llvm-objcopy] Implement support for section groupsAlexander Shaposhnikov2018-03-217-45/+345
| | | | | | | | | | | | | | | | | | | This diff adds support for SHT_GROUP sections to llvm-objcopy. Some sections are interrelated and comprise a group. For example, a definition of an inline function might require, in addition to the section containing its instructions, a read-only data section containing literals referenced inside the function. A section of the type SHT_GROUP contains the indices of the group members, therefore, it needs to be updated whenever the indices change. Similarly, the fields sh_link, sh_info should be recalculated as well. [Resubmit r328012 with the proper handling of endianness] Test plan: make check-all Differential revision: https://reviews.llvm.org/D43996 llvm-svn: 328143
* [TableGen] Hoist the code for copying InstRWs from an old scheduling class ↵Craig Topper2018-03-211-12/+12
| | | | | | | | | | to a new one out of the loop that assigns instructions to the new class. NFCI We already know all the of instructions we're processing in the instruction loop belong to no class or all to the same class. So we only have to worry about remapping one class. So hoist it all out and remove the SmallPtrSet that tracked which class we'd already remapped. I had to introduce new instruction loop inside this code to print an error message, but that only occurs on the error path. llvm-svn: 328142
* typoAdrian Prantl2018-03-211-1/+1
| | | | llvm-svn: 328141
* [InstSimplify] fp_binop X, NaN --> NaNSanjay Patel2018-03-213-62/+61
| | | | | | | | We propagate the existing NaN value when possible. Differential Revision: https://reviews.llvm.org/D44521 llvm-svn: 328140
* [TableGen] Remove unnecessary map lookup and shadowing of a variable. NFCICraig Topper2018-03-211-1/+0
| | | | | | We already have an OldSCIdx variable in the outer loop here. And we already did the map lookup in the loop that populated ClassInstrs. And the outer OldSCIdx got it from ClassInstrs. llvm-svn: 328139
* [TableGen] Use range-based for loops. NFCCraig Topper2018-03-211-12/+11
| | | | llvm-svn: 328138
* [TableGen] Use count_if instead of a manual loop. NFCCraig Topper2018-03-211-5/+4
| | | | llvm-svn: 328137
* [X86] Rewrite getOperandBias in X86BaseInfo.h to be a little more structured ↵Craig Topper2018-03-211-23/+33
| | | | | | and update comments to be more clear about what it does. NFC llvm-svn: 328136
* Sink Analysis/ObjectUtil(canBeOmittedFromSymbolTable) into IR so it can be ↵David Blaikie2018-03-217-49/+28
| | | | | | legitimately be used by Object/IRSymtab llvm-svn: 328135
* [Builtins] Overload __builtin_operator_new/delete to allow forwarding to ↵Eric Fiselier2018-03-2111-30/+386
| | | | | | | | | | | | | | | | | | | | | | | | | | usual allocation/deallocation functions. Summary: Libc++'s default allocator uses `__builtin_operator_new` and `__builtin_operator_delete` in order to allow the calls to new/delete to be ellided. However, libc++ now needs to support over-aligned types in the default allocator. In order to support this without disabling the existing optimization Clang needs to support calling the aligned new overloads from the builtins. See llvm.org/PR22634 for more information about the libc++ bug. This patch changes `__builtin_operator_new`/`__builtin_operator_delete` to call any usual `operator new`/`operator delete` function. It does this by performing overload resolution with the arguments passed to the builtin to determine which allocation function to call. If the selected function is not a usual allocation function a diagnostic is issued. One open issue is if the `align_val_t` overloads should be considered "usual" when `LangOpts::AlignedAllocation` is disabled. In order to allow libc++ to detect this new behavior the value for `__has_builtin(__builtin_operator_new)` has been updated to `201802`. Reviewers: rsmith, majnemer, aaron.ballman, erik.pilkington, bogner, ahatanak Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D43047 llvm-svn: 328134
* [SLP] Add test case for a gather sequence with multiple usesMatthew Simpson2018-03-211-0/+66
| | | | llvm-svn: 328133
* [InstrProf] Support for external functions in text format.Mircea Trofin2018-03-217-31/+105
| | | | | | | | | | | | | | | | | | | | | | | Summary: External functions appearing as indirect call targets could not be found in the SymTab, and the value:counter record was represented, in the text format, using an empty string for the name. This would then cause a silent parsing error when reading. This CL: - adds explicit support for such functions - fixes the places where we would not propagate errors when reading - addresses a performance issue due to eager resorting of the SymTab. Reviewers: xur, eraman, davidxl Reviewed By: davidxl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44717 llvm-svn: 328132
* Reland "[lit] Adding config initialization to lit tests in clang-tools-extra"Julie Hockett2018-03-211-0/+2
| | | | | | | | Adding the config initialization to clang-tools-extra so that tests that use REQUIRES, UNSUPPORTED, and XFAIL based on platform or target triple work properly. llvm-svn: 328131
* Ensure that DataTypes.h is installed now that it's moved to llvm-cDavid Blaikie2018-03-211-1/+1
| | | | llvm-svn: 328130
* [llvm-mca] Move the logic that computes the register file usage to the ↵Andrea Di Biagio2018-03-219-75/+161
| | | | | | | | | | | | | | | | | | | | | | | BackendStatistics view. With this patch, the "instruction dispatched" event now provides information related to the number of microarchitectural registers used in each register file. Similarly, the "instruction retired" event is now able to tell how may registers are freed in each register file. Currently, the BackendStatistics view is the only consumer of register usage/pressure information. BackendStatistics uses that info to print out a few general statistics (i.e. max number of mappings used; total mapping created). Before this patch, the BackendStatistics was forced to query the Backend to obtain the register pressure information. This helps removes that dependency. Now views are completely independent from the Backend. As a consequence, it should be easier to address PR36663 and further modularize the pipeline. Added a couple of test cases in the BtVer2 specific directory. llvm-svn: 328129
* [SchedModel] Use CodeGenSchedClass::getSchedClassIdx helper directly. NFCI.Simon Pilgrim2018-03-211-1/+1
| | | | llvm-svn: 328128
* [clang-tidy] Marking hicpp-no-assembler-msvc unsupported on WindowsJulie Hockett2018-03-211-0/+2
| | | | | | | | After changes to lit.site.cfg.in, the test is now running (and failing) on windows, so temporarily marking it unsupported. See PR36855 for more details. llvm-svn: 328127
* [SchedModel] Use CodeGenSchedClass::isKeyEqual instead of duplicating code. ↵Simon Pilgrim2018-03-212-6/+4
| | | | | | NFCI. llvm-svn: 328126
* [libFuzzer] Disable equivalence-signals test on Darwin due to persistent ↵George Karpenkov2018-03-211-0/+3
| | | | | | failures llvm-svn: 328125
* [Docs] Remove some WIP X86 documentation I accidentally leaked into r328031.Craig Topper2018-03-214-97/+0
| | | | | | I didn't mean to commit it, but I guess I failed to switch branches or stash it in my local tree. llvm-svn: 328124
* Reapply Support layering fixes.David Blaikie2018-03-219-509/+547
| | | | | | | | | | | | | | | | | | | | Compiler.h is used by Demangle (which Support depends on) - so sink it into Demangle to avoid a circular dependency DataTypes.h is used by llvm-c (which Support depends on) - so sink it into llvm-c. DataTypes.h could probably be fixed the other way - making llvm-c depend on Support instead of Support depending on llvm-c - if anyone feels that's the better option, happy to work with them on that. I /think/ this'll address the layering issues that previous attempts to commit this have triggered in the Modules buildbot, but I haven't been able to reproduce that build so can't say for sure. If anyone's having trouble with this - it might be worth taking a look to see if there's a quick fix/something small I missed rather than revert, but no worries. llvm-svn: 328123
* Add missing #includes to Analysis/MustExecute.hDavid Blaikie2018-03-211-0/+7
| | | | llvm-svn: 328122
* [Documentation] Fix markup problems in X86Usage.rstEugene Zelenko2018-03-211-3/+3
| | | | llvm-svn: 328121
* [Hexagon] Generalize DAG mutation for function callsKrzysztof Parzyszek2018-03-211-18/+38
| | | | | | | | | Add barrier edges to check for any physical register. The previous code worked for the function return registers: r0/d0, v0/w0. Patch by Brendon Cahoon. llvm-svn: 328120
* [InstCombine] add folds for xor-of-icmp signbit tests (PR36682)Sanjay Patel2018-03-213-29/+54
| | | | | | | | | | | | This is part of solving: https://bugs.llvm.org/show_bug.cgi?id=36682 There's also a leftover improvement from the long-ago-closed: https://bugs.llvm.org/show_bug.cgi?id=5438 https://rise4fun.com/Alive/dC1 llvm-svn: 328119
* TableGen: Remove redundant loop in ListInit::resolveReferencesNicolai Haehnle2018-03-211-7/+2
| | | | | | | | | | | | | | | | Summary: Recursive lookups are handled by the Resolver, so the loop was purely a waste of runtime. Change-Id: I2bd23a68b478aea0bbac1a86ca7635adffa28688 Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D44624 llvm-svn: 328118
* TableGen: Streamline how defs are instantiatedNicolai Haehnle2018-03-218-393/+317
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Instantiating def's and defm's needs to perform the following steps: - for defm's, clone multiclass def prototypes and subsitute template args - for def's and defm's, add subclass definitions, substituting template args - clone the record based on foreach loops and substitute loop iteration variables - override record variables based on the global 'let' stack - resolve the record name (this should be simple, but unfortunately it's not due to existing .td files relying on rather silly implementation details) - for def(m)s in multiclasses, add the unresolved record as a multiclass prototype - for top-level def(m)s, resolve all internal variable references and add them to the record keeper and any active defsets This change streamlines how we go through these steps, by having both def's and defm's feed into a single addDef() method that handles foreach, final resolve, and routing the record to the right place. This happens to make foreach inside of multiclasses work, as the new test case demonstrates. Previously, foreach inside multiclasses was not forbidden by the parser, but it was de facto broken. Another side effect is that the order of "instantiated from" notes in error messages is reversed, as the modified test case shows. This is arguably clearer, since the initial error message ends up pointing directly to whatever triggered the error, and subsequent notes will point to increasingly outer layers of multiclasses. This is consistent with how C++ compilers report nested #includes and nested template instantiations. Change-Id: Ica146d0db2bc133dd7ed88054371becf24320447 Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D44478 llvm-svn: 328117
* [Documentation] Fix markup problem in AMDGPUUsage.rst.Eugene Zelenko2018-03-211-1/+1
| | | | llvm-svn: 328116
* [clang-tidy] Use :doc: for check links in Release Notes.Eugene Zelenko2018-03-213-68/+68
| | | | | | Differential revision: https://reviews.llvm.org/D44694 llvm-svn: 328115
* [Fuchsia] Don't install libc++, libc++abi or libunwind on DarwinPetr Hosek2018-03-211-11/+22
| | | | | | | | | | The Clang driver doesn't currently know how to use the libraries that are shipped as part of the toolchain so there's no reason to ship them at all. Differential Revision: https://reviews.llvm.org/D44724 llvm-svn: 328114
* [Hexagon] Eliminate subregisters from PHI nodes before pipeliningKrzysztof Parzyszek2018-03-212-42/+77
| | | | | | | | | | | | | | | | The pipeliner needs to remove instructions from the SlotIndexes structure when they are deleted. Otherwise, the SlotIndexes map has stale data, and an assert will occur when adding new instructions. This patch also changes the pipeliner to make the back-edge of a loop carried dependence 1 cycle. The 1 cycle latency is added to the anti-dependence that represents the back-edge. This changes eliminates a couple of hacks added to the pipeliner to handle the latency of the back-edge. It is needed to correctly pipeline the test case for the sub-register elimination pass. llvm-svn: 328113
* [WebAssembly] Suppress unused function warning for register name matcherReid Kleckner2018-03-211-0/+4
| | | | llvm-svn: 328112
* [X86][Haswell] Merge multiple InstrRW entries that map to the same ↵Simon Pilgrim2018-03-211-1990/+1524
| | | | | | | | SchedWriteRes group (NFCI) (PR35955) I've also merged some VEX/non-VEX instregex strings with a (V?) prefix or (Y?) ymm variant - there are still a lot more of these to do. llvm-svn: 328111
* [X86][SandyBridge] Merge more VEX/non-VEX instregex patterns (NFCI) (PR35955)Simon Pilgrim2018-03-211-637/+326
| | | | llvm-svn: 328110
* [InstCombine] move/add tests for xor-of-icmps (PR36682); NFCSanjay Patel2018-03-212-21/+128
| | | | llvm-svn: 328109
* [Fix] fix type deduction on ARM and MSVCJonas Toth2018-03-211-1/+1
| | | | llvm-svn: 328108
* [clang-tidy] Resubmit hicpp-multiway-paths-covered without breaking testJonas Toth2018-03-219-0/+863
| | | | | | | | | | | | | | | | | | | | | | | | The original check did break the green buildbot in the sanitizer build. It took a while to redroduce and understand the issue. There occured a stackoverflow while parsing the AST. The testcase with 256 case labels was the problem because each case label added another stackframe. It seemed that the issue occured only in 'RelWithDebInfo' builds and not in normal sanitizer builds. To simplify the matchers the recognition for the different kinds of switch statements has been moved into a seperate function and will not be done with ASTMatchers. This is an attempt to reduce recursion and stacksize as well. The new check removed this big testcase. Covering all possible values is still implemented for bitfields and works there. The same logic on integer types will lead to the issue. Running it over LLVM gives the following results: Differential: https://reviews.llvm.org/D40737 llvm-svn: 328107
* Last batch of test-tree cleaning changesPavel Labath2018-03-215-118/+80
| | | | | | | | | | | | | | | - postmortem tests: make sure the core files are created in the build folder - TestSourceManager: copy the .c file into the build dir before modifying it - TestLogging: create log files in the build folder After these changes I get a clean test run (on linux) even if I set the source tree to be read only. It's possible some of the skipped/xfailed tests are still creating files in the source tree, but at the moment, I don't have plans to go hunting for those. llvm-svn: 328106
* [LangRef] add note about format of FP typesSanjay Patel2018-03-211-0/+4
| | | | llvm-svn: 328105
* [RISCV] Codegen support for RV32F floating point comparison operationsAlex Bradbury2018-03-218-17/+1137
| | | | | | | | | This patch also includes extensive tests targeted at select and br+fcmp IR inputs. A sequence of br+fcmp required support for FPR32 registers to be added to RISCVInstrInfo::storeRegToStackSlot and RISCVInstrInfo::loadRegFromStackSlot. llvm-svn: 328104
* [ELF][PPC64] Fix getRelExpr for R_PPC64_REL16_LO and R_PPC64_REL16_HAZaara Syeda2018-03-212-1/+37
| | | | | | | | | The relocations R_PPC64_REL16_LO and R_PPC64_REL16_HA should return R_PC for getRelExpr since they compute #lo(S + A – P) and #ha(S + A – P). Differential Revision: https://reviews.llvm.org/D44648 llvm-svn: 328103
* [RISCV] Add tests missed from r327979Alex Bradbury2018-03-211-0/+53
| | | | llvm-svn: 328102
* [clang-tidy][modernize-make-unique] Checks c++14 flag before using ↵Alexander Kornienko2018-03-218-5/+45
| | | | | | | | | | | | | | | | | | | | std::make_unique Summary: For a c++11 code, the clang-tidy rule "modernize-make-unique" should return immediately, as std::make_unique is not supported. Reviewers: hokein, aaron.ballman, ilya-biryukov, alexfh Reviewed By: hokein, aaron.ballman, alexfh Subscribers: Quuxplusone, xazax.hun, cfe-commits Tags: #clang-tools-extra Patch by Frederic Tingaud! Differential Revision: https://reviews.llvm.org/D43766 llvm-svn: 328101
* Make positionToOffset return llvm::Expected<size_t>Simon Marchi2018-03-216-33/+111
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: To implement incremental document syncing, we want to verify that the ranges provided by the front-end are valid. Currently, positionToOffset deals with invalid Positions by returning 0 or Code.size(), which are two valid offsets. Instead, return an llvm:Expected<size_t> with an error if the position is invalid. According to the LSP, if the character value exceeds the number of characters of the given line, it should default back to the end of the line. It makes sense in some contexts to have this behavior, and does not in other contexts. The AllowColumnsBeyondLineLength parameter allows to decide what to do in that case, default back to the end of the line, or return an error. Reviewers: ilya-biryukov Subscribers: klimek, ilya-biryukov, jkorous-apple, ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D44673 llvm-svn: 328100
* Change DT_* value definitions to macros in a separate fileAlexander Richardson2018-03-214-217/+216
| | | | | | | | | | | | | | | | | | | | Summary: I recently added a new dynamic tag to our fork of LLVM and when adding it to llvm-readobj I noticed that not all DT_ values were being handled there. Using macros in a .def file that can be included by both ELFDumper.cpp and the ELF.h header ensures that the two don't get out of sync when new values are added. Reviewers: grimar, pcc, davide, espindola Reviewed By: grimar, espindola Subscribers: srhines, llvm-commits Differential Revision: https://reviews.llvm.org/D44558 llvm-svn: 328099
* [LangRef] more hyphens: always write "floating-point"Sanjay Patel2018-03-211-192/+192
| | | | | | | | | We were inconsistent, sometimes even within a single sentence. The consensus seems clear that the FP we're looking for is spelled "floating-point". Without the hyphen, it's a "surprisingly fine" jazz album. llvm-svn: 328098
OpenPOWER on IntegriCloud