summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
...
* Verifier: Add a testcase for verifying type refsDuncan P. N. Exon Smith2015-03-311-0/+32
| | | | | | | r233664 fixed the `Verifier` so that it doesn't crash on bad type refs. This deserves a test! llvm-svn: 233756
* [PowerPC] Don't use a vector preferred memory type at -O0Hal Finkel2015-03-312-15/+26
| | | | | | | | | | | | Even at -O0, we fall back to SDAG when we hit intrinsics, and if the intrinsic is a memset/memcpy/etc. we might normally use vector types. At -O0, this is probably not a good idea (because, if there is a bug in the lowering code, there would be no good way to turn it off). At -O0, only use scalar preferred types. Related to PR22754. llvm-svn: 233755
* [AArch64] Enable the codegenprepare optimization that promotes operation to formQuentin Colombet2015-03-313-0/+694
| | | | | | | | | | extended loads. Implement the related target lowering hook so that the optimization has a better estimation of the cost of an extension. rdar://problem/19267165 llvm-svn: 233753
* Fix AllocationPriority not getting set for derived register classes.Matthias Braun2015-03-311-1/+3
| | | | llvm-svn: 233752
* IR: Enable uniquing callbacks during MDNode::replaceWithUniqued()Duncan P. N. Exon Smith2015-03-313-0/+51
| | | | | | | | | | | | | | | | Uniqued nodes have more complete registration with `ReplaceableMetadataImpl` so that they can update themselves when operands change. Fix a bug where `MDNode::replaceWithUniqued()` wasn't enabling these callbacks. The two most obvious ways missing callbacks causes problems is that auto-resolution fails and re-uniquing (on changed operands) just doesn't happen. I've added tests for both -- in both cases, I confirmed that the final check was failing before the fix. rdar://problem/20365935 llvm-svn: 233751
* [MCJIT] Enable MCJIT regression tests on Darwin.Lang Hames2015-03-311-5/+0
| | | | | | Commit r233747 fixed the issue that had been blocking this. llvm-svn: 233750
* [SDAG] Handle non-integer preferred memset types for non-constant valuesHal Finkel2015-03-313-2/+80
| | | | | | | | | | | | | | The existing code in getMemsetValue only handled integer-preferred types when the fill value was not a constant. Make this more robust in two ways: 1. If the preferred type is a floating-point value, do the mul-splat trick on the corresponding integer type and then bitcast. 2. If the preferred type is a vector, do the mul-splat trick on one vector element, and then build a vector out of them. Fixes PR22754 (although, we should also turn off use of vector types at -O0). llvm-svn: 233749
* [ExecutionEngine] Fix MCJIT::addGlobalMapping.Lang Hames2015-03-313-82/+102
| | | | | | | | | | | | | | | | | | This patch fixes MCJIT::addGlobalMapping by changing the implementation of the ExecutionEngineState class. The new implementation maintains a bidirectional mapping between symbol names (std::strings) and addresses (uint64_ts), rather than a mapping between Value*s and void*s. This has fix has been made for backwards compatibility, however the strongly preferred way to resolve unknown symbols is by writing a custom RuntimeDyld::SymbolResolver (formerly RTDyldMemoryManager) and overriding the findSymbol method. The addGlobalMapping method is a hangover from the legacy JIT (which has was removed in 3.6), and may be deprecated in a future release as part of a clean-up of the ExecutionEngine interface. Patch by Murat Bolat. Thanks Murat! llvm-svn: 233747
* [fuzzer] Add support for token-based fuzzing (e.g. for C++). Allow string ↵Kostya Serebryany2015-03-3110-58/+422
| | | | | | flags. llvm-svn: 233745
* Clarify that higher priority means higher values.Matthias Braun2015-03-312-5/+5
| | | | llvm-svn: 233744
* RegAllocGreedy: Allow target to specify register class ordering.Matthias Braun2015-03-316-3/+19
| | | | | | | | | | Specify an allocation order with a register class. This is used by register allocators with a greedy heuristic. This is usefull as it is sometimes beneficial to color more constrained classes first. Differential Revision: http://reviews.llvm.org/D8626 llvm-svn: 233743
* RegAllocGreedy: Improve live interval order in ReverseLocal modeMatthias Braun2015-03-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | When allocating live intervals in linear order and all of them are local to a single basic block you get an optimal coloring. This is also true if you reverse the order, but it is not true if you sort live ranges beginnings in reverse order, change to sort live range endings in reverse order. Take the following live ranges for example: |---| |--------| |----------| |-------| They get colored suboptimally with 3 registers if you sort the live range starting points in reverse order (but optimally with live range begins in order, or live range ends in reverse order). Apparently the previous strategy was intentional because of allocation time considerations. I am having a hard time replicating these effects, while I see substantial improvements in allocation quality with this change. No testcase as none of the (in tree) targets use reverse order mode. Differential Revision: http://reviews.llvm.org/D8625 llvm-svn: 233742
* [Hexagon] Avoid an unused variable warning when assertions are offSimon Atanasyan2015-03-311-0/+1
| | | | | | No functional changes. llvm-svn: 233740
* [SystemZ] Address review comments for r233689Ulrich Weigand2015-03-311-4/+5
| | | | | | | | | | Change lowerCTPOP to: - Gracefully handle a known-zero input value - Simplify computation of significant bit size Thanks to Jay Foad for the review! llvm-svn: 233736
* [X86, AVX] fix zero-extending integer operand load patterns to use integer ↵Sanjay Patel2015-03-314-11/+29
| | | | | | | | | instructions This is a follow-on to r233704 and another partial fix for PR22685: https://llvm.org/bugs/show_bug.cgi?id=22685 llvm-svn: 233724
* [Orc][MCJIT] Remove the small code model regression tests.Lang Hames2015-03-312-24/+0
| | | | | | | | | | | | | These regression tests are supposed to test small code model support, but have been XFAIL'd because we don't have an in-tree memory manager that can guarantee a small-code-model compatible memory layout. Unfortunately, they can occasionally pass if they get lucky with memory allocation, causing unexpected passes on the bots. That's not very helpful. I'm going to remove these until we have the infrastructure (small-code-model compatible memory manager) to run them properly. llvm-svn: 233722
* AArch64: fix v8.1 sqrdmlah tests on Darwin platformsTim Northover2015-03-311-2/+2
| | | | llvm-svn: 233709
* Rework r233647, "llvm/examples: Suppress building a few JIT examples."NAKAMURA Takumi2015-03-313-3/+3
| | | | | | It didn't work with "install". llvm-svn: 233708
* [X86, AVX] try to lowerVectorShuffleAsElementInsertion() for all 256-bit ↵Sanjay Patel2015-03-314-38/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | vector sub-types I suggested this change in D7898 (http://llvm.org/viewvc/llvm-project?view=revision&revision=231354) It improves the v4i64 case although not optimally. This AVX codegen: vmovq {{.*#+}} xmm0 = mem[0],zero vxorpd %ymm1, %ymm1, %ymm1 vblendpd {{.*#+}} ymm0 = ymm0[0],ymm1[1,2,3] Becomes: vmovsd {{.*#+}} xmm0 = mem[0],zero Unfortunately, this doesn't completely solve PR22685. There are still at least 2 problems under here: We're not handling v32i8 / v16i16. We're not getting the FP / int domains right for instruction selection. But since this patch alone appears to do no harm, reduces code duplication, and helps v4i64, I'm submitting this patch ahead of fixing the above. Differential Revision: http://reviews.llvm.org/D8341 llvm-svn: 233704
* typos; NFCSanjay Patel2015-03-311-5/+5
| | | | llvm-svn: 233701
* [SystemZ] Add Analysis to required_libraries (fall-out from r233688)Ulrich Weigand2015-03-311-1/+1
| | | | | | Should fix build failures with cmake builds llvm-svn: 233700
* [docs] add cross-referenceScott Douglass2015-03-311-1/+3
| | | | llvm-svn: 233699
* Expand MUX instructions early on HexagonKrzysztof Parzyszek2015-03-3111-13/+1544
| | | | | | This time with all files included. llvm-svn: 233696
* Revert 233694. Weak SVN-fu.Krzysztof Parzyszek2015-03-317-27/+13
| | | | llvm-svn: 233695
* Expand MUX instructions early on HexagonKrzysztof Parzyszek2015-03-317-13/+27
| | | | llvm-svn: 233694
* [AArch64] Add v8.1a "Rounding Double Multiply Add/Subtract" extensionVladimir Sukharev2015-03-315-0/+960
| | | | | | | | | | Reviewers: t.p.northover, jmolloy Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8502 llvm-svn: 233693
* [SystemZ] Support RISBGN instruction on zEC12Ulrich Weigand2015-03-3111-17/+147
| | | | | | | | | | | | | | So far, we do not yet support any instruction specific to zEC12. Most of the facilities added with zEC12 are indeed not very useful to compiler code generation, but there is one exception: the miscellaneous-extensions facility provides the RISBGN instruction, which is a variant of RISBG that does not set the condition code. Add support for this facility, MC support for RISBGN, and CodeGen support for prefering RISBGN over RISBG on zEC12, unless we can actually make use of the condition code set by RISBG. llvm-svn: 233690
* [SystemZ] Use POPCNT instruction on z196Ulrich Weigand2015-03-3113-6/+208
| | | | | | | | | | We already exploit a number of instructions specific to z196, but not yet POPCNT. Add support for the population-count facility, MC support for the POPCNT instruction, CodeGen support for using POPCNT, and implement the getPopcntSupport TargetTransformInfo hook. llvm-svn: 233689
* [SystemZ] Provide basic TargetTransformInfo implementationUlrich Weigand2015-03-319-3/+335
| | | | | | | | | | | | This hooks up the TargetTransformInfo machinery for SystemZ, and provides an implementation of getIntImmCost. In addition, the patch adds the isLegalICmpImmediate and isLegalAddImmediate TargetLowering overrides, and updates a couple of test cases where we now generate slightly better code. llvm-svn: 233688
* Fix the operand encoding in the test instruction.Rafael Espindola2015-03-315-8/+8
| | | | | | Fixes pr22995. llvm-svn: 233686
* [PowerPC] Remove TargetMachine CPU auto-detectionUlrich Weigand2015-03-311-6/+0
| | | | | | As was done for X86 in r206094. llvm-svn: 233684
* [SDAG] Move TRUNCATE splitting logic into a helper, and useJames Molloy2015-03-315-24/+55
| | | | | | | | | | | it more liberally. SplitVecOp_TRUNCATE has logic for recursively splitting oversize vectors that need more than one round of splitting to become legal. There are many other ISD nodes that could benefit from this logic, so factor it out and use it for FP_TO_UINT,FP_TO_SINT,SINT_TO_FP,UINT_TO_FP and FTRUNC. llvm-svn: 233681
* [X86] Stop changing result of getHostCPUName based on whether the processor ↵Craig Topper2015-03-311-14/+5
| | | | | | supports AVX. getHostCPUFeatures should be used instead to determine whether to support AVX. llvm-svn: 233674
* Make llc use getHostCPUFeatures when 'native' is specified for cpu.Craig Topper2015-03-313-10/+23
| | | | | | This is necessary for x86 where not all Sandybridge, Ivybrige, Haswell, and Broadwell CPUs support AVX. Currently we modify the CPU name back to Nehalem for this case, but that turns off additional features for these CPUs. llvm-svn: 233673
* [X86] Be more robust against unknown Intel family 6 models. Use feature ↵Craig Topper2015-03-311-10/+43
| | | | | | flags to guess what it might be. llvm-svn: 233671
* [X86] Generate MOVNT for all vector types.Ahmed Bougacha2015-03-312-9/+298
| | | | | | | | We used to miss non-Q YMM integer vectors, and, non-Q/D XMM integer vectors. While there, change the v4i32 patterns to prefer MOVNTDQ. llvm-svn: 233668
* tools: Unify how verifyModule() is calledDuncan P. N. Exon Smith2015-03-316-11/+15
| | | | | | | | | Unify the error messages for the various tools when `verifyModule()` fails on an input module. The "brave new way" is: lltool: path/to/input.ll: error: input module is broken! llvm-svn: 233667
* [bpf] mark mov instructions as ReMaterializableAlexei Starovoitov2015-03-312-4/+7
| | | | | | loading immediate into register is cheap, so take advantage of remat. llvm-svn: 233666
* Verifier: Don't return early from verifyTypeRefs()Duncan P. N. Exon Smith2015-03-311-8/+2
| | | | | | | | We'll no longer crash in the `verifyTypeRefs()` (used to be called `verifyDebugInfo()`), so there's no reason to return early here. Remove the `EverBroken` member since this was the only use! llvm-svn: 233665
* Verifier: Explicitly verify type referencesDuncan P. N. Exon Smith2015-03-311-83/+93
| | | | | | | | | | | | | `verifyDebugInfo()` was doing two things: - Asserting on unresolved type references. - Calling `Verify()` functions for various types of debug info. The `Verify()` functions have been gutted, so rename the function to `verifyTypeRefs()` and explicitly check those. Instead of assertions, we get nice error messages now. llvm-svn: 233664
* Verifier: Move over DISubprogram::Verify()Duncan P. N. Exon Smith2015-03-313-34/+42
| | | | | | | | | | | | | Move over the remaining (somewhat complicated) check from `DISubprogram::Verify()`. I suspect this check could be optimized -- e.g., it would be nice not to do another full traversal here -- but it's not exactly obvious how. For now, just bring it over as is. Once we have a better model for the "canonical" subprogram of a `Function`, we should enforce that all `!dbg` attachments lead to the canonical one. llvm-svn: 233663
* DebugInfo: Rewrite llvm::getDISubprogram(), NFCDuncan P. N. Exon Smith2015-03-311-11/+3
| | | | | | | | Simplify implementation of `llvm::getDISubprogram()`. I might go through and see how difficult it is to update the users, since this function doesn't really seem necessary anymore. llvm-svn: 233662
* DebugInfo: Hide isScopeRef() and isTypeRef() behind NDEBUGDuncan P. N. Exon Smith2015-03-311-1/+1
| | | | | | | | | The copies of these in `lib/IR/DebugInfo.cpp` are apparently [1] only used in assertions now, so hide them behind `#ifndef NDEBUG`. [1]: http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/9238 llvm-svn: 233661
* DebugInfo: Factor out RETURN_FROM_RAW, etc.Duncan P. N. Exon Smith2015-03-311-153/+92
| | | | | | | | | | Remove the helper macros `RETURN_FROM_RAW()`, `RETURN_DESCRIPTOR_FROM_RAW()`, and `RETURN_REF_FROM_RAW()`, since they don't do anything too special anymore. This loses an `assert(get())`, but I'm hoping any crashes were shaken out when r232844 landed a few weeks ago. llvm-svn: 233660
* Verifier: Check reference flags in debug infoDuncan P. N. Exon Smith2015-03-312-18/+13
| | | | | | Move over checks of `&` and `&&` flags. llvm-svn: 233658
* Verifier: Move more debug info checks away from Verify()Duncan P. N. Exon Smith2015-03-316-46/+21
| | | | | | | | | | Most of these checks were already in the `Verifier` so this is more of a cleanup. Now almost everything is over there. Now that require a `name:` for `MDGlobalVariable`, add a check in `LLParser` for it. llvm-svn: 233657
* DebugInfo: Move debug info flags to the new hierarchyDuncan P. N. Exon Smith2015-03-312-5/+14
| | | | | | | | | Move definition of the debug info flags to the new hierarchy, but leave them duplicated in `DIDescriptor` for now to reduce code churn. My current plan is to remove `DIDescriptor` entirely, so the duplication should go away naturally. llvm-svn: 233656
* Verifier: Move checks over from DIDescriptor::Verify()Duncan P. N. Exon Smith2015-03-315-64/+46
| | | | | | | | | | | | | | Move over some more checks from `DIDescriptor::Verify()`, and change `LLParser` to require non-null `file:` fields in compile units. I've ignored the comment in test/Assembler/metadata-null-operands.ll since I disagree with it. At the time that test was written (r229960), the debug info verifier wasn't on by default, so my comment there is in the context of not expecting the verifier to be useful. It is now, and besides that, since r233394 we can check when parsing textual IR whether an operand is null that shouldn't be. llvm-svn: 233654
* [AArch64] Fix poor codegen for add immediate.Quentin Colombet2015-03-312-0/+30
| | | | | | | We used to match the register variant before the immediate when the register argument could be implicitly zero-extended. llvm-svn: 233653
* DebugInfo: Remove LexicalBlockFile scope/context distinctionDuncan P. N. Exon Smith2015-03-312-19/+4
| | | | | | | | | | | | | | Two things here: 1. I read `getScope()` and `getContext()` backwards in r233640. There was no need for `getScopeOfScope()`. Obviously not enough test coverage here (as I said in that commit, I'm going to come back to that), but anyway I'm reverting to the behaviour before r233640. 2. The callers that use `DILexicalBlockFile::getContext()` don't seem to care about the difference. Just have it redirect to `getScope()` so I can't get confused again. llvm-svn: 233650
OpenPOWER on IntegriCloud