summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [clang-scan-deps] Skip UTF-8 BOM in source minimizerAlexandre Ganea2019-08-272-0/+17
| | | | | | Differential Revision: https://reviews.llvm.org/D66511 llvm-svn: 369993
* NFC: Make test work with or without assertionsVitaly Buka2019-08-271-7/+10
| | | | llvm-svn: 369992
* AMDGPU: Run AMDGPUCodeGenPrepare after scalar optsMatt Arsenault2019-08-273-190/+175
| | | | | | | | | | | | | | | | | | | | The mul24 matching could interfere with SLSR and the other addressing mode related passes. This probably is not the optimal placement, but is an intermediate step. This should probably be moved after all the generic IR passes, particularly LSR. Moving this after LSR seems to help in some cases, and hurts others. As-is in this patch, in idiv-licm, it saves 1-2 instructions inside some of the loop bodies, but increases the number in others. Moving this later helps these loops. In the new lsr tests in mul24-pass-ordering, the intrinsic prevents introducing more instructions in the loop preheader, so moving this later ends up hurting them. This shouldn't be any worse than before the intrinsics were introduced in r366094, and LSR should probably be smarter. I think it's because it doesn't know the and inside the loop will be folded away. llvm-svn: 369991
* Send error message on failed attach from debugerserver.Jason Molenda2019-08-271-2/+18
| | | | | | | | | | | | Instead of using a magic return error code from debugserver to indicate that an attach failed because of SIP being enabled in RNBRemote::HandlePacket_v, use the extended error reporting that Pavel added to lldb/lldb-server in https://reviews.llvm.org/D45573 <rdar://problem/39398385> llvm-svn: 369990
* Reorganize code and add a fixme to point out a bug in existing code [NFC]Philip Reames2019-08-261-12/+10
| | | | llvm-svn: 369989
* [clang-scan-deps] Minimizer: Correctly skip over double slashes in angle ↵Alexandre Ganea2019-08-262-3/+12
| | | | | | | | | | bracket #include Previously, double slashes (//) occurring in angle brackets #include were incorrectly interpreted as comments. eg. #include <dir//file.h> Differential Revision: https://reviews.llvm.org/D66550 llvm-svn: 369988
* [build_exception] Decode build failure messagesVedant Kumar2019-08-261-1/+1
| | | | | | | This is so that the test harness pretty-prints build error messages in trace mode, instead of dumping a raw python bytes object. llvm-svn: 369987
* [clang-scan-deps] Minimizer: Correctly handle multi-line content with CR+LF ↵Alexandre Ganea2019-08-262-14/+51
| | | | | | | | | | line endings Previously, an #error directive with quoted, multi-line content, along with CR+LF line endings wasn't handled correctly. Differential Revision: https://reviews.llvm.org/D66556 llvm-svn: 369986
* PR42587: diagnose unexpanded uses of a pack parameter of a genericRichard Smith2019-08-269-34/+111
| | | | | | | | | | | | | | | | | lambda from within the lambda-declarator. Instead of trying to reconstruct whether a parameter pack was declared inside a lambda (which we can't do correctly in general because we might not have attached parameters to their declaration contexts yet), track the set of parameter packs introduced in each live lambda scope, and require only those parameters to be immediately expanded when they appear inside that lambda. In passing, fix incorrect disambiguation of a lambda-expression starting with an init-capture pack in a braced-init-list. We previously incorrectly parsed that as a designated initializer. llvm-svn: 369985
* Copy test data so tests don't traverse test directories. NFCRichard Trieu2019-08-262-1/+71
| | | | llvm-svn: 369984
* [mips] Fix indentation. NFCSimon Atanasyan2019-08-261-9/+13
| | | | llvm-svn: 369983
* [mips] clang-format the code. NFCSimon Atanasyan2019-08-261-3/+3
| | | | llvm-svn: 369982
* [X86] Delay combineIncDecVector until after op legalization.Craig Topper2019-08-262-9/+19
| | | | | | | | | Probably better to keep add over sub in early DAG combines. It might make sense to push this to lowering or delay it all the way to isel. But this was the simplest change. llvm-svn: 369981
* hwasan, codegen: Keep more lifetime markers used for hwasanVitaly Buka2019-08-264-0/+8
| | | | | | | | | | | | Reviewers: eugenis Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66697 llvm-svn: 369980
* msan, codegen, instcombine: Keep more lifetime markers used for msanVitaly Buka2019-08-267-11/+46
| | | | | | | | | | | | Reviewers: eugenis Subscribers: hiraditya, cfe-commits, #sanitizers, llvm-commits Tags: #clang, #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D66695 llvm-svn: 369979
* [WebAssembly] Fix SSA rebuilding in SjLj transformationHeejin Ahn2019-08-262-5/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously we skipped uses within the same BB as a def when rebuilding SSA after SjLj transformation. For example, before transformation, ``` for.cond: %0 = phi i32 [ %var, %for.inc ] ... %var = ... br label %for.inc for.inc: ; preds = %for.cond call i32 @setjmp(...) br %for.cond ``` In this BB, %var should be defined in all paths from %for.inc to make %0 valid. In the input it was true; %for.inc's only predecessor was %for.cond. But after SjLj transformation, it is possible that %for.inc has other predecessors that are reachable without reaching %for.cond. ``` entry.split: ... br i1 %a, label %bb.1, label %for.inc for.cond: %0 = phi i32 [ %var, %for.inc ] ... ; Not valid! %var = ... br label %for.inc for.inc: ; preds = %for.cond, %entry.split call i32 @setjmp(...) ... br %for.cond ``` In this case, we can't use %var in the `phi` instruction in %for.cond, because %var is not defined in all paths through %for.inc (If the control flow is %entry -> %entry.split -> %for.inc -> %for.cond, %var has not been defined until we reach the `phi`). But the previous code excluded users within the same BB, skipping instructions within the same BB so they are not rewritten properly. User instructions within the same BB also should be candidates for rewriting if they are _before_ the original definition. Fixes PR43097. Reviewers: dschuff Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66729 llvm-svn: 369978
* [hwasan] Fix test failure in r369721.Evgeniy Stepanov2019-08-262-5/+9
| | | | | | | | | Try harder to emulate "old runtime" in the test. To get the old behavior with the new runtime library, we need both disable personality function wrapping and enable landing pad instrumentation. llvm-svn: 369977
* [ORC] Make sure that queries on emitted-but-not-ready symbols fail correctly.Lang Hames2019-08-263-119/+139
| | | | | | | | | | | | | | | | | In r369808 the failure scheme for ORC symbols was changed to make MaterializationResponsibility objects responsible for failing the symbols they represented. This simplifies error logic in the case where symbols are still covered by a MaterializationResponsibility, but left a gap in error handling: Symbols that have been emitted but are not yet ready (due to a dependence on some unemitted symbol) are not covered by a MaterializationResponsibility object. Under the scheme introduced in r369808 such symbols would be moved to the error state, but queries on those symbols were never notified. This led to deadlocks when such symbols were failed. This commit updates error logic to immediately fail queries on any symbol that has already been emitted if one of its dependencies fails. llvm-svn: 369976
* [ORC] Fix an overly aggressive assert.Lang Hames2019-08-262-3/+35
| | | | | | | | Symbols that have not been queried will not have MaterializingInfo entries, so remove the assert that all failed symbols should have these entries. Also updates the loop to only remove entries that were found earlier. llvm-svn: 369975
* [WebAssembly] Combine emscripten SjLj testsHeejin Ahn2019-08-263-29/+15
| | | | | | | | | | | | | | | | | | | Summary: Combine a test in lower-em-sjlj-longjmp-only.ll into lower-em-sjlj.ll, because the test command is the same and I don't see any reason it should be a separate file. Also converted tabs into spaces and fixed indentations in lower-em-sjlj-sret.ll. (lower-em-sjlj.ll uses a different test command (llc), so it couldn't be combined) Reviewers: dschuff Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66728 llvm-svn: 369974
* [GlobalISel] Import patterns containing INSERT_SUBREGJessica Paquette2019-08-2610-39/+407
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This teaches the importer to handle INSERT_SUBREG instructions. We were missing patterns involving INSERT_SUBREG in AArch64. It appears in AArch64InstrInfo.td 107 times, and 14 times in AArch64InstrFormats.td. To meaningfully import it, the GlobalISelEmitter needs to know how to infer a super register class for a given register class. This patch introduces the following: - `getSuperRegForSubReg`, a function which finds the largest register class which supports a value type and subregister index - `inferSuperRegisterClass`, a function which finds the appropriate super register class for an INSERT_SUBREG' - `inferRegClassFromPattern`, a function which allows for some trivial lookthrough into instructions - `getRegClassFromLeaf`, a helper function which returns the register class for a leaf `TreePatternNode` - Support for subregister index operands in `importExplicitUseRenderer` It also - Updates tests in each backend which are impacted by the change - Adds GlobalISelEmitterSubreg.td to test that we import and skip the expected patterns As a result of this patch, INSERT_SUBREG patterns in X86 may use the LOW32_ADDR_ACCESS_RBP register class instead of GR32. This is correct, since the register class contains the same registers as GR32 (except with the addition of RBP). So, this also teaches X86 to handle that register class. This is in line with X86ISelLowering, which treats this as a GR class. Differential Revision: https://reviews.llvm.org/D66498 llvm-svn: 369973
* [ScopBuilder] Simplify main statement flag in buildEqivClassBlockStmts. NFC.Michael Kruse2019-08-261-11/+7
| | | | | | | | | | | | | | | | | When reading code in ScopBuilder::buildEqivClassBlockStmts, I think the main statement flag computation can be simplified, here is the patch. It's based on two simple facts that: 1. Instruction won't be removed once it's inserted into UnionFind. 2. Main statement must be set if there is non-trivial statement besides the last one. The patch also saves std::find call. Patch by bin.narwal <bin.narwal@gmail.com> Differential Revision: https://reviews.llvm.org/D66477 llvm-svn: 369972
* Revert r369843 "[Testing] Unbreak r369830"Vitaly Buka2019-08-261-1/+0
| | | | | | | | That was not the fix. This reverts commit 8bcf690ae03db85608b2ea22eac7a91c84df4dc. llvm-svn: 369971
* [Core] GetAPInt should return an OptionalAlex Langford2019-08-261-16/+19
| | | | | | | | The current implementation returns a bool for indicating success and whether or not the APInt passed by reference was populated. Instead of doing that, I think it makes more sense to return an Optional<APInt>. llvm-svn: 369970
* Debug Info: Support for DW_AT_export_symbols for anonymous structsShafik Yaghmour2019-08-262-0/+46
| | | | | | | | | | | | | | | | | | | | This implements the DWARF 5 feature described in: http://dwarfstd.org/ShowIssue.php?issue=141212.1 To support recognizing anonymous structs: struct A { struct { // Anonymous struct int y; }; } a This patch adds support for the new flag in constructTypeDIE(...) and test to verify this change. Differential Revision: https://reviews.llvm.org/D66605 llvm-svn: 369969
* Updating a test case that was missed in r369957.Aaron Ballman2019-08-261-1/+1
| | | | llvm-svn: 369968
* [DWARF] Rename getDwarf5OrGNUCallSite{Attr,Tag}, NFCVedant Kumar2019-08-263-23/+17
| | | | llvm-svn: 369967
* [DWARF] Pick the DWARF5 OP_entry_value opcode on DarwinVedant Kumar2019-08-264-8/+104
| | | | | | | Use the GNU extension for OP_entry_value consistently (i.e. whenever GNU extensions are used for TAG_call_site). llvm-svn: 369966
* Remove unused variables.Benjamin Kramer2019-08-261-2/+0
| | | | llvm-svn: 369965
* [DebugInfo] Add debug-entry-values test coverage, NFCVedant Kumar2019-08-261-0/+7
| | | | | | | Check that call site descriptions are emitted in dwarf4 + lldb + debug-entry-values mode. llvm-svn: 369964
* [test] Remove extra spaces from a test, NFCVedant Kumar2019-08-261-7/+7
| | | | llvm-svn: 369963
* Add a clarify comment for meaning of SafePointes [NFC]Philip Reames2019-08-261-1/+5
| | | | | | Extracted from D66688 as requested. llvm-svn: 369962
* [ADT] Make StringRef(const char*) constexprBenjamin Kramer2019-08-263-3/+20
| | | | | | | | | | This should let us get rid of StringLiteral in the long term and avoid chasing accidental StringRef globals once and for all. This requires C++14, I godbolted it on every compiler I know we support so I hope there won't be much fallout. llvm-svn: 369961
* Fixing a weird copy-pasta to get bots back to green.Aaron Ballman2019-08-261-1/+1
| | | | llvm-svn: 369960
* Preland test cases for D66688 to make diffs clear.Philip Reames2019-08-261-0/+1390
| | | | llvm-svn: 369959
* ContentCache: Drop getBuffer's dependency on SourceManagerDuncan P. N. Exon Smith2019-08-264-33/+31
| | | | | | | | | | | | | Refactor ContentCache::IsSystemFile to IsFileVolatile, checking SourceManager::userFilesAreVolatile at construction time. This is a step toward lowering ContentCache down from SourceManager to FileManager. No functionality change intended. https://reviews.llvm.org/D66713 llvm-svn: 369958
* Reword the C11 extension diagnostic.Aaron Ballman2019-08-263-30/+30
| | | | | | This makes it more consistent with other language extension diagnostics. llvm-svn: 369957
* Fix gen-cdb-fragment test for WindowsAlex Lorenz2019-08-261-2/+2
| | | | | | Windows bots didn't seem to like the empty argument, so I rewrote the test. llvm-svn: 369956
* [Clang][Bundler] Use llvm-objcopy for creating fat object filesSergey Dmitriev2019-08-264-125/+29
| | | | | | | | clang-offload-bundler currently uses partial linking for creating fat object files, but such technique cannot be used on Windows due to the absence of partial linking support in the linker. This patch changes implementation to use llvm-objcopy for merging device and host objects instead of doing partial linking. This is one step forward towards enabling OpenMP offload on Windows. Differential Revision: https://reviews.llvm.org/D66485 llvm-svn: 369955
* Diagnose use of _Thread_local as an extension when not in C11 mode.Aaron Ballman2019-08-266-38/+55
| | | | llvm-svn: 369954
* gn build: Merge r369918Nico Weber2019-08-262-0/+2
| | | | llvm-svn: 369953
* Recommit [PowerPC] Update P9 vector costs for insert/extractRoland Froese2019-08-262-24/+53
| | | | | | | Now that the v1i128 smin regression has been fixed, recommit the P9 cost updates from D60160. llvm-svn: 369952
* gn build: color linker errors when using lldNico Weber2019-08-261-0/+3
| | | | llvm-svn: 369951
* gn build: (manually) merge r369741Nico Weber2019-08-261-0/+2
| | | | llvm-svn: 369950
* [InstCombine] icmp eq/ne (gep inbounds P, Idx..), null -> icmp eq/ne P, null ↵Philip Reames2019-08-262-8/+11
| | | | | | | | | | for vectors Extend the transform introduced in https://reviews.llvm.org/D66608 to work for vector geps as well. Differential Revision: https://reviews.llvm.org/D66671 llvm-svn: 369949
* gn build: (manually) merge r369940Nico Weber2019-08-262-0/+8
| | | | llvm-svn: 369948
* [Hexagon] Improve generated code for test-if-bit-clearKrzysztof Parzyszek2019-08-263-22/+35
| | | | llvm-svn: 369947
* [OPENMP][NVPTX]Fix critical region codegen.Alexey Bataev2019-08-262-3/+26
| | | | | | | | | | | | | | | | | Summary: Previously critical regions were emitted with the barrier making it a worksharing construct though it is not. Also, it leads to incorrect behavior in Cuda9+. Patch fixes this problem. Reviewers: ABataev, jdoerfert Subscribers: jholewinski, guansong, cfe-commits, grokos Tags: #clang Differential Revision: https://reviews.llvm.org/D66673 llvm-svn: 369946
* [Attributor] Adjust and test the iteration bound of testsJohannes Doerfert2019-08-2616-16/+28
| | | | | | | | | | | | | | | | | | Summary: Try to verify how many iterations we need for a fixpoint in our tests. This patch adjust the way we count to make it easier to follow. It also adjusts the bounds to actually account for a fixpoint and not only the minimum number to pass all checks. Reviewers: uenoku, sstefan1 Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66757 llvm-svn: 369945
* [msvc] Add necessary #include to make compiler intrinsics available.Richard Smith2019-08-261-0/+4
| | | | llvm-svn: 369944
OpenPOWER on IntegriCloud