summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* [X86][SSE] Add initial <2 x half> tests for PR31088Simon Pilgrim2017-04-291-0/+105
| | | | | | As discussed on D32391, test X86/X64 SSE2 and X64 F16C. llvm-svn: 301744
* [ConstantRange] Use ternary operator instead of 'if' to avoid copying an ↵Craig Topper2017-04-291-10/+4
| | | | | | APInt and then possibly copying over it. llvm-svn: 301741
* [ConstantRange] Add std::move to a bunch of places that pass local APInts to ↵Craig Topper2017-04-291-24/+25
| | | | | | | | ConstantRange constructor. The ConstantRange constructor takes APInt by value so without these moves we are making copies. llvm-svn: 301740
* Remove unused private field.Zachary Turner2017-04-291-4/+3
| | | | llvm-svn: 301738
* [ConstantRange] Remove a temporary APInt I meant to delete in r300621. NFCCraig Topper2017-04-291-1/+0
| | | | llvm-svn: 301737
* [ConstantRange] Improve the efficiency of one of the ConstantRange constructors.Craig Topper2017-04-291-6/+3
| | | | | | | | | | We were default constructing the Lower/Upper APInts. Then creating min or max value, then doing a move assignment to Lower and copy assignment to upper. The copy assignment operator in particular has an out of line function call that has to examine whether or not a previous allocation exists that can be reused which of course it can't in this case. The new code creates the min/max value first, move constructs Lower from it then copy constructs Upper from Lower. This also seems to have convinced a self host build that this constructor can be inlined more readily into other methods in ConstantRange. llvm-svn: 301736
* AMDGPU: Fix copies from physical registers in SIFixSGPRCopiesMatt Arsenault2017-04-292-4/+23
| | | | | | | | | This would assert when there were multiple defs of a physical register. We just need to move all of the users of it. llvm-svn: 301730
* [llvm-pdbdump] Abstract some of the YAML/Raw printing code.Zachary Turner2017-04-2922-270/+420
| | | | | | | | | There is a lot of duplicate code for printing line info between YAML and the raw output printer. This introduces a base class that can be shared between the two, and makes some minor cleanups in the process. llvm-svn: 301728
* [ObjCARC] Do not move a release between a call and aAkira Hatanaka2017-04-293-16/+58
| | | | | | | | | | | | | | | | | | | retainAutoreleasedReturnValue that retains the returned value. This commit fixes a bug in ARC optimizer where it moves a release between a call and a retainAutoreleasedReturnValue, causing the returned object to be released before the retainAutoreleasedReturnValue can retain it. This commit accomplishes that by doing a lookahead and checking whether the call prevents the release from moving upwards. In the long term, we should treat the region between the retainAutoreleasedReturnValue and the call as a critical section and disallow moving anything there (possibly using operand bundles). rdar://problem/20449878 llvm-svn: 301724
* [LoopUnswitch] Make DEBUG output more readable (part 2).Davide Italiano2017-04-291-1/+1
| | | | | | | | | I fixed my miscompile in r301722 and I hope I don't have to take a look at this code again now that Chandler has a new LoopUnswitch pass, but maybe this could be of use for somebody else in the meanwhile. llvm-svn: 301723
* [LoopUnswitch] Don't remove instructions with side effects.Davide Italiano2017-04-292-1/+21
| | | | | | | | This fixes PR32818. Differential Revision: https://reviews.llvm.org/D32664 llvm-svn: 301722
* [llvm-readobj] Fix incorrect printing of CV column info.Zachary Turner2017-04-291-2/+4
| | | | llvm-svn: 301720
* Fuzzer: Mark test/cxxstring.test UNSUPPORTED: windowsDuncan P. N. Exon Smith2017-04-281-0/+2
| | | | | | | | | This has been mysteriously failing since r301593, which cleaned up the types of things like size_t and SIZE_MAX for freestanding targets. Reid and Kostya suggested marking it as UNSUPPORTED on windows, given that no one has been able to reproduce locally. llvm-svn: 301719
* [llvm-readobj] Use LLVMDebugInfoCodeView to parse line tables.Zachary Turner2017-04-282-51/+23
| | | | | | | | The llvm-readobj parsing code currently exists in our CodeView library, so we use that to parse instead of re-writing the logic in the tool. llvm-svn: 301718
* [Support] Provide unsafe random access for VarStreamArray.Zachary Turner2017-04-281-4/+20
| | | | llvm-svn: 301716
* [InstCombine] add tests to show potentially bogus application of DeMorgan (NFC)Sanjay Patel2017-04-281-0/+22
| | | | llvm-svn: 301714
* Remove set but unused variable in BitcodeReader.cpp. NFC.Hans Wennborg2017-04-281-4/+0
| | | | llvm-svn: 301713
* Revert r301697 "[IR] Make add/remove Attributes use AttrBuilder instead of ↵Hans Wennborg2017-04-2812-51/+93
| | | | | | | | | | | | | | | | | | AttributeList" This broke the Clang build. (Clang-side patch missing?) Original commit message: > [IR] Make add/remove Attributes use AttrBuilder instead of > AttributeList > > This change cleans up call sites and avoids creating temporary > AttributeList objects. > > NFC llvm-svn: 301712
* InferAddressSpaces: Search constant expressions for addrspacecastsMatt Arsenault2017-04-283-15/+68
| | | | | | | These are pretty common when using local memory, and the 64-bit generic addressing is much more expensive to compute. llvm-svn: 301711
* Remove line and file from DINamespace.Adrian Prantl2017-04-2836-130/+102
| | | | | | | | | | | | | | Fixes the issue highlighted in http://lists.llvm.org/pipermail/cfe-dev/2014-June/037500.html. The DW_AT_decl_file and DW_AT_decl_line attributes on namespaces can prevent LLVM from uniquing types that are in the same namespace. They also don't carry any meaningful information. rdar://problem/17484998 Differential Revision: https://reviews.llvm.org/D32648 llvm-svn: 301706
* InferAddressSpaces: Avoid looking up deleted valuesMatt Arsenault2017-04-281-3/+10
| | | | | | | | | | | While looking at pure addressing expressions, it's possible for the value to appear later in Postorder. I haven't been able to come up with a testcase where this exhibits an actual issue, but if you insert a dump before the value map lookup, a few testcases crash. llvm-svn: 301705
* InferAddressSpaces: Infer from just addrspacecastsMatt Arsenault2017-04-283-7/+70
| | | | | | | | Eliminates some more cases where some subset of the addressing computation remains flat. Some cases with addrspacecasts in nested constant expressions are still left behind however. llvm-svn: 301704
* [SCEV] Use early exit in createAddRecFromPHI. NFC.Michael Zolotukhin2017-04-281-109/+110
| | | | llvm-svn: 301703
* LoopRotate: Fix use after scope bugDaniel Berlin2017-04-281-3/+4
| | | | llvm-svn: 301702
* [RDF] Correctly calculate lane masks for defsKrzysztof Parzyszek2017-04-282-2/+59
| | | | llvm-svn: 301700
* Properly handle PHIs with subregisters in UnreachableBlockElimKrzysztof Parzyszek2017-04-282-8/+46
| | | | | | | | | When a PHI operand has a subregister, create a COPY instead of simply replacing the PHI output with the input it. Differential Revision: https://reviews.llvm.org/D32650 llvm-svn: 301699
* [Hexagon] Do not move a block if it is on a fall-through pathKrzysztof Parzyszek2017-04-282-3/+81
| | | | llvm-svn: 301698
* [IR] Make add/remove Attributes use AttrBuilder instead of AttributeListReid Kleckner2017-04-2812-93/+51
| | | | | | | | | This change cleans up call sites and avoids creating temporary AttributeList objects. NFC llvm-svn: 301697
* [ConstantRange] Use APInt::isNullValue rather than APInt::isMinValue where ↵Craig Topper2017-04-281-2/+2
| | | | | | it would make more sense to thing of 0 as 0 rather than the minimum unsigned value. NFC llvm-svn: 301696
* [APInt] Add an isNullValue method to check for all bits being zero. Use it ↵Craig Topper2017-04-281-3/+8
| | | | | | | | | | in a couple internal methods where it makes more sense than isMinValue or !getBoolValue. NFC I used Null rather than Zero to match the getNullValue method name. There are some other places outside APInt where isNullValue would be more readable than isMinValue even though they do the same thing. I'll update those in future patches. llvm-svn: 301695
* [ConstantRange] Use const references to prevent a couple APInt copies. NFCCraig Topper2017-04-281-2/+2
| | | | llvm-svn: 301694
* [LoopUnswitch] Make DEBUG output more readable.Davide Italiano2017-04-281-1/+1
| | | | | | | | | While debugging a miscompile I realized loopunswitch doesn't put newlines when printing the instruction being replacement. Ending up with a single line with many instruction replaced isn't the best for readability and/or mental sanity. llvm-svn: 301692
* [WebAssembly] Add size of section header to data relocation offsets.Sam Clegg2017-04-285-14/+45
| | | | | | | | | | | Also, add test for data relocations and fix addend to be signed. Subscribers: jfb, dschuff Differential Revision: https://reviews.llvm.org/D32513 llvm-svn: 301690
* [ValueTracking] Teach isSafeToSpeculativelyExecute() about the speculatable ↵Matt Arsenault2017-04-282-0/+29
| | | | | | | | attribute Patch by Tom Stellard llvm-svn: 301688
* [WebAssembly] Write initial memory in pages not bytesSam Clegg2017-04-285-3/+29
| | | | | | | | Subscribers: jfb, dschuff Differential Revision: https://reviews.llvm.org/D32660 llvm-svn: 301687
* TableGen: Add IntrHasSideEffects property for intrinsicsMatt Arsenault2017-04-285-1/+21
| | | | | | | | | | | | | | | The IntrNoMem, IntrReadMem, IntrWriteMem, and IntrArgMemOnly intrinsic properties differ from their corresponding LLVM IR attributes by specifying that the intrinsic, in addition to its memory properties, has no other side effects. The IntrHasSideEffects flag used in combination with one of the memory flags listed above, makes it possible to define an intrinsic such that its properties at the CodeGen layer match its properties at the IR layer. Patch by Tom Stellard llvm-svn: 301685
* Make getParamAlignment use argument numbersReid Kleckner2017-04-2816-32/+48
| | | | | | | | | | | | | | | | | | The method is called "get *Param* Alignment", and is only used for return values exactly once, so it should take argument indices, not attribute indices. Avoids confusing code like: IsSwiftError = CS->paramHasAttr(ArgIdx, Attribute::SwiftError); Alignment = CS->getParamAlignment(ArgIdx + 1); Add getRetAlignment to handle the one case in Value.cpp that wants the return value alignment. This is a potentially breaking change for out-of-tree backends that do their own call lowering. llvm-svn: 301682
* GlobalISel: Followup for r301679Matthias Braun2017-04-281-1/+2
| | | | llvm-svn: 301681
* Add speculatable function attributeMatt Arsenault2017-04-2819-18/+133
| | | | | | | | This attribute tells the optimizer that the function may be speculated. Patch by Tom Stellard llvm-svn: 301680
* TargetLowering: Add finalizeLowering() function; NFCMatthias Braun2017-04-286-24/+27
| | | | | | | | | | | | | | | | | Adds a new method finalizeLowering to TargetLoweringBase. This is in preparation for an upcoming commit. This function is meant for target specific adjustments to MachineFrameInfo or register reservations. Move the freezeRegisters() and the hasCopyImplyingStackAdjustment() handling into the new function to prove the concept. As an added bonus GlobalISel no longer missed the hasCopyImplyingStackAdjustment() handling with this. Differential Revision: https://reviews.llvm.org/D32621 llvm-svn: 301679
* AMDGPU: Add new amdgcn.init.exec intrinsicsMarek Olsak2017-04-287-0/+196
| | | | | | | | | | v2: More tests, bug fixes, cosmetic changes. Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, llvm-commits, t-tye Differential Revision: https://reviews.llvm.org/D31762 llvm-svn: 301677
* limit to 2 parallel links when using thinltoBob Haarman2017-04-281-7/+11
| | | | | | | | | | | | | | | | Summary: When using ThinLTO, the linker performs its own parallelism. This change limits the number of parallel link jobs that Ninja will issue to keep the total number of threads reasonable when linking with ThinLTO. Reviewers: hans, ruiu Subscribers: mgorny, mehdi_amini, Prazek Differential Revision: https://reviews.llvm.org/D31990 llvm-svn: 301676
* Kill off the old SimplifyInstruction API by converting remaining users.Daniel Berlin2017-04-2821-105/+125
| | | | llvm-svn: 301673
* [IPO/MergeFunctions] This function is used only under DEBUG().Davide Italiano2017-04-281-0/+4
| | | | llvm-svn: 301672
* [RS4GC] Simplify attribute handling code NFCReid Kleckner2017-04-281-47/+25
| | | | | | | Avoids use of AttributeList::getNumSlots, making it easier to change the underlying implementation. llvm-svn: 301671
* Use Argument::hasAttribute and AttributeList::ReturnIndex moreReid Kleckner2017-04-2815-141/+103
| | | | | | | | | | | This eliminates many extra 'Idx' induction variables in loops over arguments in CodeGen/ and Target/. It also reduces the number of places where we assume that ReturnIndex is 0 and that we should add one to argument numbers to get the corresponding attribute list index. NFC llvm-svn: 301666
* Cleanup: Use DIExpression::prepend in buildDbgValueForSpill(). (NFC)Adrian Prantl2017-04-283-13/+5
| | | | llvm-svn: 301665
* [IR] Delete unused Argument::removeAttr overloadReid Kleckner2017-04-282-11/+0
| | | | | | It doesn't make sense to remove an AttributeList from an argument. llvm-svn: 301663
* Clean up DIExpression::prependDIExpr a little. (NFC)Adrian Prantl2017-04-286-27/+20
| | | | llvm-svn: 301662
* Bitcode: Do not remove empty summary entries when reading a per-module summary.Peter Collingbourne2017-04-283-29/+0
| | | | | | | | This became no longer necessary after D19462 landed, and will be incompatible with an upcoming change to the summary data structures that changes how we represent references. llvm-svn: 301660
OpenPOWER on IntegriCloud