summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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-032-8/+9
| | | | llvm-svn: 256701
* Use range-based for loop. NFCCraig Topper2016-01-031-2/+2
| | | | llvm-svn: 256700
* [TableGen] Replace a logically negated xor of bools with just an equality ↵Craig Topper2016-01-031-1/+1
| | | | | | comparison for readability. NFC llvm-svn: 256699
* [TableGen] Use std::find_if and a lambda instead of manual loops.Craig Topper2016-01-031-9/+10
| | | | llvm-svn: 256698
* [TableGen] Fix a bug introduced in r256627. If the switch was not emitted we ↵Craig Topper2016-01-031-2/+3
| | | | | | still emitted a closing curly brace. llvm-svn: 256697
* [TableGen] Use range-based for loops. NFCCraig Topper2016-01-031-20/+13
| | | | llvm-svn: 256696
* [PGO] simple refactoring (NFC)Xinliang David Li2016-01-032-4/+10
| | | | llvm-svn: 256695
* WinEHPrepare.cpp: Suppress a warning for -Asserts. [-Wunused-variable]NAKAMURA Takumi2016-01-031-4/+2
| | | | llvm-svn: 256694
* Revert or r256638. I`ve lost a little piece of code when resolved conflicts ↵George Rimar2016-01-022-51/+8
| | | | | | | | | | | | | | | | | | right before commit. Sorry about that. Test did not catch this either, so I`ll improve it and recommit later. Original commit message: [ELF] - Optimize .eh_frame section: remove CIE if all FDEs referencing it were removed. This patch performs little optimization for eh_frame section. If all FDE`s that referenced CIE are removed then CIE is also removed from output. That can happen for example when dropping FDEs that point to dropped sections. Testcase showing that is included. The same optimization was added to ld about 14 years ago: https://sourceware.org/ml/binutils/2001-12/msg00144.html, gold does not do that it seems. Differential revision: http://reviews.llvm.org/D15564 llvm-svn: 256693
* [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-022-0/+16
| | | | | | | | | | | | | | 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-023-7/+62
| | | | | | | | | | | | 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-022-4/+83
| | | | | | | | | | | | | | | | | | | | 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
* Reimplement __readeflags and __writeeflags on top of intrinsicsDavid Majnemer2016-01-012-28/+11
| | | | | | | Lean on LLVM to provide this functionality now that it provides the necessary intrinsics. llvm-svn: 256686
* [X86] Add intrinsics for reading and writing to the flags registerDavid Majnemer2016-01-0112-34/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [TrailingObjects] Fix "Convert classes in OpenMPClause.h" for MSVCJames Y Knight2016-01-011-12/+12
| | | | | | | "friend class OMPVarListClause" -> "friend OMPVarListClause". It's a template, not a class. llvm-svn: 256684
* [TrailingObjects] Convert classes in OpenMPClause.hJames Y Knight2016-01-012-96/+87
| | | | llvm-svn: 256683
* [LibCallSimplifier] propagate FMF when shrinking binary callsSanjay Patel2015-12-312-0/+20
| | | | 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-312-19/+21
| | | | llvm-svn: 256679
* change function names to avoid accidentally matching the substringSanjay Patel2015-12-311-40/+53
| | | | llvm-svn: 256678
* add 'fast' attribute to calls to show that the flag isn't being propagatedSanjay Patel2015-12-311-55/+57
| | | | llvm-svn: 256677
* 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
* add FMF for CreateCall variantSanjay Patel2015-12-312-2/+15
| | | | | | | The version with OpBundles was missed in: http://reviews.llvm.org/rL255555 llvm-svn: 256674
* [AVX512] add PSRLQ and PSRLD IntrinsicMichael Zuckerman2015-12-314-0/+269
| | | | | | Differential Revision: http://reviews.llvm.org/D15770 llvm-svn: 256673
* [X86][PKU] add clang intrinsic for {RD|WR}PKRUAsaf Badouh2015-12-317-1/+81
| | | | | | Differential Revision: http://reviews.llvm.org/D15837 llvm-svn: 256672
* [X86] Avoid folding scalar loads into unary sse intrinsicsMichael Kuperstein2015-12-312-25/+123
| | | | | | | | | | | | | | | | | | 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-314-5/+82
| | | | | | Differential Revision: http://reviews.llvm.org/D15808 llvm-svn: 256670
* [TableGen] Modify the AsmMatcherEmitter to only apply the table growth from ↵Craig Topper2015-12-313-63/+119
| | | | | | | | | | | | | | 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
* [TableGen] Use range-based for loops. NFCCraig Topper2015-12-311-8/+3
| | | | llvm-svn: 256668
* [PGO]: Implement Func PGO name string compressionXinliang David Li2015-12-313-4/+196
| | | | | | | | | | 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
* [OPENMP 4.5] Codegen for 'schedule' clause with monotonic/nonmonotonic ↵Alexey Bataev2015-12-316-195/+414
| | | | | | | | modifiers. OpenMP 4.5 adds support for monotonic/nonmonotonic modifiers in 'schedule' clause. Add codegen for these modifiers. llvm-svn: 256666
* [TrailingObjects] Fix bug in "Convert classes in ExprObjC.h"James Y Knight2015-12-311-1/+2
| | | | | | (Detected by asan) llvm-svn: 256665
* [MS ABI] Remove mangleCXXCatchHandlerTypeDavid Majnemer2015-12-312-14/+0
| | | | | | It's dead code, no functional change is intended. llvm-svn: 256664
* [MS ABI] Change the ArgBackRefMap to hold const qualified pointersDavid Majnemer2015-12-311-2/+2
| | | | | | Just a cleanup, no functional change is intended. llvm-svn: 256663
* [MS ABI] Replace dead code with an assertionDavid Majnemer2015-12-311-2/+4
| | | | | | | As per C++ [dcl.ref]p1, cv-qualified references are not valid. As such, change the mangler to assert that this event does not happen. llvm-svn: 256662
* [MSVC Compat] Diagnose multiple default ctors for dllexport'd classesDavid Majnemer2015-12-313-2/+31
| | | | | | | | | | | | | | | | | The MS ABI emits a special default constructor closure thunk if a default constructor has a weird calling convention or default arguments. The MS ABI has a quirk: there can be only one such thunk because the mangling scheme does not have room for distinct manglings. We must raise a diagnostic in this eventuality. N.B. MSVC sorta gets this right. Multiple default constructors result in the default constructor closure getting emitted but they seem to get confused by which default constructors are reasonable to reference from the closure. We try to be a little more careful which results in mild differences in behavior. llvm-svn: 256661
* [TableGen] Move determination of IsIsolatedToken into the tokenizer instead ↵Craig Topper2015-12-311-31/+33
| | | | | | of trying to search characters around the token. No functional change intended. Verified for in-tree targets. llvm-svn: 256660
* [TrailingObjects] Convert classes in ExprObjC.hJames Y Knight2015-12-314-122/+99
| | | | llvm-svn: 256659
* [TrailingObjects] Convert remaining classes in Expr.h and ExprCXX.hJames Y Knight2015-12-315-199/+153
| | | | llvm-svn: 256658
* Improve diagnostic for the case where a function template candidate is rejectedRichard Smith2015-12-318-16/+95
| | | | | | | | by overload resolution because deduction succeeds, but the substituted parameter type for some parameter (with deduced type) doesn't exactly match the corresponding adjusted argument type. llvm-svn: 256657
* Revert "Revert "[ptr-traits] Implement the base pointer traits using the ↵Chandler Carruth2015-12-301-5/+23
| | | | | | | | | | | | | | actual"" This reverts commit r256642 and restores r256620 now that Tobias has updated Polly. There are still some potential problems with the code in Polly that I've sent post-commit review about, but they're unlikely to break anything in practice, and I'd like to avoid the rest of LLVM and Clang regressing here. llvm-svn: 256656
* [ValueTracking] fix bug computing isKnownToBeAPowerOfTwo() with arithmetic ↵Sanjay Patel2015-12-302-2/+23
| | | | | | | | | | | | | | 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
* Use __rebind_pointer to avoid #ifdef blockEric Fiselier2015-12-306-202/+46
| | | | llvm-svn: 256654
* [ThinLTO] Rename variables used in metadata linking (NFC)Teresa Johnson2015-12-304-11/+13
| | | | | | | | 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
OpenPOWER on IntegriCloud