Commit Graph

13211 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen
91ba63d230 80 col.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151167 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-22 16:50:46 +00:00
Eric Christopher
8b6fe6b651 Only add DW_AT_prototyped if we're working with a C-like language.
Worth another 45k (1%) off of a large C++ testcase.

rdar://10909458

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151144 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-22 08:46:21 +00:00
Eric Christopher
438b092a4b Add the source language into the compile unit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151143 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-22 08:46:13 +00:00
Eric Christopher
e2dc9336d1 Remove extra semi-colon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151142 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-22 08:46:02 +00:00
Andrew Trick
cc77b54036 misched: DAG builder should not track dependencies for SSA defs.
The vast majority of virtual register definitions don't need an entry
in the DAG builder's VRegDefs set.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151136 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-22 06:08:13 +00:00
Andrew Trick
b4566a9999 Initialize SUnits before DAG building.
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
2012-02-22 06:08:11 +00:00
Craig Topper
44d23825d6 Make all pointers to TargetRegisterClass const since they are all pointers 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
2012-02-22 05:59:10 +00:00
Jakob Stoklund Olesen
a240743ad9 Use SparseSet for the RAFast live virtual register map.
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
2012-02-22 01:02:37 +00:00
Lang Hames
4586d257ab Add API "handleMoveIntoBundl" for updating liveness when moving instructions 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
2012-02-21 22:29:38 +00:00
Eric Christopher
35f225aa2c There's no need for a DW_AT_byte_size on a pointer type.
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
2012-02-21 22:25:53 +00:00
Andrew Trick
19273aec44 Clear virtual registers after they are no longer referenced.
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
2012-02-21 04:51:23 +00:00
Andrew Trick
e8ccb04913 StackSlotColoring does not use a VirtRegMap
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151031 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-21 04:51:19 +00:00
Lang Hames
fd6d3217d3 Fix some bugs in HMEditor's moveAllOperandsInto logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151006 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-21 00:00:36 +00:00
Evan Cheng
01b623c8c2 Fix machine-cp by having it to check sub-register indicies. e.g.
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
2012-02-20 23:28:17 +00:00
James Molloy
6259dcdc57 Teach the DAGCombiner that certain loadext nodes followed by ANDs can be converted to zeroexts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150957 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-20 12:02:38 +00:00
Evan Cheng
df7e8bd702 Make post-ra tail duplication bundle safe. No test case as recent codegen
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
2012-02-20 07:51:58 +00:00
Benjamin Kramer
7db76e7ca3 Silence operator precedence warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150921 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-19 12:25:07 +00:00
Ahmed Charles
b0934ab7d8 Remove dead code. Improve llvm_unreachable text. Simplify some control flow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150918 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-19 11:37:01 +00:00
Lang Hames
6aceab1392 Add machinery for pushing live ranges onto bundle starts while bundling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150915 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-19 07:13:05 +00:00
Lang Hames
4a0b2d658a Simplify moveEnteringDownFrom rules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150914 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-19 06:13:56 +00:00
Lang Hames
038d2d5ced Skip through instructions rather than operands when looking for last use slot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150912 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-19 04:38:25 +00:00
Lang Hames
ac027144e8 Fix TODO and trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150910 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-19 03:09:55 +00:00
Lang Hames
55fed62c9e Defer sanity checks on live intervals until after all have been updated. 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
2012-02-19 03:00:30 +00:00
Lang Hames
ecb50624d1 Bring HMEditor into line with LLVM coding standards.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150851 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-17 23:43:40 +00:00
Eric Christopher
9b5d6b860c Ignore the lifetime intrinsics in fast-isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150848 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-17 23:03:39 +00:00
Jakob Stoklund Olesen
0b923d9ee9 Don't print out pointer values in SUnit::dump().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150842 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-17 21:44:51 +00:00
Matt Beaumont-Gay
0310038d5a Sink variable into assert
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150841 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-17 21:40:48 +00:00
Lang Hames
fbc8dd306a Add support for regmask slots to HMEditor. Also fixes a comment error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150840 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-17 21:29:41 +00:00
Jakob Stoklund Olesen
d9f0ff56a1 Transfer regmasks to MRI.
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
2012-02-17 19:07:56 +00:00
Lang Hames
3dc7c5138d Refactor 'handleMove' code in live intervals. Clients of LiveIntervals won't see
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
2012-02-17 18:44:18 +00:00
Jim Grosbach
7842a741eb Tidy up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150820 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-17 17:35:10 +00:00
Jakob Stoklund Olesen
0f7de3542f Revert r150288, "Allow Post-RA LICM to hoist reserved register reads."
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
2012-02-17 16:40:44 +00:00
David Chisnall
50f603fff6 ... and it's probably best to use the correct alignment, rather than just 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
2012-02-17 16:30:39 +00:00
David Chisnall
ca5b752d18 It turns out that putting an 8-byte symbol in a 4-byte section makes Solaris 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
2012-02-17 16:05:50 +00:00
Lang Hames
00195d828b Reverse iterator - should be incrementing rather than decrementing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150778 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-17 01:54:11 +00:00
Lang Hames
29879d7f86 MachineScheduler shouldn't use/preserve LiveDebugVariables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150773 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-17 01:11:37 +00:00
Lang Hames
5d0827582f Oops - isRegLiveIntoSuccessor is used in non-assert builds now. Remove NDEBUG guards.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150771 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-17 00:51:32 +00:00
Lang Hames
c2e08db4e5 Re-enable 150652 and 150654 - Make FPSCR non-reserved, and make MachineCSE 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
2012-02-17 00:27:16 +00:00
Lang Hames
af8b34dae9 Turn off assertion, conservatively compute liveness for live-in un-allocatable registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150768 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-17 00:18:18 +00:00
Benjamin Kramer
1a7ea9dd04 Disable machine copy propagation for now. It's known to be buggy (PR11940) and introduces subtle miscompiles in many places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150703 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-16 17:29:50 +00:00
James Molloy
6afa3f744a Remove extraneous #include and spelling mistake introduced in r150669.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150670 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-16 09:48:07 +00:00
James Molloy
6660c05da3 Modify the algorithm when traversing the DAGCombiner's worklist to be O(log 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
2012-02-16 09:17:04 +00:00
Lang Hames
1834df8384 Oop - r150653 + r150654 broke one of my test cases. Backing out for now...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150655 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-16 02:32:10 +00:00
Lang Hames
f7e31b9e81 MachineCSE shouldn't extend the live ranges of reserved or allocatable registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150653 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-16 02:19:35 +00:00
Jakob Stoklund Olesen
a230262791 Handle register masks in branch folding.
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
2012-02-15 23:42:54 +00:00
Andrew Trick
e746186ed4 Fix library visibility problems with VLIWPacketizer.
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
2012-02-15 23:34:15 +00:00
Lang Hames
cc2037be2c Make LiveIntervals::handleMove() bundle aware.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150630 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-15 23:21:33 +00:00
Bill Wendling
2de3ff5043 Use 'getDataNoRel' for the section kind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150628 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-15 22:47:53 +00:00
Lang Hames
cc72913268 Fix assertion condition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150627 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-15 22:45:51 +00:00
Bill Wendling
057d521e3d Modify the code that emits the module flags to use the new module flags accessor
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
2012-02-15 22:36:15 +00:00