summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-03-10Add new LLVM_OPTIMIZED_TABLEGEN build setting which configures, builds and ↵Chris Bieneman2-3/+8
uses a release tablegen build when LLVM is configured with assertions enabled. Summary: This change leverages the cross-compiling functionality in the build system to build a release tablegen executable for use during the build. Reviewers: resistor, rnk Reviewed By: rnk Subscribers: rnk, joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D7349 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231842 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10[AArch64] Avoid going through GPRs for across-vector instructions.Ahmed Bougacha8-124/+611
This adds new node types for each intrinsic. For instance, for addv, we have AArch64ISD::UADDV, such that: (v4i32 (uaddv ...)) is the same as (v4i32 (scalar_to_vector (i32 (int_aarch64_neon_uaddv ...)))) that is, (v4i32 (INSERT_SUBREG (v4i32 (IMPLICIT_DEF)), (i32 (int_aarch64_neon_uaddv ...)), ssub) In a combine, we transform all such across-vector-lanes intrinsics to: (i32 (extract_vector_elt (uaddv ...), 0)) This has one big advantage: by making the extract_element explicit, we enable the existing patterns for lane-aware instructions to fire. This lets us avoid needlessly going through the GPRs. Consider: uint32x4_t test_mul(uint32x4_t a, uint32x4_t b) { return vmulq_n_u32(a, vaddvq_u32(b)); } We now generate: addv.4s s1, v1 mul.4s v0, v0, v1[0] instead of the previous: addv.4s s1, v1 fmov w8, s1 dup.4s v1, w8 mul.4s v0, v1, v0 rdar://20044838 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231840 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10[AArch64] Remove integer INSvi*lane patterns. NFCI.Ahmed Bougacha1-4/+0
Most are redundant, and they never seem to fire. The V128 integer patterns already exist in the INS multiclass. The duplicates only fire when the vector index type isn't i64, because they accept "imm" instead of an explicit "i64", as the instruction definition patterns do. TLI::getVectorIdxTy is i64 on AArch64, so this should never happen. Also, one of them had a typo: for i64, INSvi32lane was used. I noticed because I mistakenly used an explicit i32 as the idx type, and got ins.s for an i64 vector_insert. The V64 patterns also don't seem to ever fire, as V64 vector extract/insert are legalized to V128. The equivalent float patterns are unique and useful, so keep them. No functional change intended; none exhibited on the LIT and LNT tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231838 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10Don't evaluate rend() on every iteration of the loop.Chad Rosier1-1/+3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231837 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10LoopAccessAnalysis: Silence -Wreturn-type diagnostic from GCCDavid Majnemer1-0/+3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231836 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10Don't use LLVM_LIBRARY_VISIBILITY in cpp files.Benjamin Kramer1-1/+3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231831 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10[AsmPrinter][TLOF] Reintroduce AArch64 testBruno Cardoso Lopes3-12/+106
Follow up from r231505. Fix the non-determinism by using a MapVector and reintroduce the AArch64 testcase. Defer deleting the got candidates up to the end and remove them in a bulk, avoiding linear time removal of each element. Thanks to Renato Golin for trying it out on other platforms. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231830 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10[Hexagon] Adding nodes for PIC support.Colin LeMahieu2-9/+55
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231829 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10[Hexagon] Adding DuplexInst instruction format and duplex class defs.Colin LeMahieu3-3/+116
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231828 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10Change the generation of the vmuluwm instruction to be based on the MUL opcode.Kit Barton5-11/+15
Phabricator review: http://reviews.llvm.org/D8185 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231827 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10remove function names from comments; NFCSanjay Patel1-29/+26
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231826 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10[Hexagon] Adding nodes for vector insert/extract lowering.Colin LeMahieu2-0/+76
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231825 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10[Hexagon] Renaming HexagonJT to JT and adding CP for constantpool.Colin LeMahieu3-6/+9
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231824 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10Change the datatype of DwarfExpression::Emit(Un)Signed to (u)int64_tAdrian Prantl3-10/+10
so it matches the one used by ByteStreamer::Emit(U|S)LEB128. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231823 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10NVPTX: move NVPTXAllocaHoisting into the cpp fileBenjamin Kramer3-34/+35
Also initialize without using static initialization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231822 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10[LAA-memchecks] Comment improvementAdam Nemet1-2/+2
I forgot to roll this into r231816. It was requested by Hal in D8122. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231821 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10Enable loop-rotate before loop-vectorize by defaultMichael Zolotukhin1-2/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231820 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10[LAA-memchecks 3/3] Introduce pointer partitions for memchecksAdam Nemet2-13/+65
This is the final patch that actually introduces the new parameter of partition mapping to RuntimePointerCheck::needsChecking. Another API (LAI::getInstructionsForAccess) is also exposed that helps to map pointers to instructions because ultimately we partition instructions. The WIP version of the Loop Distribution pass in D6930 has been adapted to use all this. See for example, how InstrPartitionContainer::computePartitionSetForPointers sets up the partitions using the above API and then calls to LAI::addRuntimeCheck with the pointer partitions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231818 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10[LAA-memchecks 2/3] Move number of memcheck threshold checking to LVAdam Nemet3-28/+24
Now the analysis won't "fail" if the memchecks exceed the threshold. It is the transform pass' responsibility to perform the check. This allows the transform pass to further analyze/eliminate the memchecks. E.g. in Loop distribution we only need to check pointers that end up in different partitions. Note that there is a slight change of functionality here. The logic in analyzeLoop is that if dependence checking fails due to non-constant distance between the pointers, another attempt is made to prove safety of the dependences purely using run-time checks. Before this patch we could fail the loop due to exceeding the memcheck threshold after the first step, now we only check the threshold in the client after the full analysis. There is no measurable compile-time effect but I wanted to record this here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231817 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10[LAA-memchecks 1/3] Split out NumComparisons checks. NFCAdam Nemet1-22/+30
The check for the number of memchecks will be moved to the client of this analysis. Besides allowing for transform-specific thresholds, this also lets Loop Distribution post-process the memchecks; Loop Distribution only needs memchecks between pointers of different partitions. The motivation for this first patch is to untangle the CanDoRT check from the NumComparison check before moving the NumComparison part. CanDoRT means that we couldn't determine the bounds for the pointer. Note that NumComparison is set independent of this flag. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231816 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10remove names from comments; NFCSanjay Patel1-11/+9
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231813 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10fix typos; NFCSanjay Patel1-2/+2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231812 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10NVPTX: Remove copy of LLVMInitializeNVPTXAsmPrinter.Benjamin Kramer1-7/+0
If anyone is using this for some strange reason, LLVMInitializeNVPTXAsmPrinter does exactly the same thing and is what other LLVM tools are calling. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231810 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10Hexagon: Remove unused InstrMapping.Benjamin Kramer1-8/+0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231809 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10[LoopAccesses 3/3] Print the dependences with -analyzeAdam Nemet4-67/+32
The dependences are now expose through the new getInterestingDependences API so we can use that with -analyze too and fix the FIXME. This lets us remove the test that relied on -debug to check the dependences. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231807 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10[LoopAccesses 2/3] Allow querying of interesting dependencesAdam Nemet2-24/+178
Gather an array of interesting dependences rather than just failing after the first unsafe one and regarding the loop unsafe. Loop Distribution needs to be able to collect all dependences in order to isolate the dependence cycles into their own partition. Since the dependence checking algorithm is quadratic in terms of accesses sharing the same underlying pointer, I am applying a cut-off threshold (MaxInterestingDependence). Exceeding that, the logic reverts back to the original approach deeming the loop unsafe upon encountering the first unsafe dependence. The main idea of the patch is to split isDepedent from directly answering the question whether the dep is safe for vectorization to return a dependence type which then gets mapped to old boolean result using Dependence::isSafeForVectorization. Tested that this was compile-time neutral on SpecINT2006 LTO bitcode inputs. No assembly change on the testsuite including external. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231806 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10[LoopAccesses 1/3] Expose MemoryDepChecker to LAA usersAdam Nemet2-127/+135
LoopDistribution needs to query various results of the dependence analysis. This series will expose some more APIs and state of the dependence checker. This patch is a simple one to just expose the DepChecker instance. The set is compile-time neutral measured with LTO bitcode files of SpecINT2006. Also there is no assembly change on the testsuite. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231805 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10Store an optional section start label in MCSection.Rafael Espindola14-143/+105
This makes code that uses section relative expressions (debug info) simpler and less brittle. This is still a bit awkward as the symbol is created late and has to be stored in a mutable field. I will move the symbol creation earlier in the next patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231802 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10remove function names from comments; NFCSanjay Patel1-11/+9
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231801 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10Teach lowering to correctly handle invoke statepoint and gc results tied to ↵Igor Laevsky4-22/+130
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. (Resubmitting this change after not being able to reproduce buildbot failure) Differential Revision: http://reviews.llvm.org/D7760 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231800 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10[BranchFolding] Remove MMOs during tail merge to preserve dependencies.Chad Rosier3-0/+81
When tail merging it may be necessary to remove MMOs from memory operations to ensures later passes (e.g., MI sched) conservatively compute dependencies. Currently, we only remove the MMO from the common tail if the MMO doesn't match with the relative instruction in the non-common tail(s). A more robust solution would be to add multiple MMOs from the duplicate MIs to the new MI. Currently ScheduleDAGInstrs.cpp ignores all MMOs on instructions with multiple MMOs, so this solution is equivalent for the time being. No test case included as this is incredibly difficult to reproduce. Patch was a collaborative effort between Ana Pazos and myself. Phabricator: http://reviews.llvm.org/D7769 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231799 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10R600/SI: Add _IDXEN and _BOTHEN variants for buffer_storeTom Stellard1-0/+15
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231798 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10R600/SI: Re-order MUBUF operands to match asm strings.Tom Stellard3-20/+19
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231797 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10R600/SI: Move kill flag to second instruction when splitting SMRDTom Stellard1-5/+12
This fixes a machine verifier error in the salu-to-valu.ll, which would have been exposed by a future commit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231796 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10R600/SI: Add 32-bit encoding of v_cndmask_b32Tom Stellard3-6/+25
This was done by refactoring the v_cndmask_b32 tablegen definition to use inherit from VOP2Inst. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231795 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10[X86, AVX] replace vinsertf128 intrinsics with generic shufflesSanjay Patel7-124/+98
We want to replace as much custom x86 shuffling via intrinsics as possible because pushing the code down the generic shuffle optimization path allows for better codegen and less complexity in LLVM. This is the sibling patch for the Clang half of this change: http://reviews.llvm.org/D8088 Differential Revision: http://reviews.llvm.org/D8086 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231794 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10Hexagon: Remove pass that does nothing at allBenjamin Kramer4-106/+0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231791 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10Remove effectively dead code.Rafael Espindola2-17/+1
Switching back and forth between sections does nothing (other than producing larger .s files). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231790 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10Fix a memory corruption in Dependency Analysis.Karthik Bhat2-0/+105
This crash occurs due to memory corruption when trying to update dependency direction based on Constraints. This crash was observed during lnt regression of Polybench benchmark test case dynprog. Review: http://reviews.llvm.org/D8059 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231788 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10Don't repeat names and clang-format this file.Rafael Espindola1-34/+30
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231786 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10Removing dead code to silence warning C4060: switch statement contains no ↵Aaron Ballman1-14/+0
'case' or 'default' labels; NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231785 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10Fix a crash in Dependency Analysis.Karthik Bhat2-6/+57
This crash in Dependency analysis is because we assume here that in case of UsefulGEP both source and destination have the same number of operands which may not be true. This incorrect assumption results in crash while populating Pairs. Fix the same. This crash was observed during lnt regression for code such as- struct s{ int A[10][10]; int C[10][10][10]; } S; void dep_constraint_crash_test(int k,int N) { for( int i=0;i<N;i++) for( int j=0;j<N;j++) S.A[0][0] = S.C[0][0][k]; } Review: http://reviews.llvm.org/D8162 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231784 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10The operand flag word used in ISD::INLINEASM is an i32 not a pointer. NFC.Daniel Sanders1-4/+2
Summary: This is part of the work to support memory constraints that behave differently to 'm'. The subsequent patches will expand on the existing encoding (which is a 32-bit int) and as a result in some flag words will no longer fit into an i16. This problem only affected the MSP430 target which appears to have 16-bit pointers. Reviewers: hfinkel Reviewed By: hfinkel Subscribers: hfinkel, llvm-commits Differential Revision: http://reviews.llvm.org/D8168 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231783 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10Teach raw_ostream to accept SmallString.Yaron Keren6-12/+17
Saves adding .str() call to any raw_ostream << SmallString usage and a small step towards making .str() consistent in the ADTs by removing one of the SmallString::str() use cases, discussion at http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20141013/240026.html I'll update the Phabricator patch http://reviews.llvm.org/D6372 for review of the Twine SmallString support, it's more complex than this one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231763 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10Fix a crash in InstCombine where we could try to truncate a switch ↵Owen Anderson2-1/+9
comparison to zero width. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231761 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10Fix a stack overflow in the assembler when checking that GEPs must be over ↵Owen Anderson2-2/+15
sized types. We failed to use a marking set to properly handle recursive types, which caused use to recurse infinitely and eventually overflow the stack. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231760 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10Fix an issue in the verifier where we could try to read information out of a ↵Owen Anderson2-1/+25
malformed statepoint intrinsic. In this situation we would always have already flagged an error on the statepoint intrinsic, but then we carry on to parse other, related GC intrinsics, and could end up crashing during that verification when they try to access data from the malformed statepoint. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231759 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10Fix an infinite loop in InstCombine when an instruction with no users and ↵Owen Anderson2-0/+18
side effects can be constant folded. ReplaceInstUsesWith needs to return nullptr when the input has no users, because in that case it does not mutate the program. Otherwise, we can get stuck in an infinite loop of repeatedly attempting to constant fold and instruction with no users. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231755 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10Move variable into assert to fix -Asserts builds.Rafael Espindola1-4/+2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231753 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-10Remove incredibly confusing isBaseAddressKnownZero.Rafael Espindola4-18/+2
When referring to a symbol in a dwarf section on ELF we should use .long foo instead of .long foo - .debug_something because ELF is unaware of the content of the sections and therefore needs relocations. This has nothing to do with optimizing a -0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231751 91177308-0d34-0410-b5e6-96231b3b80d8