summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAge
* Fix some formatting, grammar and style issues and add a couple of missing ↵Eli Bendersky2012-04-29
| | | | | | comments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155793 91177308-0d34-0410-b5e6-96231b3b80d8
* SmallVector: Don't rely on having an assignment operator around in push_back ↵Benjamin Kramer2012-04-29
| | | | | | for POD-like types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155791 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comments from copy-paste to a more relevant meaningEli Bendersky2012-04-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155790 91177308-0d34-0410-b5e6-96231b3b80d8
* Add constants for first and last integer vector types to be consistent with ↵Craig Topper2012-04-29
| | | | | | floating point. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155787 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove tab charactersCraig Topper2012-04-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155786 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark the default cases of MVT::getVectorElementType and ↵Craig Topper2012-04-29
| | | | | | MVT:getVectorNumElements as unreachable to reduce code size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155785 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't update spill weights when joining intervals.Jakob Stoklund Olesen2012-04-28
| | | | | | We don't compute spill weights until after coalescing anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155766 91177308-0d34-0410-b5e6-96231b3b80d8
* Spring cleaning - Delete dead code.Jakob Stoklund Olesen2012-04-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155765 91177308-0d34-0410-b5e6-96231b3b80d8
* If the __is_trivially_copyable type trait is available use it as the ↵Benjamin Kramer2012-04-28
| | | | | | | | | baseline for isPodLike. This way we can enable the POD-like class optimization for a lot more classes, saving ~120k of code in clang/i386/Release+Asserts when selfhosting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155761 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the most basic superclass of SmallVector in ArrayRef.Benjamin Kramer2012-04-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155760 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply the SmallMap patch with a fix.Benjamin Kramer2012-04-25
| | | | | | Comparing ~0UL with an unsigned will always return false when long is 64 bits long. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155568 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove more dead code.Jakob Stoklund Olesen2012-04-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155566 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "First implementation of:"Eric Christopher2012-04-25
| | | | | | | | This reverts commit 76271a3366731d4c372fdebcd8d3437e6e09a61b. as it's breaking the bots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155562 91177308-0d34-0410-b5e6-96231b3b80d8
* First implementation of:Stepan Dyatkovskiy2012-04-25
| | | | | | | | | | | | | - FlatArrayMap. Very simple map container that uses flat array inside. - MultiImplMap. Map container interface, that has two modes, one for small amount of elements and one for big amount. - SmallMap. SmallMap is DenseMap compatible MultiImplMap. It uses FlatArrayMap for small mode, and DenseMap for big mode. Also added unittests for new classes and update for ProgrammersManual. For more details about new classes see ProgrammersManual and comments in sourcecode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155557 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify LiveIntervals::getApproximateInstructionCount().Jakob Stoklund Olesen2012-04-25
| | | | | | | This function is only used for a heuristic during -join-physregs. It doesn't need floating point. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155554 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a dead function.Jakob Stoklund Olesen2012-04-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155553 91177308-0d34-0410-b5e6-96231b3b80d8
* typo in declaration from earlier todayAndrew Trick2012-04-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155519 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM: improved assembler diagnostics for missing CPU features.Jim Grosbach2012-04-24
| | | | | | | | | | | When an instruction match is found, but the subtarget features it requires are not available (missing floating point unit, or thumb vs arm mode, for example), issue a diagnostic that identifies what the feature mismatch is. rdar://11257547 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155499 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a naughty header include that breaks "installed" builds.Andrew Trick2012-04-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155486 91177308-0d34-0410-b5e6-96231b3b80d8
* Related to PR1255. Let's begin. I'll commit classes that corresponds to our ↵Stepan Dyatkovskiy2012-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | latest PR1255 discussion posts in llvm-commits. Strategy. 0. Implement new classes. Classes doesn't affect anything. They still work with ConstantInt base values at this stage. 1. Fictitious replacement of current ConstantInt case values with ConstantRangesSet. Case ranges set will still hold single value, and ConstantInt *getCaseValue() will return it. But additionally implement new method in SwitchInst that allows to work with case ranges. Currenly I think it should be some wrapper that returns either single value or ConstantRangesSet object. 2. Step-by-step replacement of old "ConstantInt* getCaseValue()" with new alternative. Modify algorithms for all passes that works with SwitchInst. But don't modify LLParser and BitcodeReader/Writer. Still hold single value in each ConstantRangesSet object. On this stage some parts of LLVM will use old-style methods, and some ones new-style. 3. After all getCaseValue() usages will removed and whole LLVM and its clients will work in new style - modify LLParser, Reader and Writer. Remove getCaseValue(). 4. Replace ConstantInt*-based case ranges set items with APInt ones. Currently we are on Zero Stage: New classes. ConstantRangesSet. I selected ConstantArrays as case ranges set "holder" object (it is a temporary decision, I'll explain why below). The array items are may be ConstantVectors with single item, and ConstantVectors with two items (that means single number and range respectively). The ConstantInt will used as basic value representation. It will replaced with APInt then. Of course ConstantArray and ConstantVector will go away after ConstantInt => APInt replacement. New class mandatory features: - bool isSatisfies(ConstantInt *V) method (need better name?). Returns true if the given value satisfies this case. - Case's ranges and values enumeration. In some passes we need to analize each case (SwitchLowering for example). Factory + unified clusterify. I also propose to implement the factory that allows to build case object with user friendly way. I called it CRSBuilder by now. Currenly I implemented the factory that allows add,remove pairs of range+successor. It also allows add existing ConstantRangesSet decompiling it to separated ranges. Factory can emit either clusters set (single case range + successor) or the set of "ConstantRangesSet + Successor" pairs. So you can use it either as builder for new cases set for SwitchInst, or for clusterification of existing cases set. Just call Factory.optimize() and it emits optimized and sorted clusters collection for you! I tested clusterification on SelectionDAGBuilder - it works fine. Don't worry it was not included in this patch. Just new classes. Factory is a template. There are two params: SuccessorClass and IsReadonly. So you can specify what successor you need (BB or MBB). And you can also restrict your factory to use values in read-only mode (SelectionDAGBuilder need IsReadonly=true). Read-only factory couldn't build the cases ranges. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155464 91177308-0d34-0410-b5e6-96231b3b80d8
* misched: DAG builder support for tracking register pressure within the ↵Andrew Trick2012-04-24
| | | | | | | | | current scheduling region. The DAG builder is a convenient place to do it. Hopefully this is more efficient than a separate traversal over the same region. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155456 91177308-0d34-0410-b5e6-96231b3b80d8
* This patch fixes a problem which arose when using the Post-RA schedulerPreston Gurd2012-04-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | on X86 Atom. Some of our tests failed because the tail merging part of the BranchFolding pass was creating new basic blocks which did not contain live-in information. When the anti-dependency code in the Post-RA scheduler ran, it would sometimes rename the register containing the function return value because the fact that the return value was live-in to the subsequent block had been lost. To fix this, it is necessary to run the RegisterScavenging code in the BranchFolding pass. This patch makes sure that the register scavenging code is invoked in the X86 subtarget only when post-RA scheduling is being done. Post RA scheduling in the X86 subtarget is only done for Atom. This patch adds a new function to the TargetRegisterClass to control whether or not live-ins should be preserved during branch folding. This is necessary in order for the anti-dependency optimizations done during the PostRASchedulerList pass to work properly when doing Post-RA scheduling for the X86 in general and for the Intel Atom in particular. The patch adds and invokes the new function trackLivenessAfterRegAlloc() instead of using the existing requiresRegisterScavenging(). It changes BranchFolding.cpp to call trackLivenessAfterRegAlloc() instead of requiresRegisterScavenging(). It changes the all the targets that implemented requiresRegisterScavenging() to also implement trackLivenessAfterRegAlloc(). It adds an assertion in the Post RA scheduler to make sure that post RA liveness information is available when it is needed. It changes the X86 break-anti-dependencies test to use –mcpu=atom, in order to avoid running into the added assertion. Finally, this patch restores the use of anti-dependency checking (which was turned off temporarily for the 3.1 release) for Intel Atom in the Post RA scheduler. Patch by Andy Zhang! Thanks to Jakob and Anton for their reviews. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155395 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow forward declarations to take a context. This helps the debuggerEric Christopher2012-04-23
| | | | | | | | | find forward declarations in the context that the actual definition will occur. rdar://11291658 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155380 91177308-0d34-0410-b5e6-96231b3b80d8
* Temporarily revert r155364 until the upstream review can complete, perChandler Carruth2012-04-23
| | | | | | the stated developer policy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155373 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r155365, r155366, and r155367. All three of these have regressionChandler Carruth2012-04-23
| | | | | | | | | | | test suite failures. The failures occur at each stage, and only get worse, so I'm reverting all of them. Please resubmit these patches, one at a time, after verifying that the regression test suite passes. Never submit a patch without running the regression test suite. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155372 91177308-0d34-0410-b5e6-96231b3b80d8
* Hexagon V5 (floating point) support.Sirish Pande2012-04-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155367 91177308-0d34-0410-b5e6-96231b3b80d8
* Hexagon Packetizer's target independent fix.Sirish Pande2012-04-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155364 91177308-0d34-0410-b5e6-96231b3b80d8
* Conflict with st_dev/st_ino identifiers under Debian GNU/HurdSylvestre Ledru2012-04-23
| | | | | | | | | | | | | | | | The problem is that the struct file_status on UNIX systems has two members called st_dev and st_ino; those are also members of the struct stat, and they are reserved identifiers which can also be provided as #define (and this is the case for st_dev on Hurd). The solution (attached) is to rename them, for example adding a "fs_" prefix (= file status) to them. Patch by Pino Toscano git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155354 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a flag to the struct type finder to collect only those types which haveBill Wendling2012-04-21
| | | | | | | names. This saves collecting types we normally don't care about. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155300 91177308-0d34-0410-b5e6-96231b3b80d8
* stop hiding SmallVector's append that takes a count + element.Chris Lattner2012-04-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155297 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused PointerLikeTypeTraits for IndexListEntry.Benjamin Kramer2012-04-21
| | | | | | | | | It set NumLowBitAvailable = 3 which may not be true on all platforms. We only ever use 2 bits (the default) so this assumption can be safely removed Should fix PR12612. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155288 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r155241, which is causing some breakage.Bill Wendling2012-04-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155253 91177308-0d34-0410-b5e6-96231b3b80d8
* Make ISelPosition a local variable.Jakob Stoklund Olesen2012-04-20
| | | | | | | | | Now that multiple DAGUpdateListeners can be active at the same time, ISelPosition can become a local variable in DoInstructionSelection. We simply register an ISelUpdater with CurDAG while ISelPosition exists. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155249 91177308-0d34-0410-b5e6-96231b3b80d8
* Register DAGUpdateListeners with SelectionDAG.Jakob Stoklund Olesen2012-04-20
| | | | | | | | | | | | | | | Instead of passing listener pointers to RAUW, let SelectionDAG itself keep a linked list of interested listeners. This makes it possible to have multiple listeners active at once, like RAUWUpdateListener was already doing. It also makes it possible to register listeners up the call stack without controlling all RAUW calls below. DAGUpdateListener uses an RAII pattern to add itself to the SelectionDAG list of active listeners. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155248 91177308-0d34-0410-b5e6-96231b3b80d8
* Extraneous semicolon.Eric Christopher2012-04-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155247 91177308-0d34-0410-b5e6-96231b3b80d8
* If we discover all of the named structs in a module, then don't bother toBill Wendling2012-04-20
| | | | | | | process any more Values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155241 91177308-0d34-0410-b5e6-96231b3b80d8
* Added TargetRegisterInfo::getRegPressureSetName.Andrew Trick2012-04-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155235 91177308-0d34-0410-b5e6-96231b3b80d8
* SparseSet: Add support for key-derived indexes and arbitrary key types.Andrew Trick2012-04-20
| | | | | | | | | | | | | | | | | | | This nicely handles the most common case of virtual register sets, but also handles anticipated cases where we will map pointers to IDs. The goal is not to develop a completely generic SparseSet template. Instead we want to handle the expected uses within llvm without any template antics in the client code. I'm adding a bit of template nastiness here, and some assumption about expected usage in order to make the client code very clean. The expected common uses cases I'm designing for: - integer keys that need to be reindexed, and may map to additional data - densely numbered objects where we want pointer keys because no number->object map exists. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155227 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow converting MachineBasicBlock::iterator to const_iterator.Andrew Trick2012-04-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155225 91177308-0d34-0410-b5e6-96231b3b80d8
* Add documentation comment.Jim Grosbach2012-04-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155203 91177308-0d34-0410-b5e6-96231b3b80d8
* TableGen support for auto-generating assembly two-operand aliases.Jim Grosbach2012-04-19
| | | | | | | | | | | | | | Assembly matchers for instructions with a two-operand form. ARM is full of these, for example: add {Rd}, Rn, Rm // Rd is optional and is the same as Rn if omitted. The property TwoOperandAliasConstraint on the instruction definition controls when, and if, an alias will be formed. No explicit InstAlias definitions are required. rdar://11255754 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155172 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow targets to select the default scheduler by name.Andrew Trick2012-04-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155090 91177308-0d34-0410-b5e6-96231b3b80d8
* whitespaceAndrew Trick2012-04-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155089 91177308-0d34-0410-b5e6-96231b3b80d8
* This reverts a long string of commits to the Hexagon backend. TheseChandler Carruth2012-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commits have had several major issues pointed out in review, and those issues are not being addressed in a timely fashion. Furthermore, this was all committed leading up to the v3.1 branch, and we don't need piles of code with outstanding issues in the branch. It is possible that not all of these commits were necessary to revert to get us back to a green state, but I'm going to let the Hexagon maintainer sort that out. They can recommit, in order, after addressing the feedback. Reverted commits, with some notes: Primary commit r154616: HexagonPacketizer - There are lots of review comments here. This is the primary reason for reverting. In particular, it introduced large amount of warnings due to a bad construct in tablegen. - Follow-up commits that should be folded back into this when reposting: - r154622: CMake fixes - r154660: Fix numerous build warnings in release builds. - Please don't resubmit this until the three commits above are included, and the issues in review addressed. Primary commit r154695: Pass to replace transfer/copy ... - Reverted to minimize merge conflicts. I'm not aware of specific issues with this patch. Primary commit r154703: New Value Jump. - Primarily reverted due to merge conflicts. - Follow-up commits that should be folded back into this when reposting: - r154703: Remove iostream usage - r154758: Fix CMake builds - r154759: Fix build warnings in release builds - Please incorporate these fixes and and review feedback before resubmitting. Primary commit r154829: Hexagon V5 (floating point) support. - Primarily reverted due to merge conflicts. - Follow-up commits that should be folded back into this when reposting: - r154841: Remove unused variable (fixing build warnings) There are also accompanying Clang commits that will be reverted for consistency. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155047 91177308-0d34-0410-b5e6-96231b3b80d8
* SourceMgr: Colorize diagnostics.Benjamin Kramer2012-04-18
| | | | | | Same color scheme as clang uses. The colors are only enabled if the output is a tty. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155035 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy up. Trailing whitespace.Jim Grosbach2012-04-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155013 91177308-0d34-0410-b5e6-96231b3b80d8
* TableGen add warning diagnostic helper functions.Jim Grosbach2012-04-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155012 91177308-0d34-0410-b5e6-96231b3b80d8
* SmallPtrSet: Reuse DenseMapInfo's pointer hash function instead of inventing ↵Benjamin Kramer2012-04-18
| | | | | | | | | | a bad one ourselves. DenseMap's hash function uses slightly more entropy and reduces hash collisions significantly. I also experimented with Hashing.h, but it didn't gave a lot of improvement while being much more expensive to compute. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154996 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove AVX vpermil intrinsics. I removed their uses from clang headers and ↵Craig Topper2012-04-18
| | | | | | builtins a while back. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154985 91177308-0d34-0410-b5e6-96231b3b80d8
* fix pr12559: mark unavailable win32 math libcallsJoe Groff2012-04-17
| | | | | | also fix SimplifyLibCalls to use TLI rather than compile-time conditionals to enable optimizations on floor, ceil, round, rint, and nearbyint git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154960 91177308-0d34-0410-b5e6-96231b3b80d8