summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Include initializer_list from utilityBen Craig2016-04-192-0/+21
| | | | | | | The C++11 and C++14 standards both say in the header <utility> synopsis that <utility> shall include <initializer_list>. llvm-svn: 266808
* [ARM NEON] Define vfms_f32 on ARM, and all vfms using vfma.Ahmed Bougacha2016-04-197-121/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r259537 added vfma/vfms to armv7, but the builtin was only lowered on the AArch64 side. Instead of supporting it on ARM, get rid of it. The vfms builtin lowered to: %nb = fsub float -0.0, %b %r = @llvm.fma.f32(%a, %nb, %c) Instead, define the operation in terms of vfma, and swap the multiplicands. It now lowers to: %na = fsub float -0.0, %a %r = @llvm.fma.f32(%na, %b, %c) This matches the instruction more closely, and lets current LLVM generate the "natural" operand ordering: fmls.2s v0, v1, v2 instead of the crooked (but equivalent): fmls.2s v0, v2, v1 Except for theses changes, assembly is identical. LLVM accepts both commutations, and the LLVM tests in: test/CodeGen/AArch64/arm64-fmadd.ll test/CodeGen/AArch64/fp-dp3.ll test/CodeGen/AArch64/neon-fma.ll test/CodeGen/ARM/fusedMAC.ll already check either the new one only, or both. Also verified against the test-suite unittests. llvm-svn: 266807
* [SSP, 2/2] Create llvm.stackguard() intrinsic and lower it to LOAD_STACK_GUARDTim Shen2016-04-1918-99/+209
| | | | | | | | | | | | | | | | | | | | | | | With this change, ideally IR pass can always generate llvm.stackguard call to get the stack guard; but for now there are still IR form stack guard customizations around (see getIRStackGuard()). Future SSP customization should go through LOAD_STACK_GUARD. There is a behavior change: stack guard values are not CSEed anymore, since we should never reuse the value in case that it has been spilled (and corrupted). See ssp-guard-spill.ll. This also cause the change of stack size and codegen in X86 and AArch64 test cases. Ideally we'd like to know if the guard created in llvm.stackprotector() gets spilled or not. If the value is spilled, discard the value and reload stack guard; otherwise reuse the value. This can be done by teaching register allocator to know how to rematerialize LOAD_STACK_GUARD and force a rematerialization (which seems hard), or check for spilling in expandPostRAPseudo. It only makes sense when the stack guard is a global variable, which requires more instructions to load. Anyway, this seems to go out of the scope of the current patch. llvm-svn: 266806
* [Orc] Add explicit move ops to OrcRemoteTargetRPCAPI for MSVC.Lang Hames2016-04-191-0/+11
| | | | llvm-svn: 266805
* [Orc] Fix missing return in RPC move assignment operator.Lang Hames2016-04-191-0/+1
| | | | llvm-svn: 266804
* Fixed a bug in AnnotatedLine::startsWith when there are comments in the line.Eric Liu2016-04-191-4/+13
| | | | | | | | | | | | Summary: When there are comments in the line, one token may be checked multiple times. Reviewers: mprobst, djasper Subscribers: ioeric, cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D19106 llvm-svn: 266803
* [lanai] Add lowering for SETCCE i32.Jacques Pienaar2016-04-195-35/+177
| | | | | | | | * Add lowering for SETCCE i32. * Add test to check lowering of i64 compares uses SETCCE expansion (outside of EQ and NE). * Fix select.ll test and immediate form selection for RI operations. llvm-svn: 266802
* [ValueTracking, VectorUtils] Refactor getIntrinsicIDForCallDavid Majnemer2016-04-198-179/+185
| | | | | | | | | | | | | The functionality contained within getIntrinsicIDForCall is two-fold: it checks if a CallInst's callee is a vectorizable intrinsic. If it isn't an intrinsic, it attempts to map the call's target to a suitable intrinsic. Move the mapping functionality into getIntrinsicForCallSite and rename getIntrinsicIDForCall to getVectorIntrinsicIDForCall while reimplementing it in terms of getIntrinsicForCallSite. llvm-svn: 266801
* ObjC Class Property: don't emit class properties on old deployment targets.Manman Ren2016-04-192-2/+22
| | | | | | | | For old deployment targets, emit nil for all class property lists. rdar://25616128 llvm-svn: 266800
* Attempt to fix buildbot.Rui Ueyama2016-04-191-1/+1
| | | | llvm-svn: 266799
* ELF: Add +, -, *, / and & to SECTIONS linker script command.Rui Ueyama2016-04-193-71/+248
| | | | | | | | | | | | | | | This patch is based heavily on George Rimor's patch http://reviews.llvm.org/D19221. In the linker script, you can write expressions to compute addresses. Currently we only support "+" operator. This adds a few more operators. Since this patch adds * and /, we need to handle operator precedences properly. I implemented that using the operator-precedence grammar. Differential Revision: http://reviews.llvm.org/D19237 llvm-svn: 266798
* Fix PR26999 better- RenderDebugEnablingArgs() once onlyDouglas Katzman2016-04-191-22/+22
| | | | llvm-svn: 266797
* [CUDA] Add a test for r266496 (raise an error if a CUDA installation isn't ↵Justin Lebar2016-04-191-0/+12
| | | | | | found) llvm-svn: 266796
* [Clang-tidy] Fix extra semicolon warning in ↵Eugene Zelenko2016-04-191-2/+2
| | | | | | cppcoreguidelines/ProTypeMemberInitCheck.cpp. llvm-svn: 266795
* [X86] Simplify StackMapShadowTracker; NFCSanjoy Das2016-04-192-38/+27
| | | | | | | | - Elide trivial contructor and desctructor - Move implementation out of an unnecessary explicit llvm namespace scope llvm-svn: 266794
* [X86MCInstLower] Clean up EmitNops; NFCSanjoy Das2016-04-191-51/+68
| | | | | | | Instead of having a conditional assert inside EmitNops, refactor so that the caller can have the assert instead. llvm-svn: 266793
* [Hexagon] Implement branch relaxationKrzysztof Parzyszek2016-04-193-0/+215
| | | | | | Patch by Sirish Pande. llvm-svn: 266792
* Adds a test to detect when clang omits specialized generic types from debug ↵Kate Stone2016-04-196-0/+118
| | | | | | information when using precompiled headers and -gmodules. llvm-svn: 266791
* reuse mustBeJSIdent for interface detectionMartin Probst2016-04-191-7/+8
| | | | llvm-svn: 266790
* clang-format: [JS] support `interface` as a free standing identifier.Martin Probst2016-04-192-0/+18
| | | | | | | | | | | | | | | Summary: `interface` can be used as a fee standing identifier in JavaScript/TypeScript. This change uses the heuristic of whether it's followed by another identifier as an indication. Reviewers: djasper Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D19240 llvm-svn: 266789
* [builtin_expect] tighten checks, add test, add commentsSanjay Patel2016-04-191-25/+50
| | | | llvm-svn: 266788
* reduce indentation; NFCISanjay Patel2016-04-191-9/+6
| | | | llvm-svn: 266787
* IR: Enable debug info type ODR uniquing for forward declsDuncan P. N. Exon Smith2016-04-197-13/+212
| | | | | | | | | | | | | | | | | | | | | | | | Add a new method, DICompositeType::buildODRType, that will create or mutate the DICompositeType for a given ODR identifier, and use it in LLParser and BitcodeReader instead of DICompositeType::getODRType. The logic is as follows: - If there's no node, create one with the given arguments. - Else, if the current node is a forward declaration and the new arguments would create a definition, mutate the node to match the new arguments. - Else, return the old node. This adds a missing feature supported by the current DITypeIdentifierMap (which I'm slowly making redudant). The only remaining difference is that the DITypeIdentifierMap has a "the-last-one-wins" rule, whereas DICompositeType::buildODRType has a "the-first-one-wins" rule. For now I'm leaving behind DICompositeType::getODRType since it has obvious, low-level semantics that are convenient for unit testing. llvm-svn: 266786
* [CodeGen] Widen non-power-of-2 vector HFA base types.Ahmed Bougacha2016-04-194-30/+92
| | | | | | | | | | | | | | | | | | | | | | | Currently, for the ppc64--gnu and aarch64 ABIs, we recognize: typedef __attribute__((__ext_vector_type__(3))) float v3f32; typedef __attribute__((__ext_vector_type__(16))) char v16i8; struct HFA { v3f32 a; v16i8 b; }; as an HFA. Since the first type encountered is used as the base type, we pass the HFA as: [2 x <3 x float>] Which leads to incorrect IR (relying on padding values) when the second field is used. Instead, explicitly widen the vector (after size rounding) in isHomogeneousAggregate. Differential Revision: http://reviews.llvm.org/D18998 llvm-svn: 266784
* [CodeGen] Fix whitespace. NFC.Ahmed Bougacha2016-04-191-1/+1
| | | | llvm-svn: 266783
* Pass dwarf-version to cc1as.Douglas Katzman2016-04-192-0/+11
| | | | | | Fix PR26999 - crashing in cc1as with any '*bsd' target. llvm-svn: 266775
* Preliminary changes for fixing PR27241. Generalized/restructured some thingsDavid L Kreitzer2016-04-191-19/+37
| | | | | | | | | in preparation for enabling the outgoing parameter store-to-push optimization for 64-bit targets. Differential Revision: http://reviews.llvm.org/D19222 llvm-svn: 266774
* Linker: Simplify test/Linker/dicompositetype-unique.ll, NFCDuncan P. N. Exon Smith2016-04-191-11/+9
| | | | | | | | | Simplify the test logic a little, sharing logic between the two linking directions by specifying -check-prefix multiple times. Now it's more obvious what's hte same and different between the two directions, and there is less CHECK duplication. This is a prep for expanding the test. llvm-svn: 266773
* [llvm-pdbdump] Print a better error message when PDB loading fails.Zachary Turner2016-04-194-17/+29
| | | | | | Differential Revision: http://reviews.llvm.org/D19234 llvm-svn: 266772
* [Release Notes] Mention Clang-tidy misc-unused-using-decls check.Eugene Zelenko2016-04-191-0/+5
| | | | llvm-svn: 266770
* [Orc] Add move ops to RPC to satisfy MSVC.Lang Hames2016-04-191-0/+23
| | | | llvm-svn: 266768
* [ValueTracking] Improve isImpliedCondition for conditions with matching ↵Chad Rosier2016-04-197-22/+636
| | | | | | | | | | | | | | | operands. This patch improves SimplifyCFG to catch cases like: if (a < b) { if (a > b) <- known to be false unreachable; } Phabricator Revision: http://reviews.llvm.org/D18905 llvm-svn: 266767
* [Orc] Add pthread dependence to the RPCUtilsTest unit test.Lang Hames2016-04-191-0/+2
| | | | llvm-svn: 266766
* reduce indentation; NFCISanjay Patel2016-04-191-10/+7
| | | | llvm-svn: 266765
* IR: LLVMContextTest => DebugTypeODRUniquingTest, NFCDuncan P. N. Exon Smith2016-04-192-4/+4
| | | | | | | | | The second test in this file is actually testing DICompositeType API, not LLVMContext API (after r266742 moved it to a higher level). This really doesn't make sense in an LLVMContextTest. Rename the tests before adding more. llvm-svn: 266764
* [Clang][Builtin][AVX512] Adding intrinsics for VGETMANT{PD|PS} and ↵Michael Zuckerman2016-04-195-0/+481
| | | | | | | | VGETEXP{PD|PS} instruction set Differential Revision: http://reviews.llvm.org/D19197 llvm-svn: 266763
* Linker: Avoid constructing ValueMap::MDMapTDuncan P. N. Exon Smith2016-04-192-2/+3
| | | | | | | | | Calling ValueMap::MD lazily constructs a ValueMap, which mallocs the buckets. Instead of swapping constructed maps, move around the underlying Optional<MDMapT>. This gets rid of some unnecessary malloc traffic from r266579 (not that it showed up on a profile). llvm-svn: 266761
* [ITTNOTIFY] Remove serialized parallel regions from frame notificationJonathan Peyton2016-04-195-65/+10
| | | | llvm-svn: 266760
* [DependenceAnalysis] Refactor uses of getConstantPart. NFC.Brendon Cahoon2016-04-191-36/+21
| | | | | | | | | | Rather than checking for the SCEV type prior to calling getContantPart, perform the checks in the function. This reduces the number of places where the checks are needed. Differential Revision: http://reviews.llvm.org/D19241 llvm-svn: 266759
* Revert "[OPENMP] Codegen for untied tasks."Alexey Bataev2016-04-197-240/+92
| | | | | | This reverts commit r266754. llvm-svn: 266755
* [OPENMP] Codegen for untied tasks.Alexey Bataev2016-04-197-92/+240
| | | | | | | | If the untied clause is present on a task construct, any thread in the team can resume the task region after a suspension. Patch adds proper codegen for untied tasks. llvm-svn: 266754
* Revert r266747 (Compilation for Intel MCU (Part 1/3)) since it breaks a few ↵Andrey Turetskiy2016-04-194-63/+8
| | | | | | buildbots. llvm-svn: 266753
* Fix Gold test after r266750 (ModuleLinker: Do not import linkonce/weak as ↵Mehdi Amini2016-04-192-2/+2
| | | | | | | "external_weak") From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266752
* IR: Use Optional instead of unique_ptr for Metadata map in ValueMap, NFCDuncan P. N. Exon Smith2016-04-191-2/+2
| | | | llvm-svn: 266751
* ModuleLinker: Do not import linkonce/weak as "external_weak"Mehdi Amini2016-04-192-4/+3
| | | | | | | | | | | | | | | Summary: There is no reason to have a weak reference because the external definition will be weak. Reviewers: rafael Subscribers: llvm-commits, tejohnson Differential Revision: http://reviews.llvm.org/D19267 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266750
* IR: Use Optional instead of unique_ptr for debug info ODR type map, NFCDuncan P. N. Exon Smith2016-04-192-3/+2
| | | | | | Save a level of malloc indirection. llvm-svn: 266749
* [ASTMatchers] Do not try to memoize nodes we can't compare.Samuel Benzaquen2016-04-192-19/+43
| | | | | | | | | | | | | | | | Summary: Prevent hasAncestor from comparing nodes that are not supported. hasDescendant was fixed some time ago to avoid this problem. I'm applying the same fix to hasAncestor: if any object in the Builder map is not comparable, skip the cache. Reviewers: alexfh Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D19231 llvm-svn: 266748
* Compilation for Intel MCU (Part 1/3)Andrey Turetskiy2016-04-194-8/+63
| | | | | | | | | | | Add -miamcu option which: * Sets IAMCU triple * Sets IAMCU ABI * Enforces static compilation Differential Revision: http://reviews.llvm.org/D18398 llvm-svn: 266747
* Enable ODR uniquing of DITypes in more placesTeresa Johnson2016-04-192-0/+7
| | | | | | | | | | | | | | | | | | | | | | | Summary: This is a follow-on to apply Duncan's new DIType ODR uniquing from r266549 and r266713 in more places. Enable enableDebugTypeODRUniquing() for ThinLTO backends invoked via libLTO, similar to the way r266549 enabled this for ThinLTO backend threads launched from gold-plugin. Also enable enableDebugTypeODRUniquing in opt, similar to the way r266549 enabled this for llvm-link (on by default, can be disabled with new -disable-debug-info-type-map option), since we may perform ThinLTO importing from opt. Reviewers: dexonsmith, joker.eph Subscribers: joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D19263 llvm-svn: 266746
* [Clang][AVX512][BUILTIN] Adding intrinsics support to VEXTRACT{I|F} and ↵Michael Zuckerman2016-04-199-1/+787
| | | | | | | | VINSERT{I|F} instruction set Differential Revision: http://reviews.llvm.org/D19097 llvm-svn: 266745
OpenPOWER on IntegriCloud