1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

13154 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen
d9600dff1c Handle regmasks in RegisterScavenging.
llvm-svn: 151210
2012-02-22 22:50:14 +00:00
Andrew Trick
1caa19b613 misched: Use SparseSet for VRegDegs for constant time clear().
llvm-svn: 151205
2012-02-22 21:59:00 +00:00
Hal Finkel
cfc8c850f6 Allow the use of an alternate symbol for calculating a function's size.
The standard function epilog includes a .size directive, but ppc64 uses
an alternate local symbol to tag the actual start of each function.

Until recently, binutils accepted the .size directive as:
 .size	test1, .Ltmp0-test1
however, using this directive with recent binutils will result in the error:
 .size expression for XXX does not evaluate to a constant
so we must use the label which actually tags the start of the function.

llvm-svn: 151200
2012-02-22 21:11:47 +00:00
Michael J. Spencer
24f6d49962 Properly emit _fltused with FastISel. Refactor to share code with SDAG.
Patch by Joe Groff!

llvm-svn: 151183
2012-02-22 19:06:13 +00:00
Andrew Trick
8827848788 Comment from code review
llvm-svn: 151178
2012-02-22 18:34:49 +00:00
Chad Rosier
3703a1917a Remove extra semi-colons.
llvm-svn: 151169
2012-02-22 17:25:00 +00:00
Jakob Stoklund Olesen
c68efb4311 80 col.
llvm-svn: 151167
2012-02-22 16:50:46 +00:00
Eric Christopher
9f47c92b48 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

llvm-svn: 151144
2012-02-22 08:46:21 +00:00
Eric Christopher
32802595f6 Add the source language into the compile unit.
llvm-svn: 151143
2012-02-22 08:46:13 +00:00
Eric Christopher
61c6749e44 Remove extra semi-colon.
llvm-svn: 151142
2012-02-22 08:46:02 +00:00
Andrew Trick
98a6abc9f6 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.

llvm-svn: 151136
2012-02-22 06:08:13 +00:00
Andrew Trick
5c61d0befc 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.

llvm-svn: 151135
2012-02-22 06:08:11 +00:00
Craig Topper
3ed929de0a Make all pointers to TargetRegisterClass const since they are all pointers to static data that should not be modified.
llvm-svn: 151134
2012-02-22 05:59:10 +00:00
Jakob Stoklund Olesen
a1db1a4669 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.

llvm-svn: 151111
2012-02-22 01:02:37 +00:00
Lang Hames
15c7539a46 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.

llvm-svn: 151099
2012-02-21 22:29:38 +00:00
Eric Christopher
7b19cf8b2a 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)

llvm-svn: 151097
2012-02-21 22:25:53 +00:00
Andrew Trick
25ec43e9fe 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.

llvm-svn: 151032
2012-02-21 04:51:23 +00:00
Andrew Trick
719b2521ef StackSlotColoring does not use a VirtRegMap
llvm-svn: 151031
2012-02-21 04:51:19 +00:00
Lang Hames
1b774db571 Fix some bugs in HMEditor's moveAllOperandsInto logic.
llvm-svn: 151006
2012-02-21 00:00:36 +00:00
Evan Cheng
3bffc22fc2 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

llvm-svn: 151002
2012-02-20 23:28:17 +00:00
James Molloy
9963b8be92 Teach the DAGCombiner that certain loadext nodes followed by ANDs can be converted to zeroexts.
llvm-svn: 150957
2012-02-20 12:02:38 +00:00
Evan Cheng
499c67989a Make post-ra tail duplication bundle safe. No test case as recent codegen
flow changes have already hidden the bug. rdar://10893812

