summaryrefslogtreecommitdiffstats
path: root/llvm/include
Commit message (Collapse)AuthorAgeFilesLines
...
* Linker: Avoid constructing ValueMap::MDMapTDuncan P. N. Exon Smith2016-04-191-0/+1
| | | | | | | | | 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
* IR: Use Optional instead of unique_ptr for Metadata map in ValueMap, NFCDuncan P. N. Exon Smith2016-04-191-2/+2
| | | | llvm-svn: 266751
* IR: getOrInsertODRUniquedType => DICompositeType::getODRType, NFCDuncan P. N. Exon Smith2016-04-192-11/+17
| | | | | | | | | | | | | | 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-191-7/+7
| | | | | | | | 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
* Correct IDF calculator for ReverseIDFDaniel Berlin2016-04-191-0/+5
| | | | | | | | | | | | | | 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-194-2/+23
| | | | | | | | | | | | | | | | | 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-191-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
* [ORC] Whitespace.Lang Hames2016-04-191-4/+4
| | | | llvm-svn: 266712
* [Orc] Tidy up some of the RPC primitives, add a unit-test for the callSTLang Hames2016-04-191-23/+57
| | | | | | (synchronous call) primitive. llvm-svn: 266711
* Port DemandedBits to the new pass manager.Michael Kuperstein2016-04-183-18/+60
| | | | | | Differential Revision: http://reviews.llvm.org/D18679 llvm-svn: 266699
* Add missing #include, found by modules selfhost.Richard Smith2016-04-181-2/+3
| | | | llvm-svn: 266697
* Add missing header, found by modules selfhost.Richard Smith2016-04-181-0/+2
| | | | llvm-svn: 266696
* Remove old DIBuilder::createFunction overload used only by dragonegg, which ↵Reid Kleckner2016-04-181-11/+0
| | | | | | | | does not currently build NFC llvm-svn: 266691
* [Orc] Explicitly delete RPC::SequenceNumberManager's copy-constructor andLang Hames2016-04-181-0/+3
| | | | | | | | | copy-assignment operator. MSVC is trying to synthesize these and failing. Hopefully explicitly deleting them will help. llvm-svn: 266665
* [Orc] Re-commit r266581 with fixes for MSVC, and format cleanups.Lang Hames2016-04-186-390/+752
| | | | | | | | | | Fixes: (1) Removes constexpr (unsupported in MSVC) (2) Move constructors (remove explicitly defaulted ones) (3) <future> - Add warning suppression for MSVC. llvm-svn: 266663
* NFC: unify clang / LLVM atomic orderingJF Bastien2016-04-182-80/+152
| | | | | | | | | | | 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
* Add missing new file for r266637Xinliang David Li2016-04-181-0/+204
| | | | llvm-svn: 266639
* Port InstrProfiling pass to the new pass managerXinliang David Li2016-04-183-3/+3
| | | | | | Differential Revision: http://reviews.llvm.org/D18126 llvm-svn: 266637
* Revert "Replace the use of MaxFunctionCount module flag"Eric Liu2016-04-181-35/+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
* Revert 266581 (and follow-up 266588), it doesn't build on Windows.Nico Weber2016-04-186-758/+386
| | | | | | | | | | 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 LLVMTarget on Windows after r266595.Nico Weber2016-04-181-2/+3
| | | | llvm-svn: 266613
* [NFC] Header cleanupMehdi Amini2016-04-18100-133/+81
| | | | | | | | | | | | | | Removed some unused headers, replaced some headers with forward class declarations. Found using simple scripts like this one: clear && ack --cpp -l '#include "llvm/ADT/IndexedMap.h"' | xargs grep -L 'IndexedMap[<]' | xargs grep -n --color=auto 'IndexedMap' Patch by Eugene Kosov <claprix@yandex.ru> Differential Revision: http://reviews.llvm.org/D19219 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266595
* [Orc] Tweak some of the new RPC code to silence a warning (extraneous ';') andLang Hames2016-04-181-4/+4
| | | | | | MSVC errors related to constexpr. llvm-svn: 266588
* [ORC] Generalize the ORC RPC utils to support RPC function return values andLang Hames2016-04-186-386/+758
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | asynchronous call/handle. Also updates the ORC remote JIT API to use the new scheme. The previous version of the RPC tools only supported void functions, and required the user to manually call a paired function to return results. This patch replaces the Procedure typedef (which only supported void functions) with the Function typedef which supports return values, e.g.: Function<FooId, int32_t(std::string)> Foo; The RPC primitives and channel operations are also expanded. RPC channels must support four new operations: startSendMessage, endSendMessage, startRecieveMessage and endRecieveMessage, to handle channel locking. In addition, serialization support for tuples to RPCChannels is added to enable multiple return values. The RPC primitives are expanded from callAppend, call, expect and handle, to: appendCallAsync - Make an asynchronous call to the given function. callAsync - The same as appendCallAsync, but calls send on the channel when done. callSTHandling - Blocking call for single-threaded code. Wraps a call to callAsync then waits on the result, using a user-supplied handler to handle any callbacks from the remote. callST - The same as callSTHandling, except that it doesn't handle callbacks - it expects the result to be the first return. expect and handle - as before. handleResponse - Handle a response from the remote. waitForResult - Wait for the response with the given sequence number to arrive. llvm-svn: 266581
* Linker: Share a single Metadata map for the lifetime of IRMoverDuncan P. N. Exon Smith2016-04-171-0/+6
| | | | | | | | | | Cache the result of mapping metadata nodes between instances of IRLinker (i.e., for the lifetime of IRMover). There shouldn't be any real functional change here, but this should give a major speedup. I had loaned this to Mehdi when he tested performance of r266446, and the two patches together gave a 10x speedup in metadata mapping. llvm-svn: 266579
* Revert "NFC: unify clang / LLVM atomic ordering"JF Bastien2016-04-172-152/+80
| | | | | | | | | | | | | | | | This reverts commit 537951f2f16d6a8542571c7722fcbae07d4e62c2. Causes an assert in: test/Transforms/AtomicExpand/SPARC/libcalls.ll (Ordering2 != AtomicOrdering::NotAtomic && "expect atomic MO") Bot: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/21724/testReport/junit/LLVM/Transforms_AtomicExpand_SPARC/libcalls_ll/ I'm not getting this assert on my local debug build, but I'll revert just to be sure. llvm-svn: 266576
* NFC: unify clang / LLVM atomic orderingJF Bastien2016-04-172-80/+152
| | | | | | | | | | | | Summary: This makes the C11 / C++11 *ABI* atomic ordering accessible from LLVM, as discussed in http://reviews.llvm.org/D18200#inline-151433 Reviewers: jyknight, reames Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D18875 llvm-svn: 266573
* Keep only the splitCodegen version that takes a factory.Rafael Espindola2016-04-172-19/+8
| | | | | | | This makes it much easier to see that all created TargetMachines are equivalent. llvm-svn: 266564
* Declare MVT::SimpleValueType as an int8_t sized enum. This removes 400 bytes ↵Craig Topper2016-04-172-17/+17
| | | | | | | | | | from TargetLoweringBase and probably other places. This required changing several places to print VT enums as strings instead of raw ints since the proper method to use to print became ambiguous. This is probably an improvement anyway. This also appears to save ~8K from an x86 self host build of llc. llvm-svn: 266562
* IR: Use an explicit map for debug info type uniquingDuncan P. N. Exon Smith2016-04-171-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than relying on the structural equivalence of DICompositeType to merge type definitions, use an explicit map on the LLVMContext that LLParser and BitcodeReader consult when constructing new nodes. Each non-forward-declaration DICompositeType with a non-empty 'identifier:' field is stored/loaded from the type map, and the first definiton will "win". This map is opt-in: clients that expect ODR types from different modules to be merged must call LLVMContext::ensureDITypeMap. - Clients that just happen to load more than one Module in the same LLVMContext won't magically merge types. - Clients (like LTO) that want to continue to merge types based on ODR identifiers should opt-in immediately. I have updated LTOCodeGenerator.cpp, the two "linking" spots in gold-plugin.cpp, and llvm-link (unless -disable-debug-info-type-map) to set this. With this in place, it will be straightforward to remove the DITypeRef concept (i.e., referencing types by their 'identifier:' string rather than pointing at them directly). llvm-svn: 266549
* [Target] Reduce size of the LoadExtActions array in TargetLoweringBase by ↵Craig Topper2016-04-171-7/+11
| | | | | | half. Saving ~18K bytes from the array. llvm-svn: 266547
* [Target] Remove checks for Simple VTs before calling routines that can ↵Craig Topper2016-04-171-10/+7
| | | | | | handle Extended VTs too. NFC llvm-svn: 266546
* [Target] Fix an assertion that should have been updated when the code below ↵Craig Topper2016-04-171-1/+1
| | | | | | it was changed in r251033. llvm-svn: 266545
* IR: Remove extra blank line, NFCDuncan P. N. Exon Smith2016-04-161-1/+0
| | | | llvm-svn: 266539
* Add missing #include to fix buildVedant Kumar2016-04-161-0/+1
| | | | | | | Failing bot: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental/23112/ llvm-svn: 266532
* Remove some unneeded headers and replace some headers with forward class ↵Mehdi Amini2016-04-1632-55/+34
| | | | | | | | | | | declarations (NFC) Differential Revision: http://reviews.llvm.org/D19154 Patch by Eugene Kosov <claprix@yandex.ru> From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266524
* ThinLTO: Move the ODR resolution to be based purely on the summary.Mehdi Amini2016-04-162-0/+12
| | | | | | | | | This is a requirement for the cache handling in D18494 Differential Revision: http://reviews.llvm.org/D18908 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266519
* ThinLTO: Make aliases explicit in the summaryMehdi Amini2016-04-162-2/+32
| | | | | | | | | | | To be able to work accurately on the reference graph when taking decision about internalizing, promoting, renaming, etc. We need to have the alias information explicit. Differential Revision: http://reviews.llvm.org/D18836 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266517
* [DebugInfo] Correct the assertion introduced in r266509 + update test.Davide Italiano2016-04-161-2/+2
| | | | llvm-svn: 266512
* Reapply "ValueMapper: Eliminate cross-file co-recursion, NFC"Duncan P. N. Exon Smith2016-04-161-23/+117
| | | | | | | | | | | | | | | | | | | | | | | This reverts commit r266507, reapplying r266503 (and r266505 "ValueMapper: Use API from r266503 in unit tests, NFC") completely unchanged. I reverted because of a bot failure here: http://lab.llvm.org:8011/builders/lld-x86_64-freebsd/builds/16810/ However, looking more closely, the failure was from a host-compiler crash (clang 3.7.1) when building: lib/CodeGen/AsmPrinter/CMakeFiles/LLVMAsmPrinter.dir/DwarfAccelTable.cpp.o I didn't modify that file, or anything it includes, with that commit. The next build (which hadn't picked up my revert) got past it: http://lab.llvm.org:8011/builders/lld-x86_64-freebsd/builds/16811/ I think this was just unfortunate timing. I suppose the bot must be flakey. llvm-svn: 266510
* [DebugInfo] Reduce size of DILocalVariable from 40 to 32 bytes.Davide Italiano2016-04-161-3/+6
| | | | | | | | This significantly contributes to peak memory usage during a LTO Release+DebugInfo build of clang. In my profile the peak usage is around 164MB before this change and ~130MB after. llvm-svn: 266509
* Revert "ValueMapper: Eliminate cross-file co-recursion, NFC"Duncan P. N. Exon Smith2016-04-161-117/+23
| | | | | | | | | | | | This reverts commit r266503, in case it's the root cause of this bot failure: http://lab.llvm.org:8011/builders/lld-x86_64-freebsd/builds/16810 I'm also reverting r266505 -- "ValueMapper: Use API from r266503 in unit tests, NFC" -- since it's in the way. llvm-svn: 266507
* ValueMapper: Eliminate cross-file co-recursion, NFCDuncan P. N. Exon Smith2016-04-161-23/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eliminate co-recursion of Mapper::mapValue through ValueMaterializer::materializeInitFor, through a major redesign of the ValueMapper.cpp interface. - Expose a ValueMapper class that controls the entry points to the mapping algorithms. - Change IRLinker to use ValueMapper directly, rather than llvm::RemapInstruction, llvm::MapValue, etc. - Use (e.g.) ValueMapper::scheduleMapGlobalInit to add mapping work to a worklist in ValueMapper instead of recursing. There were two fairly major complications. Firstly, IRLinker::linkAppendingVarProto incorporates an on-the-fly IR ugprade that I had to split apart. Long-term, this upgrade should be done in the bitcode reader (and we should only accept the "new" form), but for now I've just made it work and added a FIXME. The hold-op is that we need to deprecate C API that relies on this. Secondly, IRLinker has special logic to correctly implement aliases with comdats, and uses two ValueToValueMapTy instances and two ValueMaterializers. I supported this by allowing clients to register an alternate mapping context, whose MCID can be passed in when scheduling new work. While out of scope for this commit, it should now be straightforward to remove recursion from Mapper::mapValue. llvm-svn: 266503
* Add some missing #includes, found by C++ modules selfhost.Richard Smith2016-04-162-1/+5
| | | | llvm-svn: 266500
* Make this header include the header it depends on, rather than trying to ↵Richard Smith2016-04-151-1/+1
| | | | | | include itself. Found by C++ modules build. llvm-svn: 266492
* Don't skip splitSeparateComponents in eliminateDeadDefs for ↵Wei Mi2016-04-151-4/+1
| | | | | | | | | | | | | | | | | | HoistSpillHelper::hoistAllSpills. Because HoistSpillHelper::hoistAllSpills is called in postOptimization, before the patch we didn't want LiveRangeEdit::eliminateDeadDefs to call splitSeparateComponents and generate unassigned new vregs. However, skipping splitSeparateComponents will make verify-machineinstrs unhappy, so I remove the early return, and use HoistSpillHelper::LRE_DidCloneVirtReg to assign physreg/stackslot for those new vregs. In addition, some code reorganization to make class HoistSpillHelper privately inheriting from LiveRangeEdit::Delegate possible. This is to be consistent with class RAGreedy and class RegisterCoalescer. Differential Revision: http://reviews.llvm.org/D19142 llvm-svn: 266489
* Replace the use of MaxFunctionCount module flagEaswaran Raman2016-04-151-2/+35
| | | | | | | | Adds an interface to get ProfileSummary for a module and makes InlineCost use ProfileSummary to get max function count. Differential Revision: http://reviews.llvm.org/D18622 llvm-svn: 266477
* [codeview] Dump char16_t and char32_t simple typesReid Kleckner2016-04-151-0/+2
| | | | llvm-svn: 266465
* [ParallelCG] Add a new splitCodeGen() API which takes a TargetMachineFactory.Davide Italiano2016-04-151-0/+14
| | | | | | | | This is a recommit of r266390 with a fix that will allow tests to pass (hopefully). Before we got a StringRef to M->getTargetTriple() and right after we moved the Module so we were referencing a dangling object. llvm-svn: 266456
* [PR27284] Reverse the ownership between DICompileUnit and DISubprogram.Adrian Prantl2016-04-152-55/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently each Function points to a DISubprogram and DISubprogram has a scope field. For member functions the scope is a DICompositeType. DIScopes point to the DICompileUnit to facilitate type uniquing. Distinct DISubprograms (with isDefinition: true) are not part of the type hierarchy and cannot be uniqued. This change removes the subprograms list from DICompileUnit and instead adds a pointer to the owning compile unit to distinct DISubprograms. This would make it easy for ThinLTO to strip unneeded DISubprograms and their transitively referenced debug info. Motivation ---------- Materializing DISubprograms is currently the most expensive operation when doing a ThinLTO build of clang. We want the DISubprogram to be stored in a separate Bitcode block (or the same block as the function body) so we can avoid having to expensively deserialize all DISubprograms together with the global metadata. If a function has been inlined into another subprogram we need to store a reference the block containing the inlined subprogram. Attached to https://llvm.org/bugs/show_bug.cgi?id=27284 is a python script that updates LLVM IR testcases to the new format. http://reviews.llvm.org/D19034 <rdar://problem/25256815> llvm-svn: 266446
OpenPOWER on IntegriCloud