summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove unused positional argument for printfJoachim Protze2017-12-222-2/+4
| | | | | | | | | | | | | | | | | The format string for hints only prints the second argument (string) and drops the first argument (hint id). Depending on how you read the POSIX text for printf, this could be valid. But for practical reason, i.e., unpacking the va_list passed to printf based on the formating information, it makes sense to fix the implementation and not pass the id for hint. Failing testcases were: misc_bugs/teams-reduction.c ompt/parallel/not_enough_threads.c Differential Revision: https://reviews.llvm.org/D41504 llvm-svn: 321361
* Unit tests for TBAA metadata generation.Serge Pavlov2017-12-223-0/+1753
| | | | | | | | | | | | | | | | | | Now tests for metadata created by clang involve compiling code snippets placed into c/c++ source files and matching interesting patterns in the obtained textual representation of IR. Writting such tests is a painful process as metadata often form complex tree-like structures but textual representation of IR contains only a pile of metadata at the module end. This change implements IR matchers that may be used to match required patterns in the binary IR representation. In this case the metadata structure is not broken and creation of match patterns is easier. The change adds unit tests for TBAA metadata generation. Differential Revision: https://reviews.llvm.org/D41433 llvm-svn: 321360
* [AMDGPU][MC] Added support of 256- and 512-bit tuples of ttmp registersDmitry Preobrazhensky2017-12-2210-43/+287
| | | | | | | | | | | | See bug 35561: https://bugs.llvm.org/show_bug.cgi?id=35561 This patch also affects implementation of SGPR and VGPR registers though changes are cosmetic. Reviewers: artem.tamazov, arsenm Differential Revision: https://reviews.llvm.org/D41437 llvm-svn: 321359
* [clangd] Add a tool to build YAML-format global symbols.Haojian Wu2017-12-224-0/+134
| | | | | | | | | | | | | | | | | | | | | | Summary: The tools is used to generate global symbols for clangd (global code completion), The format is YAML, which is only for **experiment**. Usage: ./bin/global-symbol-builder </path/to/llvm-dir> > global-symbols.yaml TEST: used the tool to generate global symbols for LLVM (~72MB). Reviewers: sammccall Reviewed By: sammccall Subscribers: klimek, mgorny, ilya-biryukov, cfe-commits Differential Revision: https://reviews.llvm.org/D41491 llvm-svn: 321358
* [mips] Add test case to check that calls to mcount follow long calls / short ↵Simon Atanasyan2017-12-221-0/+19
| | | | | | calls options. NFC llvm-svn: 321357
* [ARM GlobalISel] Support G_INTTOPTR and G_PTRTOINT for s32Diana Picus2017-12-226-0/+169
| | | | | | | Mark conversions between pointers and 32-bit scalars as legal, map them to the GPR and select to a simple COPY. llvm-svn: 321356
* debugserver: Propagate environment in launch-mode (pr35671)Pavel Labath2017-12-227-22/+77
| | | | | | | | | | | | | | | | | | Summary: Make sure we propagate environment when starting debugserver with a pre-loaded inferior. AFAIK, RNBRunLoopLaunchInferior is only called in pre-loaded inferior scenario, so we can just pick up the debugserver environment instead of trying to construct an envp from the (empty) context. This makes debugserver pass an test added for an equivalent lldb-server fix. Reviewers: jasonmolenda, clayborg Subscribers: JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D41352 llvm-svn: 321355
* [ARM GlobalISel] Support pointer constantsDiana Picus2017-12-224-1/+34
| | | | | | | | | | Pointer constants are pretty rare, since we usually represent them as integer constants and then cast to pointer. One notable exception is the null pointer constant, which is represented directly as a G_CONSTANT 0 with pointer type. Mark it as legal and make sure it is selected like any other integer constant. llvm-svn: 321354
* Enable TestReadMemCString on non-darwin targetsPavel Labath2017-12-222-11/+4
| | | | | | | | | | | | | | The test works fine on linux, and I believe other targets should not have an issue with as well. If they do, we can start blacklisting instead of whitelisting. The idea of using "-1" as the value of the pointer on non-apple targets backfired, as it fails the "address != LLDB_INVALID_ADDRESS" test (-1 is the value of LLDB_INVALID_ADDRESS). However, it should be safe to use 0x100 for other targets as well. The first page of memory is generally kept unreadable to catch null pointer dereferences. llvm-svn: 321353
* [CodeGen] Represent array members in new-format TBAA type descriptorsIvan A. Kosarev2017-12-222-0/+38
| | | | | | | | | | | | | Now that in the new TBAA format we allow access types to be of any object types, including aggregate ones, it becomes critical to specify types of all sub-objects such aggregates comprise as their members. In order to meet this requirement, this patch enables generation of field descriptors for members of array types. Differential Revision: https://reviews.llvm.org/D41399 llvm-svn: 321352
* [CodeGen] Support generation of TBAA info in the new formatIvan A. Kosarev2017-12-222-30/+70
| | | | | | | | | | Now that the MDBuilder helpers generating TBAA type and access descriptors in the new format are in place, we can teach clang to use them when requested. Differential Revision: https://reviews.llvm.org/D41394 llvm-svn: 321351
* [clangd] Simplify GlobalCompilationDatabase, cache missing GCDsSam McCall2017-12-222-47/+23
| | | | llvm-svn: 321350
* [DAGCombine] Revert r321259Sam Parker2017-12-223-140/+22
| | | | | | | Improve ReduceLoadWidth for SRL Patch is causing an issue on the PPC64 BE santizer. llvm-svn: 321349
* [clangd] Improve packing of Symbol struct. NFCSam McCall2017-12-222-4/+10
| | | | llvm-svn: 321348
* Fix unused variable warning in SemaTemplate. NFCSam McCall2017-12-221-1/+1
| | | | llvm-svn: 321346
* Rewrite the cached map used for locating the most precise DIE amongChandler Carruth2017-12-222-33/+397
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | inlined subroutines for a given address. This is essentially the hot path of llvm-symbolizer when extracting inlined frames during symbolization. Previously, we would read every subprogram and every inlined subroutine, building a std::map across the entire PC space to the best DIE, and then do only a handful of queries as we symbolized a backtrace. A huge fraction of the time was spent building the map itself. This patch changes it two a two-level system. First, we just build a map from PC-interval to DWARF subprograms. These are required to be disjoint and so constructing this is pretty easy. Second, we build a map *just* for the inlined subroutines within the subprogram containing the query address. This allows us to look at far fewer DIEs and build a *much* smaller set of cached maps in the llvm-symbolizer case where only a few address get symbolized during the entire run. It also builds both interval maps in a very different way. It constructs a single flat vector of pairs that maps from offset -> index. The indices point into collections of DIE objects, but can also be "tombstones" (-1) to mark gaps. In the case of subprograms, this mostly just simplifies the data structure a bit. For inlined subroutines, because we carefully split them as we build the map, we end up in many cases having no holes and not having to store both start and stop offsets. Finally, the PC ranges for the inlined subroutines are compressed into 32-bits by making them relative to the base PC of the outer subprogram. This means that if you have a single function body with over 2gb of executable code in it, we will stop mapping address past the first 2gb of that function into inlined subroutines and just give you the subprogram. This doesn't seem like a problem. ;] All of this combines to make llvm-symbolizer *well* over 2x faster for symbolizing backtraces out of LLVM's unittests. Death-test heavy unit tests are running >2x faster. I'm still going to look at completely disabling symbolization there, but figured while I had a good benchmark we should make symbolization a bit better. Sadly, the logic to build the flat interval map for the inlined subroutines is fairly complex. I'm not super happy about this and welcome any simplifying suggestions. Huge thanks to Dave Blaikie who helped walk me through what the various things I needed to do in DWARF to make this work. Differential Revision: https://reviews.llvm.org/D40987 llvm-svn: 321345
* [lldb] Stop searching for a symbol in a pdb by regexAaron Smith2017-12-224-15/+24
| | | | | | | | | | | | | | | | | Summary: It was possible when searching for a symbol by regex in a pdb that an invalid regex would cause an exception on Windows. This updates the code to avoid throwing an exception. When fixing the exception it was decided there is no reason to search for a symbol in a pdb by regex. To support this, SymbolFilePDB::FindTypes() now only searches for types by name and no longer calls FindTypesByRegEx(). Reviewers: zturner, lldb-commits Reviewed By: zturner Subscribers: clayborg Differential Revision: https://reviews.llvm.org/D41086 llvm-svn: 321344
* [X86] Add missing check lines for the silvermont cases in ↵Craig Topper2017-12-221-0/+8
| | | | | | predefined-arch-macros.c test. llvm-svn: 321343
* [Modules] Map missing private submodules from Foo.Private to Foo_PrivateBruno Cardoso Lopes2017-12-223-2/+53
| | | | | | | | | | | | | | In case `@import Foo.Private` fails because the submodule doesn't exist, look for `Foo_Private` (if available) and build/load that module instead. In that process emit a warning and tell the user about the assumption. The intention here is to assist all existing private modules owners (in ObjC and Swift) to migrate to the new `Foo_Private` syntax. rdar://problem/36023940 llvm-svn: 321342
* [X86] Add 'prfchw' to the correct CPUs to match the backend.Craig Topper2017-12-222-0/+21
| | | | llvm-svn: 321341
* [X86] Add missing initialization for the HasPREFETCHWT1 subtarget variable.Craig Topper2017-12-221-0/+1
| | | | llvm-svn: 321340
* Diagnose the various invalid decl-specifiers on nontype template parameters.Faisal Vali2017-12-223-3/+85
| | | | | | | | | | | | | The standard correctly forbids various decl-specifiers that dont make sense on non-type template parameters - such as the extern in: template<extern int> struct X; This patch implements those restrictions (in a fashion similar to the corresponding checks on function parameters within ActOnParamDeclarator). Credit goes to miyuki (Mikhail Maltsev) for drawing attention to this issue, authoring the initial versions of this patch, and supporting the effort to re-engineer it slightly. Thank you! For details of how this patch evolved please see: https://reviews.llvm.org/D40705 llvm-svn: 321339
* Change SBProcess::ReadCStringFromMemory() back to returningJason Molenda2017-12-225-2/+84
| | | | | | | | | an empty Python string object when it reads a 0-length string out of memory (and a successful SBError object). <rdar://problem/26186692> llvm-svn: 321338
* [Modules] Change private modules rules and warningsBruno Cardoso Lopes2017-12-2229-87/+216
| | | | | | | | | | | | | | | | We used to advertise private modules to be declared as submodules (Foo.Private). This has proven to not scale well since private headers might carry several dependencies, introducing unwanted content into the main module and often causing dep cycles. Change the canonical way to name it to Foo_Private, forcing private modules as top level ones, and provide warnings under -Wprivate-module to suggest fixes for other private naming. Update documentation to reflect that. rdar://problem/31173501 llvm-svn: 321337
* [X86] Enable PRFCHW feature on KNL/KNM and all CPUs inherited from Broadwell.Craig Topper2017-12-221-2/+4
| | | | llvm-svn: 321336
* [X86] Add prefetchwt1 instruction and overhaul priorities and isel enabling ↵Craig Topper2017-12-229-21/+126
| | | | | | | | | | | | | | for prefetch instructions. Previously prefetch was only considered legal if sse was enabled, but it should be supported with 3dnow as well. The prfchw flag now imply at least some form of prefetch without the write hint is available, either the sse or 3dnow version. This is true even if 3dnow and sse are explicitly disabled. Similarly prefetchwt1 feature implies availability of prefetchw and the the prefetcht0/1/2/nta instructions. This way we can support _MM_HINT_ET0 using prefetchw and _MM_HINT_ET1 with prefetchwt1. And its assumed that if we have levels for the write hint we would have levels for the non-write hint, thus why we enable the sse prefetch instructions. I believe this behavior is consistent with gcc. I've updated the prefetch.ll to test all of these combinations. llvm-svn: 321335
* [X86] Use SIGN_EXTEND to implement ANY_EXTEND from vXi1.Craig Topper2017-12-226-170/+156
| | | | llvm-svn: 321334
* inline-fp.ll was moved in r321332; delete it properly.Eli Friedman2017-12-221-137/+0
| | | | llvm-svn: 321333
* [Inliner] Restrict soft-float inlining penalty.Eli Friedman2017-12-225-35/+143
| | | | | | | | | | | | | | The penalty is currently getting applied in a bunch of places where it doesn't make sense, like bitcasts (which are free) and calls (which were getting the call penalty applied twice). Instead, just apply the penalty to binary operators and floating-point casts. While I'm here, also fix getFPOpCost() to do the right thing in more cases, so we don't have to dig into function attributes. Differential Revision: https://reviews.llvm.org/D41522 llvm-svn: 321332
* Add hasProfileData() to check if a function has profile data. NFC.Easwaran Raman2017-12-2210-16/+21
| | | | | | | | | | | | | | | | | | | Summary: This replaces calls to getEntryCount().hasValue() with hasProfileData that does the same thing. This refactoring is useful to do before adding synthetic function entry counts but also a useful cleanup IMO even otherwise. I have used hasProfileData instead of hasRealProfileData as David had earlier suggested since I think profile implies "real" and I use the phrase "synthetic entry count" and not "synthetic profile count" but I am fine calling it hasRealProfileData if you prefer. Reviewers: davidxl, silvas Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41461 llvm-svn: 321331
* [DWARF] Fix formatting bug with r321295. This fixes a MIPS buildbot failure.Wolfgang Pieb2017-12-221-1/+1
| | | | llvm-svn: 321330
* Fix isl out-of-quota errors affecting later quota guards.Michael Kruse2017-12-222-0/+20
| | | | | | | | | | | | | | | | | | | If an out-of-quota error occurred, the last error would be isl_error_quota unless a different error occured. We typically check whether the max-operations occured by comparing to that error value after leaving the quota guard. This would check whether there ever was a quota-error, not just in the last quota guards. The observable bug occurred if the max-operations limit was reached in DeLICM, and if -polly-dependences-computout=0, DependenceInfo would think that the quota for computing dependencies was the reason, i.e., fail the operation even if the calculation itself was successful. Fix by reseting the last error to isl_error_none when entering a quota guard, signaling that no quota error occured unless in the guard's scope. llvm-svn: 321329
* Change the default Aarch64 ISA to be v8.2 to correctly decode newerJason Molenda2017-12-221-0/+5
| | | | | | | instructions (e.g. on the new iphones). <rdar://problem/30585124> llvm-svn: 321328
* Enable more abilities in SymbolFilePDBAaron Smith2017-12-222-4/+46
| | | | | | | | | | | | | | | | Summary: 1) Finding symbols through --symfile 2) More abilities: Functions, Blocks, GlobalVariables, LocalVariables, VariableTypes Reviewers: zturner, lldb-commits Reviewed By: zturner Subscribers: clayborg Differential Revision: https://reviews.llvm.org/D41092 llvm-svn: 321327
* [CUDA] More fixes for __shfl_* intrinsics.Artem Belevich2017-12-211-28/+49
| | | | | | | | | * __shfl_{up,down}* uses unsigned int for the third parameter. * added [unsigned] long overloads for non-sync shuffles. Differential Revision: https://reviews.llvm.org/D41521 llvm-svn: 321326
* [X86] Allow _mm_prefetch (both the header implementation and the builtin) to ↵Craig Topper2017-12-213-7/+11
| | | | | | | | accept bit 2 which is supposed to indicate the prefetched addresses will be written to Add the appropriate _MM_HINT_ET0/ET1 defines to match gcc. llvm-svn: 321325
* Correct hasFeature/isValidFeatureName's handling of shstk/adx/mwaitxErich Keane2017-12-211-2/+7
| | | | | | | | | | | | https://bugs.llvm.org/show_bug.cgi?id=35721 reports that x86intrin.h is issuing a few warnings. This is because attribute target is using isValidFeatureName for its source. It was also discovered that two of these were missing from hasFeature. Additionally, shstk is and ibu are reordered alphabetically, as came up during code review. llvm-svn: 321324
* Update test after r321312Paul Robinson2017-12-211-3/+2
| | | | llvm-svn: 321323
* Bring clang options in error messages up to date.Adrian Prantl2017-12-211-4/+4
| | | | llvm-svn: 321322
* Delete dead code.Adrian Prantl2017-12-211-1/+0
| | | | llvm-svn: 321321
* [analyzer] Add Javascript to analyzer HTML output to allow keyboard navigation.George Karpenkov2017-12-212-2/+94
| | | | | | Differential Revision: https://reviews.llvm.org/D41414 llvm-svn: 321320
* [ODRHash] Canonicalize Decl's before processing.Richard Trieu2017-12-211-0/+1
| | | | | | | Canonicalizing the Decl before processing it as part of the hash should reduce issues with non-canonical types showing up as mismatches. llvm-svn: 321319
* Suppress "redundant parens" warning for "A (::B())".Richard Smith2017-12-213-1/+39
| | | | | | | | This is a slightly odd construct (it's more common to see "A (::B)()") but can happen in friend declarations, and the parens are not redundant as they prevent the :: binding to the left. llvm-svn: 321318
* Define isUndefWeak inline.Rafael Espindola2017-12-212-7/+4
| | | | | | | This small function was showing up in the profile. Defining it inline gives about 0.3% speedup. llvm-svn: 321317
* [CMake][Fuchsia] Enable assertionsPetr Hosek2017-12-212-0/+2
| | | | | | | | | | | | | | | | Enable assertions in both stages. Release+Asserts is fast enough. No need to let insanity through. Patch By: mcgrathr Reviewers: phosek Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D41471 llvm-svn: 321316
* [X86] Use SIGN_EXTEND rather than ZERO_EXTEND for lowering ↵Craig Topper2017-12-212-6/+6
| | | | | | | | extract_vector_elt from vXi1 with a non-const index. We have a better range of instructions we can use if we can fill with the value i1 value rather than zeroing. llvm-svn: 321315
* [scudo] Add -fsanitize=scudo option to FuchsiaPetr Hosek2017-12-212-0/+18
| | | | | | | | | | | | | | Apparently the -fsanitize flag hadn't been added for Scudo upstream yet. Patch By: flowerhack Reviewers: cryptoad, alekseyshl, mcgrathr, phosek Reviewed By: mcgrathr, phosek Differential Revision: https://reviews.llvm.org/D41413 llvm-svn: 321314
* Include process.h for getpid on Windows in instr profilingReid Kleckner2017-12-211-0/+1
| | | | llvm-svn: 321313
* [AST] Incorrectly qualified unscoped enumeration as template actual parameter.Paul Robinson2017-12-216-7/+36
| | | | | | | | | | | | | | | An unscoped enumeration used as template argument, should not have any qualified information about its enclosing scope, as its visibility is global. In the case of scoped enumerations, they must include information about their enclosing scope. Patch by Carlos Alberto Enciso! Differential Revision: https://reviews.llvm.org/D39239 llvm-svn: 321312
* Call isStaticLinkTimeConstant only once per relocation.Rafael Espindola2017-12-211-7/+10
| | | | | | | | | It is a pretty expensive function. Some of the speedups: clang: 1.92% chrome: 1.15% linux-kernel: 1.40% llvm-svn: 321311
OpenPOWER on IntegriCloud