summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [Polly] Add handling of Top Level RegionsPhilip Pfaffe2017-05-245-16/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: My goal is to make the newly added `AllowWholeFunctions` options more usable/powerful. The changes to ScopBuilder.cpp are exclusively checks to prevent `Region.getExit()` from being dereferenced, since Top Level Regions (TLRs) don't have an exit block. In ScopDetection's `isValidCFG`, I removed a check that disallowed ReturnInstructions to have return values. This might of course have been intentional, so I would welcome your feedback on this and maybe a small explanation why return values are forbidden. Maybe it can be done but needs more changes elsewhere? The remaining changes in ScopDetection are simply to consider the AllowWholeFunctions option in more places, i.e. allow TLRs when it is set and once again avoid derefererncing `getExit()` if it doesn't exist. Finally, in ScopHelper.cpp I extended `polly::isErrorBlock` to handle regions without exit blocks as well: The original check was if a given BasicBlock dominates all predecessors of the exit block. Therefore I do the same for TLRs by regarding all BasicBlocks terminating with a ReturnInst as predecessors of a "virtual" function exit block. Patch by: Lukas Boehm Reviewers: philip.pfaffe, grosser, Meinersbur Reviewed By: grosser Subscribers: pollydev, llvm-commits, bollu Tags: #polly Differential Revision: https://reviews.llvm.org/D33411 llvm-svn: 303790
* Address follow-up feedback for r303712Argyrios Kyrtzidis2017-05-243-6/+5
| | | | llvm-svn: 303789
* Replace std::call_once with llvm:call_onceKamil Rytarowski2017-05-242-2/+4
| | | | | | | | | | | | | | | | | | | | | Summary: This is required on some platforms, as GNU libstdc++ std::call_once is known to be buggy. This fixes operation of LLD on at least NetBSD and perhaps OpenBSD and Linux PowerPC. The same change has been introduced to LLVM and LLDB. Reviewers: ruiu Reviewed By: ruiu Subscribers: emaste, #lld Tags: #lld Differential Revision: https://reviews.llvm.org/D33508 llvm-svn: 303788
* Simplify a variable type by using StringRef instead of CachedHashStringRef.Rui Ueyama2017-05-244-20/+14
| | | | | | | | | | A variable `ComdatGroup` is not supposed to contain a large number of items. Even when linking clang, it ends up having only 300K strings. It doesn't make sense to use CachedHashStringRef for this hash table. This patch has neutral or slightly positive impact on performance while reducing code complexity. llvm-svn: 303787
* Fix one test case faiulre in commit 303766.Tony Jiang2017-05-241-9/+9
| | | | | | | | It is clean when I build boostrap and run make checkall on my machine, I guess it could be I only build bootstrap with assert, while the buildbots may build without asserts, which could cause the difference. llvm-svn: 303786
* Prevent UBSan report in CrashRecovery testsVitaly Buka2017-05-241-1/+1
| | | | | | Reverted by mistake with r303783. llvm-svn: 303785
* Move writeTo to OutputSectionCommand.Rafael Espindola2017-05-246-103/+118
| | | | | | | | | | | | This reduces how many times we have to map from OutputSection to OutputSectionCommand. It is a required step to moving clearOutputSections earlier. In order to always use writeTo in OutputSectionCommand we have to call fabricateDefaultCommands for -r links and move section compression after it. llvm-svn: 303784
* Revert "Attempt to pacify ASan and UBSan reports in CrashRecovery tests"Vitaly Buka2017-05-241-5/+1
| | | | | | | | It's not needed after r303729. This reverts commit r303311. llvm-svn: 303783
* Fix a couple of typos in memory intrinsic optimization output (NFC)Teresa Johnson2017-05-243-3/+3
| | | | | | s/instrinsic/intrinsic llvm-svn: 303782
* Move clearOutputSections earlier. NFC.Rafael Espindola2017-05-241-1/+1
| | | | llvm-svn: 303781
* P9: D-form vector load/store. Differential Revision: ↵Zaara Syeda2017-05-2411-227/+243
| | | | | | https://reviews.llvm.org/D33248 llvm-svn: 303780
* [InstCombine] Use less bitwise operations to handle Instruction::SExt in ↵Craig Topper2017-05-241-19/+14
| | | | | | | | | | | | SimplifyDemandedUseBits. Other improvements. The current code created a NewBits mask and used it as a mask several times. One of them just before a call to trunc making it unnecessary. A call to getActiveBits can get us the same information for the case. We also ORed with this mask later when we should have just sign extended the known bits. We also called trunc on the guaranteed to be zero KnownZeros/Ones masks entering this code. Creating appropriately sized temporary APInts is probably better. Differential Revision: https://reviews.llvm.org/D32098 llvm-svn: 303779
* Move machine-cse-physreg.mir to test/CodeGen/ThumbKrzysztof Parzyszek2017-05-241-0/+0
| | | | llvm-svn: 303778
* Rewrite badly-formatted switch. NFC.Rui Ueyama2017-05-241-8/+11
| | | | llvm-svn: 303777
* Make key-value types explicit. NFC.Rui Ueyama2017-05-241-3/+8
| | | | llvm-svn: 303776
* Change the control flow so that the function is a bit more readable. NFC.Rui Ueyama2017-05-241-6/+4
| | | | llvm-svn: 303775
* [InstSimplify] Simplify uadd/sadd/umul/smul with overflow intrinsics when ↵Craig Topper2017-05-242-3/+53
| | | | | | | | | | | | | | | | the Zero or Undef is on the LHS. Summary: This code was migrated from InstCombine a few years ago. InstCombine had nearby code that would move Constants to the RHS for these, but InstSimplify doesn't have such code on this path. Reviewers: spatel, majnemer, davide Reviewed By: spatel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D33473 llvm-svn: 303774
* [ValueTracking] Convert most of the calls to computeKnownBits to use the ↵Craig Topper2017-05-2413-82/+34
| | | | | | | | | | version that returns the KnownBits object. This continues the changes started when computeSignBit was replaced with this new version of computeKnowBits. Differential Revision: https://reviews.llvm.org/D33431 llvm-svn: 303773
* [ValueTracking] Add OptimizationRemarkEmitter to the other signature for ↵Craig Topper2017-05-242-3/+6
| | | | | | | | commuteKnownBits. This is needed for an upcoming patch. llvm-svn: 303772
* Revert r291254: [AArch64] Reduce vector insert/extract cost for FalkorMatthew Simpson2017-05-242-27/+0
| | | | | | | The default vector insert/extract cost is more profitable on Falkor than the reduced cost. llvm-svn: 303771
* Do not track section types of previous sections, always use PROGBITS for ↵Dmitry Mikulin2017-05-242-3/+10
| | | | | | | | dummy sections. Fix for PR33029. llvm-svn: 303770
* Add some tips on benchmarking.Rafael Espindola2017-05-242-0/+88
| | | | llvm-svn: 303769
* [OPENMP] Allow value of thread local variables in target regions.Alexey Bataev2017-05-242-21/+27
| | | | | | | | | If the variable is marked as TLS variable and target device does not support TLS, the error is emitted for the variable even if it is not used in target regions. Patch fixes this and allows to use the values of the TLS variables in target regions. llvm-svn: 303768
* [AMDGPU] Prevent too large store merges in AMDGPU Subtargets. NFCI.Nirav Dave2017-05-244-0/+24
| | | | | | | | | Various address spaces on the SI and R600 subtargets have stricter limits on memory access size that other address spaces. Use canMergeStoresTo predicate to prevent the DAGCombiner from creating these stores as they will be split up during legalization. llvm-svn: 303767
* [PowerPC] Implement vec_xxsldwi builtin.Tony Jiang2017-05-246-0/+107
| | | | | | | | | | The vec_xxsldwi builtin is missing from altivec.h. This has been requested by developers working on libvpx for VP9 support for Google. The patch fixes PR: https://bugs.llvm.org/show_bug.cgi?id=32653 Differential Revision: https://reviews.llvm.org/D33236 llvm-svn: 303766
* Allow armv{7,7s,7k,7m,7em} buildsJonathan Roelofs2017-05-2418-1/+39
| | | | llvm-svn: 303765
* [coroutines] Make generic lambda coroutines workGor Nishanov2017-05-243-0/+72
| | | | | | | | | | | | | | | | Summary: 1. Coroutine cannot be constexpr (added a check in SemaLambda.cpp not to mark coroutine as constexpr) 2. TransformCoroutineBodyStmt should transform ResultDecl and ReturnStmt Reviewers: rsmith, GorNishanov Reviewed By: GorNishanov Subscribers: EricWF, cfe-commits Differential Revision: https://reviews.llvm.org/D33498 llvm-svn: 303764
* [LV] Update type in cost model for scalarizationMatthew Simpson2017-05-242-6/+41
| | | | | | | | | | | | | | For non-uniform instructions marked for scalarization, we should update `VectorTy` when computing instruction costs to reflect the scalar type. In addition to determining instruction costs, this type is also used to signal that all instructions in the loop will be scalarized. This currently affects memory instructions and non-pointer induction variables and their updates. (We also mark GEPs scalar after vectorization, but their cost is computed together with memory instructions.) For scalarized induction updates, this patch also scales the scalar cost by the vectorization factor, corresponding to each induction step. llvm-svn: 303763
* [DeLICM] Partial writes for PHIs.Michael Kruse2017-05-244-1/+173
| | | | | | | | | | | | | | Enable the use for partial writes for PHI write accesses with a switch. This simply skips the test for whether a PHI write would be partial. The analog test for partial value writes also protects for partial reads which we do not support (yet). It is possible to test for partial reads separately such that we could skip the partial write check as well. In case this shows up to be useful, I can implement it as well. Differential Revision: https://reviews.llvm.org/D33487 llvm-svn: 303762
* Warn about uses of `@available` that can't suppress theAlex Lorenz2017-05-245-2/+29
| | | | | | | | | | -Wunguarded-availability warnings rdar://32306520 Differential Revision: https://reviews.llvm.org/D33450 llvm-svn: 303761
* [PowerPC] Implement vec_xxpermdi builtin.Tony Jiang2017-05-248-1/+169
| | | | | | | | | | The vec_xxpermdi builtin is missing from altivec.h. This has been requested by developers working on libvpx for VP9 support for Google. The patch fixes PR: https://bugs.llvm.org/show_bug.cgi?id=32653 Differential Revision: https://reviews.llvm.org/D33053 llvm-svn: 303760
* [JSONImporter] misses checks whether the data it imports makes sense.Michael Kruse2017-05-2441-7/+2084
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this patch, the JSONImporter did not verify if the data it loads were correct or not (Bug llvm.org/PR32543). I add some checks in the JSONImporter class and some test cases. Here are the checks (and test cases) I added : JSONImporter::importContext - The "context" key does not exist. - The context was not parsed successfully by ISL. - The isl_set has the wrong number of parameters. - The isl_set is not a parameter set. JSONImporter::importSchedule - The "statements" key does not exist. - There is not the right number of statement in the file. - The "schedule" key does not exist. - The schedule was not parsed successfully by ISL. JSONImporter::importAccesses - The "statements" key does not exist. - There is not the right number of statement in the file. - The "accesses" key does not exist. - There is not the right number of memory accesses in the file. - The "relation" key does not exist. - The memory access was not parsed successfully by ISL. JSONImporter::areArraysEqual - The "type" key does not exist. - The "sizes" key does not exist. - The "name" key does not exist. JSONImporter::importArrays /!\ Do not check if there is an key name "arrays" because it is not considered as an error. All checks are already in place or implemented in JSONImporter::areArraysEqual. Contributed-by: Nicolas Bonfante <nicolas.bonfante@insa-lyon.fr> Differential Revision: https://reviews.llvm.org/D32739 llvm-svn: 303759
* [MSP430] Fix PR33050: Don't use ADD16ri to lower FrameIndex.Vadzim Dambrouski2017-05-244-4/+9
| | | | | | | | | Use ADDframe pseudo instruction instead. This will fix machine verifier error, and will help to fix PR32146. Differential Revision: https://reviews.llvm.org/D33452 llvm-svn: 303758
* [sanitizer] [SystemZ] Update CVE-2016-2143 check for Ubuntu 16.04Ulrich Weigand2017-05-241-0/+7
| | | | | | | The Ubuntu 16.04 kernel contains a backport of the CVE check starting with version 4.4.0-13. Update FixedCVE_2016_2143. llvm-svn: 303757
* Driver must return non-zero code on errors in command lineSerge Pavlov2017-05-2416-82/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is recommit of r302775, reverted in r302777 due to a fail in clang-tidy. Original mesage is below. Now if clang driver is given wrong arguments, in some cases it continues execution and returns zero code. This change fixes this behavior. The fix revealed some errors in clang test set. File test/Driver/gfortran.f90 added in r118203 checks forwarding gfortran flags to GCC. Now driver reports error on this file, because the option -working-directory implemented in clang differs from the option with the same name implemented in gfortran, in clang the option requires argument, in gfortran does not. In the file test/Driver/arm-darwin-builtin.c clang is called with options -fbuiltin-strcat and -fbuiltin-strcpy. These option were removed in r191435 and now clang reports error on this test. File arm-default-build-attributes.s uses option -verify, which is not supported by driver, it is cc1 option. Similarly, the file split-debug.h uses options -fmodules-embed-all-files and -fmodule-format=obj, which are not supported by driver. Other revealed errors are mainly mistypes. Differential Revision: https://reviews.llvm.org/D33013 llvm-svn: 303756
* [InstCombine] add tests to show potential missing folds; NFCSanjay Patel2017-05-241-0/+39
| | | | | | | | | As noted in https://bugs.llvm.org/show_bug.cgi?id=33138 and the comments, there are multiple ways to view this. If we choose not to solve this in InstCombine, these tests will serve as documentation of that choice. llvm-svn: 303755
* Revert "AMDGPU: Fold CI-specific complex SMRD patterns into existing complex ↵Marek Olsak2017-05-244-18/+51
| | | | | | | | | | | patterns" This reverts commit e065977c4b5f68ab845400b256f6a3822b1325fa. It doesn't work. S_LOAD_DWORD_IMM_ci and friends aren't selected by any of the patterns, so it was putting 32-bit literals into the 8-bit field. llvm-svn: 303754
* Generalize two diagnostic messages to take function name as parameter.Tony Jiang2017-05-242-7/+10
| | | | llvm-svn: 303753
* [coroutines] Improved diagnostics when unhandled_exception is missing in the ↵Gor Nishanov2017-05-243-5/+9
| | | | | | | | | | | | | | | | promise_type Summary: Now we helpfully provide a note pointing at the promise_type in question. Reviewers: EricWF, GorNishanov Reviewed By: GorNishanov Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33481 llvm-svn: 303752
* [index] The references to explicit class properties should be recordedAlex Lorenz2017-05-242-0/+21
| | | | | | rdar://32376363 llvm-svn: 303751
* [InstCombine] add tests to document bitcast + bitwise-logic behavior; NFCSanjay Patel2017-05-241-0/+45
| | | | | | | | The solution for PR26702 ( https://bugs.llvm.org/show_bug.cgi?id=26702 ) added a canonicalization rule, but the minimal regression tests don't demonstrate how that rule interacts with other folds. llvm-svn: 303750
* [coroutines] [NFC] Add tests for return_void, unhandled_exception and ↵Gor Nishanov2017-05-244-0/+238
| | | | | | | | | | | | | | | | | | | promise dtor Summary: * Test that coroutine promise destructor is called. * Test that we call return_void on fallthrough * Test that we call unhandled exception in a try catch surrounding the body Reviewers: EricWF, GorNishanov Reviewed By: GorNishanov Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33479 llvm-svn: 303748
* Revert "[SCEV] Do not fold dominated SCEVUnknown into AddRecExpr start"Diana Picus2017-05-247-180/+20
| | | | | | This reverts commit r303730 because it broke all the buildbots. llvm-svn: 303747
* [Hexagon] Fix comment in HexagonPacketizer::runOnMachineFunctionKrzysztof Parzyszek2017-05-241-2/+2
| | | | | | | | Patch by Wei-Ren Chen. Differential Revision: https://reviews.llvm.org/D33439 llvm-svn: 303745
* [LoopVectorizer] Let target prefer scalar addressing computations.Jonas Paulsson2017-05-246-0/+160
| | | | | | | | | | | | | | | | | | | | | | The loop vectorizer usually vectorizes any instruction it can and then extracts the elements for a scalarized use. On SystemZ, all elements containing addresses must be extracted into address registers (GRs). Since this extraction is not free, it is better to have the address in a suitable register to begin with. By forcing address arithmetic instructions and loads of addresses to be scalar after vectorization, two benefits result: * No need to extract the register * LSR optimizations trigger (LSR isn't handling vector addresses currently) Benchmarking show improvements on SystemZ with this new behaviour. Any other target could try this by returning false in the new hook prefersVectorizedAddressing(). Review: Renato Golin, Elena Demikhovsky, Ulrich Weigand https://reviews.llvm.org/D32422 llvm-svn: 303744
* [SystemZ] Fix register modelling in expandLoadStackGuard()Jonas Paulsson2017-05-241-16/+14
| | | | | | | | EXPENSIVE_CHECKS found this bug (https://bugs.llvm.org/show_bug.cgi?id=33047), which this patch fixes. The EAR instruction defines a GR32, not a GR64. Review: Ulrich Weigand llvm-svn: 303743
* [clang-format] Remove unused using directive, NFCKrasimir Georgiev2017-05-241-1/+0
| | | | llvm-svn: 303742
* Method loadFromCommandLine should be able to report errorsSerge Pavlov2017-05-246-31/+61
| | | | | | | | | | | | | | | Now FixedCompilationDatabase::loadFromCommandLine has no means to report which error occurred if it fails to create compilation object. This is a block for implementing D33013, because after that change driver will refuse to create compilation if command line contains erroneous options. This change adds additional argument to loadFromCommandLine, which is assigned error message text if compilation object was not created. This is the same way as other methods of CompilationDatabase report failure. Differential Revision: https://reviews.llvm.org/D33272 llvm-svn: 303741
* Revert "RunThreadPlan: Fix halting logic in IgnoreBreakpoints = false"Pavel Labath2017-05-242-80/+76
| | | | | | | This reverts commit r303732, as it introduces a regression in TestLoadUnload on android. llvm-svn: 303740
* clang-format: Introduce BreakConstructorInitializers optionFrancois Ferrand2017-05-245-39/+283
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This option replaces the BreakConstructorInitializersBeforeComma option with an enum, thus introducing a mode where the colon stays on the same line as constructor declaration: // When it fits on line: Constructor() : initializer1(), initializer2() {} // When it does not fit: Constructor() : initializer1(), initializer2() {} // When ConstructorInitializerAllOnOneLineOrOnePerLine = true: Constructor() : initializer1(), initializer2() {} Reviewers: krasimir, djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D32479 llvm-svn: 303739
OpenPOWER on IntegriCloud