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

197 Commits

Author SHA1 Message Date
Anton Korobeynikov
bbc637e96d Use special DAG-to-DAG preprocessing to allow mem-mem instructions to be selected.
Yay for ASCII graphics!

llvm-svn: 84808
2009-10-22 00:16:00 +00:00
Anton Korobeynikov
23ea13afbb Add DAG printing for RMW stuff debugging
llvm-svn: 84776
2009-10-21 19:18:28 +00:00
Anton Korobeynikov
d233af8049 RMW preprocessing stuff was incorrect. Grab the stuff from x86 backend and disable some tests until it will be clever enough to handle them.
llvm-svn: 84775
2009-10-21 19:17:55 +00:00
Anton Korobeynikov
6329ddd231 Implement branch folding
llvm-svn: 84774
2009-10-21 19:17:18 +00:00
Anton Korobeynikov
c9ed87ea9a Cosmetic changes, no functionality changes
llvm-svn: 84773
2009-10-21 19:16:49 +00:00
Anton Korobeynikov
7c7a801467 Add note
llvm-svn: 84713
2009-10-21 00:14:15 +00:00
Anton Korobeynikov
f7e27bb17e Be crazy and assert in case of unsupported modifier passed.
llvm-svn: 84712
2009-10-21 00:13:58 +00:00
Anton Korobeynikov
3b90c55321 Handle external symbols
llvm-svn: 84711
2009-10-21 00:13:42 +00:00
Anton Korobeynikov
d104087bfe Distinguish between pcrel imm operands and 'normal' ones. Fix fixes gross weirdness of asmprinting.
llvm-svn: 84710
2009-10-21 00:13:25 +00:00
Anton Korobeynikov
c35bd58bd5 Add basic block operands & jump kinds
llvm-svn: 84709
2009-10-21 00:13:05 +00:00
Anton Korobeynikov
2bcb24c40b Ignore all implicit reg operands
llvm-svn: 84708
2009-10-21 00:12:44 +00:00
Anton Korobeynikov
f3003dfcd1 Add a workaround for different memops prefixes
llvm-svn: 84707
2009-10-21 00:12:27 +00:00
Anton Korobeynikov
af4c4ee8f5 Checkpoint MCInst printer. We (almostly) able to print global / JT / constpool entries
llvm-svn: 84706
2009-10-21 00:12:08 +00:00
Anton Korobeynikov
5a6771aab2 Add simple operand printing stuff
llvm-svn: 84704
2009-10-21 00:11:27 +00:00
Anton Korobeynikov
8b01906b63 Add experimental MSP430 MCInstLowering stuff
llvm-svn: 84703
2009-10-21 00:11:08 +00:00
Anton Korobeynikov
0c059394ac Wire up MSP430 printMCInst() method
llvm-svn: 84702
2009-10-21 00:10:47 +00:00
Anton Korobeynikov
a534ef3f63 Add MSP430 InstPrinter stub
llvm-svn: 84701
2009-10-21 00:10:30 +00:00
Anton Korobeynikov
8dc97f136b Use proper target data
llvm-svn: 84700
2009-10-21 00:10:00 +00:00
Evan Cheng
d941e8b23a Revert 84315 for now. Re-thinking the patch.
llvm-svn: 84321
2009-10-17 07:53:04 +00:00
Evan Cheng
12dd96e2f8 Rename getFixedStack to getStackObject. The stack objects represented are not
necessarily fixed. Only those will negative frame indices are "fixed."

llvm-svn: 84315
2009-10-17 06:22:26 +00:00
Anton Korobeynikov
deadc3ed2d Add missed mem-mem move patterns
llvm-svn: 83812
2009-10-11 23:03:53 +00:00
Anton Korobeynikov
986885b62e Add MSP430 mem-mem insts support. Patch by Brian Lucas with some my refinements
llvm-svn: 83811
2009-10-11 23:03:28 +00:00
Anton Korobeynikov
329def1675 Implement 'm' memory operand properly
llvm-svn: 83785
2009-10-11 19:14:21 +00:00
Anton Korobeynikov
4465f90db6 Implement proper asmprinting for the globals. This eliminates bogus "call" modifier and also adds support for offsets wrt globals.
llvm-svn: 83784
2009-10-11 19:14:02 +00:00
Anton Korobeynikov
1ca8655151 Implement asm printing for inline asm memory operands
llvm-svn: 83783
2009-10-11 19:13:34 +00:00
Anton Korobeynikov
1f9ff55cbc It seems that OR operation does not affect status reg at all.
Remove impdef of SRW. This fixes PR4779

llvm-svn: 83739
2009-10-10 22:17:47 +00:00
Jim Grosbach
61c5ce1bde Add register-reuse to frame-index register scavenging. When a target uses
a virtual register to eliminate a frame index, it can return that register
and the constant stored there to PEI to track. When scavenging to allocate
for those registers, PEI then tracks the last-used register and value, and
if it is still available and matches the value for the next index, reuses
the existing value rather and removes the re-materialization instructions.
Fancier tracking and adjustment of scavenger allocations to keep more
values live for longer is possible, but not yet implemented and would likely
be better done via a different, less special-purpose, approach to the
problem.

eliminateFrameIndex() is modified so the target implementations can return
the registers they wish to be tracked for reuse.

ARM Thumb1 implements and utilizes the new mechanism. All other targets are
simply modified to adjust for the changed eliminateFrameIndex() prototype.