llvm-svn: 150949
2012-02-20 07:51:58 +00:00
Benjamin Kramer
576a9ea6ca Silence operator precedence warning.
llvm-svn: 150921
2012-02-19 12:25:07 +00:00
Ahmed Charles
745c53c2a7 Remove dead code. Improve llvm_unreachable text. Simplify some control flow.
llvm-svn: 150918
2012-02-19 11:37:01 +00:00
Lang Hames
88e5e4d72e Add machinery for pushing live ranges onto bundle starts while bundling.
llvm-svn: 150915
2012-02-19 07:13:05 +00:00
Lang Hames
bdb4efcb20 Simplify moveEnteringDownFrom rules.
llvm-svn: 150914
2012-02-19 06:13:56 +00:00
Lang Hames
831e129c9d Skip through instructions rather than operands when looking for last use slot.
llvm-svn: 150912
2012-02-19 04:38:25 +00:00
Lang Hames
8b2e08187a Fix TODO and trailing whitespace.
llvm-svn: 150910
2012-02-19 03:09:55 +00:00
Lang Hames
b946cb5e75 Defer sanity checks on live intervals until after all have been updated. Hold (LiveInterval, LiveRange) pairs to update, rather than vregs.
llvm-svn: 150909
2012-02-19 03:00:30 +00:00
Lang Hames
095e9964bd Bring HMEditor into line with LLVM coding standards.
llvm-svn: 150851
2012-02-17 23:43:40 +00:00
Eric Christopher
325985565a Ignore the lifetime intrinsics in fast-isel.
llvm-svn: 150848
2012-02-17 23:03:39 +00:00
Jakob Stoklund Olesen
4aa0e7c7c4 Don't print out pointer values in SUnit::dump().
llvm-svn: 150842
2012-02-17 21:44:51 +00:00
Matt Beaumont-Gay
a45b6e23d0 Sink variable into assert
llvm-svn: 150841
2012-02-17 21:40:48 +00:00
Lang Hames
27171ecf20 Add support for regmask slots to HMEditor. Also fixes a comment error.
llvm-svn: 150840
2012-02-17 21:29:41 +00:00
Jakob Stoklund Olesen
bde432b917 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.

llvm-svn: 150830
2012-02-17 19:07:56 +00:00
Lang Hames
ed9553242f 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.

llvm-svn: 150826
2012-02-17 18:44:18 +00:00
Jim Grosbach
f636a3204d Tidy up.
llvm-svn: 150820
2012-02-17 17:35:10 +00:00
Jakob Stoklund Olesen
355efd71af 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.

llvm-svn: 150816
2012-02-17 16:40:44 +00:00
David Chisnall
d5d4804858 ... and it's probably best to use the correct alignment, rather than just guessing that it's the same as the size.
llvm-svn: 150813
2012-02-17 16:30:39 +00:00
David Chisnall
86b0f069d6 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.

llvm-svn: 150811
2012-02-17 16:05:50 +00:00
Lang Hames
a8cd3b538d Reverse iterator - should be incrementing rather than decrementing.
llvm-svn: 150778
2012-02-17 01:54:11 +00:00
Lang Hames
dd3a5d8e78 MachineScheduler shouldn't use/preserve LiveDebugVariables.
llvm-svn: 150773
2012-02-17 01:11:37 +00:00
Lang Hames
680ee0f7e0 Oops - isRegLiveIntoSuccessor is used in non-assert builds now. Remove NDEBUG guards.
llvm-svn: 150771
2012-02-17 00:51:32 +00:00
Lang Hames
99cd3c4b9e Re-enable 150652 and 150654 - Make FPSCR non-reserved, and make MachineCSE bail on reserved registers. This *should* be safe as of r150786.
llvm-svn: 150769
2012-02-17 00:27:16 +00:00
Lang Hames
89b5263016 Turn off assertion, conservatively compute liveness for live-in un-allocatable registers.
llvm-svn: 150768
2012-02-17 00:18:18 +00:00
Benjamin Kramer
814de25917 Disable machine copy propagation for now. It's known to be buggy (PR11940) and introduces subtle miscompiles in many places.
llvm-svn: 150703
2012-02-16 17:29:50 +00:00
James Molloy
29c431b327 Remove extraneous #include and spelling mistake introduced in r150669.
llvm-svn: 150670
2012-02-16 09:48:07 +00:00
James Molloy
e1a6a76cda 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.
llvm-svn: 150669
2012-02-16 09:17:04 +00:00
Lang Hames
71b9f733eb Oop - r150653 + r150654 broke one of my test cases. Backing out for now...
llvm-svn: 150655
2012-02-16 02:32:10 +00:00
Lang Hames
e47462d4a0 MachineCSE shouldn't extend the live ranges of reserved or allocatable registers.
llvm-svn: 150653
2012-02-16 02:19:35 +00:00