summaryrefslogtreecommitdiffstats
path: root/llvm/include
Commit message (Collapse)AuthorAgeFilesLines
...
* Introduce deoptimization operand bundlesSanjoy Das2015-11-111-0/+8
| | | | | | | | | | | | | | | | | | | | | Summary: This change introduces the notion of "deoptimization" operand bundles. LLVM can recognize and optimize these in more precise ways than it can a generic "unknown" operand bundles. The current form of this special recognition / optimization is an enum entry in LLVMContext, a LangRef blurb and a verifier rule. Over time we will teach LLVM to do more aggressive optimization around deoptimization operand bundles, exploiting known facts about kinds of state deoptimization operand bundles are allowed to track. Reviewers: reames, majnemer, chandlerc, dexonsmith Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14551 llvm-svn: 252806
* [Symbolizer]: Add -pretty-print optionHemant Kulkarni2015-11-111-2/+6
| | | | | | Differential Revision: http://reviews.llvm.org/D13671 llvm-svn: 252798
* Move the enum attributes defined in Attributes.h to a table-gen file.Akira Hatanaka2015-11-113-57/+165
| | | | | | | | | | | | | | This is a step towards consolidating some of the information regarding attributes in a single place. This patch moves the enum attributes in Attributes.h to the table-gen file. Additionally, it adds definitions of target independent string attributes that will be used in follow-up commits by the inliner to check attribute compatibility. rdar://problem/19836465 llvm-svn: 252796
* dwarfdump: DWP type unit index dumping skeletonDavid Blaikie2015-11-112-0/+4
| | | | llvm-svn: 252786
* Format my previous commitDavid Blaikie2015-11-111-1/+0
| | | | llvm-svn: 252782
* dwarfdump: First piece of support for DWP dumpingDavid Blaikie2015-11-113-1/+46
| | | | | | Just a tiny piece of index dumping - the header in this instance. llvm-svn: 252781
* Support: Recognize Borland DWARF extensions.Dawn Perchik2015-11-112-0/+33
| | | | | | | | | | | This patch adds DWARF values for the Delphi language and Borland C++ language extensions. Reviewed by: dblaikie Subscribers: llvm-commits, majnemer Differential Revision: http://reviews.llvm.org/D14522 llvm-svn: 252776
* Add target preference for GatherAllAliases max depthMatt Arsenault2015-11-111-0/+10
| | | | llvm-svn: 252775
* Reverting r252760Colin LeMahieu2015-11-111-6/+2
| | | | llvm-svn: 252770
* Emit discriminator for inlined callsites.Dehao Chen2015-11-111-0/+1
| | | | | | | | | | | | Summary: Inlined callsites need to be emitted in debug info so that sample profile can be annotated to the correct inlined instance. Reviewers: dnovillo, dblaikie Subscribers: dblaikie, llvm-commits Differential Revision: http://reviews.llvm.org/D14511 llvm-svn: 252768
* [Symbolizer]: Add -pretty-print optionHemant Kulkarni2015-11-111-2/+6
| | | | | | Differential Revision: http://reviews.llvm.org/D13671 llvm-svn: 252760
* [ASan] Enable optional ASan recovery.Yury Gribov2015-11-111-2/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D14242 llvm-svn: 252719
* ADT: Avoid relying on UB in ilist_node::getNextNode()Duncan P. N. Exon Smith2015-11-119-45/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Re-implement `ilist_node::getNextNode()` and `getPrevNode()` without relying on the sentinel having a "next" pointer. Instead, get access to the owning list and compare against the `begin()` and `end()` iterators. This only works when the node *can* get access to the owning list. The new support is in `ilist_node_with_parent<>`, and any class `Ty` inheriting from `ilist_node<NodeTy>` that wants `getNextNode()` and/or `getPrevNode()` should inherit from `ilist_node_with_parent<NodeTy, ParentTy>` instead. The requirements: - `NodeTy` must have a `getParent()` function that returns the parent. - `ParentTy` must have a `getSublistAccess()` static that, given a(n ignored) `NodeTy*` (to determine which list), returns a member field pointer to the appropriate `ilist<>`. This isn't the cleanest way to get access to the owning list, but it leverages the API already used in the IR hierarchy (see, e.g., `Instruction::getSublistAccess()`). If anyone feels like ripping out the calls to `getNextNode()` and `getPrevNode()` and replacing with direct iterator logic, they can also remove the access function, etc., but as an incremental step, I'm maintaining the API where it's currently used in tree. If these requirements are *not* met, call sites with access to the ilist can call `iplist<NodeTy>::getNextNode(NodeTy*)` directly, as in ilistTest.cpp. Why rewrite this? The old code was broken, calling `getNext()` on a sentinel that possibly didn't have a "next" pointer at all! The new code avoids that particular flavour of UB (see the commit message for r252538 for more details about the "lucky" memory layout that made this function so interesting). There's still some UB here: the end iterator gets downcast to `NodeTy*`, even when it's a sentinel (which is typically `ilist_half_node<NodeTy*>`). I'll tackle that in follow-up commits. See this llvm-dev thread for more details: http://lists.llvm.org/pipermail/llvm-dev/2015-October/091115.html What's the danger? There might be some code that relies on `getNextNode()` or `getPrevNode()` *never* returning `nullptr` -- i.e., that relies on them being broken when the sentinel is an `ilist_half_node<NodeTy>`. I tried to root out those cases with the audits I did leading up to r252380, but it's possible I missed one or two. I hope not. (If (1) you have out-of-tree code, (2) you've reverted r252380 temporarily, and (3) you get some weird crashes with this commit, then I recommend un-reverting r252380 and auditing the compile errors looking for "strange" implicit conversions.) llvm-svn: 252694
* Sort the enums in Attributes.h in case insensitive alphabetical order.Akira Hatanaka2015-11-111-10/+10
| | | | | | | | | Sort the enums in preparation for moving the attributes to a table-gen file. rdar://problem/19836465 llvm-svn: 252692
* MachineInstr: addRegisterDefReadUndef() => setRegisterDefReadUndef()Matthias Braun2015-11-111-1/+1
| | | | | | This way we can not only add but also remove read undef flags. llvm-svn: 252678
* don't repeat function/class/variable names in comments; NFCSanjay Patel2015-11-101-143/+127
| | | | llvm-svn: 252666
* [OperandBundles] Identify operand bundles with both their names and IDsSanjoy Das2015-11-102-6/+54
| | | | | | | No code uses this functionality yet. This change just exposes information / structure that was already present. llvm-svn: 252644
* Support for emitting inline stack probesAndy Ayers2015-11-101-0/+4
| | | | | | | | | | | | | | | | | | For CoreCLR on Windows, stack probes must be emitted as inline sequences that probe successive stack pages between the current stack limit and the desired new stack pointer location. This implements support for the inline expansion on x64. For in-body alloca probes, expansion is done during instruction lowering. For prolog probes, a stub call is initially emitted during prolog creation, and expanded after epilog generation, to avoid complications that arise when introducing new machine basic blocks during prolog and epilog creation. Added a new test case, modified an existing one to exclude non-x64 coreclr (for now). Add test case Fix tests llvm-svn: 252578
* Fix llvm-nm(1) printing of llvm-bitcode files for -format darwin to match ↵Kevin Enderby2015-11-101-0/+1
| | | | | | | | darwin’s nm(1). Also a small fix to match printing of Mach-O objects with -format posix. llvm-svn: 252567
* [PGO] Make indexed value profile data more compactXinliang David Li2015-11-103-3/+145
| | | | | | | | | | | | | | | | - Make indexed value profile data more compact by peeling out the per-site value count field into its own smaller sized array. - Introduced formal data structure definitions to specify value profile data layout in indexed format. Previously the layout of the data is only assumed in the client code (scattered in three different places : size computation, EmitData, and ReadData - The new data structure serves as a central place for layout documentation. - Add interfaces to force BE output for value profile data (testing purpose) - Add byte swap unit tests Differential Revision: http://reviews.llvm.org/D14401 llvm-svn: 252563
* add a SelectionDAG method to check if no common bits are set in two nodes; NFCISanjay Patel2015-11-091-0/+4
| | | | | | | | | | | | | | | This was suggested in: http://reviews.llvm.org/D13956 and is a follow-on to: http://reviews.llvm.org/rL252515 http://reviews.llvm.org/rL252519 This lets us remove logically equivalent/duplicated code from DAGCombiner and X86ISelDAGToDAG. A corresponding function for IR instructions already exists in ValueTracking. llvm-svn: 252539
* CodeGen: Be clear about semantics in SlotIndex::getNextSlot(), NFCDuncan P. N. Exon Smith2015-11-091-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Be honest about using iterator semantics in `SlotIndex::getNextSlot()` and `SlotIndex::getPrevSlot()`. Instead of calling `getNextNode()` -- which is documented (but fails) to check for the sentinel -- call `&*++getIterator()`. This is (surprisingly!) a NFC commit. `ilist_traits<IndexListEntry>` has an `ilist_half_node<IndexListEntry>` as a sentinel (and no other fields), and so the layout of `ilist<IndexListEntry>` is: -- struct ilist<IndexListEntry> { ilist_half_node<IndexListEntry> Sentinel; IndexListEntry *Head; IndexListEntry *getHead() { return Head; } IndexListEntry *getSentinel() { return cast<...>(&Sentinel); } }; -- In memory, this happens to look just like: -- struct ilist<IndexListEntry> { ilist_node<IndexListEntry> Sentinel; IndexListEntry *getHead() { return Sentinel.getNext(); } IndexListEntry *getSentinel() { return cast<...>(&Sentinel); } }; -- As a result, `ilist_node<IndexListEntry>::getNextNode()` that checks `getNext()` of the possible sentinel will get a pointer to the head of the list; it will never detect the sentinel, and will return the sentinel itself instead of `nullptr` in the special cases. Since `getNextNode()` and `getPrevNode()` don't work, just be honest that we're not checking for the end/beginning of the list here. Since this code works, I guess we must never go past the sentinel. (It's possible we're just getting lucky, and the new code will get "lucky" in the same situations. To properly fix that hypothetical bug, we would need to check the iterator against `end()`/`begin()`.) llvm-svn: 252538
* Fix -Wdeprecated warnings due to the use of copy ops on SCEVPredicate ↵David Blaikie2015-11-091-4/+5
| | | | | | | | | | | derived class objects SCEVUnionPredicate is copied constructed here: lib/Transforms/Scalar/LoopDistribute.cpp:793 and move assigned (which can use the base class's copy ctor just fine/without extra cost (I'd add it if it weren't for MSVC's issues meaning = default is insufficient)) here: lib/Transforms/Utils/LoopVersioning.cpp:46 llvm-svn: 252537
* [TargetLibraryInfo] Add support for fls, flsl, flsll.Davide Italiano2015-11-091-0/+9
| | | | | | | | | This is a prerequisite for further optimisations of these functions, which will be commited as a separate patch. Differential Revision: http://reviews.llvm.org/D14219 llvm-svn: 252535
* [WinEH] Don't emit CATCHRET from visitCatchPadDavid Majnemer2015-11-092-1/+7
| | | | | | | Instead, emit a CATCHPAD node which will get selected to a target specific sequence. llvm-svn: 252528
* Add templated read/write to support::endian.Rafael Espindola2015-11-091-13/+41
| | | | | | | Expose read and write functions that take endianess as a template parameter. llvm-svn: 252517
* fix formatting; NFCSanjay Patel2015-11-091-1/+1
| | | | llvm-svn: 252500
* Moving FileManager::removeDotPaths to llvm::sys::path::remove_dotsMike Aizatsky2015-11-091-0/+7
| | | | | | Differential Revision: http://reviews.llvm.org/D14393 llvm-svn: 252499
* Allow LLE/LD and the loop versioning infrastructure to use SCEV predicatesSilviu Baranga2015-11-092-13/+23
| | | | | | | | | | | | | | | | | | | Summary: LAA currently generates a set of SCEV predicates that must be checked by users. In the case of Loop Distribute/Loop Load Elimination, no such predicates could have been emitted, since we don't allow stride versioning. However, in the future there could be SCEV predicates that will need to be checked. This change adds support for SCEV predicate versioning in the Loop Distribute, Loop Load Eliminate and the loop versioning infrastructure. Reviewers: anemet Subscribers: mssimpso, sanjoy, llvm-commits Differential Revision: http://reviews.llvm.org/D14240 llvm-svn: 252467
* [EABI] Add LLVM support for -meabi flagRenato Golin2015-11-092-9/+28
| | | | | | | | | | | | | | | | | | | | | "GCC requires the freestanding environment provide memcpy, memmove, memset and memcmp": https://gcc.gnu.org/onlinedocs/gcc-5.2.0/gcc/Standards.html Hence in GNUEABI targets LLVM should not convert 'memops' to their equivalent '__aeabi_memops'. This convertion violates GCC contract. The -meabi flag controls whether or not LLVM will modify 'memops' in GNUEABI targets. Without -meabi: use the triple default EABI. With -meabi=default: use the triple default EABI. With -meabi=gnu: use 'memops'. With -meabi=4 or -meabi=5: use '__aeabi_memops'. With -meabi set to an unknown value: same as -meabi=default. Patch by Vinicius Tinti. llvm-svn: 252462
* Add a method to the BitcodeReader to parse only the identification blockMehdi Amini2015-11-092-0/+12
| | | | | | | | | | | Summary: Mimic parseTriple(); and exposes it to LTOModule.cpp Reviewers: dexonsmith, rafael Subscribers: llvm-commits From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 252442
* [AsmParser] Backends can parameterize ASM tokenization.Colin LeMahieu2015-11-091-0/+9
| | | | llvm-svn: 252439
* [AsmParser] Provide target direct access to mnemonic token. Allow ↵Colin LeMahieu2015-11-091-0/+9
| | | | | | | | assignment parsing to be hooked by target. Allow target to specify if identifier is a label. Differential Revision: http://reviews.llvm.org/D14255 llvm-svn: 252435
* [PGO] Instr func name var creation code refactoringXinliang David Li2015-11-091-0/+30
| | | | | | | Move the code from cfe to LLMV and become shared interfaces. There is no functional change. llvm-svn: 252433
* [AsmParser] Allow tokens to be put back in to the token stream.Colin LeMahieu2015-11-081-3/+11
| | | | | | Differential Revision: http://reviews.llvm.org/D14252 llvm-svn: 252432
* [Bitcode] Add enums for call instruction markers and flags. NFC.Akira Hatanaka2015-11-071-0/+9
| | | | | | | | | | This commit adds enums in LLVMBitCodes.h to improve readability and maintainability. This is a follow-up to r252368 which was discussed here: http://reviews.llvm.org/D12923 llvm-svn: 252395
* [OperandBundles] Rename accessor, NFCSanjoy Das2015-11-072-5/+5
| | | | | | Rename getOperandBundle to getOperandBundleAt since that's more obvious. llvm-svn: 252388
* [WinEH] Update exception pointer registersJoseph Tremoulet2015-11-071-25/+9
| | | | | | | | | | | | | | | | | | | | Summary: The CLR's personality routine passes these in rdx/edx, not rax/eax. Make getExceptionPointerRegister a virtual method parameterized by personality function to allow making this distinction. Similarly make getExceptionSelectorRegister a virtual method parameterized by personality function, for symmetry. Reviewers: pgavlin, majnemer, rnk Subscribers: jyknight, dsanders, llvm-commits Differential Revision: http://reviews.llvm.org/D14344 llvm-svn: 252383
* Reapply "ADT: Require explicit ilist iterator/pointer conversions"Duncan P. N. Exon Smith2015-11-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit r252373, reapplying r252372 now that I've updated clang-tools-extra. Original commit message follows. ADT: Require explicit ilist iterator/pointer conversions Disallow implicit conversions between ilist iterators and element points. Explicit conversions still work of course. This is the first step toward removing the undefined behaviour in `ilist` and `iplist`: http://lists.llvm.org/pipermail/llvm-dev/2015-October/091115.html The motivation for removing the implicit iterators is that I came across real bugs (that were *really* getting lucky). More details and some brief discussion later in that thread: http://lists.llvm.org/pipermail/llvm-dev/2015-October/091617.html Note: if you have out-of-tree code, it should be fairly easy to revert this patch downstream while you update your out-of-tree call sites. Note that these conversions are occasionally latent bugs (that may happen to "work" now, but only because of getting lucky with UB; follow-ups will change your luck). When they are valid, I suggest using `->getIterator()` to go from pointer to iterator, and `&*` to go from iterator to pointer. llvm-svn: 252380
* Revert "ADT: Require explicit ilist iterator/pointer conversions"Duncan P. N. Exon Smith2015-11-071-3/+3
| | | | | | | This reverts commit r252372. Apparently I missed clang-tools-extra. http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/2534/steps/build/logs/stdio llvm-svn: 252373
* ADT: Require explicit ilist iterator/pointer conversionsDuncan P. N. Exon Smith2015-11-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Disallow implicit conversions between ilist iterators and element points. Explicit conversions still work of course. This is the first step toward removing the undefined behaviour in `ilist` and `iplist`: http://lists.llvm.org/pipermail/llvm-dev/2015-October/091115.html The motivation for removing the implicit iterators is that I came across real bugs (that were *really* getting lucky). More details and some brief discussion later in that thread: http://lists.llvm.org/pipermail/llvm-dev/2015-October/091617.html Note: if you have out-of-tree code, it should be fairly easy to revert this patch downstream while you update your out-of-tree call sites. Note that these conversions are occasionally latent bugs (that may happen to "work" now, but only because of getting lucky with UB; follow-ups will change your luck). When they are valid, I suggest using `->getIterator()` to go from pointer to iterator, and `&*` to go from iterator to pointer. llvm-svn: 252372
* Add 'notail' marker for call instructions.Akira Hatanaka2015-11-061-2/+7
| | | | | | | | | | | | This marker prevents optimization passes from adding 'tail' or 'musttail' markers to a call. Is is used to prevent tail call optimization from being performed on the call. rdar://problem/22667622 Differential Revision: http://reviews.llvm.org/D12923 llvm-svn: 252368
* [ValueTracking] Add parameters to isImpliedCondition; NFCSanjoy Das2015-11-061-1/+4
| | | | | | | | | | | | | | | | Summary: This change makes the `isImpliedCondition` interface similar to the rest of the functions in ValueTracking (in that it takes a DataLayout, AssumptionCache etc.). This is an NFC, intended to make a later diff less noisy. Depends on D14369 Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14391 llvm-svn: 252333
* [WinEH] Mark funclet entries and exits as clobbering all registersReid Kleckner2015-11-062-2/+15
| | | | | | | | | | | | | | | | | Summary: In this implementation, LiveIntervalAnalysis invents a few register masks on basic block boundaries that preserve no registers. The nice thing about this is that it prevents the prologue inserter from thinking it needs to spill all XMM CSRs, because it doesn't see any explicit physreg defs in the MI. Reviewers: MatzeB, qcolombet, JosephTremoulet, majnemer Subscribers: MatzeB, llvm-commits Differential Revision: http://reviews.llvm.org/D14407 llvm-svn: 252318
* Bring r252305 back with a test fix.Rafael Espindola2015-11-061-9/+0
| | | | | | | | | | We now create the .eh_frame section early, just like every other special section. This means that the special flags are visible in code that explicitly asks for ".eh_frame". llvm-svn: 252313
* Revert "Simplify the creation of .eh_frame/.debug_frame sections."Rafael Espindola2015-11-061-0/+9
| | | | | | | | This reverts commit r252305. Investigating a test failure. llvm-svn: 252306
* Simplify the creation of .eh_frame/.debug_frame sections.Rafael Espindola2015-11-061-9/+0
| | | | llvm-svn: 252305
* Add a new attribute: norecurseJames Molloy2015-11-063-1/+12
| | | | | | This attribute allows the compiler to assume that the function never recurses into itself, either directly or indirectly (transitively). This can be used among other things to demote global variables to locals. llvm-svn: 252282
* DIBuilder.h: Prune \param(s) corresponding to r252219. [-Wdocumentation]NAKAMURA Takumi2015-11-061-2/+0
| | | | llvm-svn: 252280
* Code style fix (caused by wrongly default clang-format style) (NFC)Xinliang David Li2015-11-061-23/+25
| | | | llvm-svn: 252276
OpenPOWER on IntegriCloud