summaryrefslogtreecommitdiffstats
path: root/llvm/include
Commit message (Collapse)AuthorAgeFilesLines
* [codeview] Maintain the type enum-to-classname mapping in the .def fileReid Kleckner2016-05-031-29/+35
| | | | | | This way it will be easy to stamp out something like a type visitor. llvm-svn: 268347
* Parse the TPI (type information) stream of PDB files.Zachary Turner2016-05-037-0/+86
| | | | | | | | | | | | | | | This parses the TPI stream (stream 2) from the PDB file. This stream contains some header information followed by a series of codeview records. There is some additional complexity here in that alongside this stream of codeview records is a serialized hash table in order to efficiently query the types. We parse the necessary bookkeeping information to allow us to reconstruct the hash table, but we do not actually construct it yet as there are still a few things that need to be understood first. Differential Revision: http://reviews.llvm.org/D19840 Reviewed By: ruiu, rnk llvm-svn: 268343
* Move llvm-readobj/StreamWriter to Support.Zachary Turner2016-05-031-0/+337
| | | | | | | | | We wish to re-use this from llvm-pdbdump, and it provides a nice way to print structured data in scoped format that could prove useful for many other dumping tools as well. Moving to support and changing name to ScopedPrinter to better reflect its purpose. llvm-svn: 268342
* ThinLTO: do not import function whose linkage prevents inlining.Mehdi Amini2016-05-031-20/+26
| | | | | | | | | | | There is not point in importing a "weak" or a "linkonce" function since we won't be able to inline it anyway. We already had a targeted check for WeakAny, this is using the same check on GlobalValue as the inline, i.e. isMayBeOverriddenLinkage() From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 268341
* livePhysRegs: Pass MBB by reference in addLive{Ins|Outs}(); NFCMatthias Braun2016-05-031-3/+3
| | | | | | | The block must no be nullptr for the addLiveIns()/addLiveOuts() function. llvm-svn: 268340
* LivePhysRegs: Automatically determine presence of pristine regs.Matthias Braun2016-05-031-7/+12
| | | | | | | | | | | | | | | | | | | | | | Remove the AddPristinesAndCSRs parameters from addLiveIns()/addLiveOuts(). We need to respect pristine registers after prologue epilogue insertion, Seeing that we got this wrong in at least two commits already, we should rather pay the small price to query MachineFrameInfo for it. There are three cases that did not set AddPristineAndCSRs to true even after register allocation: - ExecutionDepsFix: live-out registers are used as a hint that the register is used soon. This is not true for pristine registers so use the new addLiveOutsNoPristines() to maintain this behaviour. - SystemZShortenInst: Not setting AddPristineAndCSRs to true looks like a bug, should do the right thing automatically now. - StackMapLivenessAnalysis: Not adding pristine registers looks like a bug to me. Added a FIXME comment but maintain the current behaviour as a change may need to get coordinated with GC runtimes. llvm-svn: 268336
* [MC] Create unique .pdata sections for every .text sectionReid Kleckner2016-05-025-39/+63
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This adds a unique ID to the COFF section uniquing map, similar to the one we have for ELF. The unique id is not currently exposed via the assembler because we don't have a use case for it yet. Users generally create .pdata with the .seh_* family of directives, and the assembler internally needs to produce .pdata and .xdata sections corresponding to the code section. The association between .text sections and the assembler-created .xdata and .pdata sections is maintained as an ID field of MCSectionCOFF. The CFI-related sections are created with the given unique ID, so if more code is added to the same text section, we can find and reuse the CFI sections that were already created. Reviewers: majnemer, rafael Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D19376 llvm-svn: 268331
* [X86] Model FAULTING_LOAD_OP as a terminator and branch.Quentin Colombet2016-05-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This operation may branch to the handler block and we do not want it to happen anywhere within the basic block. Moreover, by marking it "terminator and branch" the machine verifier does not wrongly assume (because of AnalyzeBranch not knowing better) the branch is analyzable. Indeed, the target was seeing only the unconditional branch and not the faulting load op and thought it was a simple unconditional block. The machine verifier was complaining because of that and moreover, other optimizations could have done wrong transformation! In the process, simplify the representation of the handler block in the faulting load op. Now, we directly reference the handler block instead of using a label. This has the benefits of: 1. MC knows how to issue a label for a BB, so leave that to it. 2. Accessing the target BB from its label is painful, whereas it is direct from a MBB operand. Note: The 2 bytes offset in implicit-null-check.ll comes from the fact the unconditional jumps are not removed anymore, as the whole terminator sequence is not analyzable anymore. Will fix it in a subsequence commit. llvm-svn: 268327
* DebugInfo: Avoid propagating incorrect debug locations in SelectionDAG via CSE.Wolfgang Pieb2016-05-021-1/+1
| | | | | | | | | | | | | | | | | | Summary: When SelectionDAG performs CSE it is possible that the context's source location is different from that of the selected node. This can lead to incorrect line number records. We update the debug location to the one that occurs earlier in the instruction sequence. This fixes PR21006. Reviewers: echristo, sdmitrouk Subscribers: jevinskie, asl, llvm-commits Differential Revision: http://reviews.llvm.org/D12094 llvm-svn: 268323
* Revert "ThinLTO: do not import function whose linkage prevents inlining."Mehdi Amini2016-05-021-26/+20
| | | | | | | This reverts commit r268315, the tests are not passing. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 268317
* ThinLTO: do not import function whose linkage prevents inlining.Mehdi Amini2016-05-021-20/+26
| | | | | | | | | | | There is not point in importing a "weak" or a "linkonce" function since we won't be able to inline it anyway. We already had a targeted check for WeakAny, this is using the same check on GlobalValue as the inline, i.e. isMayBeOverriddenLinkage() From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 268315
* Fix a typo, NFCVedant Kumar2016-05-021-1/+1
| | | | llvm-svn: 268311
* Thread Expected<...> up from libObject’s getType() for symbols to allow ↵Kevin Enderby2016-05-024-18/+18
| | | | | | | | | | | | | | | | | | | | | | llvm-objdump to produce a good error message. Produce another specific error message for a malformed Mach-O file when a symbol’s section index is more than the number of sections. The existing test case in test/Object/macho-invalid.test for macho-invalid-section-index-getSectionRawName now reports the error with the message indicating that a symbol at a specific index has a bad section index and that bad section index value. Again converting interfaces to Expected<> from ErrorOr<> does involve touching a number of places. Where the existing code reported the error with a string message or an error code it was converted to do the same. Also there some were bugs in the existing code that did not deal with the old ErrorOr<> return values.  So now with Expected<> since they must be checked and the error handled, I added a TODO and a comment: "// TODO: Actually report errors helpfully" and a call something like consumeError(NameOrErr.takeError()) so the buggy code will not crash since needed to deal with the Error. llvm-svn: 268298
* [LVI] Add an API to LazyValueInfo so that it can export ConstantRangesJohn Regehr2016-05-021-0/+6
| | | | | | | | | that it computes. Currently this is used for testing and precision tuning, but it might be used by optimizations later. Differential Revision: http://reviews.llvm.org/D19179 llvm-svn: 268291
* Revert "[SimplifyCFG] Extend TryToSimplifyUncondBranchFromEmptyBlock for ↵Reid Kleckner2016-05-021-9/+0
| | | | | | | | | | | empty block including lifetime intrinsics" This reverts commit r268254. This change causes assertion failures while building Chromium. Reduced test case coming soon. llvm-svn: 268288
* PDB - Instead of hardcoding stream numbers, use an enum.Zachary Turner2016-05-021-0/+7
| | | | llvm-svn: 268270
* Parse PDB Name Hash TableZachary Turner2016-05-024-0/+56
| | | | | | | | | | | | | PDB has a lot of similar data structures. We already have code for parsing a Name Map, but PDB seems to have a different but very similar structure that is a hash table. This is the beginning of code needed in order to parse the name hash table, but it is not yet complete. It parses the basic metadata of the hash table, the bucket array, and the names buffer, but doesn't use any of these fields yet as the data structure requires a non-trivial amount of work to understand. llvm-svn: 268268
* [WebAssembly] Rename memory_size intrinsic to current_memoryDerek Schuff2016-05-021-2/+2
| | | | | | This follows the recent renaming in the wasm spec. llvm-svn: 268255
* [SimplifyCFG] Extend TryToSimplifyUncondBranchFromEmptyBlock for empty block ↵Hans Wennborg2016-05-021-0/+9
| | | | | | | | | | | | | | | | | | including lifetime intrinsics Make it possible that TryToSimplifyUncondBranchFromEmptyBlock merges empty basic block including lifetime intrinsics as well as phi nodes and unconditional branch into its successor or predecessor(s). If successor of empty block has single predecessor, all contents including lifetime intrinsics are sinked into the successor. Otherwise, they are hoisted into its predecessor(s) and then merged into the predecessor(s). Patch by Josh Yoon <josh.yoon@samsung.com>! Differential Revision: http://reviews.llvm.org/D19257 llvm-svn: 268254
* Expose a getFullName for thin archive members.Rafael Espindola2016-05-021-0/+1
| | | | | | It will be used in lld. llvm-svn: 268226
* [CodeGen] Add OPC_MoveChild0-OPC_MoveChild7 opcodes to isel matching tables ↵Craig Topper2016-05-021-0/+2
| | | | | | to optimize table size. Shaves about 12K off the X86 matcher table. llvm-svn: 268209
* Properly name LLVMSetIsInBounds's argument. NFCAmaury Sechet2016-05-011-1/+1
| | | | llvm-svn: 268176
* Capitalize align argument in the C API as per convention. NFCAmaury Sechet2016-05-011-2/+2
| | | | llvm-svn: 268175
* [ORC] Save AArch64 NEON state in the JIT reentry block.Lang Hames2016-05-011-1/+1
| | | | | | | The earlier version of the resolver code did not save NEON state, so it would have broken any callees that used floating point. llvm-svn: 268173
* Differential Revision: http://reviews.llvm.org/D19753Sriraman Tallam2016-04-301-9/+1
| | | | | | Delete Target Option PositionIndependentExecutable as PIE is now part of module flags. llvm-svn: 268155
* [Orc] Fix the AArch64 resolver size.Lang Hames2016-04-301-1/+1
| | | | llvm-svn: 268146
* Fix a typo (NFC)Vedant Kumar2016-04-301-1/+1
| | | | llvm-svn: 268144
* Reapply r268107 after fixing a bug breaks debug build.Xinliang David Li2016-04-291-0/+7
| | | | | | Makes the new method to set data needed by debug dump. llvm-svn: 268130
* clean up documentation comments; NFCSanjay Patel2016-04-291-2/+4
| | | | llvm-svn: 268122
* Revert r268107 -- debug build failureXinliang David Li2016-04-291-4/+0
| | | | llvm-svn: 268116
* [Orc] Add ORC lazy-compilation support for AArch64.Lang Hames2016-04-291-0/+31
| | | | | | | The ORC compile callbacks and indirect stubs APIs will now work for AArc64, allowing functions to be lazily compiled and/or updated. llvm-svn: 268112
* [Orc] Make sure we don't drop the internal error in OrcRemoteTargetClient whenLang Hames2016-04-291-2/+3
| | | | | | the constructor fails, as this would lead to an 'unchecked error' crash. llvm-svn: 268111
* [inliner]: Refactor inline deferring logic into its own method /NFCXinliang David Li2016-04-291-0/+4
| | | | | | | | The implemented heuristic has a large body of code which better sits in its own function for better readability. It also allows adding more heuristics easier in the future. llvm-svn: 268107
* Differential Revision: http://reviews.llvm.org/D19733Sriraman Tallam2016-04-291-6/+0
| | | | llvm-svn: 268106
* AMDGPU: Add kernarg.segment.ptr intrinsicMatt Arsenault2016-04-291-0/+4
| | | | llvm-svn: 268105
* Fix commentMatt Arsenault2016-04-291-1/+1
| | | | llvm-svn: 268102
* Move coverage related code into a separate library.Easwaran Raman2016-04-293-2/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D19333 llvm-svn: 268089
* Put PDB parsing code into a pdb namespace.Zachary Turner2016-04-2911-30/+49
| | | | llvm-svn: 268072
* Refactor the PDB Stream reading interface.Zachary Turner2016-04-298-59/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | The motivation for this change is that PDB has the notion of streams and substreams. Substreams often consist of variable length structures that are convenient to be able to treat as guaranteed, contiguous byte arrays, whereas the streams they are contained in are not necessarily so, as a single stream could be spread across many discontiguous blocks. So, when processing data from a substream, we want to be able to assume that we have a contiguous byte array so that we can cast pointers to variable length arrays and such. This leads to the question of how to be able to read the same data structure from either a stream or a substream using the same interface, which is where this patch comes in. We separate out the stream's read state from the underlying representation, and introduce a `StreamReader` class. Then we change the name of `PDBStream` to `MappedBlockStream`, and introduce a second kind of stream called a `ByteStream` which is simply a sequence of contiguous bytes. Finally, we update all of the std::vectors in `PDBDbiStream` to use `ByteStream` instead as a proof of concept. llvm-svn: 268071
* Add operator- to Path's reverse_iterator. Needed for D19666Filipe Cabecinhas2016-04-291-0/+3
| | | | | | | | | | Reviewers: rafael, craig.topper, bogner Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D19724 llvm-svn: 268062
* Unify XDEBUG and EXPENSIVE_CHECKS (into the latter), and add an option to ↵Filipe Cabecinhas2016-04-292-4/+4
| | | | | | | | | | | | | | | | | | | the cmake build to enable them. Summary: Historically, we had a switch in the Makefiles for turning on "expensive checks". This has never been ported to the cmake build, but the (dead-ish) code is still around. This will also make it easier to turn it on in buildbots. Reviewers: chandlerc Subscribers: jyknight, mzolotukhin, RKSimon, gberry, llvm-commits Differential Revision: http://reviews.llvm.org/D19723 llvm-svn: 268050
* fix typo; NFCSanjay Patel2016-04-291-1/+1
| | | | llvm-svn: 268045
* [GlobalOpt] Propagate operand bundlesDavid Majnemer2016-04-291-2/+22
| | | | | | | We neglected to transfer operand bundles for some transforms. These were found via inspection, I'll try to come up with some test cases. llvm-svn: 268011
* Read the rest of the DBI substreams, and parse source info.Zachary Turner2016-04-282-1/+19
| | | | | | | | | | | | | We now read out the rest of the substreams from the DBI streams. One of these substreams, the FileInfo substream, contains information about which source files contribute to each module (aka compiland). This patch additionally parses out the file information from that substream, and dumps it in llvm-pdbdump. Differential Revision: http://reviews.llvm.org/D19634 Reviewed by: ruiu llvm-svn: 267928
* Reset the TopRPTracker's position in ScheduleDAGMILive::initQueuesKrzysztof Parzyszek2016-04-281-0/+4
| | | | | | | | | | | | | | | | | | | ScheduleDAGMI::initQueues changes the RegionBegin to the first non-debug instruction. Since it does not track register pressure, it does not affect any RP trackers. ScheduleDAGMILive inherits initQueues from ScheduleDAGMI, and it does reset the TopTPTracker in its schedule method. Any derived, target-specific scheduler will need to do it as well, but the TopRPTracker is only exposed as a "const" object to derived classes. Without the ability to modify the tracker directly, this leaves a derived scheduler with a potential of having the TopRPTracker out-of-sync with the CurrentTop. The symptom of the problem: void llvm::ScheduleDAGMILive::scheduleMI(llvm::SUnit *, bool): Assertion `TopRPTracker.getPos() == CurrentTop && "out of sync"' failed. Differential Revision: http://reviews.llvm.org/D19438 llvm-svn: 267918
* Fix builds broken in r267910.Eugene Zelenko2016-04-281-1/+1
| | | | llvm-svn: 267915
* Add "PIE Level" metadata to module flags.Sriraman Tallam2016-04-282-0/+15
| | | | | | http://reviews.llvm.org/D19671 llvm-svn: 267911
* Fix some Clang-tidy modernize and Include What You Use warnings.Eugene Zelenko2016-04-283-20/+70
| | | | | | Differential revision: http://reviews.llvm.org/D19673 llvm-svn: 267910
* [GVN] Minor code cleanup. NFC.Chad Rosier2016-04-281-9/+8
| | | | | | | Differential Revision: http://reviews.llvm.org/D18828 Patch by Aditya Kumar! llvm-svn: 267898
* CodeGen: Add DetectDeadLanes pass.Matthias Braun2016-04-282-0/+4
| | | | | | | | | | | | | | | | | | | | The DetectDeadLanes pass performs a dataflow analysis of used/defined subregister lanes across COPY instructions and instructions that will get lowered to copies. It detects dead definitions and uses reading undefined values which are obscured by COPY and subregister usage. These dead definitions cause trouble in the register coalescer which cannot deal with definitions suddenly becoming dead after coalescing COPY instructions. For now the pass only adds dead and undef flags to machine operands. It should be possible to extend it in the future to remove the dead instructions and redo the analysis for the affected virtual registers. Differential Revision: http://reviews.llvm.org/D18427 llvm-svn: 267851
OpenPOWER on IntegriCloud