summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* Remove macro guards for extern template instantiations.Benjamin Kramer2015-07-1312-92/+61
| | | | | | | This is a C++11 feature that both GCC and MSVC have supported as ane extension long before C++11 was approved. llvm-svn: 242042
* Avoid using Loop::getSubLoopsVector.Benjamin Kramer2015-07-132-7/+7
| | | | | | | Passes should never modify it, just use the const version. While there reduce copying in LoopInterchange. No functional change intended. llvm-svn: 242041
* Fix handling of the 'n' asm constraint with invalid operands.James Y Knight2015-07-132-2/+12
| | | | | | | | | | It had accidently accepted a symbol+offset value (and emitted incorrect code for it, keeping only the offset part) instead of properly reporting the constraint as invalid. Differential Revision: http://reviews.llvm.org/D11039 llvm-svn: 242040
* AMDGPU/SI: Select mad patterns to v_mac_f32Tom Stellard2015-07-1314-48/+341
| | | | | | | | | The two-address instruction pass will convert these back to v_mad_f32 if necessary. Differential Revision: http://reviews.llvm.org/D11060 llvm-svn: 242038
* ARM: Fix cttz expansion on vector types.Logan Chien2015-07-134-13/+571
| | | | | | | | | | | | The 64/128-bit vector types are legal if NEON instructions are available. However, there was no matching patterns for @llvm.cttz.*() intrinsics and result in fatal error. This commit fixes the problem by lowering cttz to: a. ctpop((x & -x) - 1) b. width - ctlz(x & -x) - 1 llvm-svn: 242037
* [ARM] Handle commutativity when converting to tADDhirr in Thumb2Scott Douglass2015-07-133-3/+14
| | | | | | | | Also, run thumb_rewrite.s tests in Thumb2 now that they pass. Differential Revision: http://reviews.llvm.org/D11132 llvm-svn: 242036
* [ARM] Add Thumb2 ADD with SP narrowing from 3 operand to 2Scott Douglass2015-07-132-6/+30
| | | | | | Differential Revision: http://reviews.llvm.org/D11131 llvm-svn: 242035
* [ARM] Small refactor of tryConvertingToTwoOperandForm (nfc)Scott Douglass2015-07-132-10/+87
| | | | | | | | | Also, add more Thumb2 ADD tests requested during review of http://reviews.llvm.org/D11053. Differential Revision: http://reviews.llvm.org/D11130 llvm-svn: 242034
* Cleanup after r241809 - remove uncessary call to std::sortSilviu Baranga2015-07-133-22/+17
| | | | | | | | | | | | | | Summary: The iteration order within a member of DepCands is deterministic and therefore we don't have to sort the accesses within a member. We also don't have to copy the indices of the pointers into a vector, since we can iterate over the members of the class. Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11145 llvm-svn: 242033
* Remove unused variable.Rafael Espindola2015-07-131-1/+0
| | | | | | Sorry I missed it in the previous commit. llvm-svn: 242032
* Aliases don't have available_externally linkage.Rafael Espindola2015-07-131-11/+0
| | | | | | | Allowing that is probably a good idea, but currently we don't, so this is dead code. llvm-svn: 242031
* Don't change the visibility when converting a definition to a declaration.Rafael Espindola2015-07-134-3/+13
| | | | llvm-svn: 242030
* Removing several -Wunused-but-set-variable warnings; NFC intended.Aaron Ballman2015-07-131-26/+0
| | | | llvm-svn: 242028
* Print the visibility of available_externally functions.Rafael Espindola2015-07-132-1/+7
| | | | | | We were already printing it for declarations, but not available_externally. llvm-svn: 242027
* Revert r241981 "Revert "Revert r236894 "[BasicAA] Fix zext & sext handling"""Manuel Klimek2015-07-133-396/+60
| | | | | | The repros from PR23626 still fail. llvm-svn: 242025
* AVX-512: Added all AVX-512 forms of Vector Convert for Float/Double/Int/Long ↵Elena Demikhovsky2015-07-1311-205/+3126
| | | | | | | | | | | | types. In this patch I have only encoding. Intrinsics and DAG lowering will be in the next patch. I temporary removed the old intrinsics test (just to split this patch). Half types are not covered here. Differential Revision: http://reviews.llvm.org/D11134 llvm-svn: 242023
* [llvm-stress] Remove unneeded llvm:: prefix. NFC.Pawel Bylica2015-07-131-1/+1
| | | | llvm-svn: 242020
* [mips] Explained the 'w' modifier in the Inline Assembler documentation.Daniel Sanders2015-07-131-2/+5
| | | | | | | | It exists for compatibility with GCC which requires it to print MSA registers for the 'f' constraint. Although LLVM doesn't need it, the 'w' modifier should still be used for portability between the two compilers. llvm-svn: 242015
* [LSR] don't attempt to promote ephemeral values to indvarsJingyue Wu2015-07-133-2/+63
| | | | | | | | | | | | | | | | | Summary: This at least saves compile time. I also encountered a case where ephemeral values affect whether other variables are promoted, causing performance issues. It may be a bug in LSR, but I didn't manage to reduce it yet. Anyhow, I believe it's in general not worth considering ephemeral values in LSR. Reviewers: atrick, hfinkel Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11115 llvm-svn: 242011
* [InstSimplify] Teach InstSimplify how to simplify extractelementDavid Majnemer2015-07-137-58/+142
| | | | llvm-svn: 242008
* [InstSimplify] Teach InstSimplify how to simplify extractvalueDavid Majnemer2015-07-135-10/+68
| | | | llvm-svn: 242007
* Fix PR24099 reported by Tomas Brukner.Yaron Keren2015-07-121-1/+1
| | | | llvm-svn: 241997
* [ARM] Add support for nest attribute using r12Renato Golin2015-07-122-0/+24
| | | | | | | | | | | | | | | | Register r12 ('ip') is used by GCC for this purpose and hence is used here. As discussed on the GCC mailing list, the register choice is an ABI issue and so choosing the same register as GCC means __builtin_call_with_static_chain is compatible. A similar patch has just gone in the AArch64 backend, so this is just the ARM counterpart, following the same discussion. Patch by Stephen Cross. llvm-svn: 241996
* [X86][SSE] Tidied up vector extend/truncation tests. NFCI.Simon Pilgrim2015-07-124-79/+81
| | | | llvm-svn: 241995
* [X86][SSE] (V)PMINSB is commutable.Simon Pilgrim2015-07-121-3/+0
| | | | | | (V)PMINSB is no different to the other (V)PMIN/(V)PMAX B/D/W instructions - it is fully commutable. llvm-svn: 241994
* Trim trailing whitespaces. NFC.Simon Pilgrim2015-07-121-3/+3
| | | | llvm-svn: 241990
* [X86][SSE] Vectorized v4i32 non-uniform shifts.Simon Pilgrim2015-07-129-385/+332
| | | | | | | | | | While the v4i32 shl operation is already vectorized using a cvttps2dq/pmulld pattern, the lshr/ashr opeations are still scalarized. This patch adds vectorization support for non-uniform v4i32 shift operations - it splats constant shift amounts to allow them to use the immediate sse shift instructions, or extracts/zero-extends non-constant shift amounts. The individual results are then blended together. Differential Revision: http://reviews.llvm.org/D11063 llvm-svn: 241989
* [LICM] Don't try to sink values out of loops without any exitsDavid Majnemer2015-07-122-1/+31
| | | | | | | | | | | | | There is no suitable basic block to sink instructions in loops without exits. The only way an instruction in a loop without exits can be used is as an incoming value to a PHI. In such cases, the incoming block for the corresponding value is unreachable. This fixes PR24013. Differential Revision: http://reviews.llvm.org/D10903 llvm-svn: 241987
* [PowerPC] Make use of the TargetRecip systemHal Finkel2015-07-124-15/+62
| | | | | | | | | | r238842 added the TargetRecip system for controlling use of reciprocal estimates for sqrt and division using a set of parameters that can be set by the frontend. Clang now supports a sophisticated -mrecip option, and this will allow that option to effectively control the relevant code-generation functionality of the PPC backend. llvm-svn: 241985
* [PowerPC] Support the nest parameter attributeHal Finkel2015-07-125-16/+119
| | | | | | | | | | | | | This adds support for the 'nest' attribute, which allows the static chain register to be set for functions calls under non-Darwin PPC/PPC64 targets. r11 is the chain register (which the PPC64 ELF ABI calls the "environment pointer"). For indirect calls under PPC64 ELFv1, this would normally be loaded from the function descriptor, but providing an explicit 'nest' parameter will override that process and use the value provided. This allows __builtin_call_with_static_chain to work as expected on PowerPC. llvm-svn: 241984
* Revert "[ExecutionEngine] Use std::function rather than a function pointer ↵Renato Golin2015-07-112-70/+3
| | | | | | | | | | | | | for the LazyFunctionCreator." This reverts commit r241962, as it was breaking all ARM buildbots. It also reverts the two subsequent related commits: r241974: "[ExecutionEngine] Add a static cast to the unittest for r241962 to suppress a warning." r241973: "[ExecutionEngine] Remove cruft and fix a couple of warnings in the test case for r241962." llvm-svn: 241983
* Revert "Revert r236894 "[BasicAA] Fix zext & sext handling""Hal Finkel2015-07-113-60/+396
| | | | | | | | | | | r236894 caused PR23626 (Clang miscompiles webkit's base64 decoder), and was reverted in r237984. This reapplies the patch with an additional test case for PR23626 and the associated fix (both scales and offsets in the BasicAliasAnalysis::constantOffsetHeuristic should initially be zero). Patch by Nick White, thanks! llvm-svn: 241981
* Move getStrideFromPointer and friends from LoopVectorize to VectorUtilsHal Finkel2015-07-113-137/+169
| | | | | | | | | | | | | | | | The following functions are moved from the LoopVectorizer to VectorUtils: - getGEPInductionOperand - stripGetElementPtr - getUniqueCastUse - getStrideFromPointer These used to be static functions in LoopVectorize, but will also be used by the upcoming loop versioning LICM transformation. Patch by Ashutosh Nema! llvm-svn: 241980
* Add argmemonly attribute.Igor Laevsky2015-07-1117-35/+167
| | | | | | | | This change adds new attribute called "argmemonly". Function marked with this attribute can only access memory through it's argument pointers. This attribute directly corresponds to the "OnlyAccessesArgumentPointees" ModRef behaviour in alias analysis. Differential Revision: http://reviews.llvm.org/D10398 llvm-svn: 241979
* Fix include guard typo introduced in r239315.Yaron Keren2015-07-111-1/+1
| | | | llvm-svn: 241978
* Define a new intrinsic @llvm.canonicalize.Owen Anderson2015-07-112-0/+71
| | | | | | | | This is used the canonicalize floating point values, which is useful for implementing certain numeric primitives. See the LangRef changes for the full details of its semantics. llvm-svn: 241977
* [PM/AA] Completely remove the AliasAnalysis::copyValue interface.Chandler Carruth2015-07-1111-45/+1
| | | | | | | | | | | | | | | | | | | | | No in-tree alias analysis used this facility, and it was not called in any particularly rigorous way, so it seems unlikely to be correct. Note that one of the only stateful AA implementations in-tree, GlobalsModRef is completely broken currently (and any AA passes like it are equally broken) because Module AA passes are not effectively invalidated when a function pass that fails to update the AA stack runs. Ultimately, it doesn't seem like we know how we want to build stateful AA, and until then trying to support and maintain correctness for an untested API is essentially impossible. To that end, I'm planning to rip out all of the update API. It can return if and when we need it and know how to build it on top of the new pass manager and as part of *tested* stateful AA implementations in the tree. Differential Revision: http://reviews.llvm.org/D10889 llvm-svn: 241975
* [ExecutionEngine] Add a static cast to the unittest for r241962 to suppress aLang Hames2015-07-111-1/+1
| | | | | | warning. llvm-svn: 241974
* [ExecutionEngine] Remove cruft and fix a couple of warnings in the test case forLang Hames2015-07-111-3/+2
| | | | | | r241962. llvm-svn: 241973
* Renamed some uses of unroll to interleave in the vectorizer.Tyler Nowicki2015-07-112-93/+100
| | | | llvm-svn: 241971
* MC: Shrink MCDwarfLoc/MCLineEntryDuncan P. N. Exon Smith2015-07-101-9/+18
| | | | | | | | | | | | Drop 8 bytes off of `MCDwarfLoc` by restricting the `Isa`, `Column`, and `Flags` members to appropriate sizes (from `DWARFDebugLine::Row`). Saves a little over 0.5% off the heap of llc with no real functionality change. (I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`; see r236629 for details.) llvm-svn: 241970
* Clean up the comments in DIBuilder.h to adhere to the coding standardsAdrian Prantl2015-07-101-315/+318
| | | | | | a little more. llvm-svn: 241969
* Revert "Clean up the comments in DIBuilder.h to adhere to the coding standards"Adrian Prantl2015-07-101-325/+315
| | | | | | This reverts commit 241965. (I accidentally committed too much). llvm-svn: 241968
* Cleanup a couple of comments in DIBuilder.cppAdrian Prantl2015-07-101-3/+3
| | | | llvm-svn: 241966
* Clean up the comments in DIBuilder.h to adhere to the coding standardsAdrian Prantl2015-07-101-315/+325
| | | | | | a little more. llvm-svn: 241965
* [ExecutionEngine] Use std::function rather than a function pointer for theLang Hames2015-07-102-3/+71
| | | | | | | | LazyFunctionCreator. Patch by Pierre-Andre Saulais. Thanks Pierre! llvm-svn: 241962
* MC: Only allow changing feature bits in MCSubtargetInfoDuncan P. N. Exon Smith2015-07-103-8/+25
| | | | | | | | | | | | | | | | | Disallow all mutation of `MCSubtargetInfo` expect the feature bits. Besides deleting the assignment operators -- which were dead "code" -- this restricts `InitMCProcessorInfo()` to subclass initialization sequences, and exposes a new more limited function called `setDefaultFeatures()` for use by the ARMAsmParser `.cpu` directive. There's a small functional change here: ARMAsmParser used to adjust `MCSubtargetInfo::CPUSchedModel` as a side effect of calling `InitMCProcessorInfo()`, but I've removed that suspicious behaviour. Since the AsmParser shouldn't be doing any scheduling, there shouldn't be any observable change... llvm-svn: 241961
* AMDGPU: Fix chains for memory ops dependent on argument loadsMatt Arsenault2015-07-101-4/+19
| | | | | | | | | | | | | | | Most loads and stores are derived from pointers derived from a kernel argument load inserted during argument lowering. This was just using the EntryToken chain for the argument loads, and any users of these loads were also on the EntryToken chain. Return the chain of the lowered argument load so that dependent loads end up on the correct chain. No test since I'm not aware of any case where this actually broke. llvm-svn: 241960
* MIR Serialization: Serialize the virtual register operands.Alex Lorenz2015-07-108-17/+149
| | | | | | | | Reviewers: Duncan P. N. Exon Smith Differential Revision: http://reviews.llvm.org/D11005 llvm-svn: 241959
* [IR] Switch static const to an enum to silence MSVC linker warningsDavid Majnemer2015-07-102-4/+2
| | | | | | | Integral class statics are handled oddly in MSVC, we don't need them in this case, use an enum instead. llvm-svn: 241958
OpenPOWER on IntegriCloud