summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [clang-tidy] Fix PR26274Alexander Kornienko2019-12-063-70/+137
| | | | | | | | | | | | | | | | | Summary: This commit fixes http://llvm.org/PR26274 in a simpler and more correct way than 4736d63f752f8d13f4c6a9afd558565c32119718 did. See https://reviews.llvm.org/D69855#1767089 for details. Reviewers: gribozavr, aaron.ballman, gribozavr2 Reviewed By: aaron.ballman, gribozavr2 Subscribers: gribozavr2, merge_guards_bot, xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70974
* gn build: Merge 99768b243cdLLVM GN Syncbot2019-12-062-0/+2
|
* [clangd] (take 2) Try harder to find a plausible `clang` as argv0, ↵Sam McCall2019-12-0611-107/+390
| | | | | | | | | | | | | | | | | | | | | | | | particularly on Mac. Summary: This was originally committed in 88bccded8fa169481fa367debf5ec615640635a1, and reverted in 93f77617abba512d2861e2fc50ce385883f587b6. This version is now much more testable: the "detect toolchain properties" part is still not tested but also not active in tests. All the command manipulation based on the detected properties is directly tested, and also not active in other tests. Fixes https://github.com/clangd/clangd/issues/211 Fixes https://github.com/clangd/clangd/issues/178 Reviewers: kbobyrev, ilya-biryukov Subscribers: mgorny, ormris, cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay Tags: #clang Differential Revision: https://reviews.llvm.org/D71029
* [lldb][NFC] Migrate FileSpec::Dump to raw_ostreamRaphael Isemann2019-12-0613-24/+22
|
* [lldb] NFC: less nesting in SearchFilter.cppKonrad Kleine2019-12-061-165/+170
| | | | | | | | | | | | I was working on SearchFilter.cpp and felt it a bit too complex in some cases in terms of nesting and logic flow. Reviewers: teemperor, JDevlieghere Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71022
* [compiler-rt] [test] Disable ASLR on ASAN/MSAN/TSAN tests on NetBSDMichał Górny2019-12-066-0/+21
| | | | | | | | Use a new %run wrapper for ASAN/MSAN/TSAN tests that calls paxctl in order to disable ASLR on the test executables. This makes it possible to test sanitizers on systems where ASLR is enabled by default. Differential Revision: https://reviews.llvm.org/D70958
* gn build: Merge 9e8c799e2b0LLVM GN Syncbot2019-12-062-1/+1
|
* [Dsymutil][NFC] Move NonRelocatableStringpool into common CodeGen folder.Alexey Lapshin2019-12-068-31/+28
| | | | | | | That refactoring moves NonRelocatableStringpool into common CodeGen folder. So that NonRelocatableStringpool could be used not only inside dsymutil. Differential Revision: https://reviews.llvm.org/D71068
* [LCSSA] Don't use VH callbacks to invalidate SCEV when creating LCSSA phisDaniil Suchkov2019-12-063-12/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | In general ValueHandleBase::ValueIsRAUWd shouldn't be called when not all uses of the value were actually replaced, though, currently formLCSSAForInstructions calls it when it inserts LCSSA-phis. Calls of ValueHandleBase::ValueIsRAUWd were added to LCSSA specifically to update/invalidate SCEV. In the best case these calls duplicate some of the work already done by SE->forgetValue, though in case when SCEV of the value is SCEVUnknown, SCEV replaces the underlying value of SCEVUnknown with the new value (i.e. acts like LCSSA-phi actually fully replaces the value it is created for), which leads to SCEV being corrupted because LCSSA-phi rarely dominates all uses of its inputs. Fixes bug https://bugs.llvm.org/show_bug.cgi?id=44058. Reviewers: fhahn, efriedma, reames, sanjoy.google Reviewed By: fhahn Subscribers: hiraditya, javed.absar, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70593
* Fix build of LookupResult.cpp from aeda128 with Visual C++.Douglas Yung2019-12-051-0/+1
|
* [JITLink] Use Blocks rather than Symbols for SectionRange.Lang Hames2019-12-051-14/+13
| | | | This ensures that anonymous blocks are included in the section range.
* [JITLink] Remove the Section::symbols_empty() method.Lang Hames2019-12-053-10/+7
| | | | llvm::empty(Sec.symbols()) can be used instead.
* DebugInfo: Pull out a common expression.David Blaikie2019-12-051-3/+5
| | | | | | | | This is for the case where -gmlt -gsplit-dwarf -fsplit-dwarf-inlining are used together in some but not all units during LTO (or, in the reduced case, even without LTO) - ensuring that no split dwarf is used (because split-dwarf-inlining puts the same data in the .o file, so there's no need to duplicate it into the .dwo file)
* llvm-reduce: Add a space to an option's --helpGeorge Burgess IV2019-12-051-1/+1
| | | | Otherwise, we get "filewith".
* [ConstantFold][SVE] Skip scalable vectors in ↵Huihui Zhang2019-12-052-0/+25
| | | | | | | | | | | | | | | | | ConstantFoldInsertElementInstruction. Summary: Should not constant fold insertelement instruction for scalable vector type. Reviewers: huntergr, sdesmalen, spatel, levedev.ri, apazos, efriedma, willlovett Reviewed By: efriedma, spatel Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70985
* Fix crash if a user-defined conversion is applied in the middle of aRichard Smith2019-12-054-1/+27
| | | | rewrite of an operator in terms of operator<=>.
* Tighten up CHECK lines added in a9f10ebffa to work on ARM.Douglas Yung2019-12-051-1/+1
| | | | On ARM platforms, the compiler generates an additional line containing `-CXXRecordDecl which is not the intended line, but preceeds the intended match causing the test to fail.
* gn build: Add support for building scudo and its unit tests.Peter Collingbourne2019-12-054-0/+191
| | | | Differential Revision: https://reviews.llvm.org/D71081
* gn build: Bump Android API level to 29, and NDK to r21.Peter Collingbourne2019-12-052-3/+3
| | | | | | | These are both necessary in order to use ELF TLS, which is needed by the scudo unit tests. Differential Revision: https://reviews.llvm.org/D71079
* [X86] Make X86TargetLowering::BuildFILD return a std::pair of SDValues so we ↵Craig Topper2019-12-052-11/+12
| | | | | | | | | | explicitly return the chain instead of calling getValue on the single SDValue. We shouldn't assume that the returned result can be used to get the other result. This is prep-work for strict FP where we will also need to pass the chain result along in more cases.
* Add strict fp support for instructions fadd/fsub/fmul/fdivLiu, Chen32019-12-068-57/+67
| | | | Differential Revision: https://reviews.llvm.org/D68757
* gn build: Merge aeda128a96cLLVM GN Syncbot2019-12-061-0/+1
|
* gn build: Merge 6470497817eLLVM GN Syncbot2019-12-061-1/+0
|
* Add lookup functions for efficient lookups of addresses when using ↵Greg Clayton2019-12-0514-28/+632
| | | | | | | | | | | | | | | | | GsymReader classes. Summary: Lookup functions are designed to not fully decode a FunctionInfo, LineTable or InlineInfo, they decode only what is needed into a LookupResult object. This allows lookups to avoid costly memory allocations and avoid parsing large amounts of information one a suitable match is found. LookupResult objects contain the address that was looked up, the concrete function address range, the name of the concrete function, and a list of source locations. One for each inline function, and one for the concrete function. This allows one address to turn into multiple frames and improves the signal you get when symbolicating addresses in GSYM files. Reviewers: labath, aprantl Subscribers: mgorny, hiraditya, llvm-commits, lldb-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70993
* Revert "[AST] Traverse the class type loc inside the member type loc."Sterling Augustine2019-12-054-53/+4
| | | | | | | This reverts commit 7f93cb62280a73e3e899d49c45be8bfbac634b7d. The assertion at RecursiveASTVisitor.h:1169 fails when passed a TypeLocNode. Not sure if the correct fix is to use getTypeLocClass or something else.
* [ThinLTO] Add option to disable readonly/writeonly attribute propagationTeresa Johnson2019-12-053-12/+16
| | | | | | | | | | | | | | | | | | | | | Summary: Add an option to allow the attribute propagation on the index to be disabled, to allow a workaround for issues (such as that fixed by D70977). Also move the setting of the WithAttributePropagation flag on the index into propagateAttributes(), and remove some old stale code that predated this flag and cleared the maybe read/write only bits when we need to disable the propagation (previously only when importing disabled, now also when the new option disables it). Reviewers: evgeny777, steven_wu Subscribers: mehdi_amini, inglorion, hiraditya, dexonsmith, arphaman, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70984
* [RegisterCoalescer] Fix the creation of subranges when rematerialization is usedQuentin Colombet2019-12-052-2/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Context * During register coalescing, we use rematerialization when coalescing is not possible. That means we may rematerialize a super register when only a smaller register is actually used. E.g., 0B v1 = ldimm 0xFF 1B v2 = COPY v1.low8bits 2B = v2 => 0B v1 = ldimm 0xFF 1B v2 = ldimm 0xFF 2B = v2.low8bits Where xB are the slot indexes. Here v2 grew from a 8-bit register to a 16-bit register. When that happens and subregister liveness is enabled, we create subranges for the newly created value. E.g., before remat, the live range of v2 looked like: main range: [1r, 2r) (Reads v2 is defined at index 1 slot register and used before the slot register of index 2) After remat, it should look like: main range: [1r, 2r) low 8 bits: [1r, 2r) high 8 bits: [1r, 1d) <-- dead def I.e., the unsused lanes of v2 should be marked as dead definition. * The Problem * Prior to this patch, the live-ranges from the previous exampel, would have the full live-range for all subranges: main range: [1r, 2r) low 8 bits: [1r, 2r) high 8 bits: [1r, 2r) <-- too long * The Fix * Technically, the code that this patch changes is not wrong: When we create the subranges for the newly rematerialized value, we create only one subrange for the whole bit mask. In other words, at this point v2 live-range looks like this: main range: [1r, 2r) low & high: [1r, 2r) Then, it gets wrong when we call LiveInterval::refineSubRanges on low 8 bits: main range: [1r, 2r) low 8 bits: [1r, 2r) high 8 bits: [1r, 2r) <-- too long Ideally, we would like LiveInterval::refineSubRanges to be able to do the right thing and mark the dead lanes as such. However, this is not possible, because by the time we update / refine the live ranges, the IR hasn't been updated yet, therefore we actually don't have enough information to do the right thing. Another option to fix the problem would have been to call LiveIntervals::shrinkToUses after the IR is updated. This is not desirable as this may have a noticeable impact on compile time. Instead, what this patch does is when we create the subranges for the rematerialized value, we explicitly create one subrange for the lanes that were used before rematerialization and one for the lanes that were not used. The used one inherits the live range of the main range and the unused one is just created empty. The existing rematerialization code then detects that the unused one are not live and it correctly sets dead def intervals for them. https://llvm.org/PR41372
* Handle two corner cases in creduce-clang-crash.pyReid Kleckner2019-12-051-0/+3
| | | | | | | | | | | | | | | | | | Summary: First, call os.path.normpath on the filename argument. I passed in ./foo-asdf.cpp, and this meant that the script failed to find the filename, and bad things happened. Second, call os.path.abspath on binaries. CReduce runs the interestingness test in a temp dir, so relative paths will not work. Reviewers: akhuang Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71098
* [AutoFDO] Top-down Inlining for specialization with context-sensitive profileWenlei He2019-12-053-9/+179
| | | | | | | | | | | | | | | | | Summary: AutoFDO's sample profile loader processes function in arbitrary source code order, so if I change the order of two functions in source code, the inline decision can change. This also prevented the use of context-sensitive profile to do specialization while inlining. This commit enforces SCC top-down order for sample profile loader. With this change, we can now do specialization, as illustrated by the added test case: Say if we have A->B->C and D->B->C call path, we want to inline C into B when root inliner is B, but not when root inliner is A or D, this is not possible without enforcing top-down order. E.g. Once C is inlined into B, A and D can only choose to inline (B->C) as a whole or nothing, but what we want is only inline B into A and D, not its recursive callee C. If we process functions in top-down order, this is no longer a problem, which is what this commit is doing. This change is guarded with a new switch "-sample-profile-top-down-load" for tuning, and it depends on D70653. Eventually, top-down can be the default order for sample profile loader. Reviewers: wmi, davidxl Subscribers: hiraditya, llvm-commits, tejohnson Tags: #llvm Differential Revision: https://reviews.llvm.org/D70655
* [AutoFDO] Properly merge context-sensitive profile of inlinee back to ↵Wenlei He2019-12-058-8/+152
| | | | | | | | | | | | | | | | | | | | outlined function Summary: When sample profile loader decides not to inline a previously inlined call-site, we adjust the profile of outlined function simply by scaling up its profile counts by call-site count. This means the context-sensitive profile of that inlined instance will be thrown away. This commit try to keep context-sensitive profile for such cases: - Instead of scaling outlined function's profile, we now properly merge the FunctionSamples of inlined instance into outlined function, including all recursively inlined profile. - Instead of adjusting the profile for negative inline decision at the end of the sample profile loader pass, we do the profile merge right after processing each function. This change paired with top-down ordering of annotation/inline-replay (a separate diff) will make sure we recursively merge profile back before the profile is used for annotation and inline replay. A new switch -sample-profile-merge-inlinee is added to enable the new profile merge for tuning. It should be the default behavior eventually. Reviewers: wmi, davidxl Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70653
* gn build: Merge fdf80e86a52LLVM GN Syncbot2019-12-051-0/+1
|
* [Concepts] Fix build failures in D41569Saar Raz2019-12-061-2/+2
| | | | Fix build failures in previous commit.
* [lldb] Update hardcoded Makefile.rules inclusions.Jordan Rupprecht2019-12-054-9/+3
| | | | | | This replaces `include $(LEVEL)/Makefile.rules` with `include Makefile.rules`. The lldb test driver already passes the include path when running make, and specifically looking for "../../Makefile.rules" forces the test to be in a specific location. Removing this hardcoded relative path will make it possible to move this test as-is.
* [Concepts] Constraint Enforcement & DiagnosticsSaar Raz2019-12-0623-133/+1060
| | | | | | | | | Part of the C++20 concepts implementation effort. - Associated constraints (requires clauses, currently) are now enforced when instantiating/specializing templates and when considering partial specializations and function overloads. - Elaborated diagnostics give helpful insight as to why the constraints were not satisfied. Phabricator: D41569 Re-commit, after fixing some memory bugs.
* [IR] Move ctor in the NDEBUG branchFangrui Song2019-12-051-2/+1
|
* [IR] Add a default copy constructor for -Wdeprecated-copyFangrui Song2019-12-051-0/+2
|
* Properly convert all declaration non-type template arguments whenRichard Smith2019-12-054-94/+118
| | | | | | | | | | | | forming non-type template parameter values. This reverts commit 93cc9dddd82f9e971f382ade6acf6634c5914966, which reverted commit 11d10527852b4d3ed738aa90d8bec0f398160593. We now always form `&x` when forming a pointer to a function rather than trying to use function-to-pointer decay. This matches the behavior of the old code in this case, but not the intent as described by the comments.
* Add a default copy constructor for -Wdeprecated-copy warnings.Eric Christopher2019-12-051-0/+2
|
* [libomptarget][nfc] Introduce SHARED, ALIGN macrosJon Chesterfield2019-12-057-40/+44
| | | | | | | | | | | | | | | | Summary: [libomptarget][nfc] Introduce SHARED, ALIGN macros Move remaining cuda attributes behind such macros Reviewers: ABataev, jdoerfert, grokos Reviewed By: ABataev Subscribers: openmp-commits, jvesely Tags: #openmp Differential Revision: https://reviews.llvm.org/D71076
* Debug Info: Apply a default location for cleanups if none is available.Adrian Prantl2019-12-052-1/+5
| | | | | | | | | This unbreaks the debuginfo-tests testsuite by replacing the assertion with a default location. There are cleanups in helper functions that don't have a valid source location such as block copy helpers and it's not worth tracking each of them down. rdar://57630879
* DebugInfo: Fix LTO+DWARFv5 loclistsDavid Blaikie2019-12-052-1/+67
| | | | | | The loclists_table_base was being overwritten for each CU even though only one loclists contribution is made so everything but the last CU would have a label that was never defined and fail to assemble.
* Debug Info: Assert that location is available for cleanupsAdrian Prantl2019-12-054-4/+32
| | | | | | rdar://57630879 Differential Revision: https://reviews.llvm.org/D71042
* Set a source location for Objective-C accessor stubsAdrian Prantl2019-12-052-4/+29
| | | | | | | | | | | | even when there is no explicit synthesize statement. This fixes a regression introduced in https://reviews.llvm.org/D68108 that could lead to missing debug locations in cleanup code in synthesized Objective-C++ properties. rdar://57630879 Differential Revision: https://reviews.llvm.org/D71084
* [libomptarget][nfc] Move omptarget-nvptx under commonJon Chesterfield2019-12-0513-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: [libomptarget][nfc] Move omptarget-nvptx under common Almost all files depend on require omptarget-nvptx, which no longer contains any obviously architecture dependent code. Moving it under common unblocks task/loop for amdgcn, and allows moving other code. At some point there should probably be a widespread symbol renaming to replace the nvptx string. I'd prefer to get things working first. Building this (and task.cu, loop.cu) without a cuda library requires some more refactoring, e.g. wrap threadfence(), use DEVICE macro more consistently. Patches for that are orthogonal and will be posted shortly. Reviewers: jdoerfert, ABataev, grokos Reviewed By: ABataev Subscribers: mgorny, fedor.sergeev, jfb, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D71073
* [AIX] Make sure to use QualNames for external global objectsDavid Tenty2019-12-052-20/+30
| | | | | | | | | | | | | | Summary: Previously we only handled the case where the csect hadn't been set up yet, so we'd hit an assert later on. Reviewers: jasonliu, DiggerLin, stevewan Reviewed By: jasonliu Subscribers: hubert.reinterpretcast, wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71032
* Add documentation headings for the OpenCL attributes.Aaron Ballman2019-12-051-0/+5
| | | | This fixes the documentation build.
* [OpenMP50] Add parallel master constructcchen2019-12-0537-18/+2984
| | | | | | | | | | | | Reviewers: ABataev, jdoerfert Reviewed By: ABataev Subscribers: rnk, jholewinski, guansong, arphaman, jfb, cfe-commits, sandoval, dreachem Tags: #clang Differential Revision: https://reviews.llvm.org/D70726
* Use diff -b on zlib tests so they pass on WindowsAmy Huang2019-12-052-2/+2
| | | | | | | | | | Reviewers: hubert.reinterpretcast Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71036
* [clangd] Highlighting dependent types in more contextsNathan Ridge2019-12-052-1/+37
| | | | | | | | | | | | | | Fixes https://github.com/clangd/clangd/issues/214. Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70746
* [clangd] Find reference to template parameter in 'sizeof...' expressionNathan Ridge2019-12-053-146/+180
| | | | | | | | | | | | | | Fixes https://github.com/clangd/clangd/issues/213. Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70740
OpenPOWER on IntegriCloud