summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* X86: Form IMGREL relocations for LLVM FunctionsDavid Majnemer2015-03-061-9/+7
| | | | | | | | We supported forming IMGREL relocations from ConstantExprs involving __ImageBase if the minuend was a GlobalVariable. Extend this functionality to all GlobalObjects. llvm-svn: 231456
* Silence C4715 'not all control paths return a value' warnings.Yaron Keren2015-03-061-0/+3
| | | | llvm-svn: 231455
* Support: Improve performance of FileOutputBuffer on WindowsRui Ueyama2015-03-061-0/+7
| | | | | | | | | | We extend an underlying file before mmap'ing it, but it's not needed on Windows. Extending file is slow on Windows, so we should avoid doing that. The difference gets larger as the size of an output file gets larger. It shove off 2 seconds out of 25 seconds when linking chrome.dll with LLD, for example. llvm-svn: 231452
* [objc-arc] Sprinkle some more auto on some iterators.Michael Gottesman2015-03-061-8/+4
| | | | llvm-svn: 231447
* [objc-arc] Move the detection of potential uses or altering of a ref count ↵Michael Gottesman2015-03-063-108/+171
| | | | | | onto PtrState. llvm-svn: 231446
* LegalizeTypes: Handle shift by 0 in ExpandShiftByConstant.Michael Zolotukhin2015-03-061-1/+8
| | | | | | | Though such shifts are usually optimized away by combiner, we still can encounter them after a vector shift is legalized. llvm-svn: 231443
* Remember to move a type to the correct set when setting the body.Rafael Espindola2015-03-061-0/+9
| | | | | | | | | We would set the body of a struct type (therefore making it non-opaque) but were forgetting to move it to the non-opaque set. Fixes pr22807. llvm-svn: 231442
* [objc-arc] Move the checking of whether or not we can match onto PtrStates ↵Michael Gottesman2015-03-063-51/+76
| | | | | | | | | | | and out of the main dataflow. These refactored computations check whether or not we are at a stage of the sequence where we can perform a match. This patch moves the computation out of the main dataflow and into {BottomUp,TopDown}PtrState. llvm-svn: 231439
* [objc-arc] Refactor (Re-)initialization of PtrState from dataflow -> ↵Michael Gottesman2015-03-063-47/+64
| | | | | | | | | | {TopDown,BottomUp}PtrState Class. This initialization occurs when we see a new retain or release. Before we performed the actual initialization inline in the dataflow. That is just messy. llvm-svn: 231438
* [objc-arc] Create two subclasses of PtrState in preparation for moving per ↵Michael Gottesman2015-03-062-43/+60
| | | | | | | | | | | ptr state change behavior onto a PtrState class. This will enable the main ObjCARCOpts dataflow to work with higher level concepts such as "can this ptr state be modified by this ref count" and not need to understand the nitty gritty details of how that is determined. This makes the dataflow cleaner. llvm-svn: 231437
* [objc-arc] Extract out MDNodes into a cache structure so the information can ↵Michael Gottesman2015-03-062-22/+33
| | | | | | be passed around. llvm-svn: 231436
* [objc-arc] Remove annotations code.Michael Gottesman2015-03-061-327/+0
| | | | | | | It will always be in the history if it is needed again. Now it is just dead code. llvm-svn: 231435
* Teach ComputeNumSignBits about signed reminder.Nadav Rotem2015-03-061-1/+27
| | | | | | This optimization a continuation of r231140 that reasoned about signed div. llvm-svn: 231433
* Fix build error.Michael Gottesman2015-03-052-21/+29
| | | | llvm-svn: 231430
* [objc-arc] Change some casts and loop iterators to use auto.Michael Gottesman2015-03-051-16/+12
| | | | llvm-svn: 231427
* [objc-arc] Extract out state specific to a ref count from the main objc arc ↵Michael Gottesman2015-03-054-287/+298
| | | | | | sequence dataflow. This will allow me to separate the actual ARC queries from the meat of the dataflow algorithm. llvm-svn: 231426
* [objc-arc] Extract blot map vector into its own file. NFC.Michael Gottesman2015-03-052-160/+151
| | | | llvm-svn: 231425
* [X86] Remove stale comment. NFC.Ahmed Bougacha2015-03-051-1/+0
| | | | | | | | It turns out 256bit V[SZ]EXT nodes are still generated by the new shuffle lowering, so this is here to stay! llvm-svn: 231422
* Instructions: Use delegated constructors to reduce duplicationBenjamin Kramer2015-03-051-153/+32
| | | | | | NFC. llvm-svn: 231411
* [AVX] Lower / fast-isel scalar FP selects into VBLENDV instructions (PR22483)Sanjay Patel2015-03-052-21/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch reduces code size for all AVX targets and increases speed for some chips. SSE 4.1 introduced the useless (see code comments) 2-register form of BLENDV and only in the packed float/double flavors. AVX subsequently made the instruction useful by adding a 4-register operand form. So we just need to paper over the lack of scalar forms of this instruction, complicate the code to choose float or double forms, and use blendv on scalars since all FP is in xmm registers anyway. This gives us an approximately 50% speed up for a blendv microbenchmark sequence on SandyBridge and Haswell: blendv : 29.73 cycles/iter logic : 43.15 cycles/iter No new test cases with this patch because: 1. fast-isel-select-sse.ll tests the positive side for regular X86 lowering and fast-isel 2. sse-minmax.ll and fp-select-cmp-and.ll confirm that we're not firing for scalar selects without AVX 3. fp-select-cmp-and.ll and logical-load-fold.ll confirm that we're not firing for scalar selects with constants. http://llvm.org/bugs/show_bug.cgi?id=22483 Differential Revision: http://reviews.llvm.org/D8063 llvm-svn: 231408
* SelectionDAGBuilder: Merge 3 copies of the limited precision exp2 emission code.Benjamin Kramer2015-03-051-251/+93
| | | | | | NFC intended. llvm-svn: 231406
* Fix uninitialized memory references in WinEHPrepareAndrew Kaylor2015-03-051-1/+3
| | | | llvm-svn: 231405
* SDAG: Merge the meat of two ExpandAtomic implementations.Benjamin Kramer2015-03-053-212/+42
| | | | | | | The copies already diverged, don't let them become any worse. Reduce redundancy in code with a little macro metaprogramming. llvm-svn: 231401
* [AArch64] Teach AsmPrinter about GlobalAddress operands.Ahmed Bougacha2015-03-051-0/+12
| | | | | | | Fixes PR22761, rdar://20024866. Differential Revision: http://reviews.llvm.org/D8042 llvm-svn: 231400
* Use the correct func begin symbol in all places in ppc.Rafael Espindola2015-03-052-9/+10
| | | | | | I missed an occurrence of the old symbol in my previous patch. llvm-svn: 231398
* [ARM] Enable vector extload combine for legal types.Ahmed Bougacha2015-03-052-0/+24
| | | | | | | | | | | | | | | | | | | | | This commit enables forming vector extloads for ARM. It only does so for legal types, and when we can't fold the extension in a wide/long form of the user instruction. Enabling it for larger types isn't as good an idea on ARM as it is on X86, because: - we pretend that extloads are legal, but end up generating vld+vmov - we have instructions like vld {dN, dM}, which can't be generated when we "manually expand" extloads to vld+vmov. For legal types, the combine doesn't fire that often: in the integration tests only in a big endian testcase, where it removes a pointless AND. Related to rdar://19723053 Differential Revision: http://reviews.llvm.org/D7423 llvm-svn: 231396
* Replace PrintStackTrace(FILE*) with PrintStackTrace(raw_ostream&)Zachary Turner2015-03-052-36/+43
| | | | | | | | | | This will be followed by a change on the clang side to update the only user of this function with the new version. Differential Revision: http://reviews.llvm.org/D8074 Reviewed By: Reid Kleckner llvm-svn: 231392
* Remove accidental errs() call in VerifierReid Kleckner2015-03-051-1/+0
| | | | llvm-svn: 231391
* Use the generic Lfunc_begin label on ppc.Rafael Espindola2015-03-054-6/+10
| | | | | | This removes yet another custom label to mark the start of a function. llvm-svn: 231390
* X86: Optimize address mode matching for FRAME_ALLOC_RECOVER nodesDavid Majnemer2015-03-052-0/+10
| | | | | | | We know that the absolute symbol will be less than 2GB and thus will always fit. llvm-svn: 231389
* Silence -Wmissing-braces warning from clang-clReid Kleckner2015-03-051-1/+1
| | | | | | | | The first element of STACKFRAME64 is a struct and Clang wants us to put braces around it's initialization. Instead, drop the zero. The result should be the same. llvm-svn: 231387
* Replace llvm.frameallocate with llvm.frameescapeReid Kleckner2015-03-056-206/+145
| | | | | | | | | | Turns out it's pretty straightforward and simplifies the implementation. Reviewers: andrew.w.kaylor Differential Revision: http://reviews.llvm.org/D8051 llvm-svn: 231386
* Revert r231276 (including r231277): Add a lock() function in PassRegistry to ↵Erik Eckstein2015-03-051-18/+2
| | | | | | speed up multi-thread synchronization. llvm-svn: 231385
* [Windows] Implement PrintStackTrace(FILE*)Zachary Turner2015-03-051-81/+104
| | | | | | | | | | | | | | | | | | | llvm::sys::PrintBacktrace(FILE*) is supposed to print a backtrace of the current thread given the current PC. This function was unimplemented on Windows, and instead the only time we could print a backtrace was as the result of an exception through LLVMUnhandledExceptionFilter. This patch implements backtracing of self by using RtlCaptureContext to get a CONTEXT for the current thread, and moving the printing and StackWalk64 code to a common method that printing own stack trace and printing stack trace of an exception can use. Differential Revision: http://reviews.llvm.org/D8068 Reviewed by: Reid Kleckner llvm-svn: 231382
* [DagCombiner] Allow shuffles to merge through bitcastsSimon Pilgrim2015-03-051-0/+83
| | | | | | | | | | | | Currently shuffles may only be combined if they are of the same type, despite the fact that bitcasts are often introduced in between shuffle nodes (e.g. x86 shuffle type widening). This patch allows a single input shuffle to peek through bitcasts and if the input is another shuffle will merge them, shuffling using the smallest sized type, and re-applying the bitcasts at the inputs and output instead. Dropped old ShuffleToZext test - this patch removes the use of the zext and vector-zext.ll covers these anyhow. Differential Revision: http://reviews.llvm.org/D7939 llvm-svn: 231380
* While reviewing the changes to Clang to add builtin support for the vsld, ↵Kit Barton2015-03-052-8/+18
| | | | | | vsrd, and vsrad instructions, it was pointed out that the builtins are generating the LLVM opcodes (shl, lshr, and ashr) not calls to the intrinsics. This patch changes the implementation of the vsld, vsrd, and vsrad instructions from from intrinsics to VXForm_1 instructions and makes them legal with P8 Altivec. It also removes the definition of the int_ppc_altivec_vsld, int_ppc_altivec_vsrd, and int_ppc_altivec_vsrad intrinsics. llvm-svn: 231378
* Revert change r231366 as it broke clang-native-arm-cortex-a9 ↵Igor Laevsky2015-03-053-92/+22
| | | | | | Analysis/properties.m test. llvm-svn: 231374
* AVX-512, SKX: Enabled masked_load/store operations for this target.Elena Demikhovsky2015-03-053-9/+119
| | | | | | | Added lowering for ISD::CONCAT_VECTORS and ISD::INSERT_SUBVECTOR for i1 vectors, it is needed to pass all masked_memop.ll tests for SKX. llvm-svn: 231371
* Teach lowering to correctly handle invoke statepoint and gc results tied to ↵Igor Laevsky2015-03-053-22/+92
| | | | | | | | them. Note that we still can not lower gc.relocates for invoke statepoints. Also it extracts getCopyFromRegs helper function in SelectionDAGBuilder as we need to be able to customize type of the register exported from basic block during lowering of the gc.result. llvm-svn: 231366
* [PBQP] Use a local bit-matrix to speedup searching an edge in the graph.Arnaud A. de Grandmaison2015-03-051-3/+10
| | | | | | | | | Build time (user time) for building llvm+clang+lldb in release mode: - default allocator: 9086 seconds - with PBQP: 9126 seconds - with PBQP + local bit matrix cache: 9097 seconds llvm-svn: 231360
* [InstCombine] Fix an assertion when fmul has a ConstantExpr operandMichael Kuperstein2015-03-051-2/+2
| | | | | | | | | isNormalFp and isFiniteNonZeroFp should not assume vector operands can not be constant expressions. Patch by Pawel Jurek <pawel.jurek@intel.com> Differential Revision: http://reviews.llvm.org/D8053 llvm-svn: 231359
* [X86] Use vmovss to handle inserting an element into index 0 of a v8f32 ↵Craig Topper2015-03-051-2/+12
| | | | | | vector of zeros. llvm-svn: 231354
* Remove useless break after return.Frederic Riss2015-03-051-1/+0
| | | | | | Pointed out by Paul Robinson. llvm-svn: 231353
* Revert r231324 "Remove the conditional addition of the execution dependency ↵Hans Wennborg2015-03-051-1/+3
| | | | | | | | fixing" See PR22799. llvm-svn: 231348
* [MBP] Use range based for-loops throughout this code. Several hadChandler Carruth2015-03-051-140/+108
| | | | | | | already been added and the inconsistency made choosing names and changing code more annoying. Plus, wow are they better for this code! llvm-svn: 231347
* [MBP] NFC, run clang-format over this code and tweak things to make theChandler Carruth2015-03-051-71/+62
| | | | | | | | | | | result reasonable. This code predated clang-format and so there was a reasonable amount of crufty formatting that had accumulated. This should ensure that neither myself nor others end up with formatting-only changes sneaking into other fixes. llvm-svn: 231341
* [MBP] This is no longer 'block-placement2'. ;] The old variants are longChandler Carruth2015-03-051-3/+3
| | | | | | gone, update this code to reflect that. llvm-svn: 231340
* Use the existing begin and end symbol for debug info.Rafael Espindola2015-03-055-27/+11
| | | | llvm-svn: 231338
* Reformat.NAKAMURA Takumi2015-03-051-14/+11
| | | | llvm-svn: 231336
* Revert r231103, "FullDependenceAnalysis: Avoid using the (deprecated in ↵NAKAMURA Takumi2015-03-051-22/+23
| | | | | | | | C++11) copy ctor" It is miscompiled on msc18. llvm-svn: 231335
OpenPOWER on IntegriCloud