1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

10159 Commits

Author SHA1 Message Date
Dan Gohman
4dcc56a102 Revert 107840 107839 107813 107804 107800 107797 107791.
Debug info intrinsics win for now.

llvm-svn: 107850
2010-07-08 01:00:56 +00:00
Jim Grosbach
b934d25d5f When processing frame index virtual registers, consider all available registers
(if there are any) and use the one which remains available for the longest
rather than just using the first one. This should help enable better re-use
of the loaded frame index values. rdar://7318760

llvm-svn: 107847
2010-07-08 00:38:54 +00:00
Dan Gohman
636476bc0b Don't forward-declare registers for static allocas, which we'll
prefer to materialize as local constants. This fixes the clang
bootstrap abort.

llvm-svn: 107840
2010-07-07 23:52:58 +00:00
Dan Gohman
10195fc7f7 Fix -fast-isel-abort to check the right instruction.
llvm-svn: 107839
2010-07-07 23:47:25 +00:00
Devang Patel
3d7c71dbbb One MDNode may be used to create regular DIE as well as abstract DIE.
Keep track of abstract subprogram DIEs. 

llvm-svn: 107822
2010-07-07 22:20:57 +00:00
Evan Cheng
22b3e8f3b1 Move getExtLoad() and (some) getLoad() DebugLoc argument after EVT argument for consistency sake.
llvm-svn: 107820
2010-07-07 22:15:37 +00:00
Dan Gohman
a88ae239b8 Not all custom inserters create new basic blocks. If the inserter
didn't create a new block, don't reset the insert position.

llvm-svn: 107813
2010-07-07 21:18:22 +00:00
Devang Patel
3e07e4eb8b Rename couple of maps.
llvm-svn: 107810
2010-07-07 20:49:57 +00:00
Devang Patel
6aef3e8bb3 80 cols.
llvm-svn: 107807
2010-07-07 20:12:52 +00:00
Dan Gohman
d0caefa601 Implement bottom-up fast-isel. This has the advantage of not requiring
a separate DCE pass over MachineInstrs.

llvm-svn: 107804
2010-07-07 19:20:32 +00:00
Dan Gohman
424cc6b616 Add X86FastISel support for return statements. This entails refactoring
a bunch of stuff, to allow the target-independent calling convention
logic to be employed.

llvm-svn: 107800
2010-07-07 18:32:53 +00:00
Dan Gohman
317e584821 Update the insert position after scheduling, which may change the
position when emitting multiple blocks when executing a custom
inserter.

llvm-svn: 107797
2010-07-07 18:22:13 +00:00
Devang Patel
c5344b8cc5 Update comment.
llvm-svn: 107796
2010-07-07 18:18:18 +00:00
Dan Gohman
2e0a949d9f Fix debugging strings.
llvm-svn: 107795
2010-07-07 17:28:45 +00:00
Dan Gohman
b2d5b47efb Give FunctionLoweringInfo an MBB member, avoiding the need to pass it
around everywhere, and also give it an InsertPt member, to enable isel
to operate at an arbitrary position within a block, rather than just
appending to a block.

llvm-svn: 107791
2010-07-07 16:47:08 +00:00
Dan Gohman
b87c534168 Simplify FastISel's constructor by giving it a FunctionLoweringInfo
instance, rather than pointers to all of FunctionLoweringInfo's
members.

This eliminates an NDEBUG ABI sensitivity.

llvm-svn: 107789
2010-07-07 16:29:44 +00:00
Dan Gohman
1c3ce1ccd5 Move FunctionLoweringInfo.h out into include/llvm/CodeGen. This will
allow target-specific fast-isel code to make use of it directly.

llvm-svn: 107787
2010-07-07 16:01:37 +00:00
Dan Gohman
c768525273 Split the SDValue out of OutputArg so that SelectionDAG-independent
code can do calling-convention queries. This obviates OutputArgReg.

llvm-svn: 107786
2010-07-07 15:54:55 +00:00
Dan Gohman
28eddf12ea Move CallingConvLower.cpp out of the SelectionDAG directory.
llvm-svn: 107781
2010-07-07 15:15:27 +00:00
Jakob Stoklund Olesen
aed9d04523 Fix more places assuming subregisters have live intervals
llvm-svn: 107780
2010-07-07 14:41:22 +00:00
Dan Gohman
bbee8c93fb Add a getFirstNonPHI utility function.
llvm-svn: 107778
2010-07-07 14:33:51 +00:00
Jakob Stoklund Olesen
3f4e5779d7 Revert "Remove references to INSERT_SUBREG after de-SSA" r107725.
Buildbot breakage.

llvm-svn: 107744
2010-07-07 00:32:25 +00:00
Jim Grosbach
657ab4a8ee By default, the eh.sjlj.setjmp/longjmp intrinsics should just do nothing rather
than assuming a target will custom lower them. Targets which do so should
exlicitly mark them as having custom lowerings. PR7454.

llvm-svn: 107734
2010-07-06 23:44:52 +00:00
Jakob Stoklund Olesen
04124836b5 Remove references to INSERT_SUBREG after de-SSA
llvm-svn: 107732
2010-07-06 23:40:35 +00:00
Jakob Stoklund Olesen
83ab844c9b Convert INSERT_SUBREG to COPY in TwoAddressInstructionPass.
INSERT_SUBREG will now only appear in SSA machine instructions.

Fix the handling of partial redefs in ProcessImplicitDefs. This is now relevant
since partial redef COPY instructions appear.

llvm-svn: 107726
2010-07-06 23:26:25 +00:00
Dan Gohman
d409104054 CanLowerReturn doesn't need a SelectionDAG; it just needs an LLVMContext.
SelectBasicBlock doesn't needs its BasicBlock argument.

