summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
...
* PR17473:Michael Zolotukhin2014-03-122-3/+88
| | | | | | | Don't normalize an expression during postinc transformation unless it's invertible. llvm-svn: 203719
* [X86] Add peephole for masked rotate amountAdam Nemet2014-03-122-0/+10
| | | | | | | | | | | | | | | | Extend what's currently done for shift because the HW performs this masking implicitly: (rotl:i32 x, (and y, 31)) -> (rotl:i32 x, y) I use the newly factored out multiclass that was only supporting shifts so far. For testing I extended my testcase for the new rotation idiom. <rdar://problem/15295856> llvm-svn: 203718
* Fix the ocaml test to not create a alias to a declaration.Rafael Espindola2014-03-121-1/+2
| | | | llvm-svn: 203717
* Test commitMichael Zolotukhin2014-03-121-0/+1
| | | | llvm-svn: 203716
* Profile: Avoid an unnecessary __attribute__((packed))Justin Bogner2014-03-122-9/+3
| | | | | | MSVC doesn't understand it, and it wasn't really necessary anyway. llvm-svn: 203709
* Profile: Remove an inefficient and unnecessary API functionJustin Bogner2014-03-123-27/+9
| | | | | | | This was leftover from an approach I abandoned, but I forgot to update it before committing. llvm-svn: 203708
* Resubmit "[SLPV] Recognize vectorizable intrinsics during SLP vectorization ..."Raul E. Silvera2014-03-122-0/+158
| | | | | | | This reverts commit 86cb795388643710dab34941ddcb5a9470ac39d8. The problems previously found have been resolved through other CLs. llvm-svn: 203707
* Add a triple to fix the test on OS X.Rafael Espindola2014-03-121-1/+1
| | | | llvm-svn: 203706
* Reject alias to undefined symbols in the verifier.Rafael Espindola2014-03-1217-63/+166
| | | | | | | | | | | | | | | On ELF and COFF an alias is just another name for a position in the file. There is no way to refer to a position in another file, so an alias to undefined is meaningless. MachO currently doesn't support aliases. The spec has a N_INDR, which when implemented will have a different set of restrictions. Adding support for it shouldn't be harder than any other IR extension. For now, having the IR represent what is actually possible with current tools makes it easier to fix the design of GlobalAlias. llvm-svn: 203705
* llvm-profdata: Use the Profile library, implement show and generateJustin Bogner2014-03-1230-197/+417
| | | | | | | | This replaces the llvm-profdata tool with a version that uses the recently introduced Profile library. The new tool has the ability to generate and summarize profdata files as well as merging them. llvm-svn: 203704
* Profile: Add a library for the instrumentation based profiling formatJustin Bogner2014-03-1212-2/+553
| | | | | | | | | | | This provides a library to work with the instrumentation based profiling format that is used by clang's -fprofile-instr-* options and by the llvm-profdata tool. This is a binary format, rather than the textual one that's currently in use. The tests are in the subsequent commits that use this. llvm-svn: 203703
* Fix two thinkos in testcase and remove XFAIL.Eric Christopher2014-03-121-2/+3
| | | | llvm-svn: 203702
* Use -std=gnu++11 on cygwin and mingw.Rafael Espindola2014-03-122-2/+14
| | | | | | | | | Without this common features like off_t and strdup are missing. This should bring back those bots. Configure bits by Meador Inge. llvm-svn: 203701
* Allow exclamation and tilde to be parsed as a part of the ppc asm operand.Roman Divacky2014-03-122-0/+9
| | | | llvm-svn: 203699
* XFAIL this temporarily.Eric Christopher2014-03-121-0/+1
| | | | llvm-svn: 203698
* Move test to X86 only for now.Eric Christopher2014-03-121-0/+0
| | | | llvm-svn: 203697
* R600: Fix trunc store from i64 to i1Matt Arsenault2014-03-122-0/+36
| | | | llvm-svn: 203695
* Allow switch-to-lookup table for tables with holes by adding bitmask checkHans Wennborg2014-03-122-7/+89
| | | | | | | | | | | | | | | | | | | | | | | | This allows us to generate table lookups for code such as: unsigned test(unsigned x) { switch (x) { case 100: return 0; case 101: return 1; case 103: return 2; case 105: return 3; case 107: return 4; case 109: return 5; case 110: return 6; default: return f(x); } } Since cases 102, 104, etc. are not constants, the lookup table has holes in those positions. We therefore guard the table lookup with a bitmask check. Patch by Jasper Neumann! llvm-svn: 203694
* When computing the size of a base type be conservative if the typeEric Christopher2014-03-122-2/+145
| | | | | | is a declaration and return the size of the type. llvm-svn: 203690
* Revert r203488 and r203520.Evan Cheng2014-03-124-102/+62
| | | | llvm-svn: 203687
* Avoid repeated calls to CE->getOperand(0). No functionality change.Rafael Espindola2014-03-121-9/+10
| | | | llvm-svn: 203686
* [X86] Refactor peepholes for masked shift amount into a multiclassAdam Nemet2014-03-121-55/+25
| | | | | | | | | | | | | | | | | | The peephole (shift x, (and y, 31)) -> (shift x, y) is repeated for each integer type and each shift variant. To improve this a new multiclass is added that covers all integer types. The shift patterns are now instantiated from this. I am planning to add new instances for rotates as well. No functional change intended: * test/CodeGen/X86/shift-and.ll provides coverage * Compared the expanded tablegen output and matched up the defs for these Pat<>s before and after llvm-svn: 203685
* [X86] Set the scheduling resources of some of the FPStack instructions.Quentin Colombet2014-03-121-0/+17
| | | | | | This is related to <rdar://problem/15607571>. llvm-svn: 203682
* Use values we've already computed, update comment.Eric Christopher2014-03-121-4/+3
| | | | | | No functional change. llvm-svn: 203681
* Turn on hashing by default for split dwarf compile units.Eric Christopher2014-03-122-2/+2
| | | | llvm-svn: 203680
* unittests: Fix -Werror buildJustin Bogner2014-03-121-2/+2
| | | | llvm-svn: 203679
* Correct typo ("a entry" -> "an entry")David Blaikie2014-03-121-1/+1
| | | | llvm-svn: 203678
* Try harder to evaluate expressions when printing assembly.Rafael Espindola2014-03-129-20/+23
| | | | | | | | | When printing assembly we don't have a Layout object, but we can still try to fold some constants. Testcase by Ulrich Weigand. llvm-svn: 203677
* DebugInfo: Use common line/file attribute construction codeDavid Blaikie2014-03-121-5/+3
| | | | llvm-svn: 203676
* Revive SizeOptLevel-explaining comments that were dropped in r203669Eli Bendersky2014-03-121-2/+2
| | | | llvm-svn: 203675
* Add parens around && clauses in a || to appease the compiler.Eli Bendersky2014-03-121-2/+2
| | | | | | Otherwise gcc 4.8.2 generates a warning. llvm-svn: 203671
* Add comment pointing to the binutils bugzilla entryHans Wennborg2014-03-121-0/+1
| | | | | | This is a follow-up to r203635 as suggested by Rafael. llvm-svn: 203670
* Move duplicated code into a helper function (exposed through overload).Eli Bendersky2014-03-123-12/+26
| | | | | | | | | | | | | | | | | There's a bit of duplicated "magic" code in opt.cpp and Clang's CodeGen that computes the inliner threshold from opt level and size opt level. This patch moves the code to a function that lives alongside the inliner itself, providing a convenient overload to the inliner creation. A separate patch can be committed to Clang to use this once it's committed to LLVM. Standalone tools that use the inlining pass can also avoid duplicating this code and fearing it will go out of sync. Note: this patch also restructures the conditinal logic of the computation to be cleaner. llvm-svn: 203669
* Update the datalayout string for ppc64LE.Will Schmidt2014-03-121-2/+7
| | | | | | Update the datalayout string for ppc64LE. llvm-svn: 203664
* Cloning a function now also clones its debug metadata if ↵Alon Mishne2014-03-123-2/+270
| | | | | | 'ModuleLevelChanges' is true. llvm-svn: 203662
* [mips][fp64] Add an implicit def to MTHC1 claiming that it reads the lower ↵Daniel Sanders2014-03-121-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 32-bits of 64-bit FPR Summary: This is a white lie to workaround a widespread bug in the -mfp64 implementation. The problem is that none of the 32-bit fpu ops mention the fact that they clobber the upper 32-bits of the 64-bit FPR. This allows MTHC1 to be scheduled on the wrong side of most 32-bit FPU ops, particularly MTC1. Fixing that requires a major overhaul of the FPU implementation which can't be done right now due to time constraints. The testcase is SingleSource/Benchmarks/Misc/oourafft.c when given TARGET_CFLAGS='-mips32r2 mfp64 -mmsa'. Also correct the comment added in r203464 to indicate that two instructions were affected. Reviewers: matheusalmeida, jacksprat Reviewed By: matheusalmeida Differential Revision: http://llvm-reviews.chandlerc.com/D3029 llvm-svn: 203659
* [mips] BSEL's and BINS[RL] operands are reversed compared to the vselect ↵Daniel Sanders2014-03-127-49/+85
| | | | | | | | | | | | | | | | | | | | | | | node used in the pattern. Summary: Correct the match patterns and the lowerings that made the CodeGen tests pass despite the mistakes. The original testcase that discovered the problem was SingleSource/UnitTests/SignlessType/factor.c in test-suite. During review, we also found that some of the existing CodeGen tests were incorrect and fixed them: * bitwise.ll: In bsel_v16i8 the IfSet/IfClear were reversed because bsel and bmnz have different operand orders and the test didn't correctly account for this. bmnz goes 'IfClear, IfSet, CondMask', while bsel goes 'CondMask, IfClear, IfSet'. * vec.ll: In the cases where a bsel is emitted as a bmnz (they are the same operation with a different input tied to the result) the operands were in the wrong order. * compare.ll and compare_float.ll: The bsel operand order was correct for a greater-than comparison, but a greater-than comparison instruction doesn't exist. Lowering this operation inverts the condition so the IfSet/IfClear need to be swapped to match. The differences between BSEL, BMNZ, and BMZ and how they map to/from vselect are rather confusing. I've therefore added a note to MSA.txt to explain this in a single place in addition to the comments that explain each case. Reviewers: matheusalmeida, jacksprat Reviewed By: matheusalmeida Differential Revision: http://llvm-reviews.chandlerc.com/D3028 llvm-svn: 203657
* ARM: correct Dwarf output for non-contiguous VFP saves.Tim Northover2014-03-123-3/+56
| | | | | | | | | | | | | | | | | | When the list of VFP registers to be saved was non-contiguous (so multiple vpush/vpop instructions were needed) these were being ordered oddly, as in: vpush {d8, d9} vpush {d11} This led to the layout in memory being [d11, d8, d9] which is ugly and doesn't match the CFI_INSTRUCTIONs we're generating either (so Dwarf info would be broken). This switches the order of vpush/vpop (in both prologue and epilogue, obviously) so that the Dwarf locations are correct again. rdar://problem/16264856 llvm-svn: 203655
* Replace '#include ValueTypes.h' with forward declarations.Patrik Hagglund2014-03-1215-20/+18
| | | | | | | In some cases the include is pushed "downstream" (or removed if unused). llvm-svn: 203644
* [ARM] Use DWARF register numbers for CFI directives in ELF assemblyHans Wennborg2014-03-124-145/+148
| | | | | | | | | | | | | | It seems gas can't handle CFI directives with VFP register names ("d12", etc.). This broke us trying to build Chromium for Android after 201423. A gas bug has been filed: https://sourceware.org/bugzilla/show_bug.cgi?id=16694 compnerd suggested making this conditional on whether we're using the integrated assembler or not. I'll look into that in a follow-up patch. Differential Revision: http://llvm-reviews.chandlerc.com/D3049 llvm-svn: 203635
* DebugInfo: Omit pubnames/pubtypes when compiling with -gmltDavid Blaikie2014-03-122-2/+11
| | | | llvm-svn: 203634
* DebugInfo: Do not emit pubnames/pubtypes sections if they are emptyDavid Blaikie2014-03-112-2/+5
| | | | llvm-svn: 203622
* Test for empty pubnames/pubtypesDavid Blaikie2014-03-111-0/+6
| | | | llvm-svn: 203621
* DebugInfo: Avoid re-looking up the DwarfUnit when emitting pubnames/pubtypesDavid Blaikie2014-03-111-1/+4
| | | | llvm-svn: 203620
* DebugInfo: Refactor emitDebugPubNames/Types into a common implementationDavid Blaikie2014-03-113-57/+17
| | | | | | | | | | I could fold the callers into their one call site, but the indirection (given how verbose choosing the section is) seemed helpful. The use of a member function pointer's a bit "tricky", but seems limited enough, the call sites are simple/clean/clear, and there's only one use. llvm-svn: 203619
* Accept Twine's to AsmPrinter::getTempSymbol (refactoring for an incoming change)David Blaikie2014-03-112-4/+5
| | | | llvm-svn: 203617
* Clean up test/DebugInfo/empty.ll now that we have an alias for "llc with ↵David Blaikie2014-03-111-4/+2
| | | | | | dwarf output" llvm-svn: 203616
* move WITH_POLLY option before add_subdirectory(tools)Sebastian Pop2014-03-111-7/+7
| | | | | | | | | | | the first run of the polly buildbot failed, and then it started passing. This is due to the fact that the buildbot re-builds in an existing directory, and the first run does not have WITH_POLLY set when it enters tools/. Thus, cmake ignores the tools/polly dir in the first run, and then because it reuses the CMakeCache.txt of the previous run, it has the WITH_POLLY set by the previous run, and so it passes the second time. llvm-svn: 203615
* DebugInfo: Remove unused labels now that we just emit DW_AT_gnu_pubnames as ↵David Blaikie2014-03-111-8/+0
| | | | | | a flag (as of r203082) llvm-svn: 203612
* support: add a utility function to normalise path separatorsSaleem Abdulrasool2014-03-114-0/+63
| | | | | | | | Add a utility function to convert the Windows path separator to Unix style path separators. This is used by a subsequent change in clang to enable the use of Windows SDK headers on Linux. llvm-svn: 203611
OpenPOWER on IntegriCloud