summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAge
* Move the PostRA scheduler's fixupKills function for reuse.Andrew Trick2013-12-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198121 91177308-0d34-0410-b5e6-96231b3b80d8
* Stub out a PostMachineScheduler pass.Andrew Trick2013-12-28
| | | | | | Placeholder and boilerplate for a PostRA MachineScheduler pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198120 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor MI-Sched in preparation for post-ra scheduling support.Andrew Trick2013-12-28
| | | | | | | | Factor the MachineFunctionPass into MachineSchedulerBase. Split the DAG class into ScheduleDAGMI and SchedulerDAGMILive. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198119 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert part of r198115 to see if it fixes a buildbot failure.Craig Topper2013-12-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198118 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark some Type and EVT methods as LLVM_READONLY.Craig Topper2013-12-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198115 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove AsmPrinter::needsRelocationsForDwarfStringPool() since it'sEric Christopher2013-12-28
| | | | | | | just calling into MAI and is only abstracting for a single interface that we actually need to check in multiple places. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198092 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach DAGCombiner how to fold a SIGN_EXTEND_INREG of a BUILD_VECTOR ofAndrea Di Biagio2013-12-27
| | | | | | | | | | | | | | | | | | | | | | ConstantSDNodes (or UNDEFs) into a simple BUILD_VECTOR. For example, given the following sequence of dag nodes: i32 C = Constant<1> v4i32 V = BUILD_VECTOR C, C, C, C v4i32 Result = SIGN_EXTEND_INREG V, ValueType:v4i1 The SIGN_EXTEND_INREG node can be folded into a build_vector since the vector in input is a BUILD_VECTOR of constants. The optimized sequence is: i32 C = Constant<-1> v4i32 Result = BUILD_VECTOR C, C, C, C git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198084 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Remove dead code, DICompositeType::addMember(DIDescriptor D)David Blaikie2013-12-27
| | | | | | | | | | | | | | It's no longer necessary to lazily add members to the DICompositeType member list. Instead any lazy members (special member functions and member template instantiations) are added to the parent late based on their context link, the same way that nested types have always been handled (never being in the member list - just added to the parent DIE lazily based on context). Clang's been updated not to use this function anymore as it improves type unit consistency by never emitting lazy members in type units. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198079 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce a simple line-by-line iterator type into the Support library.Chandler Carruth2013-12-27
| | | | | | | | | | | | | | | | | | | This is an iterator which you can build around a MemoryBuffer. It will iterate through the non-empty, non-comment lines of the buffer as a forward iterator. It should be small and reasonably fast (although it could be made much faster if anyone cares, I don't really...). This will be used to more simply support the text-based sample profile file format, and is largely based on the original patch by Diego. I've re-worked the style of it and separated it from the work of producing a MemoryBuffer from a file which both simplifies the interface and makes it easier to test. The style of the API follows the C++ standard naming conventions to fit in better with iterators in general, much like the Path and FileSystem interfaces follow standard-based naming conventions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198068 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typo.Roman Divacky2013-12-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198045 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the MSVC 2010 buildAlp Toker2013-12-25
| | | | | | C++11-style forward declared enums weren't supported until MSVC 2012. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197992 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support to indvars for optimizing sadd.with.overflow.Andrew Trick2013-12-23
| | | | | | | | | | | | | | | | Split sadd.with.overflow into add + sadd.with.overflow to allow analysis and optimization. This should ideally be done after InstCombine, which can perform code motion (eventually indvars should run after all canonical instcombines). We want ISEL to recombine the add and the check, at least on x86. This is currently under an option for reducing live induction variables: -liv-reduce. The next step is reducing liveness of IVs that are live out of the overflow check paths. Once the related optimizations are fully developed, reviewed and tested, I do expect this to become default. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197926 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] don't unpoison redzones on function exit in use-after-return mode.Kostya Serebryany2013-12-23
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Before this change the instrumented code before Ret instructions looked like: <Unpoison Frame Redzones> if (Frame != OriginalFrame) // I.e. Frame is fake <Poison Complete Frame> Now the instrumented code looks like: if (Frame != OriginalFrame) // I.e. Frame is fake <Poison Complete Frame> else <Unpoison Frame Redzones> Reviewers: eugenis Reviewed By: eugenis CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2458 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197907 91177308-0d34-0410-b5e6-96231b3b80d8
* Define LLVM_HAS_STRONG_ENUMSAlp Toker2013-12-22
| | | | | | | This is needed to guard an upcoming feature in clang until the C++11 transition is complete, at which point it can be removed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197895 91177308-0d34-0410-b5e6-96231b3b80d8
* The count() function for STL datatypes returns unsigned, evenYaron Keren2013-12-22
| | | | | | | | | | | | | | | | | | | where it's only bool-like 1/0 result like std::set.count(). Some of the LLVM ADT already return unsigned count(), while others return bool count(). This patch modifies SmallPtrSet, SmallSet, SparseSet count() to return unsigned instead of bool: 1 instead of true 0 instead of false More ADT to follow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197879 91177308-0d34-0410-b5e6-96231b3b80d8
* BlockFrequencyInfo: Readded getEntryFreq.Yuchen Wu2013-12-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197839 91177308-0d34-0410-b5e6-96231b3b80d8
* [COFF] Add support for the .secidx directiveTimur Iskhodzhanov2013-12-20
| | | | | | Reviewed at http://llvm-reviews.chandlerc.com/D2445 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197826 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix yet another typoTimur Iskhodzhanov2013-12-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197821 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the AnyPointerSize and AnyEndianness enumerators, which were left fromDmitri Gribenko2013-12-20
| | | | | | | LLVM's early days. Today LLVM IR is always target-specific. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197772 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a finishParse() callback to the targer asm parserDavid Peixotto2013-12-19
| | | | | | | | | This callback is invoked when the parse has finished successfuly. It will be used to write out ARM constant pools to implement the ldr pseudo. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197706 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for positionally-encoded operands to FixedLenDecoderEmitterHal Finkel2013-12-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately, the PowerPC instruction definitions make heavy use of the positional operand encoding heuristic to map operands onto bitfield variables in the instruction definitions. Changing this to use name-based mapping is not trivial, however, because additional infrastructure needs to be designed to handle mapping of complex operands (with multiple suboperands) onto multiple bitfield variables. In the mean time, this adds support for positionally encoded operands to FixedLenDecoderEmitter, so that we can generate a disassembler for the PowerPC backend. To prevent an accidental reliance on this feature, and to prevent an undesirable interaction with existing disassemblers, a backend must opt-in to this support by setting the new decodePositionallyEncodedOperands instruction-set bit to true. When enabled, this iterates the variables that contribute to the instruction encoding, just as the encoder does, and emulates the procedure the encoder uses to map "numbered" operands to variables. The bit range for each variable is also determined as the encoder determines them. This map is then consulted during the decoder-generator's loop over operands to decode, allowing the decoder to understand both position-based and name-based operand-to-variable mappings. As noted in the comment on the decodePositionallyEncodedOperands definition, this support should be removed once it is no longer needed. There should be no change to existing disassemblers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197691 91177308-0d34-0410-b5e6-96231b3b80d8
* Support for microMIPS TLS relocations.Zoran Jovanovic2013-12-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197685 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an explicit insert point argument to SplitBlockAndInsertIfThen.Evgeniy Stepanov2013-12-19
| | | | | | | | | Currently SplitBlockAndInsertIfThen requires that branch condition is an Instruction itself, which is very inconvenient, because it is sometimes an Operator, or even a Constant. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197677 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach the llvm-readobj COFF dumper to dump debug line tables from object filesTimur Iskhodzhanov2013-12-19
| | | | | | Reviewed at http://llvm-reviews.chandlerc.com/D2425 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197674 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix missing C++ mode commentMatt Arsenault2013-12-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197658 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM IAS: support .inst directiveSaleem Abdulrasool2013-12-19
| | | | | | | | | This adds support for the .inst directive. This is an ARM specific directive to indicate an instruction encoded as a constant expression. The major difference between .word, .short, or .byte and .inst is that the latter will be disassembled as an instruction since it does not get flagged as data. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197657 91177308-0d34-0410-b5e6-96231b3b80d8
* [stackprotector] Use analysis from the StackProtector pass for stack layout ↵Josh Magee2013-12-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | in PEI a nd LocalStackSlot passes. This changes the MachineFrameInfo API to use the new SSPLayoutKind information produced by the StackProtector pass (instead of a boolean flag) and updates a few pass dependencies (to preserve the SSP analysis). The stack layout follows the same approach used prior to this change - i.e., only LargeArray stack objects will be placed near the canary and everything else will be laid out normally. After this change, structures containing large arrays will also be placed near the canary - a case previously missed by the old implementation. Out of tree targets will need to update their usage of MachineFrameInfo::CreateStackObject to remove the MayNeedSP argument. The next patch will implement the rules for sspstrong and sspreq. The end goal is to support ssp-strong stack layout rules. WIP. Differential Revision: http://llvm-reviews.chandlerc.com/D2158 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197653 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a buffer overrun detected by AddressSanitizer.Anna Zaks2013-12-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197647 91177308-0d34-0410-b5e6-96231b3b80d8
* Begin adding docs and IR-level support for the inalloca attributeReid Kleckner2013-12-19
| | | | | | | | | | | | | | | | | | | The inalloca attribute is designed to support passing C++ objects by value in the Microsoft C++ ABI. It behaves the same as byval, except that it always implies that the argument is in memory and that the bytes are never copied. This attribute allows the caller to take the address of an outgoing argument's memory and execute arbitrary code to store into it. This patch adds basic IR support, docs, and verification. It does not attempt to implement any lowering or fix any possibly broken transforms. When this patch lands, a complete description of this feature should appear at http://llvm.org/docs/InAlloca.html . Differential Revision: http://llvm-reviews.chandlerc.com/D2173 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197645 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-cov: Added -f option for function summaries.Yuchen Wu2013-12-19
| | | | | | | | | | | Similar to the file summaries, the function summaries output line, branching and call statistics. The file summaries have been moved outside the initial loop so that all of the function summaries can be outputted before file summaries. Also updated test cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197633 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug info: Implement (rvalue) reference qualifiers for C++11 non-staticAdrian Prantl2013-12-18
| | | | | | | | member functions. Paired commit with CFE. rdar://problem/15356637 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197613 91177308-0d34-0410-b5e6-96231b3b80d8
* Pull in a couple of new constants from the upcoming DWARF 5 standard.Adrian Prantl2013-12-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197611 91177308-0d34-0410-b5e6-96231b3b80d8
* formattingAdrian Prantl2013-12-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197610 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-cov: Print coverage summary to STDOUT.Yuchen Wu2013-12-18
| | | | | | | | | | | | File summaries will now be optionally outputted which will give line, branching and call coverage info. Unfortunately, clang's current instrumentation does not give enough information to deduce function calls, something that gcc is able to do. Thus, no calls are always outputted to be consistent with gcov output. Also updated tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197606 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-cov: Added -c option for branch counts.Yuchen Wu2013-12-18
| | | | | | | | | This will cause llvm-cov to output branch counts instead of branch probabilities. -b must be enabled. Also updated tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197594 91177308-0d34-0410-b5e6-96231b3b80d8
* Add warning capabilities in LLVM.Quentin Colombet2013-12-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reapplies r197438 and fixes the link-time circular dependency between IR and Support. The fix consists in moving the diagnostic support into IR. The patch adds a new LLVMContext::diagnose that can be used to communicate to the front-end, if any, that something of interest happened. The diagnostics are supported by a new abstraction, the DiagnosticInfo class. The base class contains the following information: - The kind of the report: What this is about. - The severity of the report: How bad this is. This patch also adds 2 classes: - DiagnosticInfoInlineAsm: For inline asm reporting. Basically, this diagnostic will be used to switch to the new diagnostic API for LLVMContext::emitError. - DiagnosticStackSize: For stack size reporting. Comes as a replacement of the hard coded warning in PEI. This patch also features dynamic diagnostic identifiers. In other words plugins can use this infrastructure for their own diagnostics (for more details, see getNextAvailablePluginDiagnosticKind). This patch introduces a new DiagnosticHandlerTy and a new DiagnosticContext in the LLVMContext that should be set by the front-end to be able to map these diagnostics in its own system. http://llvm-reviews.chandlerc.com/D2376 <rdar://problem/15515174> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197508 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r197438 and r197447 until we figure out how to avoid circular ↵Quentin Colombet2013-12-17
| | | | | | dependency at link time git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197451 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-cov: Marked secondary print functions private.Yuchen Wu2013-12-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197439 91177308-0d34-0410-b5e6-96231b3b80d8
* Add warning capabilities in LLVM.Quentin Colombet2013-12-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch adds a new LLVMContext::diagnose that can be used to communicate to the front-end, if any, that something of interest happened. The diagnostics are supported by a new abstraction, the DiagnosticInfo class. The base class contains the following information: - The kind of the report: What this is about. - The severity of the report: How bad this is. This patch also adds 2 classes: - DiagnosticInfoInlineAsm: For inline asm reporting. Basically, this diagnostic will be used to switch to the new diagnostic API for LLVMContext::emitError. - DiagnosticStackSize: For stack size reporting. Comes as a replacement of the hard coded warning in PEI. This patch also features dynamic diagnostic identifiers. In other words plugins can use this infrastructure for their own diagnostics (for more details, see getNextAvailablePluginDiagnosticKind). This patch introduces a new DiagnosticHandlerTy and a new DiagnosticContext in the LLVMContext that should be set by the front-end to be able to map these diagnostics in its own system. http://llvm-reviews.chandlerc.com/D2376 <rdar://problem/15515174> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197438 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable double to float shrinking optimizations for binary functions like ↵Yi Jiang2013-12-16
| | | | | | 'fmin/fmax'. Fix radar:15283121 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197434 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-cov: Added -u option for unconditional branch info.Yuchen Wu2013-12-16
| | | | | | | | | Outputs branch information for unconditional branches in addition to conditional branches. -b option must be enabled. Also updated tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197432 91177308-0d34-0410-b5e6-96231b3b80d8
* Recognize EABIHF as environment and use it for RTAPI + VFP.Joerg Sonnenberger2013-12-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197405 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Introduce LLVM_INCLUDE_DIR.NAKAMURA Takumi2013-12-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197392 91177308-0d34-0410-b5e6-96231b3b80d8
* [Stackmap] Refactor operand parsing.Juergen Ributzka2013-12-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197329 91177308-0d34-0410-b5e6-96231b3b80d8
* [Stackmap] Liveness Analysis PassJuergen Ributzka2013-12-14
| | | | | | | | | | | | | | | | | | | | This optional register liveness analysis pass can be enabled with either -enable-stackmap-liveness, -enable-patchpoint-liveness, or both. The pass traverses each basic block in a machine function. For each basic block the instructions are processed in reversed order and if a patchpoint or stackmap instruction is encountered the current live-out register set is encoded as a register mask and attached to the instruction. Later on during stackmap generation the live-out register mask is processed and also emitted as part of the stackmap. This information is optional and intended for optimization purposes only. This will enable a client of the stackmap to reason about the registers it can use and which registers need to be preserved. Reviewed by Andy git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197317 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert register liveness tracking to work on a sub-register level instead ↵Juergen Ributzka2013-12-14
| | | | | | | | of just register units. Reviewed by Andy git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197315 91177308-0d34-0410-b5e6-96231b3b80d8
* [block-freq] Rename getEntryFrequency() -> getEntryFreq() to match ↵Michael Gottesman2013-12-14
| | | | | | getBlockFreq() in all *BlockFrequencyInfo*. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197304 91177308-0d34-0410-b5e6-96231b3b80d8
* [block-freq] Teach branch probability how to return the edge weight in ↵Michael Gottesman2013-12-14
| | | | | | | | | | between a BasicBlock and one of its successors. IMHO At some point BasicBlock should be refactored along the lines of MachineBasicBlock so that successors/weights are actually embedded within the block. Now is not that time though. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197303 91177308-0d34-0410-b5e6-96231b3b80d8
* [block-freq] Add a right shift to BlockFrequency that saturates at 1.Michael Gottesman2013-12-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197302 91177308-0d34-0410-b5e6-96231b3b80d8
* [block-freq] Remove old BlockFrequency entry frequency and printing code.Michael Gottesman2013-12-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197297 91177308-0d34-0410-b5e6-96231b3b80d8