aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Initialize SUnits before DAG building.Andrew Trick2012-02-225-75/+113
| | | | | | | | | | | | Affect on SD scheduling and postRA scheduling: Printing the DAG will display the nodes in top-down topological order. This matches the order within the MBB and makes my life much easier in general. Affect on misched: We don't need to track virtual register uses at all. This is awesome. I also intend to rely on the SUnit ID as a topo-sort index. So if A < B then we cannot have an edge B -> A. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151135 91177308-0d34-0410-b5e6-96231b3b80d8
* Make all pointers to TargetRegisterClass const since they are all pointers ↵Craig Topper2012-02-222-5/+5
| | | | | | to static data that should not be modified. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151134 91177308-0d34-0410-b5e6-96231b3b80d8
* Use SparseSet for the RAFast live virtual register map.Jakob Stoklund Olesen2012-02-221-73/+110
| | | | | | | | | | | | This makes RAFast 4% faster, and it gets rid of the dodgy DenseMap iteration. This also revealed that RAFast would sometimes dereference DenseMap iterators after erasing other elements from the map. That does seem to work in the current DenseMap implementation, but SparseSet doesn't allow it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151111 91177308-0d34-0410-b5e6-96231b3b80d8
* Add API "handleMoveIntoBundl" for updating liveness when moving instructions ↵Lang Hames2012-02-211-13/+68
| | | | | | | | | | | | | | into bundles. This method takes a bundle start and an MI being bundled, and makes the intervals for the MI's operands appear to start/end on the bundle start. Also fixes some minor cosmetic issues (whitespace, naming convention) in the HMEditor code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151099 91177308-0d34-0410-b5e6-96231b3b80d8
* There's no need for a DW_AT_byte_size on a pointer type.Eric Christopher2012-02-211-1/+1
| | | | | | Part of rdar://10493979 where it reduces by about .5% (10k) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151097 91177308-0d34-0410-b5e6-96231b3b80d8
* Clear virtual registers after they are no longer referenced.Andrew Trick2012-02-217-5/+39
| | | | | | | | | | | | | Passes after RegAlloc should be able to rely on MRI->getNumVirtRegs() == 0. This makes sharing code for pre/postRA passes more robust. Now, to check if a pass is running before the RA pipeline begins, use MRI->isSSA(). To check if a pass is running after the RA pipeline ends, use !MRI->getNumVirtRegs(). PEI resets virtual regs when it's done scavenging. PTX will either have to provide its own PEI pass or assign physregs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151032 91177308-0d34-0410-b5e6-96231b3b80d8
* StackSlotColoring does not use a VirtRegMapAndrew Trick2012-02-211-4/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151031 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some bugs in HMEditor's moveAllOperandsInto logic.Lang Hames2012-02-211-9/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151006 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix machine-cp by having it to check sub-register indicies. e.g.Evan Cheng2012-02-202-3/+27
| | | | | | | | | | | | | ecx = mov eax al = mov ch The second copy is not a nop because the sub-indices of ecx,ch is not the same of that of eax/al. Re-enabled machine-cp. PR11940 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151002 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach the DAGCombiner that certain loadext nodes followed by ANDs can be ↵James Molloy2012-02-201-0/+82
| | | | | | converted to zeroexts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150957 91177308-0d34-0410-b5e6-96231b3b80d8
* Make post-ra tail duplication bundle safe. No test case as recent codegenEvan Cheng2012-02-201-3/+6
| | | | | | | flow changes have already hidden the bug. rdar://10893812 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150949 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence operator precedence warning.Benjamin Kramer2012-02-191-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150921 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead code. Improve llvm_unreachable text. Simplify some control flow.Ahmed Charles2012-02-192-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150918 91177308-0d34-0410-b5e6-96231b3b80d8
* Add machinery for pushing live ranges onto bundle starts while bundling.Lang Hames2012-02-191-2/+207
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150915 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify moveEnteringDownFrom rules.Lang Hames2012-02-191-11/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150914 91177308-0d34-0410-b5e6-96231b3b80d8
* Skip through instructions rather than operands when looking for last use slot.Lang Hames2012-02-191-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150912 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix TODO and trailing whitespace.Lang Hames2012-02-191-10/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150910 91177308-0d34-0410-b5e6-96231b3b80d8
* Defer sanity checks on live intervals until after all have been updated. ↵Lang Hames2012-02-191-171/+170
| | | | | | Hold (LiveInterval, LiveRange) pairs to update, rather than vregs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150909 91177308-0d34-0410-b5e6-96231b3b80d8
* Bring HMEditor into line with LLVM coding standards.Lang Hames2012-02-171-160/+163
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150851 91177308-0d34-0410-b5e6-96231b3b80d8
* Ignore the lifetime intrinsics in fast-isel.Eric Christopher2012-02-171-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150848 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't print out pointer values in SUnit::dump().Jakob Stoklund Olesen2012-02-171-5/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150842 91177308-0d34-0410-b5e6-96231b3b80d8
* Sink variable into assertMatt Beaumont-Gay2012-02-171-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150841 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for regmask slots to HMEditor. Also fixes a comment error.Lang Hames2012-02-171-3/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150840 91177308-0d34-0410-b5e6-96231b3b80d8
* Transfer regmasks to MRI.Jakob Stoklund Olesen2012-02-173-13/+7
| | | | | | | | | MRI keeps track of which physregs have been used. Make sure it gets updated with all the regmask-clobbered registers. Delete the closePhysRegsUsed() function which isn't necessary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150830 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor 'handleMove' code in live intervals. Clients of LiveIntervals won't seeLang Hames2012-02-171-211/+245
| | | | | | | | | | any changes. Internally this adds a private inner class HMEditor, to LiveIntervals. HMEditor provides an API for updating live intervals when code is moved or bundled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150826 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy up.Jim Grosbach2012-02-173-5/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150820 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r150288, "Allow Post-RA LICM to hoist reserved register reads."Jakob Stoklund Olesen2012-02-171-11/+0
| | | | | | | | | | This caused miscompilations on out-of-tree targets, and possibly i386 as well. I'll find some other way of hoisting %rip-relative loads from loops containing calls. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150816 91177308-0d34-0410-b5e6-96231b3b80d8
* ... and it's probably best to use the correct alignment, rather than just ↵David Chisnall2012-02-171-1/+1
| | | | | | guessing that it's the same as the size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150813 91177308-0d34-0410-b5e6-96231b3b80d8
* It turns out that putting an 8-byte symbol in a 4-byte section makes Solaris ↵David Chisnall2012-02-171-3/+3
| | | | | | | | | | | | ld sulk. GNU ld is perfectly happy with it, which is worrying for a whole other set of reasons... Thanks to Anton, Duncan and Rafael for helping me track this down. Pointy hat to Rafael for introducing the bug in the first place. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150811 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverse iterator - should be incrementing rather than decrementing.Lang Hames2012-02-171-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150778 91177308-0d34-0410-b5e6-96231b3b80d8
* MachineScheduler shouldn't use/preserve LiveDebugVariables.Lang Hames2012-02-171-4/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150773 91177308-0d34-0410-b5e6-96231b3b80d8
* Oops - isRegLiveIntoSuccessor is used in non-assert builds now. Remove ↵Lang Hames2012-02-171-2/+0
| | | | | | NDEBUG guards. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150771 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-enable 150652 and 150654 - Make FPSCR non-reserved, and make MachineCSE ↵Lang Hames2012-02-171-3/+9
| | | | | | bail on reserved registers. This *should* be safe as of r150786. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150769 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn off assertion, conservatively compute liveness for live-in ↵Lang Hames2012-02-171-8/+10
| | | | | | un-allocatable registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150768 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable machine copy propagation for now. It's known to be buggy (PR11940) ↵Benjamin Kramer2012-02-161-1/+1
| | | | | | and introduces subtle miscompiles in many places. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150703 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove extraneous #include and spelling mistake introduced in r150669.James Molloy2012-02-161-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150670 91177308-0d34-0410-b5e6-96231b3b80d8
* Modify the algorithm when traversing the DAGCombiner's worklist to be O(log ↵James Molloy2012-02-161-13/+36
| | | | | | N) for all operations. This fixes a horrible worst case with lots of nodes where 99% of the time was being spent in std::remove. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150669 91177308-0d34-0410-b5e6-96231b3b80d8
* Oop - r150653 + r150654 broke one of my test cases. Backing out for now...Lang Hames2012-02-161-9/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150655 91177308-0d34-0410-b5e6-96231b3b80d8
* MachineCSE shouldn't extend the live ranges of reserved or allocatable ↵Lang Hames2012-02-161-3/+9
| | | | | | registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150653 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle register masks in branch folding.Jakob Stoklund Olesen2012-02-151-0/+8
| | | | | | | Don't attempt to move instructions with regmask operands. They are most likely calls anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150634 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix library visibility problems with VLIWPacketizer.Andrew Trick2012-02-151-6/+19
| | | | | | The existing framework for postra scheduling is library local. We want to keep it that way. Soon we will have a more general MachineScheduler interface. At that time, various bits will be exposed to targets. In the meantime, the VLIWPacketizer wants to use ScheduleDAGInstrs directly, so it needs to wrapped in a PIMPL to avoid exposing it to the target interface. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150633 91177308-0d34-0410-b5e6-96231b3b80d8
* Make LiveIntervals::handleMove() bundle aware.Lang Hames2012-02-152-4/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150630 91177308-0d34-0410-b5e6-96231b3b80d8
* Use 'getDataNoRel' for the section kind.Bill Wendling2012-02-151-5/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150628 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix assertion condition.Lang Hames2012-02-151-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150627 91177308-0d34-0410-b5e6-96231b3b80d8
* Modify the code that emits the module flags to use the new module flags accessorBill Wendling2012-02-152-38/+38
| | | | | | | | | | method. This allows the target lowering code to not have to deal with MDNodes. Also, avoid leaking memory like a sieve by not creating a global variable for the image info section, but just emitting the code directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150624 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't expose DefaultVLIWSchedulerAndrew Trick2012-02-151-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150619 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove overly conservative assert.Lang Hames2012-02-151-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150608 91177308-0d34-0410-b5e6-96231b3b80d8
* Generic "VLIW" packetizer based on a DFA generated from target itinerary.Andrew Trick2012-02-151-0/+147
| | | | | | Patch by Sundeep! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150607 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r150565 again. Appears to be a stage2 failure with dragonegg.Andrew Trick2012-02-151-6/+8
| | | | | | I'll put MachineLICM back before PEI. All my arm/x86 benchmarks look good, but buildbots don't like it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150568 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r150565 with the typo fix properly merged.Andrew Trick2012-02-151-8/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150567 91177308-0d34-0410-b5e6-96231b3b80d8