summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* [AVX512] add PSRAW Intrinsic Michael Zuckerman2016-01-041-0/+6
| | | | | | Differential Revision: http://reviews.llvm.org/D15850 llvm-svn: 256751
* [MC] Fix file name in file headerJeroen Ketema2016-01-041-1/+1
| | | | llvm-svn: 256749
* [AVX512] add PSRLV Intrinsic Michael Zuckerman2016-01-041-0/+7
| | | | | | Differential Revision: http://reviews.llvm.org/D15838 llvm-svn: 256747
* Fix a horrible infloop in value tracking in the face of dead code.Chandler Carruth2016-01-041-1/+6
| | | | | | | | | | | | | | | Amazingly, we just never triggered this without: 1) Moving code around for MetadataTracking so that a certain *different* amount of inlining occurs in the per-TU compile step. 2) Then you LTO opt or clang with a bootstrap, and get inlining, loop opts, and GVN line up everything *just* right. I don't really know how we didn't hit this before. We really need to be fuzz testing stuff, it shouldn't be hard to trigger. I'm working on crafting a reduced nice test case, and will submit that when I have it, but I want to get LTO build bots going again. llvm-svn: 256735
* [TableGen] Use some free space in Init to store the opcode for ↵Craig Topper2016-01-041-4/+4
| | | | | | UnOpInit/BinOpInit/TernOpInit allowing those types to be a little smaller. NFC llvm-svn: 256733
* [X86] Make hasFP constant timeDavid Majnemer2016-01-045-25/+27
| | | | | | | | | | We need a frame pointer if there is a push/pop sequence after the prologue in order to unwind the stack. Scanning the instructions to figure out if this happened made hasFP not constant-time which is a violation of expectations. Let's compute this up-front and reuse that computation when we need it. llvm-svn: 256730
* [LICM] Make instruction sinking funclet-awareDavid Majnemer2016-01-041-16/+75
| | | | | | | | | | | We had two bugs here: - We might try to sink into a catchswitch, causing verifier failures. - We will succeed in sinking into a cleanuppad but we didn't update the funclet operand bundle. This fixes PR26000. llvm-svn: 256728
* [TableGen] Change TGParser::SetValue to take an ArrayRef instead of ↵Craig Topper2016-01-042-15/+10
| | | | | | std::vector reference. Use None in many places where a default constructed vector was being passed. NFC llvm-svn: 256726
* [TableGen] Fix a bug that caused the wrong name for a record built from a ↵Craig Topper2016-01-042-7/+12
| | | | | | | | | | | | multiclass containing a defm called NAME that references another multiclass that contains a defm that uses NAME concatenated with other strings. It would end up doing the concatenations from the second multiclass twice. This occured because SetValue detected a self assignment when trying to set the value of NAME to a VarInit called NAME. NAME is special here and it will get cleaned up later. So add a flag to suppress the self assignment check for this case. Strangely the self-assignment error was returning false indicating it wasn't an error, but it wasn't doing the right thing. So this also changes it to report an error. This fixes the names of some AVX512 FMA instructions that showed this double expansion. llvm-svn: 256725
* Use std::is_sorted and std::none_of instead of manual loops. NFCCraig Topper2016-01-034-25/+23
| | | | llvm-svn: 256719
* [PGO] Cleanup: remove reduncant calls in loweringXinliang David Li2016-01-031-2/+0
| | | | | | | | CoverageMapping data's section and alignment is already set during creation. No need to call it again during lowering. llvm-svn: 256716
* [PGO] Cleanup: Use covmap header definition in the template fileXinliang David Li2016-01-031-4/+4
| | | | | | | | | | | | | | This is one last remaining instrumentatation related structure that needs to be migrate to use the centralized template definition. With this change, instrumentation code related to coverage module header will be kept in sync with the coverage mapping reader. The remaining code which makes implicit assumption about covmap control structure layout in the the lowering pass will cleaned up in a different patch. This patch is not intended to have no functional change. llvm-svn: 256715
* [PGO] Code refactoring to use header struct def /NFCXinliang David Li2016-01-031-5/+10
| | | | llvm-svn: 256712
* [SelectionDAG] Pulled out common code for CONCAT_VECTORS node creationSimon Pilgrim2016-01-031-39/+55
| | | | | | Pulled out the similar CONCAT_VECTORS creation code from the 2/3 operand getNode() calls (to handle all UNDEF and all BUILD_VECTOR cases). Added a similar handler to the general getNode() call as well. llvm-svn: 256709
* Fix several accidental DOS line endings in source filesDimitry Andric2016-01-033-120/+120
| | | | | | | | | | | | | | | Summary: There are a number of files in the tree which have been accidentally checked in with DOS line endings. Convert these to native line endings. There are also a few files which have DOS line endings on purpose, and I have set the svn:eol-style property to 'CRLF' on those. Reviewers: joerg, aaron.ballman Subscribers: aaron.ballman, sanjoy, dsanders, llvm-commits Differential Revision: http://reviews.llvm.org/D15848 llvm-svn: 256707
* Use an ArrayRef to simplify repeated calculation of the array end. NFCCraig Topper2016-01-031-5/+6
| | | | llvm-svn: 256702
* Use std::is_sorted instead of manual loops. NFCCraig Topper2016-01-031-8/+4
| | | | llvm-svn: 256701
* [PGO] simple refactoring (NFC)Xinliang David Li2016-01-031-4/+8
| | | | llvm-svn: 256695
* WinEHPrepare.cpp: Suppress a warning for -Asserts. [-Wunused-variable]NAKAMURA Takumi2016-01-031-4/+2
| | | | llvm-svn: 256694
* [Verifier] Add braces to satisfy buildbots. NFCJoseph Tremoulet2016-01-021-1/+2
| | | | | | Fix build break introduced by r256691. llvm-svn: 256692
* [WinEH] Verify catchswitch handlersJoseph Tremoulet2016-01-021-0/+7
| | | | | | | | | | | | | | Summary: The handler list must be nonempty and consist solely of CatchPads. Reviewers: rnk, andrew.w.kaylor, majnemer Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D15842 llvm-svn: 256691
* [WinEH] Tighten parentPad verifier checksJoseph Tremoulet2016-01-021-4/+2
| | | | | | | | | | | | Summary: A catchswitch cannot be a parent of a cleanuppad or another catchswitch. Reviewers: rnk, andrew.w.kaylor, majnemer Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D15841 llvm-svn: 256690
* [WinEH] Update catchrets with cloned successorsJoseph Tremoulet2016-01-021-4/+38
| | | | | | | | | | | | | | | | | | | | Summary: Add a pass to update catchrets when their successors get cloned; the existing pass doesn't catch these because it walks the funclet whose blocks are being cloned but the catchret is in a child funclet. Also update the test for removing incoming PHI values; when the predecessor is a catchret, the relevant color is the catchret's parentPad, not its block's color. Reviewers: andrew.w.kaylor, rnk, majnemer Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D15840 llvm-svn: 256689
* Correct misleading formatting of several ifs followed by two statements ↵Yaron Keren2016-01-021-5/+16
| | | | | | | | | | without braces. While the original code would work with or without braces, it makes sense to set HaveSemi to true only if (!HaveSemi), otherwise it's already true, so I put the assignment inside the if block. This addresses PR25998. llvm-svn: 256688
* [WinEH] Add additional verificationDavid Majnemer2016-01-021-4/+7
| | | | | | | | Recolor the IR to make sure our computed colors are not hiding any bugs. Also, verifyFunction if we are running some post-preparation operations; some of these operations can hide latent bugs. llvm-svn: 256687
* [X86] Add intrinsics for reading and writing to the flags registerDavid Majnemer2016-01-013-4/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | LLVM's targets need to know if stack pointer adjustments occur after the prologue. This is needed to correctly determine if the red-zone is appropriate to use or if a frame pointer is required. Normally, LLVM can figure this out very precisely by reasoning about the contents of the MachineFunction. There is an interesting corner case: inline assembly. The vast majority of inline assembly which will perform a push or pop is done so to pair up with pushf or popf as appropriate. Unfortunately, this inline assembly doesn't mark the stack pointer as clobbered because, well, it isn't. The stack pointer is decremented and then immediately incremented. Because of this, LLVM was changed in r256456 to conservatively assume that inline assembly contain a sequence of stack operations. This is unfortunate because the vast majority of inline assembly will not end up manipulating the stack pointer in any way at all. Instead, let's provide a more principled solution: an intrinsic. FWIW, other compilers (MSVC and GCC among them) also provide this functionality as an intrinsic. llvm-svn: 256685
* [LibCallSimplifier] propagate FMF when shrinking binary callsSanjay Patel2015-12-311-0/+4
| | | | llvm-svn: 256682
* [X86] Remove a return after llvm_unreachable.Craig Topper2015-12-311-1/+0
| | | | llvm-svn: 256681
* [X86] Move shuffle decoding for constant pool into the X86CodeGen library to ↵Craig Topper2015-12-317-181/+238
| | | | | | remove a layering violation in the Util library. llvm-svn: 256680
* [LibCallSimplifier] propagate FMF when shrinking unary callsSanjay Patel2015-12-311-0/+4
| | | | llvm-svn: 256679
* Variable names start with an upper case letter; NFCSanjay Patel2015-12-311-4/+4
| | | | llvm-svn: 256676
* fix formatting; NFCSanjay Patel2015-12-311-17/+22
| | | | llvm-svn: 256675
* [AVX512] add PSRLQ and PSRLD IntrinsicMichael Zuckerman2015-12-311-0/+10
| | | | | | Differential Revision: http://reviews.llvm.org/D15770 llvm-svn: 256673
* [X86] Avoid folding scalar loads into unary sse intrinsicsMichael Kuperstein2015-12-311-15/+39
| | | | | | | | | | | | | | | | | | Not folding these cases tends to avoid partial register updates: sqrtss (%eax), %xmm0 Has a partial update of %xmm0, while movss (%eax), %xmm0 sqrtss %xmm0, %xmm0 Has a clobber of the high lanes immediately before the partial update, avoiding a potential stall. Given this, we only want to fold when optimizing for size. This is consistent with the patterns we already have for some of the fp/int converts, and in X86InstrInfo::foldMemoryOperandImpl() Differential Revision: http://reviews.llvm.org/D15741 llvm-svn: 256671
* [X86][PKU] Add {RD,WR}PKRU intrinsicsAsaf Badouh2015-12-312-3/+55
| | | | | | Differential Revision: http://reviews.llvm.org/D15808 llvm-svn: 256670
* [TableGen] Modify the AsmMatcherEmitter to only apply the table growth from ↵Craig Topper2015-12-311-0/+5
| | | | | | | | | | | | | | r252440 to the Hexagon target. This restores the previous behavior of not including the mnemonic in the classes table for every target that starts instruction lines with the mnemonic. Not only did the table size increase by 1 entry, but the class enum increased in size which caused every class in the array to increase in size. It also grew the size of the function that parsers tokens into classes by a substantial amount. This adds a new HasMnemonicFirst flag to all AsmParsers. It's set to 1 by default and Hexagon target overrides it to 0. For the X86 target alone this recovers 324KB of size on the llvm-mc executable. I believe the current state is still a bad design choice for the Hexagon target as it causes most of the parsing to do a linear search through the entire match table to comparing operands against every instruction until it finds one that works. At least for the other targets we do a binary search based on mnemonic over which to do the linear scan. llvm-svn: 256669
* [PGO]: Implement Func PGO name string compressionXinliang David Li2015-12-311-2/+99
| | | | | | | | | | This is part of the effort/prepration to reduce the size instr-pgo (object, binary, memory footprint, and raw data). The functionality is currently off by default and not yet used by any clients. llvm-svn: 256667
* [ValueTracking] fix bug computing isKnownToBeAPowerOfTwo() with arithmetic ↵Sanjay Patel2015-12-301-2/+3
| | | | | | | | | | | | | | shift right (PR25900) This is a fix for: https://llvm.org/bugs/show_bug.cgi?id=25900 If we think that an arithmetic right shift of a power of two is always a power of two, an sdiv gets wrongly converted to udiv. Differential Revision: http://reviews.llvm.org/D15827 llvm-svn: 256655
* [ThinLTO] Rename variables used in metadata linking (NFC)Teresa Johnson2015-12-303-9/+11
| | | | | | | | As suggested in review for r255909, rename MDMaterialized to AllowTemps, and identify the name of the boolean flag being set in calls to saveMetadataList. llvm-svn: 256653
* Ensure MDNode used as key in metadata linking map cannot be RAUWedTeresa Johnson2015-12-303-0/+24
| | | | | | | | | | | | As suggested in review for r255909, add a way to ensure that temporary MD used as keys in the MetadataToID map during ThinLTO importing are not RAUWed. Add support for marking an MDNode as not replaceable. Clear the new CanReplace flag when adding a temporary MD node to the MetadataToID map and clear it when destroying the map. llvm-svn: 256648
* [ThinLTO] Check MDNode values saved for metadata linking (NFC)Teresa Johnson2015-12-301-0/+5
| | | | | | | | | | | Add an assert suggested in review for r255909 to ensure that MDNodes saved in the map used for metadata linking are either temporary or resolved. Also add a comment clarifying why we may need to save off non-MDNode metadata. llvm-svn: 256646
* fix formatting; NFCSanjay Patel2015-12-301-8/+8
| | | | llvm-svn: 256645
* Rename MDValue* to Metadata* (NFC)Teresa Johnson2015-12-294-151/+156
| | | | | | | Renamed MDValue* to Metadata*, and MDValueToValIDMap to MetadataToIDs, as per review for r255909. llvm-svn: 256593
* [RS4GC] Use DenseMap::count() instead of DenseMap::find()/DenseMap::end(). NFC.Manuel Jacob2015-12-291-1/+1
| | | | llvm-svn: 256586
* don't repeat function names in comments; NFCSanjay Patel2015-12-291-57/+47
| | | | llvm-svn: 256584
* use auto with dyn_casted values; NFCSanjay Patel2015-12-291-6/+3
| | | | llvm-svn: 256581
* [PlaceSafepoints] Assert that the gc.safepoint_poll function is present in ↵Manuel Jacob2015-12-291-0/+1
| | | | | | | | | | | the module. If running the PlaceSafepoints pass on a module which doesn't have the gc.safepoint_poll function without disabling entry and backedge safepoints, previously the pass crashed with an obscure error because of a null pointer. Now it fails the assert instead. llvm-svn: 256580
* use auto with dyn_casted values; NFCSanjay Patel2015-12-291-11/+9
| | | | llvm-svn: 256579
* fix formatting; NFCSanjay Patel2015-12-291-11/+10
| | | | llvm-svn: 256574
* use range-based for-loops; NFCISanjay Patel2015-12-291-18/+15
| | | | llvm-svn: 256573
OpenPOWER on IntegriCloud