llvm-svn: 83467
2009-10-07 17:12:56 +00:00
Dan Gohman
a803c712dd Instead of printing unnecessary basic block labels as labels in
verbose-asm mode, print comments instead. This eliminates a non-comment
difference between verbose-asm mode and non-verbose-asm mode.

Also, factor out the relevant code out of all the targets and into
target-independent code.

llvm-svn: 83392
2009-10-06 17:38:38 +00:00
Devang Patel
a8f35ac640 Update processDebugLoc() so that it can be used to process debug info before and after printing an instruction.
llvm-svn: 83363
2009-10-06 02:19:11 +00:00
Devang Patel
e097bf49d0 Use MachineInstr as an processDebugLoc() argument.
This will allow processDebugLoc() to handle scopes for DWARF debug info. 

llvm-svn: 83183
2009-09-30 23:12:50 +00:00
Dan Gohman
0c4e55a2f8 Rename getTargetNode to getMachineNode, for consistency with the
naming scheme used in SelectionDAG, where there are multiple kinds
of "target" nodes, but "machine" nodes are nodes which represent
a MachineInstr.

llvm-svn: 82790
2009-09-25 18:54:59 +00:00
Evan Cheng
7714c8412d Fix PR4926. When target hook EmitInstrWithCustomInserter() insert new basic blocks and update CFG, it should also inform sdisel of the changes so the phi source operands will come from the right basic blocks.
llvm-svn: 82311
2009-09-19 09:51:03 +00:00
Evan Cheng
7cb9c456e5 Enhance EmitInstrWithCustomInserter() so target can specify CFG changes that sdisel will use to properly complete phi nodes.
Not functionality change yet.

llvm-svn: 82273
2009-09-18 21:02:19 +00:00
Anton Korobeynikov
fb7ac49d96 Allow symbols to start from the digit if target requests it. This allows, e.g. pinning
variables to specified absolute address. Make use of this feature for MSP430.
This unbreaks PR4776.

llvm-svn: 82227
2009-09-18 16:57:42 +00:00
Chris Lattner
334aa7a1d4 remove all but one reference to TargetRegisterDesc::AsmName.
llvm-svn: 81714
2009-09-13 20:31:40 +00:00
Chris Lattner
20b7392123 the tblgen produced 'getRegisterName' method does not access
the object, make it static instead of const.

llvm-svn: 81711
2009-09-13 20:19:22 +00:00
Chris Lattner
0cde5283e3 make tblgen produce a function that returns the name for a physreg.
Nothing is using this info yet.

llvm-svn: 81707
2009-09-13 20:08:00 +00:00
Chris Lattner
cbcbedf254 replace printBasicBlockLabel with EmitBasicBlockStart,
now that printBasicBlockLabel is only used for starting
a MBB.  This allows elimination of a bunch of arguments.

llvm-svn: 81684
2009-09-13 18:25:37 +00:00
Chris Lattner
de1324146e convert some uses of printBasicBlockLabel to use GetMBBSymbol
instead.

llvm-svn: 81677
2009-09-13 17:14:04 +00:00
Chris Lattner
b9aca1a178 remove DebugLoc from MCInst and eliminate "Comment printing" from
the MCInst path of the asmprinter.  Instead, pull comment printing
out of the autogenerated asmprinter into each target that uses the
autogenerated asmprinter.  This causes code duplication into each
target, but in a way that will be easier to clean up later when more
asmprinter stuff is commonized into the base AsmPrinter class.

This also fixes an xcore strangeness where it inserted two tabs
before every instruction.

llvm-svn: 81396
2009-09-09 23:14:36 +00:00
Duncan Sands
10c1356bad Remove some unused variables and methods warned about by
icc (#177, partial).  Patch by Erick Tryzelaar.

llvm-svn: 81106
2009-09-06 08:33:48 +00:00
Sandeep Patel
9c4e094e2a Retype from unsigned to CallingConv::ID accordingly. Approved by Bob Wilson.
llvm-svn: 80773
2009-09-02 08:44:58 +00:00
Benjamin Kramer
61232721d9 Normalize makefile comments and sort cmake file lists.
llvm-svn: 80584
2009-08-31 13:05:24 +00:00
Anton Korobeynikov
6ee3a73ba1 Add dummy inline asm handling for 'r' constraint. This fixes PR4778
llvm-svn: 80085
2009-08-26 13:44:29 +00:00
Anton Korobeynikov
b388728ba7 Provide dynamic_stackalloc lowering for MSP430.
This fixes PR4769

llvm-svn: 80001
2009-08-25 17:00:23 +00:00
Daniel Dunbar
411094cde6 Fix some refactos for iostream changes (in -Asserts mode).
- The world needs better C++ refactoring tools, can I get an Amen!?

llvm-svn: 79843
2009-08-23 08:50:52 +00:00
Chris Lattner
bd73307361 eliminate uses of cerr()
llvm-svn: 79834
2009-08-23 07:05:07 +00:00
Chris Lattner
26ec3291f0 eliminate the last DOUTs from the targets.
llvm-svn: 79833
2009-08-23 06:49:22 +00:00
Benjamin Kramer
52cba58070 Forgot to update some CMakeLists.
llvm-svn: 79780
2009-08-22 22:20:11 +00:00
Chris Lattner
8d06945fff rename TAI -> MAI, being careful not to make MAILJMP instructions :)
llvm-svn: 79777
2009-08-22 21:43:10 +00:00