summaryrefslogtreecommitdiffstats
path: root/llvm/include
Commit message (Collapse)AuthorAgeFilesLines
* Rejected r156374: Ordinary PR1255 patch. Due to clang-x86_64-debian-fnt ↵Stepan Dyatkovskiy2012-05-082-59/+5
| | | | | | buildbot failure. llvm-svn: 156377
* Remove 256-bit AVX non-temporal store intrinsics. Similar was previously ↵Craig Topper2012-05-081-10/+0
| | | | | | done for 128-bit. llvm-svn: 156375
* Ordinary patch for PR1255.Stepan Dyatkovskiy2012-05-082-5/+59
| | | | | | | Added new case-ranges orientated methods for adding/removing cases in SwitchInst. After this patch cases will internally representated as ConstantArray-s instead of ConstantInt, externally cases wrapped within the ConstantRangesSet object. Old methods of SwitchInst are also works well, but marked as deprecated. So on this stage we have no side effects except that I added support for case ranges in BitcodeReader/Writer, of course test for Bitcode is also added. Old "switch" format is also supported. llvm-svn: 156374
* Add an MF argument to TRI::getPointerRegClass() and TII::getRegClass().Jakob Stoklund Olesen2012-05-072-2/+4
| | | | | | | | | | | | | The getPointerRegClass() hook can return register classes that depend on the calling convention of the current function (ptr_rc_tailcall). So far, we have been able to infer the calling convention from the subtarget alone, but as we add support for multiple calling conventions per target, that no longer works. Patch by Yiannis Tsiouris! llvm-svn: 156328
* Constify (trivially) ImmutableSet::iterator::getVisitState().Jordy Rose2012-05-071-1/+1
| | | | | | This was probably intended all along. llvm-svn: 156318
* Add TRI::getCommonSuperRegClass().Jakob Stoklund Olesen2012-05-071-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | This function is a generalization of getMatchingSuperRegClass() to the symmetric case where both sides are using a sub-register index. It will find a super-register class and sub-register indexes that make this diagram commute: PreA SuperRC ----------> RCA | | | | PreB | | SubA | | | | V V RCB ----------> SubRC SubB This can be used to coalesce copies like: %vreg1:sub16 = COPY %vreg2:sub16; GR64:%vreg1, GR32: %vreg2 llvm-svn: 156317
* Fix trivial typo in llvm_move.John McCall2012-05-071-1/+1
| | | | llvm-svn: 156288
* Add SSE4A MOVNTSS/MOVNTSD instructions.Craig Topper2012-05-071-0/+10
| | | | llvm-svn: 156281
* Tidy up. Whitespace.Jim Grosbach2012-05-071-10/+10
| | | | llvm-svn: 156276
* reapply my patch, with a fix for an off-by-one error. Turned out to be a lotChris Lattner2012-05-051-1/+8
| | | | | | of work for a drive-by fix :) llvm-svn: 156246
* revert my patches, which are causing problems.Chris Lattner2012-05-051-8/+1
| | | | llvm-svn: 156245
* add missing header <shame>Chris Lattner2012-05-051-1/+8
| | | | llvm-svn: 156244
* Nuke a few dead remnants of the CBE.Jim Grosbach2012-05-052-10/+0
| | | | llvm-svn: 156241
* [Support] Add sys::Process::GetRandomNumber().Daniel Dunbar2012-05-051-1/+5
| | | | | | - Primitive API, but we rarely have need for random numbers. llvm-svn: 156237
* [build] Add build check for ::arc4random().Daniel Dunbar2012-05-052-0/+6
| | | | llvm-svn: 156236
* Add a new target hook "predictableSelectIsExpensive".Benjamin Kramer2012-05-051-0/+10
| | | | | | | | | | | This will be used to determine whether it's profitable to turn a select into a branch when the branch is likely to be predicted. Currently enabled for everything but Atom on X86 and Cortex-A9 devices on ARM. I'm not entirely happy with the name of this flag, suggestions welcome ;) llvm-svn: 156233
* Teach the code extractor how to extract a sequence of blocks fromChandler Carruth2012-05-041-0/+8
| | | | | | | RegionInfo's RegionNode. This mirrors the logic for automating the extraction from a Loop. llvm-svn: 156208
* Rename the Region::block_iterator to Region::block_node_iterator, andChandler Carruth2012-05-041-6/+58
| | | | | | | | | | | | | | | | | | | | | | | | add a new Region::block_iterator which actually iterates over the basic blocks of the region. The old iterator, now call 'block_node_iterator' iterates over RegionNodes which contain a single basic block. This works well with the GraphTraits-based iterator design, however most users actually want an iterator over the BasicBlocks inside these RegionNodes. Now the 'block_iterator' is a wrapper which exposes exactly this interface. Internally it uses the block_node_iterator to walk all nodes which are single basic blocks, but transparently unwraps the basic block to make user code simpler. While this patch is a bit of a wash, most of the updates are to internal users, not external users of the RegionInfo. I have an accompanying patch to Polly that is a strict simplification of every user of this interface, and I'm working on a pass that also wants the same simplified interface. This patch alone should have no functional impact. llvm-svn: 156202
* This patch adds a new NVPTX back-end to LLVM which supports code generation ↵Justin Holewinski2012-05-043-0/+875
| | | | | | | | | | | | | | | | | for NVIDIA PTX 3.0. This back-end will (eventually) replace the current PTX back-end, while maintaining compatibility with it. The new target machines are: nvptx (old ptx32) => 32-bit PTX nvptx64 (old ptx64) => 64-bit PTX The sources are based on the internal NVIDIA NVPTX back-end, and contain more functionality than the current PTX back-end currently provides. NV_CONTRIB llvm-svn: 156196
* Factor the computation of input and output sets into a public interfaceChandler Carruth2012-05-041-2/+11
| | | | | | | | | | | | | | | | of the CodeExtractor utility. This allows speculatively computing input and output sets to measure the likely size impact of the code extraction. These sets cannot be reused sadly -- we mutate the function prior to forming the final sets used by the actual extraction. The interface has been revamped slightly to make it easier to use correctly by making the interface const and sinking the computation of the number of exit blocks into the full extraction function and away from the rest of this logic which just computed two output parameters. llvm-svn: 156168
* Move the CodeExtractor utility to a dedicated header file / source file,Chandler Carruth2012-05-042-53/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | and expose it as a utility class rather than as free function wrappers. The simple free-function interface works well for the bugpoint-specific pass's uses of code extraction, but in an upcoming patch for more advanced code extraction, they simply don't expose a rich enough interface. I need to expose various stages of the process of doing the code extraction and query information to decide whether or not to actually complete the extraction or give up. Rather than build up a new predicate model and pass that into these functions, just take the class that was actually implementing the functions and lift it up into a proper interface that can be used to perform code extraction. The interface is cleaned up and re-documented to work better in a header. It also is now setup to accept the blocks to be extracted in the constructor rather than in a method. In passing this essentially reverts my previous commit here exposing a block-level query for eligibility of extraction. That is no longer necessary with the more rich interface as clients can query the extraction object for eligibility directly. This will reduce the number of walks of the input basic block sequence by quite a bit which is useful if this enters the normal optimization pipeline. llvm-svn: 156163
* Remove the SubRegClasses field from RegisterClass descriptions.Jakob Stoklund Olesen2012-05-041-4/+0
| | | | | | This information in now computed by TableGen. llvm-svn: 156152
* Remove TargetRegisterClass::SuperRegClasses.Jakob Stoklund Olesen2012-05-041-13/+0
| | | | | | | | This manually enumerated list of super-register classes has been superceeded by the automatically computed super-register class masks available through SuperRegClassIterator. llvm-svn: 156151
* Use SuperRegClassIterator for findRepresentativeClass().Jakob Stoklund Olesen2012-05-041-4/+0
| | | | | | | | The masks returned by SuperRegClassIterator are computed automatically by TableGen. This is better than depending on the manually specified SuperRegClasses. llvm-svn: 156147
* Add a SuperRegClassIterator class.Jakob Stoklund Olesen2012-05-041-0/+56
| | | | | | | | This iterator class provides a more abstract interface to the (Idx, Mask) lists of super-registers for a register class. The layout of the tables shouldn't be exposed to clients. llvm-svn: 156144
* A pile of long over-due refactorings here. There are some very, *very*Chandler Carruth2012-05-042-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | minor behavior changes with this, but nothing I have seen evidence of in the wild or expect to be meaningful. The real goal is unifying our logic and simplifying the interfaces. A summary of the changes follows: - Make 'callIsSmall' actually accept a callsite so it can handle intrinsics, and simplify callers appropriately. - Nuke a completely bogus declaration of 'callIsSmall' that was still lurking in InlineCost.h... No idea how this got missed. - Teach the 'isInstructionFree' about the various more intelligent 'free' heuristics that got added to the inline cost analysis during review and testing. This mostly surrounds int->ptr and ptr->int casts. - Switch most of the interesting parts of the inline cost analysis that were essentially computing 'is this instruction free?' to use the code metrics routine instead. This way we won't keep duplicating logic. All of this is motivated by the desire to allow other passes to compute a roughly equivalent 'cost' metric for a particular basic block as the inline cost analysis. Sadly, re-using the same analysis for both is really messy because only the actual inline cost analysis is ever going to go to the contortions required for simplification, SROA analysis, etc. llvm-svn: 156140
* Add a FoldingSetVector datastructure which is analogous to a SetVector,Chandler Carruth2012-05-031-0/+105
| | | | | | | | | | but using a FoldingSet underneath and with a largely compatible interface to that of FoldingSet. This can be used anywhere a FoldingSet would be natural, but iteration order is significant. The initial intended use case is in Clang's template specialization lists to preserve instantiation order iteration. llvm-svn: 156131
* Use a shared implementation of getMatchingSuperRegClass().Jakob Stoklund Olesen2012-05-031-3/+1
| | | | | | TargetRegisterClass now gives access to the necessary tables. llvm-svn: 156122
* Add TargetRegisterClass::getSuperRegIndices().Jakob Stoklund Olesen2012-05-031-0/+13
| | | | | | | | This is a pointer into one of the tables used by getMatchingSuperRegClass(). It makes it possible to use a shared implementation of that function. llvm-svn: 156121
* Factor the logic for testing whether a basic block is viable for codeChandler Carruth2012-05-031-0/+8
| | | | | | | | | | | extraction into a public interface. Also clean it up and apply it more consistently such that we check for landing pads *anywhere* in the extracted code, not just in single-block extraction. This will be used to guide decisions in passes that are planning to eventually perform a round of code extraction. llvm-svn: 156114
* Add rudimentary CMake logic for detecting Graphviz.Ted Kremenek2012-05-031-1/+1
| | | | llvm-svn: 156108
* add support for calloc to objectsize loweringNuno Lopes2012-05-031-0/+11
| | | | llvm-svn: 156102
* Fix the type of SubClassMask.Jakob Stoklund Olesen2012-05-031-1/+1
| | | | llvm-svn: 156084
* Don't override subreg functions in targets without subregisters.Jakob Stoklund Olesen2012-05-031-2/+7
| | | | | | | | Some targets have no sub-registers at all. Use the TargetRegisterInfo versions of composeSubRegIndices(), getSubClassWithSubReg(), and getMatchingSuperRegClass() for those targets. llvm-svn: 156075
* Added TargetRegisterInfo::getAllocatableClass.Andrew Trick2012-05-031-0/+5
| | | | | | | | | | The ensures that virtual registers always belong to an allocatable class. If your target attempts to create a vreg for an operand that has no allocatable register subclass, you will crash quickly. This ensures that targets define register classes as intended. llvm-svn: 156046
* Move llvm-tblgen's StringMatcher into the TableGen library so it canDouglas Gregor2012-05-021-0/+54
| | | | | | be used by clang-tblgen. llvm-svn: 156000
* [llvm-c] Make a few function declarations proper prototypesAnders Waldenborg2012-05-021-6/+6
| | | | | | | | | This avoids warnings when included in a application that uses -Wstrict-prototypes. e.g: AsmPrinters.def:27:1: warning: function declaration isn't a prototype [-Wstrict-prototypes] llvm-svn: 155997
* Update SmallVector to support move semantics if the host does.John McCall2012-05-022-14/+231
| | | | | | | | | | | | | Note that support for rvalue references does not imply support for the full set of move-related STL operations. I've preserved support for an odd little thing in insert() where we're trying to support inserting a new element from an existing one. If we actually want to support that, there's a lot more we need to do: insert can call either grow or push_back, neither of which is safe against this particular use pattern. llvm-svn: 155979
* Target independent Hexagon Packetizer fix.Sirish Pande2012-05-011-12/+32
| | | | llvm-svn: 155947
* YAMLParser: get rid of global ctors & dtors.Benjamin Kramer2012-05-011-11/+18
| | | | llvm-svn: 155907
* Change the PassManager from a reference to a pointer.Bill Wendling2012-05-011-1/+1
| | | | | | | | | The TargetPassManager's default constructor wants to initialize the PassManager to 'null'. But it's illegal to bind a null reference to a null l-value. Make the ivar a pointer instead. PR12468 llvm-svn: 155902
* Second attempt at PR12573:Bill Wendling2012-04-301-1/+2
| | | | | | | | | | | Allow the "SplitCriticalEdge" function to split the edge to a landing pad. If the pass is *sure* that it thinks it knows what it's doing, then it may go ahead and specify that the landing pad can have its critical edge split. The loop unswitch pass is one of these passes. It will split the critical edges of all edges coming from a loop to a landing pad not within the loop. Doing so will retain important loop analysis information, such as loop simplify. llvm-svn: 155817
* Remove superfluous 'inline'Craig Topper2012-04-291-2/+2
| | | | llvm-svn: 155799
* Fix some formatting, grammar and style issues and add a couple of missing ↵Eli Bendersky2012-04-291-4/+7
| | | | | | comments. llvm-svn: 155793
* SmallVector: Don't rely on having an assignment operator around in push_back ↵Benjamin Kramer2012-04-291-1/+1
| | | | | | for POD-like types. llvm-svn: 155791
* Fix comments from copy-paste to a more relevant meaningEli Bendersky2012-04-293-3/+3
| | | | llvm-svn: 155790
* Add constants for first and last integer vector types to be consistent with ↵Craig Topper2012-04-291-1/+4
| | | | | | floating point. llvm-svn: 155787
* Remove tab charactersCraig Topper2012-04-291-2/+2
| | | | llvm-svn: 155786
* Mark the default cases of MVT::getVectorElementType and ↵Craig Topper2012-04-291-2/+2
| | | | | | MVT:getVectorNumElements as unreachable to reduce code size. llvm-svn: 155785
* Don't update spill weights when joining intervals.Jakob Stoklund Olesen2012-04-281-4/+0
| | | | | | We don't compute spill weights until after coalescing anyway. llvm-svn: 155766
OpenPOWER on IntegriCloud