summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* Make OnDiskChainedHashTableGenerator's Bucket type a POD type and reorder ↵Benjamin Kramer2015-04-111-5/+2
| | | | | | | | | fields to optimize padding For the common case of offset_type=unsigned this brings Bucket from 24 to 16 bytes. llvm-svn: 234692
* DebugInfo: Move DIScope::getName() and getContext() to MDScopeDuncan P. N. Exon Smith2015-04-114-40/+37
| | | | | | | | Continue gutting the `DIDescriptor` hierarchy. In this case, move the guts of `DIScope::getName()` and `DIScope::getContext()` to `MDScope::getName()` and `MDScope::getScope()`. llvm-svn: 234691
* Remove empty non-virtual destructors or mark them =default when non-publicBenjamin Kramer2015-04-1117-60/+37
| | | | | | These add no value but can make a class non-trivially copyable. NFC. llvm-svn: 234688
* [PowerPC] Disable part-word atomics on the P7Hal Finkel2015-04-112-18/+18
| | | | | | | As it turns out, even though these are part of ISA 2.06, the P7 does not support them (or, at least, not any P7s we're tested so far). llvm-svn: 234686
* Add direct moves to/from VSR and exploit them for FP/INT conversionsNemanja Ivanovic2015-04-1111-1/+591
| | | | | | | | | | This patch corresponds to review: http://reviews.llvm.org/D8928 It adds direct move instructions to/from VSX registers to GPR's. These are exploited for FP <-> INT conversions. llvm-svn: 234682
* Use 'override/final' instead of 'virtual' for overridden methodsAlexander Kornienko2015-04-11165-376/+385
| | | | | | | | | | | | | | The patch is generated using clang-tidy misc-use-override check. This command was used: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \ -checks='-*,misc-use-override' -header-filter='llvm|clang' \ -j=32 -fix -format http://reviews.llvm.org/D8925 llvm-svn: 234679
* DebugInfo: Rewrite atSameLineAs() as MDLocation::canDiscriminate()Duncan P. N. Exon Smith2015-04-113-5/+19
| | | | | | | | Rewrite `DILocation::atSameLineAs()` as `MDLocation::canDiscriminate()` with a doxygen comment explaining its purpose. I've added a few FIXMEs where I think this check is too weak; fixing that is tracked by PR23199. llvm-svn: 234674
* [Orc] Update kaleidoscope tutorial for API change in r234669.Lang Hames2015-04-111-1/+1
| | | | llvm-svn: 234673
* DebugInfo: Remove dead DIRef friendsDuncan P. N. Exon Smith2015-04-111-4/+0
| | | | llvm-svn: 234672
* DebugInfo: Add forwarding getFilename() accessor to new hierarchyDuncan P. N. Exon Smith2015-04-113-20/+47
| | | | | | | | Add forwarding `getFilename()` and `getDirectory()` accessors to nodes in the new hierarchy that define a `getFile()`. Use that to re-implement existing functionality in the `DIDescriptor` hierarchy. llvm-svn: 234671
* [PowerPC] Fix PPCLoopPreIncPrep for depth > 1 loopsHal Finkel2015-04-112-10/+79
| | | | | | | | | This pass had the same problem as the data-prefetching pass: it was only checking for depth == 1 loops in practice. Fix that, add some debugging statements, and make sure that, when we grab an AddRec, it is for the loop we expect. llvm-svn: 234670
* [Orc] Tidy up IndirectionUtils API a little, add some comments. NFC.Lang Hames2015-04-113-19/+34
| | | | llvm-svn: 234669
* [Statepoints] Fix a release only build failurePhilip Reames2015-04-111-2/+2
| | | | | | A function which is used only in Asserts builds needs to be defined only in Asserts builds. llvm-svn: 234667
* [CodeGen] Split -enable-global-merge into ARM and AArch64 options.Ahmed Bougacha2015-04-118-20/+37
| | | | | | | | | | | | | Currently, there's a single flag, checked by the pass itself. It can't force-enable the pass (and is on by default), because it might not even have been created, as that's the targets decision. Instead, have separate explicit flags, so that the decision is consistently made in the target. Keep the flag as a last-resort "force-disable GlobalMerge" for now, for backwards compatibility. llvm-svn: 234666
* DebugInfo: Remove dead DIDescriptor::getDescriptorField()Duncan P. N. Exon Smith2015-04-102-30/+0
| | | | llvm-svn: 234665
* [AArch64] Strengthen the code for the prologue insertion.Quentin Colombet2015-04-101-0/+2
| | | | | | | | | The spilled registers are pristine and thus, correctly handled by the register scavenger and so on, but the liveness information is strictly speaking wrong at this point. Fix that. llvm-svn: 234664
* [WinEH] Recognize SEH finally block inserted by the frontendReid Kleckner2015-04-102-63/+273
| | | | | | | | | | | This allows winehprepare to build sensible llvm.eh.actions calls for SEH finally blocks. The pattern matching in this change is brittle and should be replaced with something more robust soon. In the meantime, this will let us write the code that produces __C_specific_handler xdata tables, which we need regardless of how we decide to get finally blocks through EH preparation. llvm-svn: 234663
* [RewriteStatepointsForGC] Use a SetVector for a worklist [NFC]Philip Reames2015-04-101-6/+4
| | | | | | Using a SetVector to replace equivelent but more verbose functionality. llvm-svn: 234662
* Generic: Make isMask_N and isShiftedMask_N consistent over 0Tim Northover2015-04-101-10/+10
| | | | | | | | | | | | | | | Previously, isMask_N returned false for 0 but isShiftedMask_N returned true. Almost all uses are for pattern matching bitfield operations in the backends, and expect false (this was discovered because of AArch64's copy of this logic). Unfortunately, I couldn't put together a small non-fragile test for this. The nature of the bitfield operations means that this edge case is only really triggered for nodes like "(and N, 0)", which the DAG combiner is usually very good at folding away before they get to this stage. rdar://20501377 llvm-svn: 234659
* [RewriteStatepointsForGC] test case missing from 234657Philip Reames2015-04-101-0/+158
| | | | llvm-svn: 234658
* [RewriteStatepointsForGC] Use an actual liveness algorithmPhilip Reames2015-04-102-205/+297
| | | | | | | | When rewriting statepoints to make relocations explicit, we need to have a conservative but consistent notion of where a particular pointer is live at a particular site. The old code just used dominance, which is correct, but decidedly more conservative then it needed to be. This patch implements a simple dataflow algorithm that's run one per function (well, twice counting fixup after base pointer insertion). There's still lots of room to make this faster, but it's fast enough for all practical purposes today. Differential Revision: http://reviews.llvm.org/D8674 llvm-svn: 234657
* [RewriteStatepointsForGC] clang-format filePhilip Reames2015-04-101-58/+57
| | | | | | Format the entire file to reduce diff of change to follow. llvm-svn: 234656
* [CodeGenPrepare] Report all changes made during instruction sinkingBenjamin Kramer2015-04-101-3/+5
| | | | | | | | r234638 chained another transform below which was tripping over the deleted instruction. Use after free found by asan in many regression tests. llvm-svn: 234654
* [RewriteStatepointsForGC] Missed review comment from 234651 & build fixPhilip Reames2015-04-101-3/+4
| | | | | | After submitting 234651, I noticed I hadn't responded to a review comment by mjacob. This patch addresses that comment and fixes a Release only build problem due to an unused variable. llvm-svn: 234653
* [RewriteStatepointsForGC] Preprocess the IR to remove unreachable blocks and ↵Philip Reames2015-04-102-6/+99
| | | | | | | | | | | | | | | single entry phis Two related small changes: Various dominance based queries about liveness can get confused if we're talking about unreachable blocks. To avoid reasoning about such cases, just remove them before rewriting statepoints. Remove single entry phis (likely left behind by LCSSA) to reduce the number of live values. Both of these are motivated by http://reviews.llvm.org/D8674 which will be submitted shortly. Differential Revision: http://reviews.llvm.org/D8675 llvm-svn: 234651
* [RewriteStatepointsForGC] Limited support for vectors of pointersPhilip Reames2015-04-102-25/+311
| | | | | | | | | | | | This patch adds limited support for inserting explicit relocations when there's a vector of pointers live over the statepoint. This doesn't handle the case where the vector contains a mix of base and non-base pointers; that's future work. The current implementation just scalarizes the vector over the gc.statepoint before doing the explicit rewrite. An alternate approach would be to plumb the vector all the way though the backend lowering, but doing that appears challenging. In particular, the size of the indirect spill slot is currently assumed to be sizeof(pointer) throughout the backend. In practice, this is enough to allow running the SLP and Loop vectorizers before RewriteStatepointsForGC. Differential Revision: http://reviews.llvm.org/D8671 llvm-svn: 234647
* [InstCombine][CodeGenPrep] Create llvm.uadd.with.overflow in CGP.Sanjoy Das2015-04-106-101/+199
| | | | | | | | | | | | | | | | | | | Summary: This change moves creating calls to `llvm.uadd.with.overflow` from InstCombine to CodeGenPrep. Combining overflow check patterns into calls to the said intrinsic in InstCombine inhibits optimization because it introduces an intrinsic call that not all other transforms and analyses understand. Depends on D8888. Reviewers: majnemer, atrick Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8889 llvm-svn: 234638
* Avoid spewing binary to stdout in some filetype=obj testsReid Kleckner2015-04-101-10/+10
| | | | llvm-svn: 234627
* use update_llc_test_checks.py to tighten checkingSanjay Patel2015-04-101-94/+103
| | | | | | | | test features, not CPUs remove unnecessary cruft llvm-svn: 234622
* Remember if lseek works in this FD.Rafael Espindola2015-04-102-1/+6
| | | | | | It will be used in clang in a sec. llvm-svn: 234619
* DebugInfo: Stop leaking temporaries in DIBuilder::createCompileUnit()Duncan P. N. Exon Smith2015-04-102-14/+15
| | | | | | | | | | | Stop leaking temporary nodes from `DIBuilder::createCompileUnit()`. `replaceAllUsesWith()` doesn't delete the nodes, so we need to delete them "manually" (well, `TempMDTuple` does that for us). Similarly, stop leaking the temporary nodes used for variables of subprograms. llvm-svn: 234617
* Have one raw_fd_ostream constructor forward to the other.Rafael Espindola2015-04-101-24/+18
| | | | | | | This fixes some odd behavior differences between the two. In particular, the version that takes a FD no longer unconditionally sets stdout to binary. llvm-svn: 234615
* [FS] Report errors from llvm::sys::fs::rename on WindowsReid Kleckner2015-04-101-0/+1
| | | | | | | | | | Previously we would always report success, which is pretty bogus. I'm too lazy to write a test where rename will portably fail on all platforms. I'm just trying to fix breakage introduced by r234597, which happened to tickle this. llvm-svn: 234611
* [WinEH] Try to make outlining invokes work a little betterReid Kleckner2015-04-103-2/+96
| | | | | | | | WinEH currently turns invokes into calls. Long term, we will reconsider this, but for now, make sure we remap the operands and clone the successors of the new terminator. llvm-svn: 234608
* [CallSite] Use the injected base class name. NFC.Benjamin Kramer2015-04-101-14/+10
| | | | llvm-svn: 234606
* [PowerPC] Prefetching should also consider depth > 1 loopsHal Finkel2015-04-102-2/+71
| | | | | | | Iterating over loops from the LoopInfo instance only provides top-level loops. We need to search the whole tree of loops to find the inner ones. llvm-svn: 234603
* [CallSite] Make construction from Value* (or Instruction*) explicit.Benjamin Kramer2015-04-1017-33/+34
| | | | | | | | | | | | | | | | | | | CallSite roughly behaves as a common base CallInst and InvokeInst. Bring the behavior closer to that model by making upcasts explicit. Downcasts remain implicit and work as before. Following dyn_cast as a mental model checking whether a Value *V isa CallSite now looks like this: if (auto CS = CallSite(V)) // think dyn_cast instead of: if (CallSite CS = V) This is an extra token but I think it is slightly clearer. Making the ctor explicit has the advantage of not accidentally creating nullptr CallSites, e.g. when you pass a Value * to a function taking a CallSite argument. llvm-svn: 234601
* [mips] [IAS] Improve comments in MipsAsmParser::expandLoadImm. NFC.Toma Tabacu2015-04-101-7/+5
| | | | llvm-svn: 234595
* [AArch64] Changes some SchedAlias to WriteRes for Cortex-A57.Chad Rosier2015-04-101-3/+8
| | | | | | | | | | | | Using SchedAliases is convenient and works well for latency and resource lookup for instructions. However, this creates an entry in AArch64WriteLatencyTable with a WriteResourceID of 0, breaking any SchedReadAdvance since the lookup will fail. http://reviews.llvm.org/D8043 Patch by Dave Estes <cestes@codeaurora.org>! llvm-svn: 234594
* [AArch64] Adjusts Cortex-A57 machine model to handle zero shift.Chad Rosier2015-04-101-0/+9
| | | | | | | http://reviews.llvm.org/D8043 Patch by Dave Estes <cestes@codeaurora.org>! llvm-svn: 234593
* Microoptimize DenseMap::clear.Benjamin Kramer2015-04-101-3/+5
| | | | | | | | Cache NumEntries locally, it's only used in an assert and using the member variable prevents the compiler from eliminating the tombstone check for types with trivial destructors. No functionality change intended. llvm-svn: 234589
* Reduce dyn_cast<> to isa<> or cast<> where possible.Benjamin Kramer2015-04-1022-64/+60
| | | | | | No functional change intended. llvm-svn: 234586
* [mips] [IAS] Make the mips-expansions-bad.s test more readable. NFC.Toma Tabacu2015-04-101-3/+5
| | | | | | | Move the check lines below the code lines and change the indentation from 8 spaces to 2 spaces. llvm-svn: 234584
* [lib/Fuzzer] Section: How good is my fuzzer?Kostya Serebryany2015-04-101-0/+15
| | | | llvm-svn: 234571
* [lib/Fuzzer] explain compatibility with AFLKostya Serebryany2015-04-101-0/+10
| | | | llvm-svn: 234570
* Divergence analysis for GPU programsJingyue Wu2015-04-1014-1/+642
| | | | | | | | | | | | | | | | | | | Summary: Some optimizations such as jump threading and loop unswitching can negatively affect performance when applied to divergent branches. The divergence analysis added in this patch conservatively estimates which branches in a GPU program can diverge. This information can then help LLVM to run certain optimizations selectively. Test Plan: test/Analysis/DivergenceAnalysis/NVPTX/diverge.ll Reviewers: resistor, hfinkel, eliben, meheff, jholewinski Subscribers: broune, bjarke.roune, madhur13490, tstellarAMD, dberlin, echristo, jholewinski, llvm-commits Differential Revision: http://reviews.llvm.org/D8576 llvm-svn: 234567
* [WinEHPrepare] Don't rely on the order of IRDavid Majnemer2015-04-103-7/+19
| | | | | | | | | | The IPToState table must be emitted after we have generated labels for all functions in the table. Don't rely on the order of the list of globals. Instead, utilize WinEHFuncInfo to tell us how many catch handlers we expect to outline. Once we know we've visited all the catch handlers, emit the cppxdata. llvm-svn: 234566
* [PowerPC] Don't crash on PPC32 i64 fp_to_uint on modern coresHal Finkel2015-04-102-0/+24
| | | | | | | | | | When we have an instruction for this (and, thus, don't generate a runtime call), we need to custom type legalize this (in a trivial way, just as we do for fp_to_sint). Fixes PR23173. llvm-svn: 234561
* [AArch64] Promote f16 operations to f32.Ahmed Bougacha2015-04-104-120/+867
| | | | | | | | | | | | | | | | | | | | For the most common ones (such as fadd), we already did the promotion. Do the same thing for all the others. Currently, we'll just crash/assert on all these operations, as there's no hardware or libcall support whatsoever. f16 (half) is specified as an interchange - not arithmetic - format, and is expected to be promoted to single-precision for arithmetic operations. While there, teach the legalizer about promoting some of the (mostly floating-point) operations that we never needed before. Differential Revision: http://reviews.llvm.org/D8648 See related discussion on the thread for: http://reviews.llvm.org/D8755 llvm-svn: 234550
* Add LLVM support for remaining integer divide and permute instructions from ↵Nemanja Ivanovic2015-04-0911-61/+291
| | | | | | | | | | | ISA 2.06 This is the patch corresponding to review: http://reviews.llvm.org/D8406 It adds some missing instructions from ISA 2.06 to the PPC back end. llvm-svn: 234546
OpenPOWER on IntegriCloud