summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "Avoid size_t -> unsigned conversion in MathExtras.h header. NFC".Pawel Bylica2015-05-191-4/+4
| | | | llvm-svn: 237680
* Avoid size_t -> unsigned conversion in MathExtras.h header. NFC.Pawel Bylica2015-05-191-4/+4
| | | | llvm-svn: 237678
* Fix documentation for Set-Like ContainersArtyom Skrobov2015-05-191-10/+26
| | | | llvm-svn: 237677
* Fix getSwappedBytes for double.Pawel Bylica2015-05-191-1/+1
| | | | llvm-svn: 237673
* BrainF.cpp: Update CreateCall() according to r237624.NAKAMURA Takumi2015-05-191-1/+2
| | | | llvm-svn: 237669
* Drop unnecessary ';' after namespaceTobias Grosser2015-05-191-1/+1
| | | | | | | The ';' was introduced in 237642. With it in place, we get a large number of warnings in -pedantic mode. llvm-svn: 237667
* SelectionDAG: Cleanup and simplify FoldConstantArithmeticMatthias Braun2015-05-192-100/+95
| | | | | | | | | | | This cleans up the FoldConstantArithmetic code by factoring out the case of two ConstantSDNodes into an own function. This avoids unnecessary complexity for many callers who already have ConstantSDNode arguments. This also avoids an intermeidate SmallVector datastructure and a loop over that datastructure. llvm-svn: 237651
* [BitcodeReader] Error out if we read an invalid function argument typeFilipe Cabecinhas2015-05-193-1/+9
| | | | | | Bug found with AFL fuzz. llvm-svn: 237650
* [lib/Fuzzer] more efficient reload logic; also don't spam git too muchKostya Serebryany2015-05-193-8/+11
| | | | llvm-svn: 237649
* [BitcodeReader] It's a malformed block if CodeLenWidth is too bigFilipe Cabecinhas2015-05-193-0/+9
| | | | | | Bug found with AFL fuzz. llvm-svn: 237646
* DAGCombiner: Factor common pattern into isOneConstant() function. NFCMatthias Braun2015-05-191-35/+32
| | | | llvm-svn: 237645
* DAGCombiner: Factor common pattern into isAllOnesConstant() function. NFCMatthias Braun2015-05-191-46/+43
| | | | llvm-svn: 237644
* DAGCombiner: Use isNullConstant() where possibleMatthias Braun2015-05-191-19/+13
| | | | llvm-svn: 237643
* Store intrinsic ID by value in Function instead of a string lookup. NFC.Pete Cooper2015-05-197-42/+41
| | | | | | | | | | | | On 64-bit targets, Function has 4-bytes of padding in its struct layout. This uses the space for the intrinsic ID. It is set and recalculated whenever the function name is set. This is similar to the current behavior which clears the function from the intrinsic ID cache when its renamed. The intrinsic cache itself is removed as the only purpose was to speedup calls to getIntrinsicID() which now just reading the new field in the struct. Reviewed by Duncan. http://reviews.llvm.org/D9836 llvm-svn: 237642
* Move Function::lookupIntrinsicID to a static method. NFCPete Cooper2015-05-192-19/+14
| | | | llvm-svn: 237641
* Re-land r237175: [X86] Always return the sret parameter in eax/rax ...Reid Kleckner2015-05-184-51/+71
| | | | | | | | | This reverts commit r237210. Also fix X86/complex-fca.ll to match the code that we used to generate on win32 and now generate everwhere to conform to SysV. llvm-svn: 237639
* Revert accidental change in r237633Matthias Braun2015-05-181-1/+1
| | | | llvm-svn: 237635
* [mips][microMIPSr6] Implement LSA instructionJozef Kolek2015-05-185-2/+34
| | | | | | | | This patch implements LSA instruction using mapping. Differential Revision: http://reviews.llvm.org/D8919 llvm-svn: 237634
* DAGCombiner: Factor common pattern into isNullConstant() function. NFCMatthias Braun2015-05-181-71/+59
| | | | llvm-svn: 237633
* Revert "[opaque pointer type] Provide a convenience for ↵David Blaikie2015-05-181-7/+0
| | | | | | | | | | IRBuilder::CreateCall that accepts a Function without needing to take an explicit callee Type" Creates ambiguity in Clang callers. Reverting while I figure it out. This reverts commit r237627. llvm-svn: 237629
* [BitcodeReader] Make sure the type of the inserted value matches the type of ↵Filipe Cabecinhas2015-05-183-0/+8
| | | | | | | | the aggregate at those indices Bug found with AFL-fuzz. llvm-svn: 237628
* [opaque pointer type] Provide a convenience for IRBuilder::CreateCall that ↵David Blaikie2015-05-181-0/+7
| | | | | | | | | accepts a Function without needing to take an explicit callee Type The common case is a direct call, so don't make all those users have to explicitly pass the result of llvm::Function::getFunctionType. llvm-svn: 237627
* Simplify IRBuilder::CreateCall* by using ArrayRef+initializer_list/braced ↵David Blaikie2015-05-1830-245/+213
| | | | | | init only llvm-svn: 237624
* 80-col fixup.Eric Christopher2015-05-181-2/+3
| | | | llvm-svn: 237623
* Fix grammar in comments.Eric Christopher2015-05-181-2/+2
| | | | llvm-svn: 237622
* AArch64: work around ld64 bug more aggressively.Tim Northover2015-05-184-31/+76
| | | | | | | | | | | | | | | ld64 currently mishandles internal pointer relocations (i.e. ARM64_RELOC_UNSIGNED referred to by section & offset rather than symbol). The existing __cfstring clause was an early discovery and workaround for this, but the problem is wider and we should avoid such relocations wherever possible for now. This code should be reverted to allowing internal relocations as soon as possible. PR23437. llvm-svn: 237621
* Fix some odd whitespace and formatting errors while makingEric Christopher2015-05-181-35/+23
| | | | | | changes in ConstantsContext.h. llvm-svn: 237620
* Extract the load/store type verification to a separate function.Filipe Cabecinhas2015-05-185-11/+52
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Added isLoadableOrStorableType to PointerType. We were doing some checks in some places, occasionally assert()ing instead of telling the caller. With this patch, I'm putting all type checking in the same place for load/store type instructions, and verifying the same thing every time. I also added a check for load/store of a function type. Applied extracted check to Load, Store, and Cmpxcg. I don't have exhaustive tests for all of these, but all Error() calls in TypeCheckLoadStoreInst are being tested (in invalid.test). Reviewers: dblaikie, rafael Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9785 llvm-svn: 237619
* [lib/Fuzzer] when -sync_command=<CMD> is given, periodically execute 'CMD ↵Kostya Serebryany2015-05-186-1/+29
| | | | | | CORPUS' to synchronize with other processes llvm-svn: 237617
* [YAML] Plug a memory leakBenjamin Kramer2015-05-182-5/+7
| | | | | | | The destructor of BlockScalarNode is never called. Store the contained string in BumpPtrAllocated memory instead. llvm-svn: 237614
* MachineInstr: Change return value of getOpcode() to unsigned.Matthias Braun2015-05-1817-55/+54
| | | | | | | | | This was previously returning int. However there are no negative opcode numbers and more importantly this was needlessly different from MCInstrDesc::getOpcode() (which even is the value returned here) and SDValue::getOpcode()/SDNode::getOpcode(). llvm-svn: 237611
* [Verifier] Assert gc_relocate always return a pointer type Chen Li2015-05-184-2/+78
| | | | | | | | | | | | | | Summary: Add an assertion in verifier.cpp to make sure gc_relocate relocate a gc pointer, and its return type has the same address space with the relocated pointer. Reviewers: reames, AndyAyers, sanjoy, pgavlin Reviewed By: pgavlin Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9695 llvm-svn: 237605
* [PlaceSafepoints] Assertion on that gc_result can not have preceding phis ↵Chen Li2015-05-182-2/+40
| | | | | | | | | | | | | | | | should only apply to invoke statepoint Summary: When PlaceSafepoints pass replaces old return result with gc_result from statepoint, it asserts that gc_result can not have preceding phis in its parent block. This is only true on invoke statepoint, which terminates the block and puts its result at the beginning of the normal successor block. Call statepoint does not terminate the block and thus its result is in the same block with it. There should be no restriction on whether there are phis or not. Reviewers: reames, igor-laevsky Reviewed By: igor-laevsky Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9803 llvm-svn: 237597
* MC: clang-format MCContext. NFC.Jim Grosbach2015-05-182-33/+27
| | | | llvm-svn: 237595
* MC: Clean up method names in MCContext.Jim Grosbach2015-05-1876-296/+297
| | | | | | | The naming was a mish-mash of old and new style. Update to be consistent with the new. NFC. llvm-svn: 237594
* Exploit dereferenceable_or_null attribute in LICM passSanjoy Das2015-05-185-43/+237
| | | | | | | | | | | | | | | | | | | | Summary: Allow hoisting of loads from values marked with dereferenceable_or_null attribute. For values marked with the attribute perform context-sensitive analysis to determine whether it's known-non-null or not. Patch by Artur Pilipenko! Reviewers: hfinkel, sanjoy, reames Reviewed By: reames Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9253 llvm-svn: 237593
* ARM: allow jump tables to be placed as constant islands.Tim Northover2015-05-1811-174/+366
| | | | | | | | | | | | | | | | | Previously, they were forced to immediately follow the actual branch instruction. This was usually OK (the LEAs actually accessing them got emitted nearby, and weren't usually separated much afterwards). Unfortunately, a sufficiently nasty phi elimination dumps many instructions right before the basic block terminator, and this can increase the range too much. This patch frees them up to be placed as usual by the constant islands pass, and consequently has to slightly modify the form of TBB/TBH tables to refer to a PC-relative label at the final jump. The other jump table formats were already position-independent. rdar://20813304 llvm-svn: 237590
* [ScalarEvolution] refactor: extract interface getGEPExprJingyue Wu2015-05-183-56/+82
| | | | | | | | | | | | | | | | | | Summary: This allows other passes (such as SLSR) to compute the SCEV expression for an imaginary GEP. Test Plan: no regression Reviewers: atrick, sanjoy Reviewed By: sanjoy Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9786 llvm-svn: 237589
* Fix llvm::BumpPtrAllocatorImpl::Reset()Hans Wennborg2015-05-182-2/+10
| | | | | | | | BumpPtrAllocator's Reset wouldn't clear CustomSizedSlabs if Slabs.size() == 0. Patch by Kal <b17c0de@gmail.com>! llvm-svn: 237588
* indvars cruft: don't replace phi nodes for no reason.Andrew Trick2015-05-181-10/+0
| | | | | | | | | Don't replace a phi with an identical phi. This was done long ago to "preserve" IVUsers analysis. The code has already called SE->forgetValue(PN) so I see no purpose in creating a new value for the phi. llvm-svn: 237587
* SimplifyIV comments and dead argument cleanup.Andrew Trick2015-05-182-7/+5
| | | | | | Remove crufty comments. IVUsers hasn't been used here for a long time. llvm-svn: 237586
* Sparc: support the "set" synthetic instruction.James Y Knight2015-05-184-2/+91
| | | | | | | | | This pseudo-instruction expands into 'sethi' and 'or' instructions, or, just one of them, if the other isn't necessary for a given value. Differential Revision: http://reviews.llvm.org/D9089 llvm-svn: 237585
* Preserve the order of READ_REGISTER and WRITE_REGISTERHal Finkel2015-05-184-6/+44
| | | | | | | | | | | | | At the present time, we don't have a way to represent general dependency relationships, so everything is represented using memory dependency. In order to preserve the data dependency of a READ_REGISTER on WRITE_REGISTER, we need to model WRITE_REGISTER as writing (which we had been doing) and model READ_REGISTER as reading (which we had not been doing). Fix this, and also the way that the chain operands were generated at the SDAG level. Patch by Nicholas Paul Johnson, thanks! Test case by me. llvm-svn: 237584
* Revert r237579, as it broke windows buildbotsOliver Stannard2015-05-1815-963/+24
| | | | llvm-svn: 237583
* Sparc: Support PSR, TBR, WIM read/write instructions.James Y Knight2015-05-186-23/+139
| | | | | | Differential Revision: http://reviews.llvm.org/D8971 llvm-svn: 237582
* Sparc: Add the "alternate address space" load/store instructions.James Y Knight2015-05-189-23/+104
| | | | | | | | | | | | | | | | | | - Adds support for the asm syntax, which has an immediate integer "ASI" (address space identifier) appearing after an address, before a comma. - Adds the various-width load, store, and swap in alternate address space instructions. (ldsba, ldsha, lduba, lduha, lda, stba, stha, sta, swapa) This does not attempt to hook these instructions up to pointer address spaces in LLVM, although that would probably be a reasonable thing to do in the future. Differential Revision: http://reviews.llvm.org/D8904 llvm-svn: 237581
* Add support for the Sparc implementation-defined "ASR" registers.James Y Knight2015-05-188-20/+172
| | | | | | | | | | (Note that register "Y" is essentially just ASR0). Also added some test cases for divide and multiply, which had none before. Differential Revision: http://reviews.llvm.org/D8670 llvm-svn: 237580
* [LLVM - ARM/AArch64] Add ACLE special register intrinsicsOliver Stannard2015-05-1815-24/+963
| | | | | | | | | | | | | | | | | | | This patch implements LLVM support for the ACLE special register intrinsics in section 10.1, __arm_{w,r}sr{,p,64}. This patch is intended to lower the read/write_register instrinsics, used to implement the special register intrinsics in the clang patch for special register intrinsics (see http://reviews.llvm.org/D9697), to ARM specific instructions MRC,MCR,MSR etc. to allow reading an writing of coprocessor registers in AArch32 and AArch64. This is done by inspecting the register string passed to the intrinsic and then lowering to the appropriate instruction. Patch by Luke Cheeseman. Differential Revision: http://reviews.llvm.org/D9699 llvm-svn: 237579
* [DAGCombine] Be more pedantic about use iteration in ↵Hal Finkel2015-05-181-11/+12
| | | | | | | | | | | | | | | | | | | | | | | CombineToPreIndexedLoadStore In CombineToPreIndexedLoadStore, when the offset is a constant, we have code that looks for other uses of the pointer which are constant offset computations so that they can be rewritten in terms of the updated pointer so that we don't need to keep a copy of the base pointer to compute these constant offsets. Unfortunately, when it iterated over the uses, it did so by SDNodes, and so we could confuse ourselves if the base pointer was produced by a node that had multiple results (because we would not immediately exclude uses of the other node results). This was reported as PR22755. Unfortunately, we don't have a test case (and I've also been unable to produce one thus far), but at least the mistake is clear. The right way to fix this problem is to make use of the information contained in the use iterators to filter out any uses of other results of the node producing the base pointer. This should be mostly NFC, but should also fix PR22755 (for which, unfortunately, we have no in-tree test case). llvm-svn: 237576
* [LoopAccesses] If shouldRetryWithRuntimeCheck, reset InterestingDependencesAdam Nemet2015-05-183-2/+66
| | | | | | | | When dependence analysis encounters a non-constant distance between memory accesses it aborts the analysis and falls back to run-time checks only. In this case we weren't resetting the array of dependences. llvm-svn: 237574
OpenPOWER on IntegriCloud