summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [test][AArch64] Relax the check line for G_BRJT in legalizer-info-validation.mirVolkan Keles2019-06-171-1/+1
| | | | | | Replace the specific number with a pattern to relax the test. llvm-svn: 363621
* Rewrite ConstStructBuilder with a mechanism that can cope with splitting and ↵Richard Smith2019-06-172-495/+702
| | | | | | | | | | | | | | | | | | | | | | | | updating constants. Summary: This adds a ConstantBuilder class that deals with incrementally building an aggregate constant, including support for overwriting previously-emitted parts of the aggregate with new values. This fixes a bunch of cases where we used to be unable to reduce a DesignatedInitUpdateExpr down to an IR constant, and also lays some groundwork for emission of class constants with [[no_unique_address]] members. Reviewers: rjmccall Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63371 llvm-svn: 363620
* Teach getSCEVAtScope how to handle loop phis w/invariant operands in loops ↵Philip Reames2019-06-174-35/+61
| | | | | | | | | | | | w/taken backedges This patch really contains two pieces: Teach SCEV how to fold a phi in the header of a loop to the value on the backedge when a) the backedge is known to execute at least once, and b) the value is safe to use globally within the scope dominated by the original phi. Teach IndVarSimplify's rewriteLoopExitValues to allow loop invariant expressions which already exist (and thus don't need new computation inserted) even in loops where we can't optimize away other uses. Differential Revision: https://reviews.llvm.org/D63224 llvm-svn: 363619
* Add convenience utility for replacing a range within a container with aRichard Smith2019-06-171-0/+27
| | | | | | different range, in preparation for use in Clang. llvm-svn: 363617
* [globalisel] Fix iterator invalidation in the extload combinesDaniel Sanders2019-06-172-54/+40
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Change the way we deal with iterator invalidation in the extload combines as it was still possible to neglect to visit a use. Even worse, it happened in the in-tree test cases and the checks weren't good enough to detect it. We now take a cheap copy of the use list before iterating over it. This prevents iterator invalidation from occurring and has the nice side effect of making the existing schedule-for-erase/schedule-for-insert mechanism moot. Reviewers: aditya_nandakumar Reviewed By: aditya_nandakumar Subscribers: rovka, kristof.beyls, javed.absar, volkan, Petar.Avramovic, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61813 llvm-svn: 363616
* Stop counting pops in tsan/check_analyze.sh.Evgeniy Stepanov2019-06-171-2/+0
| | | | | | | | | | | | | | | | | Summary: It looks like LLVM has started doing less tail duplication in this code, or something like that, resulting in a significantly smaller number of pop instructions (16 -> 12). Removing the check. Reviewers: vitalybuka, dvyukov Subscribers: kubamracek, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D63450 llvm-svn: 363615
* [AMDGPU] Propagate function attributes thru bitcastsStanislav Mekhanoshin2019-06-172-3/+27
| | | | | | | | | AMDGPUPropagateAttributes will not work on function bitcatsts, so move AMDGPUFixFunctionBitcasts before it. Differential Revision: https://reviews.llvm.org/D63455 llvm-svn: 363614
* Fix a bug w/inbounds invalidation in LFTR (recommit)Philip Reames2019-06-175-23/+99
| | | | | | | | | | | | | | | | | | Recommit r363289 with a bug fix for crash identified in pr42279. Issue was that a loop exit test does not have to be an icmp, leading to a null dereference crash when new logic was exercised for that case. Test case previously committed in r363601. Original commit comment follows: This contains fixes for two cases where we might invalidate inbounds and leave it stale in the IR (a miscompile). Case 1 is when switching to an IV with no dynamically live uses, and case 2 is when doing pre-to-post conversion on the same pointer type IV. The basic scheme used is to prove that using the given IV (pre or post increment forms) would have to already trigger UB on the path to the test we're modifying. As such, our potential UB triggering use does not change the semantics of the original program. As was pointed out in the review thread by Nikita, this is defending against a separate issue from the hasConcreteDef case. This is about poison, that's about undef. Unfortunately, the two are different, see Nikita's comment for a fuller explanation, he explains it well. (Note: I'm going to address Nikita's last style comment in a separate commit just to minimize chance of subtle bugs being introduced due to typos.) Differential Revision: https://reviews.llvm.org/D62939 llvm-svn: 363613
* Clang :: Sema/wchar.c has long been failing on Solaris:Rainer Orth2019-06-174-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | error: 'error' diagnostics expected but not seen: File /vol/llvm/src/clang/local/test/Sema/wchar.c Line 22: initializing wide char array with non-wide string literal error: 'error' diagnostics seen but not expected: File /vol/llvm/src/clang/local/test/Sema/wchar.c Line 20: array initializer must be an initializer list File /vol/llvm/src/clang/local/test/Sema/wchar.c Line 22: array initializer must be an initializer list It turns out the definition is wrong, as can be seen in GCC's gcc/config/sol2.h: /* wchar_t is called differently in <wchar.h> for 32 and 64-bit compilations. This is called for by SCD 2.4.1, p. 6-83, Figure 6-65 (32-bit) and p. 6P-10, Figure 6.38 (64-bit). */ #undef WCHAR_TYPE #define WCHAR_TYPE (TARGET_64BIT ? "int" : "long int") The following patch implements this, and at the same time corrects the wint_t definition which is the same: /* Same for wint_t. See SCD 2.4.1, p. 6-83, Figure 6-66 (32-bit). There's no corresponding 64-bit definition, but this is what Solaris 8 <iso/wchar_iso.h> uses. */ #undef WINT_TYPE #define WINT_TYPE (TARGET_64BIT ? "int" : "long int") Clang :: Preprocessor/wchar_t.c and Clang :: Sema/format-strings.c need to be adjusted to account for that. Tested on i386-pc-solaris2.11, x86_64-pc-solaris2.11, and x86_64-pc-linux-gnu. Differential Revision: https://reviews.llvm.org/D62944 llvm-svn: 363612
* llgdb.py: Make sure to clean up the debugger on exit.Adrian Prantl2019-06-171-1/+6
| | | | | | <rdar://problem/51807962> llvm-svn: 363611
* gn build: Merge r363483.Peter Collingbourne2019-06-171-0/+2
| | | | llvm-svn: 363610
* gn build: Merge r363584.Peter Collingbourne2019-06-171-0/+1
| | | | llvm-svn: 363609
* Add color to the default thread and frame format.Jonas Devlieghere2019-06-173-14/+21
| | | | | | | | | | | | | | Now that we correctly ignore ASCII escape sequences when colors are disabled (r362240), I'd like to change the default frame and thread format to include color in their output, in line with the syntax highlighting that Raphael added a while ago. This patch adds highlighting for the stop reason, the file, line and column number. With colors disabled, this of course is a no-op. Differential revision: https://reviews.llvm.org/D62743 llvm-svn: 363608
* PR42205: DebugInfio: Do not attempt to emit debug info metadata for static ↵David Blaikie2019-06-172-0/+16
| | | | | | | | | | | member variable template partial specializations Would cause a crash in an attempt to create the type for the still unresolved 'auto' in the partial specialization (& even without the use of 'auto', the expression would be value dependent & crash/assertion-fail there). llvm-svn: 363606
* [NFC] Assign a couple of LWG issues to myselfLouis Dionne2019-06-171-3/+3
| | | | llvm-svn: 363605
* Attempt to fix GWP-ASan build failure on sanitizer-android. Add -fPIC.Mitch Phillips2019-06-171-1/+1
| | | | llvm-svn: 363604
* [libc++] Update ABI list for ABI v2Louis Dionne2019-06-171-0/+74
| | | | | | I forgot to add symbols for filesystem. llvm-svn: 363603
* AMDGPU/GFX10: Don't generate s_code_end padding in the asm-printerNicolai Haehnle2019-06-172-47/+55
| | | | | | | | | | | | | | | | | | | | | | Summary: The purpose of the padding is to guard against stale code being fetched into the instruction cache by the lowest level prefetching. We're generating relocatable ELF here, and so the padding should arguably be added by the linker. This is in fact what Mesa does. This also fixes multi-part shaders for Mesa. Change-Id: I6bfede58f20e9f337762ccf39ef9e0e263e69e82 Reviewers: arsenm, rampitec, t-tye Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63427 llvm-svn: 363602
* Reduced test case for pr42279 in advance of the relevant re-commit + fixPhilip Reames2019-06-171-0/+31
| | | | llvm-svn: 363601
* AMDGPU: Explicitly define a triple for some testsNicolai Haehnle2019-06-175-10/+13
| | | | | | | | | | | | | | | | | | | | | | | Summary: This is related to the changes to the groupstaticsize intrinsic in D61494 which would otherwise make the related tests in these files fail or much less useful. Note that for some reason, SOPK generation is less effective in the amdhsa OS, which is why I chose PAL. I haven't investigated this deeper. Change-Id: I6bb99569338f7a433c28b4c9eb1e3e036b00d166 Reviewers: arsenm Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63392 llvm-svn: 363600
* [test] Add wrap flags after D61934.Michael Kruse2019-06-172-3/+3
| | | | | | | | | | | | https://reviews.llvm.org/D61934, committed as r362687, r363540, r363364 and r363147, made some emitted instruction nus/nsw. Add these falgs to Polly's regression tests. This should fix Polly :: Isl/CodeGen/partial_write_in_region_with_loop.ll Polly :: Isl/CodeGen/scev_expansion_in_nonaffine.ll llvm-svn: 363599
* [EarlyCSE] Fix hashing of self-comparesJoseph Tremoulet2019-06-172-2/+23
| | | | | | | | | | | | | | | | | | | | | | | Summary: Update compare normalization in SimpleValue hashing to break ties (when the same value is being compared to itself) by switching to the swapped predicate if it has a lower numerical value. This brings the hashing in line with isEqual, which already recognizes the self-compares with swapped predicates as equal. Fixes PR 42280. Reviewers: spatel, efriedma, nikic, fhahn, uabelho Reviewed By: nikic Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63349 llvm-svn: 363598
* [MemorySSA] Don't use template when the clone is a simplified instruction.Alina Sbirlea2019-06-173-4/+45
| | | | | | | | | | | | | | | | | | | Summary: LoopRotate doesn't create a faithful clone of an instruction, it may simplify it beforehand. Hence the clone of an instruction that has a MemoryDef associated may not be a definition, but a use or not a memory alternig instruction. Don't rely on the template when the clone may be simplified. Reviewers: george.burgess.iv Subscribers: jlebar, Prazek, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63355 llvm-svn: 363597
* [GlobalISel][AArch64] Fold G_SUB into G_ICMP when it's safe to do soJessica Paquette2019-06-172-16/+435
| | | | | | | | | | | | | | | | | | | | | | | | | Basically porting over the behaviour in AArch64ISelLowering to GISel. See emitComparison for reference. When we have something like this: ``` lhs = G_SUB 0, y ... G_ICMP lhs, rhs ``` We can fold away the G_SUB and produce a cmn instead, given that we produce the same value in NZCV. Add a test showing that the transformation works, and also showing that we don't perform the transformation when it's unsafe. Also factor out the CSet emission into emitCSetForICMP. Differential Revision: https://reviews.llvm.org/D63163 llvm-svn: 363596
* [X86] Add TB_NO_REVERSE to some memory folding table entries where the ↵Craig Topper2019-06-171-3/+3
| | | | | | | | | | | | | register form requires 64-bit mode, but the memory form does not. We don't know if its safe to unfold if we're in 32-bit mode. This is simlar to what was done to some load opcodes in r363523. I think its pretty unlikely we will try to unfold these anyway so I don't think this is testable. llvm-svn: 363595
* Update status of issue 3209Marshall Clow2019-06-171-2/+2
| | | | llvm-svn: 363594
* LiveInterval.h: add LiveRange::findIndexesLiveAt function - return a list of ↵Valery Pykhtin2019-06-171-0/+38
| | | | | | | | SlotIndexes the LiveRange live at. Differential revision: https://reviews.llvm.org/D62411 llvm-svn: 363593
* [X86][SSE] Scalarize under-aligned XMM vector nt-stores (PR42026)Simon Pilgrim2019-06-173-763/+801
| | | | | | If a XMM non-temporal store has less than natural alignment, scalarize the vector - with SSE4A we can stay on the vector and use MOVNTSD(f64), else we must move to GPRs and use MOVNTI(i32/i64). llvm-svn: 363592
* AMDGPU: Make getreg intrinsic inaccessiblememonlyMatt Arsenault2019-06-171-1/+1
| | | | llvm-svn: 363591
* [MemorySSA] Add all MemoryPhis before filling their values.Alina Sbirlea2019-06-172-3/+64
| | | | | | | | | | | | | | | | | | Summary: Add all MemoryPhis in IDF before filling in their incomign values. Otherwise, a new Phi can be added that needs to become the incoming value of another Phi. Test fails the verification in verifyPrevDefInPhis. Reviewers: george.burgess.iv Subscribers: jlebar, Prazek, zzheng, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63353 llvm-svn: 363590
* Add tests for LWG 3206. NFCMarshall Clow2019-06-172-2/+25
| | | | llvm-svn: 363589
* [AMDGPU] gfx1010 wavefrontsize intrinsic foldingStanislav Mekhanoshin2019-06-174-16/+143
| | | | | | Differential Revision: https://reviews.llvm.org/D63206 llvm-svn: 363588
* AMDGPU: Fold readlane/readfirstlane callsMatt Arsenault2019-06-172-0/+149
| | | | llvm-svn: 363587
* [AMDGPU] Pass to propagate ABI attributes from kernels to the functionsStanislav Mekhanoshin2019-06-176-4/+515
| | | | | | | | | | | | | | | | The pass works in two modes: Mode 1: Just set attributes starting from kernels. This can work at the very beginning of opt and llc pipeline, but cannot clone functions because it must be a function pass. Mode 2: Actually clone functions for new attributes. This can only work after all function passes in the opt pipeline because it has to be a module pass. Differential Revision: https://reviews.llvm.org/D63208 llvm-svn: 363586
* [clang][AST] Remove unnecessary 'const'.Michael Liao2019-06-171-1/+1
| | | | llvm-svn: 363585
* [GWP-ASan] Integration with Scudo [5].Mitch Phillips2019-06-1721-5/+335
| | | | | | | | | | | | | | | | | | | | | | Summary: See D60593 for further information. This patch adds GWP-ASan support to the Scudo hardened allocator. It also implements end-to-end integration tests using Scudo as the backing allocator. The tests include crash handling for buffer over/underflow as well as use-after-free detection. Reviewers: vlad.tsyrklevich, cryptoad Reviewed By: vlad.tsyrklevich, cryptoad Subscribers: kubamracek, mgorny, #sanitizers, llvm-commits, morehouse Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D62929 llvm-svn: 363584
* gn build: Merge r363541Nico Weber2019-06-172-9/+7
| | | | llvm-svn: 363583
* [X86][AVX] Split under-aligned vector nt-stores.Simon Pilgrim2019-06-173-511/+530
| | | | | | If a YMM/ZMM non-temporal store has less than natural alignment, split the vector - either they will be satisfactorily aligned or will continue to be split until they are XMMs - at which point the legalizer will scalarize it. llvm-svn: 363582
* [LV] Suppress vectorization in some nontemporal casesWarren Ristow2019-06-1710-12/+234
| | | | | | | | | | | | | | | | | | | | | When considering a loop containing nontemporal stores or loads for vectorization, suppress the vectorization if the corresponding vectorized store or load with the aligment of the original scaler memory op is not supported with the nontemporal hint on the target. This adds two new functions: bool isLegalNTStore(Type *DataType, unsigned Alignment) const; bool isLegalNTLoad(Type *DataType, unsigned Alignment) const; to TTI, leaving the target independent default implementation as returning true, but with overriding implementations for X86 that check the legality based on available Subtarget features. This fixes https://llvm.org/PR40759 Differential Revision: https://reviews.llvm.org/D61764 llvm-svn: 363581
* GlobalISel: Ignore callsite attributes when picking intrinsic typeMatt Arsenault2019-06-172-1/+24
| | | | | | | | | | | A target intrinsic may be defined as possibly reading memory, but the call site may have additional knowledge that it doesn't read memory. The intrinsic lowering will expect the pessimistic assumption of the intrinsic definition, so the chain should still be used. I fixed the same bug in SelectionDAG in r287593. llvm-svn: 363580
* GlobalISel: Verify intrinsicsMatt Arsenault2019-06-175-36/+146
| | | | | | | | I keep using the wrong instruction when manually writing tests. This really needs to check the number of operands, but I don't see an easy way to do that right now. llvm-svn: 363579
* AMDGPU/GlobalISel: Account for multiple defs when finding intrinsic IDMatt Arsenault2019-06-171-2/+1
| | | | llvm-svn: 363578
* [AMDGPU] gfx1010 wave32 metadataStanislav Mekhanoshin2019-06-1717-9/+726
| | | | | | Differential Revision: https://reviews.llvm.org/D63207 llvm-svn: 363577
* AMDGPU/GlobalISel: Implement select for G_ICMP and G_SELECTTom Stellard2019-06-175-5/+559
| | | | | | | | | | | | Reviewers: arsenm Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, dstuttard, tpr, t-tye, hiraditya, Petar.Avramovic, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60640 llvm-svn: 363576
* Update the meeting page with papers/issues that are ready for CologneMarshall Clow2019-06-171-39/+45
| | | | llvm-svn: 363575
* Various improvements to Clang MSVC VisualizerMike Spertus2019-06-171-32/+149
| | | | | | | | This change adds/improves MSVC visualizers for many Clang types, including array types, trailing return types in function, deduction guides, a fix for OpaquePtr, etc. It also replaces all of the view(deref) with the "na" formatter, which is a better built-in natvis technique for doing the same thing. Differential Revision: https://reviews.llvm.org/D63039 llvm-svn: 363574
* [Remarks] Extend -fsave-optimization-record to specify the formatFrancis Visoiu Mistrih2019-06-1733-23/+172
| | | | | | | | | Use -fsave-optimization-record=<format> to specify a different format than the default, which is YAML. For now, only YAML is supported. llvm-svn: 363573
* [ScopInliner] Register FunctionAnalysisManagerModuleProxy.Michael Kruse2019-06-171-0/+1
| | | | | | | | | | | | FunctionAnalysisManagerModuleProxy started to be used by the AlwaysInlinerPass in r363287 and therefore had to be registered in the New PassManager. Should fix the regression tests Polly :: ScopInliner/invariant-load-func.ll Polly :: ScopInliner/simple-inline-loop.ll llvm-svn: 363572
* [X86] combineLoad - begun making the load split code more generic. NFCI.Simon Pilgrim2019-06-171-13/+12
| | | | | | | | This is currently only used for ymm->xmm splitting but we shouldn't hardcode the offsets/alignment. This is necessary for an upcoming patch to split under-aligned non-temporal vector loads. llvm-svn: 363570
* [scudo][standalone] Introduce the combined allocatorKostya Kortchinsky2019-06-175-0/+870
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The Combined allocator hold together all the other components, and provides a memory allocator interface based on various template parameters. This will be in turn used by "wrappers" that will provide the standard C and C++ memory allocation functions, but can be used as is as well. This doesn't depart significantly from the current Scudo implementation except for a few details: - Quarantine batches are now protected by a header a well; - an Allocator instance has its own TSD registry, as opposed to a static one for everybody; - a function to iterate over busy chunks has been added, for Android purposes; This also adds the associated tests, and a few default configurations for several platforms, that will likely be further tuned later on. Reviewers: morehouse, hctim, eugenis, vitalybuka Reviewed By: morehouse Subscribers: srhines, mgorny, delcypher, jfb, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D63231 llvm-svn: 363569
OpenPOWER on IntegriCloud