summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [LV] Report multiple reasons for not vectorizing under allowExtraAnalysisAyal Zaks2017-05-233-37/+153
| | | | | | | | | | | | | | | | | | | | The default behavior of -Rpass-analysis=loop-vectorizer is to report only the first reason encountered for not vectorizing, if one is found, at which time the vectorizer aborts its handling of the loop. This patch allows multiple reasons for not vectorizing to be identified and reported, at the potential expense of additional compile-time, under allowExtraAnalysis which can currently be turned on by Clang's -fsave-optimization-record and opt's -pass-remarks-missed. Removed from LoopVectorizationLegality::canVectorize() the redundant checking and reporting if we CantComputeNumberOfIterations, as LAI::canAnalyzeLoop() also does that. This redundancy is caught by a lit test once multiple reasons are reported. Patch initially developed by Dror Barak. Differential Revision: https://reviews.llvm.org/D33396 llvm-svn: 303613
* [ScopInfo] Translate buildMemIntrinsicAccessRelation to isl C++ [NFC]Tobias Grosser2017-05-231-16/+16
| | | | llvm-svn: 303612
* [ScopInfo] Translate assumeNoOutOfBound to isl C++ [NFC]Tobias Grosser2017-05-231-26/+19
| | | | llvm-svn: 303611
* [ScopInfo] Translate applyAndSetFAD to isl C++Tobias Grosser2017-05-231-10/+6
| | | | llvm-svn: 303610
* libDebugInfo: Support symbolizing using DWP filesDavid Blaikie2017-05-236-13/+59
| | | | llvm-svn: 303609
* [ScopInfo] Translate isReadOnly to isl C++Tobias Grosser2017-05-231-8/+4
| | | | llvm-svn: 303608
* [AArch64] Fix PRR33100.Akira Hatanaka2017-05-232-7/+29
| | | | | | | | | | | | | This commit fixes a bug introduced in r301019 where optimizeLogicalImm would replace a logical node's immediate operand that was CSE'd and was also an operand of another node. This commit fixes the bug by replacing the logical node instead of its immediate operand. rdar://problem/32295276 llvm-svn: 303607
* Update expected result for or-branch.ll . NFCAmaury Sechet2017-05-231-13/+53
| | | | llvm-svn: 303606
* [coroutines] Skip over passthrough operator co_awaitGor Nishanov2017-05-232-0/+21
| | | | | | https://reviews.llvm.org/D31627 llvm-svn: 303605
* Added LLVM_FALLTHROUGH to address gcc warning: this statement may fall through.Galina Kistanova2017-05-231-0/+1
| | | | llvm-svn: 303604
* [coroutines] Add emission of initial and final suspendsGor Nishanov2017-05-233-11/+58
| | | | | | https://reviews.llvm.org/D31608 llvm-svn: 303603
* Cosmetic. Added braces to address gcc warning: suggest explicit braces to ↵Galina Kistanova2017-05-231-4/+8
| | | | | | avoid ambiguous 'else' [-Wdangling-else]. llvm-svn: 303602
* TypeStreamMerger.h: Fix a \param in r303577. [-Wdocumentation]NAKAMURA Takumi2017-05-231-1/+1
| | | | llvm-svn: 303601
* [ScopInfo] Simplify domains earlyTobias Grosser2017-05-232-0/+380
| | | | | | | | | | | | | This speeds up scop modeling for scops with many redundent existentially quantified constraints. For the attached test case, this change reduces scop modeling time from minutes (hours?) to 0.15 seconds. This change resolves a compilation timeout on the AOSP build. Thanks Eli for reporting _and_ reducing the test case! Reported-by: Eli Friedman <efriedma@codeaurora.org> llvm-svn: 303600
* [coroutines] Add support for deallocation elisionGor Nishanov2017-05-232-8/+58
| | | | | | | | | | Wrap deallocation code with: if (auto *mem = coro.free()) Deallocate When backend decides to elide allocations it will replace coro.free with nullptr to suppress deallocation code. llvm-svn: 303599
* [coroutines] Replace all coro.frame builtins with an SSA value of coro.beginGor Nishanov2017-05-234-23/+39
| | | | | | | | SemaCoroutine forms expressions referring to the coroutine frame of the enclosing coroutine using coro.frame builtin. During codegen, we emit llvm.coro.begin intrinsic that returns the address of the coroutine frame. When coro.frame is emitted, we replace it with SSA value of coro.begin. llvm-svn: 303598
* Added LLVM_FALLTHROUGH to address gcc warning: this statement may fall through.Galina Kistanova2017-05-231-0/+4
| | | | llvm-svn: 303597
* [coroutines] Add support for allocation elisionGor Nishanov2017-05-232-4/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: We wrap allocation code so that backend can elide it if necessary. llvm.coro.alloc intrinsic returns true, when allocation is needed and false otherwise. ``` %NeedAlloc = call i1 @llvm.coro.alloc(token %2) br i1 %NeedAlloc, label %AllocBB, label %InitBB AllocBB: %5 = call i64 @llvm.coro.size.i64() %call = call i8* @_Znwm(i64 %5) ; operator new br label %InitBB InitBB: %Phi = phi i8* [ null, %0 ], [ %call, %4 ] call i8* @llvm.coro.begin(token %2, i8* %Phi) ``` Reviewers: majnemer, EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D31584 llvm-svn: 303596
* Added LLVM_FALLTHROUGH to address gcc warning: this statement may fall through.Galina Kistanova2017-05-231-0/+1
| | | | llvm-svn: 303595
* [NFC, Refactor] Modernize TemplateIdAnnotation using TrailingObjectsFaisal Vali2017-05-234-66/+82
| | | | | | | | | | A refactoring of TemplateIdAnnotation that uses TrailingObjects to create a variably-sized object on the heap. https://reviews.llvm.org/D31414 Thanks to Aaron B for the review! llvm-svn: 303594
* Adjust clang test for r303590Teresa Johnson2017-05-231-4/+9
| | | | | | | Forgot to commit this separately from the llvm change to use a new module flag type for pic and pie levels. Should fix the bot errors llvm-svn: 303593
* FIX: Remove debugging assert left in previous commitDavid Blaikie2017-05-231-1/+0
| | | | | | Sorry for the bot noise. llvm-svn: 303592
* libDebugInfo: Avoid independently parsing the same .dwo file for two ↵David Blaikie2017-05-234-38/+47
| | | | | | | | | separate CUs residing there NFC, just an optimization. Will be building on this for DWP support shortly. llvm-svn: 303591
* Support for taking the max of module flags when linking, use for PIE/PICTeresa Johnson2017-05-237-14/+43
| | | | | | | | | | | | | | | | | | | | | | Summary: Add Max ModFlagBehavior, which can be used to take the max of two module flag values when merging modules. Use it for the PIE and PIC levels. This avoids an error when we try to import from a module built -fpic into a module built -fPIC, for example. For both PIE and PIC levels, this will be legal, since the code generation gets more conservative as the level is increased. Therefore we can take the max instead of somehow trying to block importing between modules compiled with different levels. Reviewers: tmsriram, pcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D33418 llvm-svn: 303590
* Add option to include multiple lines in snippets.Richard Smith2017-05-226-88/+404
| | | | | | | | | | | | When a diagnostic includes a highlighted range spanning multiple lines, clang now supports printing out multiple lines of context if necessary to show the highlighted ranges. This is not yet exposed in the driver, but can be enabled by "-Xclang -fcaret-diagnostics-max-lines -Xclang N". This is experimental until we can find out whether it works well in practice, and if so, what a good default for the maximum number of lines is. llvm-svn: 303589
* [InstSimplify] Fix the indentation throughout the interface header file.Craig Topper2017-05-221-135/+134
| | | | | | | | The forward declarations and the SimplifyQuery class at the beginning of the namespace weren't indented. But the closing brace for SimplifyQuery and everything after it were indented. This commit makes the whole file consistent to no identation per coding standards. The signature of every function in this file changed a few weeks ago so this isn't a big disturbance to the revision history. llvm-svn: 303588
* [NewPM] Fix an innocent but silly typo. Reported by Craig Topper.Davide Italiano2017-05-221-1/+1
| | | | llvm-svn: 303587
* [NewPM] Add a temporary cl::opt() to test NewGVN.Davide Italiano2017-05-221-2/+13
| | | | llvm-svn: 303586
* Added LLVM_FALLTHROUGH to address gcc warning: this statement may fall through.Galina Kistanova2017-05-221-0/+1
| | | | llvm-svn: 303585
* [coroutines] Fix coro-eh-cleanup.cpp testGor Nishanov2017-05-221-1/+1
| | | | llvm-svn: 303584
* [coroutines] Wrap the body of the coroutine in try-catchGor Nishanov2017-05-226-21/+125
| | | | | | | | | | | | | | | | | | | | | | Summary: If unhandled_exception member function is present in the coroutine promise, wrap the body of the coroutine in: ``` try { body } catch(...) { promise.unhandled_exception(); } ``` Reviewers: EricWF, rnk, rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D31692 llvm-svn: 303583
* Give files from #line the characteristics of the current fileReid Kleckner2017-05-229-104/+66
| | | | | | | | | | This allows #line directives to appear in system headers that have code that clang would normally warn on. This is compatible with GCC, which is easy to test by running `gcc -E`. Fixes PR30752 llvm-svn: 303582
* [CodeGen] Fix uninitialized variables exposed by r303084Vitaly Buka2017-05-221-2/+2
| | | | | | | All other calls of analyzeBranch reset PredTBB and PredFBB, so I assume it's expected behavior. llvm-svn: 303581
* InstructionSimplify: don't speculate about Constants changing.Tim Northover2017-05-222-0/+43
| | | | | | | | | | When presented with an icmp/select pair, we can end up asking what would happen if we replaced one constant with another in an instruction. This is a mistake, while non-constant Values could become a constant, constants cannot change and trying to do so can lead to completely invalid IR (a GEP referencing a non-existant field in the original case). llvm-svn: 303580
* [lld] Infer relocation model from module flags in relocatable LTO link.Evgeniy Stepanov2017-05-223-1/+63
| | | | | | Fix for PR33096. llvm-svn: 303579
* Infer relocation model from module flags in relocatable LTO link.Evgeniy Stepanov2017-05-225-12/+85
| | | | | | Fix for PR33096. llvm-svn: 303578
* Implement various flavors of type merging.Zachary Turner2017-05-2216-95/+685
| | | | | | | | | | | | | | Previous algotirhm assumed that types and ids are in a single unified stream. For inputs that come from object files, this is the case. But if the input is already a PDB, or is the result of a previous merge, then the types and ids will already have been split up, in which case we need an algorithm that can accept operate on independent streams of types and ids that refer across stream boundaries to each other. Differential Revision: https://reviews.llvm.org/D33417 llvm-svn: 303577
* Make TypeSerializer's StringMap use the same allocator.Zachary Turner2017-05-226-46/+26
| | | | llvm-svn: 303576
* Don't generate line&scope debug info for meta-instructions.Adrian Prantl2017-05-226-22/+154
| | | | | | | | | | | | | | | MachineInstructions that don't generate any code (such as IMPLICIT_DEFs) should not generate any debug info either. Fixes PR33107. https://bugs.llvm.org/show_bug.cgi?id=33107 This reapplies r303566 without any modifications. The stage2 build failures persisted even after reverting this patch, and looking back through history, it looks like these tests are flaky. llvm-svn: 303575
* Fix update VP metadata after inlining for instrumentation PGOTeresa Johnson2017-05-223-3/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: With instrumentation profiling, when updating the VP metadata after an inline, VP metadata on the inlined copy was inadvertantly having all counts zeroed out. This was causing indirect calls from code inlined during the call step to be marked as cold in the ThinLTO summaries and not imported. The CallerBFI needs to be passed down so that the CallSiteCount can be computed from the profile summary info. With Sample PGO this was working since the count is extracted from the branch weight metadata on the call being inlined (even before we stopped looking at metadata for non-sample PGO in r302844 this largely wasn't working for instrumentation PGO since only promoted indirect calls would be getting inlined and have the metadata). Added an instrumentation PGO test and renamed the sample PGO test. Reviewers: danielcdh, eraman Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D33389 llvm-svn: 303574
* [coroutines] Build GRO declaration and return GRO statementGor Nishanov2017-05-229-29/+208
| | | | | | | | | | | | | | | | | | Summary: 1. build declaration of the gro local variable that keeps the result of get_return_object. 2. build return statement returning the gro variable 3. emit them during CodeGen 4. sema and CodeGen tests updated Reviewers: EricWF, rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D31646 llvm-svn: 303573
* [Hexagon] Fix definitions of vector predicate loads and storesKrzysztof Parzyszek2017-05-221-22/+17
| | | | | | This fixes http://llvm.org/PR33048. llvm-svn: 303572
* [DataLayout] Add llvm_unreachable to the default of a nested switch ↵Craig Topper2017-05-221-1/+1
| | | | | | statement that covers all values given to it by the outer switch. NFC llvm-svn: 303571
* Revert "Don't generate line&scope debug info for meta-instructions."Adrian Prantl2017-05-226-154/+22
| | | | | | This reverts commit r303566 while investigating a stage2 buildbot failure. llvm-svn: 303570
* [AMDGPU] Narrow lshl from 64 to 32 bit if possibleStanislav Mekhanoshin2017-05-2214-37/+105
| | | | | | | | | Turn expensive 64 bit shift into 32 bit if shift does not overflow int: shl (ext x) => zext (shl x) Differential Revision: https://reviews.llvm.org/D33367 llvm-svn: 303569
* [index] Index the default template parameter valuesAlex Lorenz2017-05-222-0/+105
| | | | | | rdar://32323724 llvm-svn: 303568
* [PartialInlining] Add internal options to enable partial inlining in pass ↵Xinliang David Li2017-05-222-2/+17
| | | | | | | | | | | pipeline (off by default) 1. Legacy: -mllvm -enable-partial-inlining 2. New: -mllvm -enable-npm-partial-inlining -fexperimental-new-pass-manager Differential Revision: http://reviews.llvm.org/D33382 llvm-svn: 303567
* Don't generate line&scope debug info for meta-instructions.Adrian Prantl2017-05-226-22/+154
| | | | | | | | | | | MachineInstructions that don't generate any code (such as IMPLICIT_DEFs) should not generate any debug info either. Fixes PR33107. https://bugs.llvm.org/show_bug.cgi?id=33107 llvm-svn: 303566
* [mips] Add one more check to the micromips attribute test case. NFCSimon Atanasyan2017-05-221-0/+2
| | | | llvm-svn: 303565
* [mips] Quote command line options with `` in the micromips attribute ↵Simon Atanasyan2017-05-221-1/+1
| | | | | | description. NFC llvm-svn: 303564
OpenPOWER on IntegriCloud