summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* [X86] Simplify StackMapShadowTracker; NFCSanjoy Das2016-04-192-38/+27
| | | | | | | | - Elide trivial contructor and desctructor - Move implementation out of an unnecessary explicit llvm namespace scope llvm-svn: 266794
* [X86MCInstLower] Clean up EmitNops; NFCSanjoy Das2016-04-191-51/+68
| | | | | | | Instead of having a conditional assert inside EmitNops, refactor so that the caller can have the assert instead. llvm-svn: 266793
* [Hexagon] Implement branch relaxationKrzysztof Parzyszek2016-04-193-0/+215
| | | | | | Patch by Sirish Pande. llvm-svn: 266792
* IR: Enable debug info type ODR uniquing for forward declsDuncan P. N. Exon Smith2016-04-193-6/+40
| | | | | | | | | | | | | | | | | | | | | | | | Add a new method, DICompositeType::buildODRType, that will create or mutate the DICompositeType for a given ODR identifier, and use it in LLParser and BitcodeReader instead of DICompositeType::getODRType. The logic is as follows: - If there's no node, create one with the given arguments. - Else, if the current node is a forward declaration and the new arguments would create a definition, mutate the node to match the new arguments. - Else, return the old node. This adds a missing feature supported by the current DITypeIdentifierMap (which I'm slowly making redudant). The only remaining difference is that the DITypeIdentifierMap has a "the-last-one-wins" rule, whereas DICompositeType::buildODRType has a "the-first-one-wins" rule. For now I'm leaving behind DICompositeType::getODRType since it has obvious, low-level semantics that are convenient for unit testing. llvm-svn: 266786
* Preliminary changes for fixing PR27241. Generalized/restructured some thingsDavid L Kreitzer2016-04-191-19/+37
| | | | | | | | | in preparation for enabling the outgoing parameter store-to-push optimization for 64-bit targets. Differential Revision: http://reviews.llvm.org/D19222 llvm-svn: 266774
* [llvm-pdbdump] Print a better error message when PDB loading fails.Zachary Turner2016-04-192-14/+19
| | | | | | Differential Revision: http://reviews.llvm.org/D19234 llvm-svn: 266772
* [ValueTracking] Improve isImpliedCondition for conditions with matching ↵Chad Rosier2016-04-194-16/+121
| | | | | | | | | | | | | | | operands. This patch improves SimplifyCFG to catch cases like: if (a < b) { if (a > b) <- known to be false unreachable; } Phabricator Revision: http://reviews.llvm.org/D18905 llvm-svn: 266767
* Linker: Avoid constructing ValueMap::MDMapTDuncan P. N. Exon Smith2016-04-191-2/+2
| | | | | | | | | Calling ValueMap::MD lazily constructs a ValueMap, which mallocs the buckets. Instead of swapping constructed maps, move around the underlying Optional<MDMapT>. This gets rid of some unnecessary malloc traffic from r266579 (not that it showed up on a profile). llvm-svn: 266761
* [DependenceAnalysis] Refactor uses of getConstantPart. NFC.Brendon Cahoon2016-04-191-36/+21
| | | | | | | | | | Rather than checking for the SCEV type prior to calling getContantPart, perform the checks in the function. This reduces the number of places where the checks are needed. Differential Revision: http://reviews.llvm.org/D19241 llvm-svn: 266759
* ModuleLinker: Do not import linkonce/weak as "external_weak"Mehdi Amini2016-04-191-2/+1
| | | | | | | | | | | | | | | Summary: There is no reason to have a weak reference because the external definition will be weak. Reviewers: rafael Subscribers: llvm-commits, tejohnson Differential Revision: http://reviews.llvm.org/D19267 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266750
* IR: Use Optional instead of unique_ptr for debug info ODR type map, NFCDuncan P. N. Exon Smith2016-04-192-3/+2
| | | | | | Save a level of malloc indirection. llvm-svn: 266749
* Enable ODR uniquing of DITypes in more placesTeresa Johnson2016-04-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Summary: This is a follow-on to apply Duncan's new DIType ODR uniquing from r266549 and r266713 in more places. Enable enableDebugTypeODRUniquing() for ThinLTO backends invoked via libLTO, similar to the way r266549 enabled this for ThinLTO backend threads launched from gold-plugin. Also enable enableDebugTypeODRUniquing in opt, similar to the way r266549 enabled this for llvm-link (on by default, can be disabled with new -disable-debug-info-type-map option), since we may perform ThinLTO importing from opt. Reviewers: dexonsmith, joker.eph Subscribers: joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D19263 llvm-svn: 266746
* IR: getOrInsertODRUniquedType => DICompositeType::getODRType, NFCDuncan P. N. Exon Smith2016-04-194-31/+62
| | | | | | | | | | | | | | Lift the API for debug info ODR type uniquing up a layer. Instead of clients managing the map directly on the LLVMContext, add a static method to DICompositeType called getODRType and handle the map in the background. Also adds DICompositeType::getODRTypeIfExists, so far just for convenience in the unit tests. This simplifies the logic in LLParser and BitcodeReader. Because of argument spam there are actually a few more lines of code now; I'll see if I come up with a reasonable way to clean that up. llvm-svn: 266742
* IR: Require DICompositeType for ODR uniquing type mapDuncan P. N. Exon Smith2016-04-194-7/+8
| | | | | | | | Tighten up the API for debug info ODR type uniquing in LLVMContext. The only reason to allow other DIType subclasses is to make the unit tests prettier :/. llvm-svn: 266737
* [X86][AVX2] Prefer VPERMQ/VPERMPD over VINSERTI128/VINSERTF128 for unary ↵Simon Pilgrim2016-04-191-4/+10
| | | | | | | | | | shuffles Using VPERMQ/VPERMPD allows memory folding of the (repeated) input where VINSERTI128/VINSERTF128 can not. Differential Revision: http://reviews.llvm.org/D19228 llvm-svn: 266728
* Minor improvement to debug output for Function Importer (NFC)Mehdi Amini2016-04-191-9/+9
| | | | | From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266723
* Add a description for the PatchableFunction pass; NFCSanjoy Das2016-04-191-1/+2
| | | | llvm-svn: 266721
* Disable the PatchableFunction pass for NVPTX & WasmSanjoy Das2016-04-192-0/+2
| | | | | | | PatchableFunction requires AllVRegsAllocated that these targets don't provide. llvm-svn: 266720
* Correct IDF calculator for ReverseIDFDaniel Berlin2016-04-193-7/+16
| | | | | | | | | | | | | | Summary: Need to use predecessors for reverse graph, successors for forward graph. succ_iterator/pred_iterator are not compatible, this patch is all the work necessary to work around that (which is what everywhere else does). Not sure if there is a better way, so cc'ing some random folks to take a gander :) Reviewers: dblaikie, qcolombet, echristo Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D18796 llvm-svn: 266718
* Introduce a "patchable-function" function attributeSanjoy Das2016-04-197-18/+137
| | | | | | | | | | | | | | | | | Summary: The `"patchable-function"` attribute can be used by an LLVM client to influence LLVM's code generation in ways that makes the generated code easily patchable at runtime (for instance, to redirect control). Right now only one patchability scheme is supported, `"prologue-short-redirect"`, but this can be expanded in the future. Reviewers: joker.eph, rnk, echristo, dberris Subscribers: joker.eph, echristo, mcrosier, llvm-commits Differential Revision: http://reviews.llvm.org/D19046 llvm-svn: 266715
* IR: Rename API for enabling ODR uniquing of DITypes, NFCDuncan P. N. Exon Smith2016-04-194-8/+8
| | | | | | | | | | | As per David's review, rename everything in the new API for ODR type uniquing of debug info. ensureDITypeMap => enableDebugTypeODRUniquing destroyDITypeMap => disableDebugTypeODRUniquing hasDITypeMap => isODRUniquingDebugTypes llvm-svn: 266713
* BitcodeWriter: Break recursion when enumerating Metadata, almost NFCDuncan P. N. Exon Smith2016-04-192-71/+74
| | | | | | | | | | | Use a worklist instead of recursing through MDNode operands in ValueEnumerator. The actual record output order has changed slightly, but otherwise there's no functionality change. I had to update test/Bitcode/metadata-function-blocks.ll. I renumbered nodes so they continue to match the implicit record ids. llvm-svn: 266709
* [lanai] Set boolean contentss to ZeroOrOneBooleanContent.Jacques Pienaar2016-04-191-0/+3
| | | | llvm-svn: 266701
* Increase SmallVector size for ConstantUniqueMap::getHashValue() (NFC)Mehdi Amini2016-04-191-1/+1
| | | | | | | | This remove totally any malloc from this function on my profile (from 155k before). From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266700
* Port DemandedBits to the new pass manager.Michael Kuperstein2016-04-187-35/+58
| | | | | | Differential Revision: http://reviews.llvm.org/D18679 llvm-svn: 266699
* [libFuzzer] try to print correct time in seconds when reporting a timeout. ↵Kostya Serebryany2016-04-183-6/+6
| | | | | | Don't report timeouts while still loading the corpus. llvm-svn: 266693
* [DWARF] Force a linkage_name on an inlined subprogram's abstract origin.Paul Robinson2016-04-184-18/+30
| | | | | | | | | | | | | When we suppress linkage names, for a non-inlined subprogram the name can still be found in the object-file symbol table, because we have the code address of the subprogram. This is not necessarily the case for an inlined subprogram, so we still want to emit the linkage name in the DWARF. Put this on the abstract-origin DIE because it's common to all inlined instances. Differential Revision: http://reviews.llvm.org/D18706 llvm-svn: 266692
* Remove old DIBuilder::createFunction overload used only by dragonegg, which ↵Reid Kleckner2016-04-181-13/+0
| | | | | | | | does not currently build NFC llvm-svn: 266691
* Add debugging to the cache pruningMehdi Amini2016-04-181-4/+23
| | | | | From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266686
* CachePruning: fix typo, we accumulate file size here, not timeMehdi Amini2016-04-181-1/+1
| | | | | From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266685
* ARM: use a pseudo-instruction for cmpxchg at -O0.Tim Northover2016-04-184-5/+385
| | | | | | | | | | | | | | | | | The fast register-allocator cannot cope with inter-block dependencies without spilling. This is fine for ldrex/strex loops coming from atomicrmw instructions where any value produced within a block is dead by the end, but not for cmpxchg. So we lower a cmpxchg at -O0 via a pseudo-inst that gets expanded after regalloc. Fortunately this is at -O0 so we don't have to care about performance. This simplifies the various axes of expansion considerably: we assume a strong seq_cst operation and ensure ordering via the always-present DMB instructions rather than v8 acquire/release instructions. Should fix the 32-bit part of PR25526. llvm-svn: 266679
* [libFuzzer] warn if the corpus is emptyKostya Serebryany2016-04-182-1/+5
| | | | llvm-svn: 266670
* [Orc] Re-commit r266581 with fixes for MSVC, and format cleanups.Lang Hames2016-04-182-35/+27
| | | | | | | | | | Fixes: (1) Removes constexpr (unsupported in MSVC) (2) Move constructors (remove explicitly defaulted ones) (3) <future> - Add warning suppression for MSVC. llvm-svn: 266663
* try to make comments more meaningful; NFCSanjay Patel2016-04-181-9/+7
| | | | | | Retry r266541 without the range-based-for-loop-change that was wrong. llvm-svn: 266658
* Fix shared build of LLVMPasses.Marcin Koscielnicki2016-04-181-1/+1
| | | | | | | It's missing a dependency on Instrumentation (needed for llvm::InstrProfiling::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&)) llvm-svn: 266656
* [BPI] Consider deoptimize calls as "unreachable"Sanjoy Das2016-04-181-1/+6
| | | | | | | | | | | | | | Summary: Calls to @llvm.experimental.deoptimize are expected to "never execute", so optimize them as such. Reviewers: chandlerc Subscribers: junbuml, mcrosier, llvm-commits Differential Revision: http://reviews.llvm.org/D19095 llvm-svn: 266654
* NFC: unify clang / LLVM atomic orderingJF Bastien2016-04-181-38/+8
| | | | | | | | | | | This makes the C11 / C++11 *ABI* atomic ordering accessible from LLVM, as discussed in http://reviews.llvm.org/D18200#inline-151433 This re-applies r266573 which I had reverted in r266576. Original review: http://reviews.llvm.org/D18875 llvm-svn: 266640
* Port InstrProfiling pass to the new pass managerXinliang David Li2016-04-185-88/+45
| | | | | | Differential Revision: http://reviews.llvm.org/D18126 llvm-svn: 266637
* Revert r266488.Easwaran Raman2016-04-181-1/+1
| | | | | | This goes with r266477 which has been reverted. llvm-svn: 266631
* Lanai: fix debug buildJF Bastien2016-04-181-1/+1
| | | | | | There's currently no raw_ostream &operator<<(SimpleValueType); provided by LLVM. It could be added by refactoring utils/TableGen/CodeGenTarget.cpp:getEnumName, but that's much more work than fixing the build. llvm-svn: 266627
* [AMDGPU] Add insert nops pass based on subtarget features instead of cl::optKonstantin Zhuravlyov2016-04-185-14/+43
| | | | | | | | | | | Also, - Skip pass if machine module does not have debug info - Minor comment changes - Added test Differential Revision: http://reviews.llvm.org/D19079 llvm-svn: 266626
* Reapply "[Coverage] Prevent detection of false instantiations in case of ↵Igor Kudrin2016-04-181-18/+12
| | | | | | | | | | | | | | | | | | macro expansion." The root of the problem was that findMainViewFileID(File, Function) could return some ID for any given file, even though that file was not the main file for that function. This patch ensures that the result of this function is conformed with the result of findMainViewFileID(Function). This commit reapplies r266436, which was reverted by r266458, with the .covmapping file serialized in v1 format. Differential Revision: http://reviews.llvm.org/D18787 llvm-svn: 266620
* Revert "Replace the use of MaxFunctionCount module flag"Eric Liu2016-04-182-48/+2
| | | | | | | | | | This reverts commit r266477. This commit introduces cyclic dependency. This commit has "Analysis" depend on "ProfileData", while "ProfileData" depends on "Object", which depends on "BitCode", which depends on "Analysis". llvm-svn: 266619
* [AMDGPU][llvm-mc] s_setreg* - Fix order of operandsArtem Tamazov2016-04-181-2/+2
| | | | | | | | Order should match the sp3 syntax, where destination (simm16 denoting the hwreg) is coming first. Differential Revision: http://reviews.llvm.org/D19161 llvm-svn: 266617
* Silence some "initialized but unused" warnings from MSVC -- the function ↵Aaron Ballman2016-04-181-13/+2
| | | | | | being called is a static function, so there's no need for an instance variable. NFC. llvm-svn: 266616
* Revert 266581 (and follow-up 266588), it doesn't build on Windows.Nico Weber2016-04-182-27/+35
| | | | | | | | | | Three problems: 1. <future> can't be easily used. If you must use it, see include/Support/ThreadPool.h for how. 2. constexpr problems, even after 266588. 3. Move assignment operators can't be defaulted in MSVC2013. llvm-svn: 266615
* Unbreak building llvm-pdbdump on Windows after r266595.Nico Weber2016-04-183-1/+4
| | | | llvm-svn: 266612
* [mips][ias] Prevent double-filling of delay slots by generating '.set ↵Daniel Sanders2016-04-181-1/+8
| | | | | | | | | | | | | | | | | | noreorder' regions. Summary: When clang is given -save-temps or -via-file-asm, any inline assembly in the source is parsed twice. Once by the compiler, and again by the assembler. We must take care to ensure that this doesn't lead to double-filling delay slots. Reviewers: sdardis, vkalintiris Subscribers: dsanders, sdardis, llvm-commits Differential Revision: http://reviews.llvm.org/D19166 llvm-svn: 266608
* Include SmallVector.h header in ↵Eric Liu2016-04-181-0/+1
| | | | | | lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h llvm-svn: 266606
* [ARM] AArch32 v8 NEON is still not IEEE-754 compliantRenato Golin2016-04-181-1/+4
| | | | llvm-svn: 266603
OpenPOWER on IntegriCloud