summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert r369927 - [DAGCombiner] Remove a bunch of redundant AddToWorklist calls.Richard Trieu2019-08-271-20/+121
| | | | | | | This change causes instrumented builds of Clang to have a fatal error in the backend. https://reviews.llvm.org/D66537 has the details. llvm-svn: 370006
* [WinEH] Allocate space in funclets stack to save XMM CSRsPengfei Wang2019-08-278-19/+208
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is an alternate approach to D63396 Currently funclets reuse the same stack slots that are used in the parent function for saving callee-saved xmm registers. If the parent function modifies a callee-saved xmm register before an excpetion is thrown, the catch handler will overwrite the original saved value. This patch allocates space in funclets stack for saving callee-saved xmm registers and uses RSP instead RBP to access memory. Signed-off-by: Pengfei Wang <pengfei.wang@intel.com> Reviewers: rnk, RKSimon, craig.topper, annita.zhang, LuoYuanke, andrew.w.kaylor Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66596 Signed-off-by: Pengfei Wang <pengfei.wang@intel.com> llvm-svn: 370005
* Fix clangd's IndexAction for FileSkipped API updateAlex Lorenz2019-08-271-2/+2
| | | | llvm-svn: 370004
* [test] Disable two of the recently (re)enabled tests on Windows.Jonas Devlieghere2019-08-272-0/+2
| | | | | | This disables two tests on Windows that I re-enabled in r369995. llvm-svn: 370003
* [ConnectionFileDescriptor] Add shutdown check in ::Write.Jonas Devlieghere2019-08-271-3/+12
| | | | | | | | | | | | The disconnect method sets the shutdown flag to true. This currently only prevents any reads from happening, but not writes, which is incorrect. Presumably this was just an oversight when adding synchronization to the class. This adds the same shutdown check to the Write method. Over-the-shoulder reviewed by Jim! llvm-svn: 370002
* [Analysis] In EmitGEPOffset, use Constant::getUniqueInteger to handle struct ↵Craig Topper2019-08-271-4/+1
| | | | | | | | | | | | | | indices in vector GEPs. We previously called getSplatValue if the index had a vector type, but getSplatValue returns null for non-splats. This would cause a nullptr dereference if it wasn't a splat. Using getUniqueInteger gives us an assert if its a vector type, but the value isn't a splat. This is what is used in SelectionDAGBuilder's code that expands GEPs as well. llvm-svn: 370001
* Revert "[clang-scan-deps] Minimizer: Correctly handle multi-line content ↵Richard Smith2019-08-272-51/+14
| | | | | | | | | | | | with CR+LF line endings" This reverts commit r369986. This change added a dependency on the 'dos2unix' tool, which is not one of our accepted test dependencies and may not exist on all machines that build Clang. llvm-svn: 370000
* Don't lose the FoundDecl and template arguments for a DeclRefExpr inRichard Smith2019-08-271-5/+12
| | | | | | TreeTransform. llvm-svn: 369999
* Use FileEntryRef for PPCallbacks::FileSkippedAlex Lorenz2019-08-278-15/+55
| | | | | | | | This fixes the issue where a filename dependendency was missing if the file that was skipped was included through a symlink in an earlier run, if the file manager was reused between runs. llvm-svn: 369998
* [MemorySSA] Fix insertUse.Alina Sbirlea2019-08-272-5/+67
| | | | | | | | Actually call the renamePass on inserted Phis. Fixes PR42940. Subscribers: llvm-commits llvm-svn: 369997
* Add PhaseOrdering/lifetime-sanitizer.ll testsVitaly Buka2019-08-271-0/+71
| | | | | | | | | | | | Reviewers: lebedev.ri Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66761 llvm-svn: 369996
* [dotest] Remove long running test "decorator" and re-enable tests.Jonas Devlieghere2019-08-2711-48/+0
| | | | | | | | | | | | Today I discovered the skipLongRunningTest decorator and to my surprise all the tests were passing without the decorator. They don't seem to be that expensive either, they take a few seconds but we have tests that take much longer than that. As such I propose to remove the decorator and enable them by default. Differential revision: https://reviews.llvm.org/D66774 llvm-svn: 369995
* AMDGPU: Combine directly on mul24 intrinsicsMatt Arsenault2019-08-273-7/+129
| | | | | | | | | The problem these are supposed to work around can occur before the intrinsics are lowered into the nodes. Try to directly simplify them so they are matched before the bit assert operations can be optimized out. llvm-svn: 369994
* [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
OpenPOWER on IntegriCloud