summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-12-20Fix mapping of @llvm.arm.ssat/usat intrinsics to ssat/usat instructions for ↵Weiming Zhao6-13/+20
Thumb2 Summary: r250697 fixed the mapping for ARM mode. We have to do the same for Thumb2 otherwise the same llvm.arm.ssat() will generate different saturating amount for ARM and Thumb. r250697: http://reviews.llvm.org/rL250697 Reviewers: rmaprath Subscribers: aemerson, llvm-commits, rengolin Differential Revision: http://reviews.llvm.org/D15653 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256115 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-20[PGO] Improve Indexed Profile Reader efficiency Xinliang David Li7-151/+176
With the support of value profiling added, the Indexed prof reader gets less efficient. The prof reader initialization used to be just reading the file header, but with VP support added, initialization needs to walk through all profile keys of ondisk hash table resulting in very poor locality and large memory increase (keys are stored together with the profile data in the mapped profile buffer). Even worse, when the reader is used by the compiler (not llvm-profdata too), the penalty becomes very high as compilation of each single module requires touching profile data buffer for the whole program. In this patch, the icall target values (MD5hash) are no longer eargerly converted back to name strings when the data is read into memory. New interface is added to to profile reader so that InstrProfSymtab can be lazily created for Indexed profile reader on-demand. Creating of the symtab is intended to be used by llvm-profdata tool for symbolic dumping of VP data. It can be used with compiler (for legacy out of tree uses) too but not recommended due to compile time and memory reasons mentioned above. Some other cleanups are also included: Function Addr to md5 map is now consolated into InstrProfSymtab. InstrProfStringtab is no longer used and eliminated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256114 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-20Minor clean up -- move large single use method out of header(NFC)Xinliang David Li2-28/+32
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256113 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-20Revert r219171, "llvm/test/lit.cfg: Suppress dwarf stuff for targeting ↵NAKAMURA Takumi1-2/+1
x86_64-mingw32 while investigating since r219108." It has been fixed since r219280 by David Majnemer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256112 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19ThreadPool unittests: do not hold mutex when calling condition_variable:notify()Mehdi Amini1-11/+11
From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256111 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19Nonnull elements in OperandBundleCallSites are not all InstructionsSanjoy Das3-5/+40
`CloneAndPruneIntoFromInst` sometimes RAUW's dead instructions with `undef` before erasing them (to avoid deleting instructions that still have uses). This changes the `WeakVH` in `OperandBundleCallSites` to hold an `undef`, and we need to guard for this situation in eventuality in `llvm::InlineFunction`. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256110 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19[Deopt bundles] Fix a test caseSanjoy Das1-1/+1
The `CHECK-NOT` line was incorrect, and would not have caught a breakage. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256109 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19[llvm-objdump] Fail early if we can't parse the object header.Davide Italiano1-4/+5
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256108 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19Delete APIs that have been deprecated since 2010.Rafael Espindola3-66/+4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256107 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19The PS4 baton passes.Paul Robinson1-4/+4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256106 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19Assert that we have all use/users in the getters.Rafael Espindola7-23/+96
An error that is pretty easy to make is to use the lazy bitcode reader and then do something like if (V.use_empty()) The problem is that uses in unmaterialized functions are not accounted for. This patch adds asserts that all uses are known. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256105 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19WebAssembly: add vtable testJF Bastien1-0/+171
The test will mainly be useful to check that the .s file assembles and relocates properly because vtables reference functions in their data section. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256102 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19Remove unnecessary casts. NFC.Manuel Jacob1-6/+5
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256101 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19Remove double blanks. NFC.Manuel Jacob1-7/+7
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256100 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19Improve InstrProfSymtab test coverageXinliang David Li1-0/+27
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256099 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19SelectionDAG: Cleanup integer bin op promotion functions.Matt Arsenault2-34/+17
SDIV and UDIV had special handling, but this is the same handling that min/max need. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256098 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19[unittests] ThreadPool: Remove redundant loop, NFCVedant Kumar1-4/+2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256097 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19[unittests] ThreadPool: Guard updates to MainThreadReadyVedant Kumar1-12/+16
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256096 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19Re-reapply "[IR] Move optional data in llvm::Function into a hungoff uselist"Vedant Kumar8-168/+92
Make personality functions, prefix data, and prologue data hungoff operands of Function. This is based on the email thread "[RFC] Clean up the way we store optional Function data" on llvm-dev. Thanks to sanjoyd, majnemer, rnk, loladiro, and dexonsmith for feedback! Includes a fix to scrub value subclass data in dropAllReferences. Does not use binary literals. Differential Revision: http://reviews.llvm.org/D13829 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256095 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19Revert "Reapply "[IR] Move optional data in llvm::Function into a hungoff ↵Vedant Kumar8-92/+168
uselist"" This reverts commit r256093. This broke lld-x86_64-win7 because of -Werror,-Wc++1y-extensions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256094 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19Reapply "[IR] Move optional data in llvm::Function into a hungoff uselist"Vedant Kumar8-168/+92
Make personality functions, prefix data, and prologue data hungoff operands of Function. This is based on the email thread "[RFC] Clean up the way we store optional Function data" on llvm-dev. Thanks to sanjoyd, majnemer, rnk, loladiro, and dexonsmith for feedback! Includes a fix to scrub value subclass data in dropAllReferences. Differential Revision: http://reviews.llvm.org/D13829 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256093 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19[PGO] Add hash to name mapping in InstrProfSymtabXinliang David Li2-4/+66
Creator and lookup interfaces are added to this symtab class. The new interfaces will be used by InstrProf Readers and writer. A unit test is also added for the new APIs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256092 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19Revert "[IR] Move optional data in llvm::Function into a hungoff uselist"Vedant Kumar8-91/+168
This reverts commit r256090. This broke llvm-clang-lld-x86_64-debian-fast. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256091 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19[IR] Move optional data in llvm::Function into a hungoff uselistVedant Kumar8-168/+91
Make personality functions, prefix data, and prologue data hungoff operands of Function. This is based on the email thread "[RFC] Clean up the way we store optional Function data" on llvm-dev. Thanks to sanjoyd, majnemer, rnk, loladiro, and dexonsmith for feedback! Differential Revision: http://reviews.llvm.org/D13829 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256090 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19ThreadPool unittest: reimplement concurrency test, deterministically this time.Mehdi Amini1-5/+36
Follow-up to r256056. From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256087 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19[libFuzzer] deprecate -save_minimized_corpus, -merge can be used insteadKostya Serebryany3-8/+7
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256086 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19[libFuzzer] split the tests to run them in parallel, remove one redundant testKostya Serebryany6-66/+41
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256085 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19Hopefully fix debug-info-blocks.ll test on win32 botKeno Fischer1-1/+1
llc_dwarf adds an mtriple, which forces this to use COFF, causing the test to fail. Hopefully using regular llc without the triple will work fine everywhere git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256084 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19AMDGPU/SI: Fix implemenation of isSourceOfDivergence() for graphics shadersTom Stellard3-6/+23
Summary: The analysis of shader inputs was completely wrong. We were passing the wrong index to AttributeSet::hasAttribute() and the logic for which inputs where in SGPRs was wrong too. Reviewers: arsenm Subscribers: arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D15608 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256082 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19[libFuzzer] make CrossOver just one of the other mutationsKostya Serebryany6-38/+58
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256081 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19[RS4GC] Remove an overly strong assertionPhilip Reames2-10/+40
As shown by the included test case, it's reasonable to end up with constant references during base pointer calculation. The code actually handled this case just fine, we only had the assert to help isolate problems under the belief that constant references shouldn't be present in IR generated by managed frontends. This turned out to be wrong on two fronts: 1) Manual Jacobs is working on a language with constant references, and b) we found a case where the optimizer does create them in practice. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256079 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19Clean up the processing of dbg.value in various placesKeno Fischer13-43/+138
Summary: First up is instcombine, where in the dbg.declare -> dbg.value conversion, the llvm.dbg.value needs to be called on the actual loaded value, rather than the address (since the whole point of this transformation is to be able to get rid of the alloca). Further, now that that's cleaned up, we can remove a hack in the backend, that would add an implicit OP_deref if the argument to dbg.value was an alloca. This stems from before the existence of DIExpression and is no longer necessary since the deref can be expressed explicitly. Now, in order to make sure that the tests pass with this change, we need to correct the printing of DEBUG_VALUE comments to take into account the expression, which wasn't taken into account before. Unfortunately, for both these changes, there were a number of incorrect test cases (mostly the wrong number of DW_OP_derefs, but also a couple where the test itself was broken more badly). aprantl and I have gone through and adjusted these test case in order to make them pass with these fixes and in some cases to make sure they're actually testing what they are meant to test. Reviewers: aprantl Subscribers: dsanders Differential Revision: http://reviews.llvm.org/D14186 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256077 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19AMDGPU: Switch barrier intrinsics to using convergentMatt Arsenault21-34/+65
noduplicate prevents unrolling of small loops that happen to have barriers in them. If a loop has a barrier in it, it is OK to duplicate it for the unroll. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256075 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19Fix broken type legalization of min/maxMatt Arsenault4-2/+90
This was using an anyext when promoting the type when zext/sext is required. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256074 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19AMDGPU/SI: use S_MOV_B64 for larger copies in copyPhysRegNicolai Haehnle1-6/+22
Reviewers: arsenm, tstellarAMD Subscribers: arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D15629 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256073 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19AMDGPU: fix overlapping copies in copyPhysRegNicolai Haehnle3-14/+32
Summary: When copying aggregate registers within the same register class, there may be an overlap between source and destination that forces us to do the copy backwards. Do the simplest possible thing that guarantees the correct order of moves when there are overlaps, and does whatever when there is no overlap. (The last part forces some trivial adjustments to test cases.) Together with r255906, this fixes a VM fault in Unreal Elemental Demo. While at it, change the generation of kill and def flags to something that looks more reasonable. This method is used very late during compilation, so it probably doesn't matter in practice, and to be honest, I don't know if this change is actually correct because the semantics in connection with aggregate registers vs. sub-registers are not clear to me. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93264 Reviewers: arsenm, tstellarAMD Subscribers: arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D15622 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256072 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19[libFuzzer] print successfull mutations sequencesKostya Serebryany3-19/+39
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256071 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19Possibly fix MSVC compilation after r256054.James Y Knight1-1/+1
I don't have any way to test MSVC compilation, but maybe this will fix the error: llvm/Support/TrailingObjects.h(286) : error C3210: 'TrailingObjectsBase' : access declaration can only be applied to a base class member llvm/Support/TrailingObjects.h(337) : see reference to class template instantiation 'llvm::TrailingObjects<BaseTy,TrailingTys...>' being compiled llvm/Support/TrailingObjects.h(286) : error C2602: 'llvm::trailing_objects_internal::TrailingObjectsBase::OverloadToken' is not a member of a base class of 'llvm::TrailingObjects<BaseTy,TrailingTys...>' llvm/Support/TrailingObjects.h(91) : see declaration of 'llvm::trailing_objects_internal::TrailingObjectsBase::OverloadToken' git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256068 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18Deprecate a few C APIs.Rafael Espindola10-27/+129
This deprecates: * LLVMParseBitcode * LLVMParseBitcodeInContext * LLVMGetBitcodeModuleInContext * LLVMGetBitcodeModule They are replaced with the functions with a 2 suffix which do not record a diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256065 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18[PGO] Cleanup: Move large member functions out of line (NFC)Xinliang David Li2-92/+99
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256058 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18Remove possibility of failures to due race in ThreadPool unittestTeresa Johnson1-22/+0
Remove all checks that required main thread to run faster than tasks in ThreadPool, and yields which are now unnecessary. This should fix some bot failures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256056 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18Rewrite the TrailingObjects template to provide two new features:James Y Knight2-108/+248
- Automatic alignment of the base type for the alignment requirements of the trailing types. - Support for an arbitrary numbers of trailing types, instead of only 1 or 2, by using a variadic template implementation. Upcoming commits to clang will take advantage of both of these features. Differential Revision: http://reviews.llvm.org/D12439 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256054 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18Delete dead code: only functions are materializable.Rafael Espindola1-4/+0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256052 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18Use a lambda to reduce code duplication.Rafael Espindola1-23/+15
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256050 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18git-clang-format a region I am about to change.Rafael Espindola1-13/+15
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256048 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18[PGO] Simplify computehash interface (NFC)Xinliang David Li3-3/+6
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256047 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18[Symbolize] Improve the ownership of parsed objects.Alexey Samsonov2-69/+65
This code changes the way Symbolize handles parsed binaries: now parsed OwningBinary<Binary> is not broken into (binary, memory buffer) pair, and is just stored as-is in a cache. ObjectFile components of Mach-O universal binaries are also stored explicitly in a separate cache. Additionally, this change: * simplifies the code that parses/caches binaries: it's now done in a single place, not three different functions. * makes flush() method behave as expected, and actually clear the cached parsed binaries and objects. * fixes a dangling pointer issue described in http://reviews.llvm.org/D15638 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256041 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18[sancov] IWYU fix: add proper header inclusion.Alexey Samsonov1-0/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256040 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18Use getEdgeProbability() instead of getEdgeWeight() in BFI and remove ↵Cong Hou4-28/+10
getEdgeWeight() interfaces from MBPI. This patch removes all getEdgeWeight() interfaces from CodeGen directory. As getEdgeProbability() is a little more expensive than getEdgeWeight(), I will compose a patch soon in which BPI only stores probabilities instead of edge weights so that getEdgeProbability() will have O(1) time. Differential revision: http://reviews.llvm.org/D15489 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256039 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18[DivergenceAnalysis] fix a bug in computing influence regionsJingyue Wu2-8/+41
Fixes PR25864 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256036 91177308-0d34-0410-b5e6-96231b3b80d8