aboutsummaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Re-commit r152202 hopefully fixing the MSVC linker error.Craig Topper2012-03-081-2/+2
| | | | | | | Original commit message: Use uint16_t to store InstrNameIndices in MCInstrInfo. Add asserts to protect all 16-bit string table offsets. Also make sure the string to offset table string is not larger than 65536 characters since larger string literals aren't portable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152296 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r152288, "[ADT] Change the trivial FoldingSetNodeID::Add* methods to beDaniel Dunbar2012-03-081-46/+0
| | | | | | inline.", which is breaking the bots in a way I don't understand. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152295 91177308-0d34-0410-b5e6-96231b3b80d8
* [ADT] Change the trivial FoldingSetNodeID::Add* methods to be inline.Daniel Dunbar2012-03-081-0/+46
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152288 91177308-0d34-0410-b5e6-96231b3b80d8
* Rotate two of the functions used to count bonuses for the inline costChandler Carruth2012-03-082-11/+12
| | | | | | | | | | | | | analysis to be methods on the cost analysis's function info object instead of the code metrics object. These really are just users of the code metrics, they're building the information for the function's analysis. This is the first step of growing the amount of information we collect about a function in order to cope with pair-wise simplifications due to allocas. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152283 91177308-0d34-0410-b5e6-96231b3b80d8
* misched interface: Expose the MachineScheduler pass.Andrew Trick2012-03-081-0/+86
| | | | | | | | Allow targets to provide their own schedulers (subclass of ScheduleDAGInstrs) to the misched pass. Select schedulers using -misched=... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152278 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup VLIWPacketizer to use the updated ScheduleDAGInstrs interface.Andrew Trick2012-03-072-13/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152262 91177308-0d34-0410-b5e6-96231b3b80d8
* misched prep: Expose the ScheduleDAGInstrs interface so targets mayAndrew Trick2012-03-071-0/+339
| | | | | | implement their own MachineScheduler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152261 91177308-0d34-0410-b5e6-96231b3b80d8
* misched preparation: rename core scheduler methods for consistency.Andrew Trick2012-03-073-11/+11
| | | | | | | We had half the API with one convention, half with another. Now was a good time to clean it up. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152255 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r152202 as it's causing internal buildbot failures.Chad Rosier2012-03-071-2/+2
| | | | | | | | | | | Original commit message: Use uint16_t to store InstrNameIndices in MCInstrInfo. Add asserts to protect all 16-bit string table offsets. Also make sure the string to offset table string is not larger than 65536 characters since larger string literals aren't portable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152233 91177308-0d34-0410-b5e6-96231b3b80d8
* Try a completely different approach to this type trait to appease olderChandler Carruth2012-03-071-31/+29
| | | | | | | | | | | | compilers. It seems that GCC 4.3 (and likely older) simply aren't going to do SFINAE on non-type template parameters the way Clang and modern GCCs do... Now we detect the implicit conversion to an integer type, and then blacklist classes, pointers, and floating point types. This seems to work well enough, and I'm hopeful will return the bots to life. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152227 91177308-0d34-0410-b5e6-96231b3b80d8
* Attempt #2 at appeasing GCC 4.3. This compiler really doesn't like theseChandler Carruth2012-03-071-17/+21
| | | | | | | | | | traits. With this change, the pattern used here is *extremely* close to the pattern used elsewhere in the file, so I'm hoping it survives the build-bots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152225 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch the is_integral_or_enum trait machinery to use an explicitChandler Carruth2012-03-071-4/+4
| | | | | | | | | | template argument and an *implicit* conversion from '0' to a null pointer. For some bizarre reason, GCC 4.3.2 thinks that the cast to '(T*)' is invalid inside of an enumerator's value... which it isn't but whatever. ;] This pattern is used elsewhere in the type_traits header and so hopefully will survive the wrath of the build bots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152220 91177308-0d34-0410-b5e6-96231b3b80d8
* What's better than fixing and simplifying broken hash functions?Chandler Carruth2012-03-071-21/+0
| | | | | | | | | Deleting them because they aren't used. =D Yell if you need these, I'm happy to instead replace them with nice uses of the new infrastructure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152219 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support to the hashing infrastructure for automatically hashing bothChandler Carruth2012-03-072-10/+42
| | | | | | | | | | | | | | | | | | integral and enumeration types. This is accomplished with a bit of template type trait magic. Thanks to Richard Smith for the core idea here to detect viable types by detecting the set of types which can be default constructed in a template parameter. This is used (in conjunction with a system for detecting nullptr_t should it exist) to provide an is_integral_or_enum type trait that doesn't need a whitelist or direct compiler support. With this, the hashing is extended to the more general facility. This will be used in a subsequent commit to hashing more things, but I wanted to make sure the type trait magic went through the build bots separately in case other compilers don't like this formulation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152217 91177308-0d34-0410-b5e6-96231b3b80d8
* misched preparation: clarify ScheduleDAG and ScheduleDAGInstrs roles.Andrew Trick2012-03-071-13/+3
| | | | | | | | | | | | | | | | | | | ScheduleDAG is responsible for the DAG: SUnits and SDeps. It provides target hooks for latency computation. ScheduleDAGInstrs extends ScheduleDAG and defines the current scheduling region in terms of MachineInstr iterators. It has access to the target's scheduling itinerary data. ScheduleDAGInstrs provides the logic for building the ScheduleDAG for the sequence of MachineInstrs in the current region. Target's can implement highly custom schedulers by extending this class. ScheduleDAGPostRATDList provides the driver and diagnostics for current postRA scheduling. It maintains a current Sequence of scheduled machine instructions and logic for splicing them into the block. During scheduling, it uses the ScheduleHazardRecognizer provided by the target. Specific changes: - Removed driver code from ScheduleDAG. clearDAG is the only interface needed. - Added enterRegion/exitRegion hooks to ScheduleDAGInstrs to delimit the scope of each scheduling region and associated DAG. They should be used to setup and cleanup any region-specific state in addition to the DAG itself. This is necessary because we reuse the same ScheduleDAG object for the entire function. The target may extend these hooks to do things at regions boundaries, like bundle terminators. The hooks are called even if we decide not to schedule the region. So all instructions in a block are "covered" by these calls. - Added ScheduleDAGInstrs::begin()/end() public API. - Moved Sequence into the driver layer, which is specific to the scheduling algorithm. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152208 91177308-0d34-0410-b5e6-96231b3b80d8
* misched preparation: modularize schedule emission.Andrew Trick2012-03-071-11/+0
| | | | | | ScheduleDAG has nothing to do with how the instructions are scheduled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152206 91177308-0d34-0410-b5e6-96231b3b80d8
* misched preparation: modularize schedule printing.Andrew Trick2012-03-071-2/+0
| | | | | | ScheduleDAG will not refer to the scheduled instruction sequence. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152205 91177308-0d34-0410-b5e6-96231b3b80d8
* misched preparation: modularize schedule verification.Andrew Trick2012-03-071-3/+3
| | | | | | ScheduleDAG will not refer to the scheduled instruction sequence. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152204 91177308-0d34-0410-b5e6-96231b3b80d8
* Use uint16_t to store InstrNameIndices in MCInstrInfo. Add asserts to ↵Craig Topper2012-03-071-2/+2
| | | | | | protect all 16-bit string table offsets. Also make sure the string to offset table string is not larger than 65536 characters since larger string literals aren't portable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152202 91177308-0d34-0410-b5e6-96231b3b80d8
* Missing change in r152106 for TinyPtrVector.Eli Friedman2012-03-071-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152201 91177308-0d34-0410-b5e6-96231b3b80d8
* Cache the sized-ness of struct types, once we reach the steady state ofChandler Carruth2012-03-071-2/+6
| | | | | | | | | | | | | | | "is sized". This prevents every query to isSized() from recursing over every sub-type of a struct type. This could get *very* slow for extremely deep nesting of structs, as in 177.mesa. This change is a 45% speedup for 'opt -O2' of 177.mesa.linked.bc, and likely a significant speedup for other cases as well. It even impacts -O0 cases because so many part of the code try to check whether a type is sized. Thanks for the review from Nick Lewycky and Benjamin Kramer on IRC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152197 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove an accidental cut/paste of a comment into the middle ofChandler Carruth2012-03-071-2/+0
| | | | | | a function. Dunno how I missed this when going through code... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152196 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup in preparation for misched: Move DAG visualization logic.Andrew Trick2012-03-071-0/+4
| | | | | | Soon, ScheduleDAG will not refer to the BB. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152177 91177308-0d34-0410-b5e6-96231b3b80d8
* Added MachineBasicBlock::getFullName() to standardize/factor codegen ↵Andrew Trick2012-03-071-0/+4
| | | | | | diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152176 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup: DAG building is specific to either SD or MI scheduling. Not part of ↵Andrew Trick2012-03-071-5/+0
| | | | | | the target interface. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152174 91177308-0d34-0410-b5e6-96231b3b80d8
* misched commentsAndrew Trick2012-03-071-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152173 91177308-0d34-0410-b5e6-96231b3b80d8
* SmallPtrSet: Provide a more efficient implementation of swap than the ↵Benjamin Kramer2012-03-061-0/+16
| | | | | | | | | default triple-copy std::swap. This currently assumes that both sets have the same SmallSize to keep the implementation simple, a limitation that can be lifted if someone cares. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152143 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new load commands for MachO.Ted Kremenek2012-03-061-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152135 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove excess const, a const_iterator shouldn't be const itself.Benjamin Kramer2012-03-061-1/+1
| | | | | | Fixes 1242 warnings from gcc during clang build. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152120 91177308-0d34-0410-b5e6-96231b3b80d8
* [TinyPtrVector] Add erase method and const-goodness.Argyrios Kyrtzidis2012-03-061-4/+27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152107 91177308-0d34-0410-b5e6-96231b3b80d8
* PointerUnion::getAddrOf() does not need to be template since we can onlyArgyrios Kyrtzidis2012-03-063-9/+16
| | | | | | use the first pointer type for it. Rename it to getAddrOfPtr1(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152106 91177308-0d34-0410-b5e6-96231b3b80d8
* Increase number of allowed registers in register classes to 64k instead of ↵Craig Topper2012-03-061-4/+4
| | | | | | 256. Widen register class ID to 16-bits. Widen register size and alignment to be up to 64k bytes instead of 256 bytes. This partially reverts r152019 to be less restrictive. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152100 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r152016 and allow overlap, sub, super register tables to be more than ↵Craig Topper2012-03-061-3/+3
| | | | | | 64k entries. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152099 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove UsuallyTinyPtrVector.Argyrios Kyrtzidis2012-03-061-137/+0
| | | | | | It is just a worse version of TinyPtrVector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152097 91177308-0d34-0410-b5e6-96231b3b80d8
* Add include/llvm/ADT/UsuallyTinyPtrVector.h which is a vector thatArgyrios Kyrtzidis2012-03-061-0/+137
| | | | | | optimizes the case where there is only one element. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152090 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM refactor away a bunch of VLD/VST pseudo instructions.Jim Grosbach2012-03-051-1/+1
| | | | | | | | | With the new composite physical registers to represent arbitrary pairs of DPR registers, we don't need the pseudo-registers anymore. Get rid of a bunch of them that use DPR register pairs and just use the real instructions directly instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152045 91177308-0d34-0410-b5e6-96231b3b80d8
* MCRegisterInfo-ize getMatchingSuperReg.Jim Grosbach2012-03-052-4/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152044 91177308-0d34-0410-b5e6-96231b3b80d8
* Make MCRegisterInfo available to the the MCInstPrinter.Jim Grosbach2012-03-052-3/+7
| | | | | | | Used to allow context sensitive printing of super-register or sub-register references. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152043 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove an unused function.Nadav Rotem2012-03-051-13/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152028 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch to a C-style cast here to silence a brain-dead MSVC warning. ItChandler Carruth2012-03-051-1/+1
| | | | | | | | | | | | complains about the truncation of a 64-bit constant to a 32-bit value when size_t is 32-bits wide, but *only with static_cast*!!! The exact signal that should *silence* such a warning, and in fact does silence it with both GCC and Clang. Anyways, this was causing grief for all the MSVC builds, so pointless change made. Thanks to Nikola on IRC for confirming that this works. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152021 91177308-0d34-0410-b5e6-96231b3b80d8
* Shrink and reorder fields in MCRegisterClass to reduce size of static data.Craig Topper2012-03-051-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152019 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert more GenRegisterInfo tables from unsigned to uint16_t to reduce ↵Craig Topper2012-03-052-12/+12
| | | | | | static data size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152016 91177308-0d34-0410-b5e6-96231b3b80d8
* Use <def,undef> operands when spilling NEON bundles.Jakob Stoklund Olesen2012-03-041-0/+1
| | | | | | | | | | | MachineOperands that define part of a virtual register must have an <undef> flag if they are not intended as read-modify-write operands. The old trick of adding an <imp-def> operand doesn't work any longer. Fixes PR12177. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152008 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace the hashing functions on APInt and APFloat with overloads of theChandler Carruth2012-03-042-8/+15
| | | | | | | | | | | | | | new hash_value infrastructure, and replace their implementations using hash_combine. This removes a complete copy of Jenkin's lookup3 hash function (which is both significantly slower and lower quality than the one implemented in hash_combine) along with a somewhat scary xor-only hash function. Now that APInt and APFloat can be passed directly to hash_combine, simplify the rest of the LLVMContextImpl hashing to use the new infrastructure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152004 91177308-0d34-0410-b5e6-96231b3b80d8
* Add generic support for hashing StringRef objects using the new hashing library.Chandler Carruth2012-03-041-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152003 91177308-0d34-0410-b5e6-96231b3b80d8
* Use uint16_t to store register overlaps to reduce static data.Craig Topper2012-03-043-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152001 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach the hashing facilities how to hash std::string objects.Chandler Carruth2012-03-041-0/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152000 91177308-0d34-0410-b5e6-96231b3b80d8
* Use uint16_t instead of unsigned to store registers in reg classes. Reduces ↵Craig Topper2012-03-042-10/+10
| | | | | | static data size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151998 91177308-0d34-0410-b5e6-96231b3b80d8
* Use uint16_t to store registers in callee saved register tables to reduce ↵Craig Topper2012-03-041-1/+1
| | | | | | size of static data. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151996 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable the small vector POD optimization for BitCodeAbbrevOp.Benjamin Kramer2012-03-031-1/+3
| | | | | | While at it bump the small vector size a bit, it's inside a heap-allocated class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151980 91177308-0d34-0410-b5e6-96231b3b80d8