llvm-svn: 107712
2010-07-06 22:19:37 +00:00
Devang Patel
7ab104353b Propagate debug loc.
llvm-svn: 107710
2010-07-06 22:08:15 +00:00
Jakob Stoklund Olesen
bc4a57ef56 One more case assuming that subregs have live ranges.
llvm-svn: 107700
2010-07-06 21:13:03 +00:00
Jakob Stoklund Olesen
ec2c876e57 Fix buildbot breakage where a def is missing.
llvm-svn: 107698
2010-07-06 21:06:39 +00:00
Jakob Stoklund Olesen
f86de96f78 Be more forgiving when calculating alias interference for physreg coalescing.
It is OK for an alias live range to overlap if there is a copy to or from the
physical register. CoalescerPair can work out if the copy is coalescable
independently of the alias.

This means that we can join with the actual destination interval instead of
using the getOrigDstReg() hack. It is no longer necessary to merge clobber
ranges into subregisters.

llvm-svn: 107695
2010-07-06 20:31:51 +00:00
Dan Gohman
808f334f79 Reapply r107655 with fixes; insert the pseudo instruction into
the block before calling the expansion hook. And don't
put EFLAGS in a mbb's live-in list twice.

llvm-svn: 107691
2010-07-06 20:24:04 +00:00
Eric Christopher
383df15267 Fix to 80-col.
llvm-svn: 107684
2010-07-06 18:35:20 +00:00
Chris Lattner
18ba4703b0 tighten up this code.
llvm-svn: 107670
2010-07-06 15:59:27 +00:00
Dan Gohman
4d264f7e51 Revert r107655.
llvm-svn: 107668
2010-07-06 15:49:48 +00:00
Dan Gohman
38f2820fc3 Add versions of OutputArgReg, AnalyzeReturn, and AnalyzeCallOperands
which do not depend on SelectionDAG.

llvm-svn: 107666
2010-07-06 15:39:54 +00:00
Anton Korobeynikov
3097e49515 Fix a major regression on COFF targets introduced by r103267: 'discardable' section means that it is used only during the program load and can be discarded afterwards.
This way *only* debug sections can be discarded, but not the opposite. Seems like the copy-and-pasto from ELF code, since there it contains the reverse flag ('alloc').

llvm-svn: 107658
2010-07-06 15:24:56 +00:00
Dan Gohman
6a73079aba Fix a bunch of custom-inserter functions to handle the case where
the pseudo instruction is not at the end of the block.

llvm-svn: 107655
2010-07-06 15:18:19 +00:00
Eric Christopher
e873e9978c Fix up -fstack-protector on linux to use the segment
registers.  Split out testcases per architecture and os
now.

Patch from Nelson Elhage.

llvm-svn: 107640
2010-07-06 05:18:56 +00:00
Chris Lattner
252f82acc6 more tidying.
llvm-svn: 107615
2010-07-05 05:53:14 +00:00
Chris Lattner
bbc150b397 random tidying
llvm-svn: 107612
2010-07-05 05:36:21 +00:00
Jakob Stoklund Olesen
9b1eb2b2ac Print symbolic subreg indices on REG_SEQUENCE and INSERT_SUBREG.
llvm-svn: 107602
2010-07-04 23:24:23 +00:00
Evan Cheng
9604b825a4 Infer alignments of fixed frame objects when they are constructed. This ensures remat'ed loads from fixed slots have the right alignments.
llvm-svn: 107591
2010-07-04 18:52:05 +00:00
Bill Wendling
34feb1390d Proper indentation.
llvm-svn: 107581
2010-07-04 08:58:43 +00:00
Eric Christopher
ab076a2261 Fix typo.
llvm-svn: 107556
2010-07-03 01:09:18 +00:00
Evan Cheng
47f3a2db40 Remove isSS argument from CreateFixedObject. Fixed objects cannot be spill slots so it's always false.
llvm-svn: 107550
2010-07-03 00:40:23 +00:00
Jakob Stoklund Olesen
dba28ee3d8 Detect and handle COPY in many places.
This code is transitional, it will soon be possible to eliminate
isExtractSubreg, isInsertSubreg, and isMoveInstr in most places.

llvm-svn: 107547
2010-07-03 00:04:37 +00:00
Eric Christopher
2cf82a97f7 80-col fixup.
llvm-svn: 107537
2010-07-02 23:17:38 +00:00
Jakob Stoklund Olesen
8186b4c8d1 Add a new target independent COPY instruction and code to lower it.
The COPY instruction is intended to replace the target specific copy
instructions for virtual registers as well as the EXTRACT_SUBREG and
INSERT_SUBREG instructions in MachineFunctions. It won't we used in a selection
DAG.

COPY is lowered to native register copies by LowerSubregs.

llvm-svn: 107529
2010-07-02 22:29:50 +00:00
Jim Grosbach
4f017c5fcb Custom inserters (e.g., conditional moves in Thumb1 can introduce
new basic blocks, and if used as a function argument, that can cause call frame
setup / destroy pairs to be split across a basic block boundary. That prevents
us from doing a simple assertion to check that the pairs match and alloc/
dealloc the same amount of space. Modify the assertion to only check the
amount allocated when there are matching pairs in the same basic block.

rdar://8022442

llvm-svn: 107517
2010-07-02 21:23:37 +00:00
Evan Cheng
2954bb814e - Two-address pass should not assume unfolding is always successful.
- X86 unfolding should check if the instructions being unfolded has memoperands.
  If there is no memoperands, then it must assume conservative alignment. If this
  would introduce an expensive sse unaligned load / store, then unfoldMemoryOperand
  etc. should not unfold the instruction.

llvm-svn: 107509
2010-07-02 20:36:18 +00:00