summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Add more examples to clang tidy checkersSylvestre Ledru2017-04-117-0/+81
| | | | | | | | | | | | | | Reviewers: alexfh Reviewed By: alexfh Subscribers: cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D31860 llvm-svn: 299920
* Add more examples to clang-format configurationSylvestre Ledru2017-04-112-9/+128
| | | | | | | | | | | | Reviewers: djasper Reviewed By: djasper Subscribers: Eugene.Zelenko, klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D31408 llvm-svn: 299919
* [IR] Fix a typo in a comment. NFCCraig Topper2017-04-111-1/+1
| | | | llvm-svn: 299918
* [InstCombine] Refinement of r299915. Only consider a ConstantVector for Neg ↵Craig Topper2017-04-111-3/+14
| | | | | | if all the elements are Undef or ConstantInt. llvm-svn: 299917
* [XRay][compiler-rt] Remove the xray_fdr_log_printer_toolDean Michael Berris2017-04-112-332/+0
| | | | | | | | | | | | | | | | | | | | Summary: We can move this functionality into LLVM's tools instead, as it no longer is strictly required for the compiler-rt testing infrastructure. It also is blocking the successful bootstrapping of the clang compiler due to a missing virtual destructor in one of the flag parsing library. Since this binary isn't critical for the XRay runtime testing effort anymore (yet), we remove it in the meantime with the hope of moving the functionality in LLVM proper instead. Reviewers: kpw, pelikan, rnk, seurer, eugenis Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D31926 llvm-svn: 299916
* [InstCombine] Support weird size element types in dyn_castNegVal.Craig Topper2017-04-113-4/+13
| | | | llvm-svn: 299915
* Exploit BasicBlock::getModule to shorten codeTobias Grosser2017-04-115-9/+5
| | | | | Suggested-by: Roman Gareev <gareevroman@gmail.com> llvm-svn: 299914
* SAdjust to recent change in constructor definition of AllocaInstTobias Grosser2017-04-113-18/+23
| | | | llvm-svn: 299913
* [LoopUnswitch] Fix a test caseSanjoy Das2017-04-111-2/+2
| | | | | | | | | | | | | | | (h/t to Chandler for pointing this out) The test in question was not at all testing what it was supposed to test. We do not //care// about placing `!make.implicit` in inner constant branch (since it will be folded away anyway). We care about placing `!make.implicit` in the outer branch that switches between either version of the loop. Having said that, it is _correct_ to leave behind the `!make.implicit` in the inner branch, but there is no need to do so. llvm-svn: 299912
* [LICM] Hoist fp division from the loops and replace by a reciprocalHal Finkel2017-04-112-0/+57
| | | | | | | | | | | When allowed, we can hoist a division out of a loop in favor of a multiplication by the reciprocal. Fixes PR32157. Patch by vit9696! Differential Revision: https://reviews.llvm.org/D30819 llvm-svn: 299911
* [PowerPC] multiply-with-overflow might use the CTR registerHal Finkel2017-04-112-9/+45
| | | | | | | | | | | | Check the legality of ISD::[US]MULO to see whether Intrinsic::[us]mul_with_overflow will legalize into a function call (and, thus, will use the CTR register). Fixes PR32485. Patch by Tim Neumann! Differential Revision: https://reviews.llvm.org/D31790 llvm-svn: 299910
* Fix a C++03 failureMarshall Clow2017-04-111-3/+3
| | | | llvm-svn: 299909
* [bugpoint] Also remove comdat's from externalized GVsHal Finkel2017-04-111-0/+1
| | | | | | | | We were removing comdats from externalized functions (function declarations can't be comdat), but were not doing the same for variable. Failure to do this would cause bugpoint to fail ("Declaration may not be in a Comdat!"). llvm-svn: 299908
* Remove some trigraphs that GCC was complaining aboutMarshall Clow2017-04-111-2/+2
| | | | llvm-svn: 299907
* [IR] Sink some AttributeListImpl methods out of headers NFCReid Kleckner2017-04-112-41/+49
| | | | llvm-svn: 299906
* Update for alloca construction changesMatt Arsenault2017-04-114-5/+17
| | | | llvm-svn: 299905
* Revert "NewGVN: Don't propagate over phi backedges where undef causes us to ↵Daniel Berlin2017-04-111-28/+6
| | | | | | | | | | have >1 value." It's not ready yet this was an accidental commit :( This reverts r299903 llvm-svn: 299904
* NewGVN: Don't propagate over phi backedges where undef causes us to have >1 ↵Daniel Berlin2017-04-111-6/+28
| | | | | | | | value. Fixes PR 32607. llvm-svn: 299903
* docs: Use the term "whole-program devirtualization" instead of "virtual ↵Peter Collingbourne2017-04-101-8/+9
| | | | | | | | | function call optimization". The former term is probably more familiar to users. Also add references to the command line flags used to enable the features described in the doc. llvm-svn: 299902
* Fix PR#32605: common_type<T> is not SFINAE-friendlyMarshall Clow2017-04-102-4/+6
| | | | llvm-svn: 299901
* Remove AttributeSetNode::get(AttributeList, unsigned) and sink constructorReid Kleckner2017-04-103-21/+19
| | | | | | | | | | | The getter was equivalent to AttributeList::getAttributes(unsigned), which seems like a better way to express getting the AttributeSet for a given index. This static helper was only used in one place anyway. The constructor doesn't benefit from inlining and doesn't need to be in a header. llvm-svn: 299900
* Reland "[IR] Make AttributeSetNode public, avoid temporary AttributeList copies"Reid Kleckner2017-04-1017-352/+356
| | | | | | | | | | | | | | | | | | | | | | | | | This re-lands r299875. I introduced a bug in Clang code responsible for replacing K&R, no prototype declarations with a real function definition with a prototype. The bug was here: // Collect any return attributes from the call. - if (oldAttrs.hasAttributes(llvm::AttributeList::ReturnIndex)) - newAttrs.push_back(llvm::AttributeList::get(newFn->getContext(), - oldAttrs.getRetAttributes())); + newAttrs.push_back(oldAttrs.getRetAttributes()); Previously getRetAttributes() carried AttributeList::ReturnIndex in its AttributeList. Now that we return the AttributeSetNode* directly, it no longer carries that index, and we call this overload with a single node: AttributeList::get(LLVMContext&, ArrayRef<AttributeSetNode*>) That aborted with an assertion on x86_32 targets. I added an explicit triple to the test and added CHECKs to help find issues like this in the future sooner. llvm-svn: 299899
* Update for alloca construction changesMatt Arsenault2017-04-101-2/+5
| | | | llvm-svn: 299898
* [ARM, x86] add tests to show possible improvement for bool math; NFCSanjay Patel2017-04-102-0/+64
| | | | llvm-svn: 299897
* [PPC64, Sanitizers] Proper stack frame for the thread spawned in internal_cloneAlex Shlyapnikov2017-04-101-24/+51
| | | | | | | | | | | | | | | Summary: Set up the proper stack frame for the thread spawned in internal_clone, the current code does not follow ABI (and causes SEGV trying to use this malformed frame). Reviewers: wschmidt Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D31555 llvm-svn: 299896
* [NewGVN] Surround with parens to clarify allegedly ambiguous precedence.Davide Italiano2017-04-101-16/+15
| | | | | | | This Placates GCC7 with -Werror. Also, clang-format the assertions while I'm here. llvm-svn: 299895
* Fix PR#32606: std::decay mishandles abominable function typesMarshall Clow2017-04-102-5/+22
| | | | llvm-svn: 299894
* [MemorySSA] We don't need to compute dominator levels anymore.Davide Italiano2017-04-102-8/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D31818 llvm-svn: 299893
* CodeGen: BlockPlacement: Don't always tail-duplicate with no other successor.Kyle Butt2017-04-103-7/+56
| | | | | | | | | | The math works out where it can actually be counter-productive. The probability calculations correctly handle the case where the alternative is 0 probability, rely on those calculations. Includes a test case that demonstrates the problem. llvm-svn: 299892
* CodeGen: BlockPlacement: Minor probability changes.Kyle Butt2017-04-103-25/+74
| | | | | | | Qin may be large, and Succ may be more frequent than BB. Take these both into account when deciding if tail-duplication is profitable. llvm-svn: 299891
* CodeGen: BranchFolding: Merge identical blocks, even if they are short.Kyle Butt2017-04-102-0/+57
| | | | | | | | Merging identical blocks when it doesn't reduce fallthrough. It is common for the blocks created from critical edge splitting to be identical. We would like to merge these blocks whenever doing so would not reduce fallthrough. llvm-svn: 299890
* Update for AllocaInst construction changesMatt Arsenault2017-04-102-3/+6
| | | | llvm-svn: 299889
* Allow DataLayout to specify addrspace for allocas.Matt Arsenault2017-04-1034-72/+382
| | | | | | | | | | | | | | | | | | | | | | | LLVM makes several assumptions about address space 0. However, alloca is presently constrained to always return this address space. There's no real way to avoid using alloca, so without this there is no way to opt out of these assumptions. The problematic assumptions include: - That the pointer size used for the stack is the same size as the code size pointer, which is also the maximum sized pointer. - That 0 is an invalid, non-dereferencable pointer value. These are problems for AMDGPU because alloca is used to implement the private address space, which uses a 32-bit index as the pointer value. Other pointers are 64-bit and behave more like LLVM's notion of generic address space. By changing the address space used for allocas, we can change our generic pointer type to be LLVM's generic pointer type which does have similar properties. llvm-svn: 299888
* Get the TOC save offset off of PPCFrameLowering rather than a separate copy ↵Eric Christopher2017-04-101-1/+1
| | | | | | of the same data. llvm-svn: 299887
* Bitcode: Merge the code for parsing global value module codes in the summary ↵Peter Collingbourne2017-04-101-26/+6
| | | | | | | | | | | bitcode reader. NFCI. This code will need to be taught to handle string tables and it's better if there is only one copy of it. Differential Revision: https://reviews.llvm.org/D31829 llvm-svn: 299886
* [tsan] Fall-back to IPv6 if IPv4 is not available.Vitaly Buka2017-04-102-28/+62
| | | | | | | | | | Reviewers: eugenis Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D31897 llvm-svn: 299885
* [msan] Choose in runtime if IPv4 or IPv6 are supported.Vitaly Buka2017-04-102-9/+54
| | | | | | | | | | | | Summary: This reverts commit cab5051c691ce27a7ffac41e8e76ceb222ad9549. Reviewers: eugenis Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D31894 llvm-svn: 299884
* Emit less compiler optimization remarks in samplepgo to reduce a call to ↵Dehao Chen2017-04-103-5/+3
| | | | | | | | | | | | | | | | findCalleeFunctionSamples which is going to be refactored. Summary: Now the SamplePGO support is more stable, we do not need so many verbose optimization remarks emitted. Reviewers: dnovillo, davidxl Reviewed By: davidxl Subscribers: fhahn, llvm-commits Differential Revision: https://reviews.llvm.org/D31826 llvm-svn: 299883
* [GVNHoist] Call isGuaranteedToTransferExecutionToSuccessor on each instructionGeoff Berry2017-04-102-17/+76
| | | | | | | | | | | w.r.t. https://bugs.llvm.org/show_bug.cgi?id=32153 The consensus seems to be isGuaranteedToTransferExecutionToSuccessor should be called for each function. Patch by Aditya Kumar Differential Revision: https://reviews.llvm.org/D31035 llvm-svn: 299882
* Revert "[asan] Fix dead stripping of globals on Linux (compiler-rt)."Evgeniy Stepanov2017-04-108-80/+14
| | | | | | This reverts r299698, which caused a big increase in object file size. llvm-svn: 299881
* Revert "[asan] Put ctor/dtor in comdat."Evgeniy Stepanov2017-04-103-54/+10
| | | | | | This reverts commit r299696, which is causing mysterious test failures. llvm-svn: 299880
* Revert "[asan] Fix dead stripping of globals on Linux."Evgeniy Stepanov2017-04-107-163/+48
| | | | | | This reverts commit r299697, which caused a big increase in object file size. llvm-svn: 299879
* Revert "[IR] Make AttributeSetNode public, avoid temporary AttributeList copies"Reid Kleckner2017-04-1015-343/+340
| | | | | | | This reverts r299875. A Linux bot came back with a test failure: http://bb.pgr.jp/builders/test-clang-i686-linux-RA/builds/741/steps/test_clang/logs/Clang%20%3A%3A%20CodeGen__2006-05-19-SingleEltReturn.c llvm-svn: 299878
* Update for lifetime intrinsic signature changeMatt Arsenault2017-04-1018-178/+180
| | | | llvm-svn: 299877
* Add address space mangling to lifetime intrinsicsMatt Arsenault2017-04-10117-813/+839
| | | | | | In preparation for allowing allocas to have non-0 addrspace. llvm-svn: 299876
* [IR] Make AttributeSetNode public, avoid temporary AttributeList copiesReid Kleckner2017-04-1015-340/+343
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: AttributeList::get(Fn|Ret|Param)Attributes no longer creates a temporary AttributeList just to hide the AttributeSetNode type. I've also added a factory method to create AttributeLists from a parallel array of AttributeSetNodes. I think this simplifies construction of AttributeLists when rewriting function prototypes. Previously we would test if a particular index had attributes, and conditionally add a temporary attribute list to a vector. Now the attribute set vector is parallel to the argument vector already that these passes already construct. My long term vision is to wrap AttributeSetNode* inside an AttributeSet type that holds the enum attributes, but that will come in a follow up change. I haven't done any performance measurements for this change because profiling hasn't shown that any of the affected code is hot. Reviewers: pete, chandlerc, sanjoy, hfinkel Reviewed By: pete Subscribers: jfb, llvm-commits Differential Revision: https://reviews.llvm.org/D31198 llvm-svn: 299875
* Remove svn:eol-style properties from some files so 'git llvm push' works for ↵Reid Kleckner2017-04-100-0/+0
| | | | | | them llvm-svn: 299874
* Fix signed / unsigned comparison warnings.Zachary Turner2017-04-101-2/+2
| | | | llvm-svn: 299873
* [mips] Use Triple::isLittleEndian to check endianness. NFCSimon Atanasyan2017-04-101-3/+1
| | | | llvm-svn: 299872
* [InstCombine] improve variable names; NFCISanjay Patel2017-04-101-34/+34
| | | | llvm-svn: 299871
OpenPOWER on IntegriCloud