Bob Wilson
aae933cc81
Revert Mon Ping's change 99928, since it broke all the llvm-gcc buildbots.
...
llvm-svn: 99948
2010-03-30 22:27:04 +00:00
Mon P Wang
9351ea594a
Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset,
...
e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1)
A update of langref will occur in a subsequent checkin.
llvm-svn: 99928
2010-03-30 20:55:56 +00:00
Chris Lattner
4de7f7e862
fix a type contradition: XCoreISD::RETSP has one argument, not zero.
...
llvm-svn: 99760
2010-03-28 08:47:39 +00:00
Chris Lattner
896b393fab
set SDNPVariadic on nodes throughout the rest of the targets that
...
need them.
llvm-svn: 98937
2010-03-19 05:33:51 +00:00
Chris Lattner
9331acc6d7
get MMI out of the label uniquing business, just go to MCContext
...
to get unique assembler temporary labels.
llvm-svn: 98489
2010-03-14 08:36:50 +00:00
Chris Lattner
23ec7363b8
Now that DBG_LABEL is updated, we can finally make MachineMove
...
contain an MCSymbol instead of a label index.
llvm-svn: 98482
2010-03-14 08:12:40 +00:00
Chris Lattner
ba3b320aa3
change the DBG_LABEL MachineInstr to always be created
...
with an MCSymbol instead of an immediate.
llvm-svn: 98481
2010-03-14 07:56:48 +00:00
Chris Lattner
ceaa2343e7
eliminate the now-unneeded context argument of MBB::getSymbol()
...
llvm-svn: 98451
2010-03-13 21:04:28 +00:00
Chris Lattner
e7538fa303
rearrange MCContext ownership. Before LLVMTargetMachine created it
...
and passing off ownership to AsmPrinter. Now MachineModuleInfo
creates it and owns it by value. This allows us to use MCSymbols
more consistently throughout the rest of the code generator, and
simplifies a bit of code. This also allows MachineFunction to
keep an MCContext reference handy, and cleans up the TargetRegistry
interfaces for AsmPrinters.
llvm-svn: 98450
2010-03-13 20:55:24 +00:00
Jeffrey Yasskin
876e602378
Fix LLVM build when the user specifies CPPFLAGS on the make command line.
...
llvm-svn: 98394
2010-03-12 21:42:14 +00:00
Chris Lattner
5a5ea25649
inline GetGlobalValueSymbol into the rest its callers and
...
remove it.
llvm-svn: 98390
2010-03-12 21:19:23 +00:00
Richard Osborne
8caa985467
Remove dead code. (S|U)MUL_LO is now lowered to LMUL or MACC(S|U)
...
llvm-svn: 98269
2010-03-11 18:38:59 +00:00
Richard Osborne
0dcde97cbc
Add dag combine to simplify lmul(x, 0, a, b)
...
llvm-svn: 98258
2010-03-11 16:26:35 +00:00
Richard Osborne
22c1716d0d
Switch XCore over to using inline jump table entries.
...
llvm-svn: 98256
2010-03-11 14:58:56 +00:00
Richard Osborne
e018a3f184
The backend now makes a reasonable job of targeting lmul / macc
...
llvm-svn: 98169
2010-03-10 18:14:47 +00:00
Richard Osborne
41c5f84f1d
Handle MVT::i64 type in DAG combine for ISD::ADD. Fold 64 bit
...
expression add(add(mul(x,y),a),b) -> lmul(x,y,a,b) if all
operands are zero extended.
llvm-svn: 98168
2010-03-10 18:12:27 +00:00
Richard Osborne
8e7cdbef01
Fix checking of intermediates having one use in isADDADDMUL
...
llvm-svn: 98164
2010-03-10 17:16:29 +00:00
Richard Osborne
a1f3ed1aeb
Extract recognition of patterns such as add(add(mul(x,y),a),b)
...
into a seperate function.
llvm-svn: 98162
2010-03-10 17:10:35 +00:00
Richard Osborne
6120fdbd30
Fix thinko.
...
llvm-svn: 98158
2010-03-10 16:27:11 +00:00
Richard Osborne
d400202a43
Fold add(add(mul(x,y),a),b) -> lmul(x,y,a,b) if the intermediate
...
results are unused elsewhere.
llvm-svn: 98157
2010-03-10 16:19:31 +00:00
Richard Osborne
c19c2bd177
Prefer LMUL to MACCU as LMUL has no tied operands.
...
llvm-svn: 98153
2010-03-10 13:27:10 +00:00
Richard Osborne
43210638f1
Custom lower (S|U)MUL_LOHI -> MACC(S|U)
...
llvm-svn: 98152
2010-03-10 13:20:07 +00:00
Richard Osborne
ed6df27ad0
Fix indentation
...
llvm-svn: 98151
2010-03-10 11:42:05 +00:00
Richard Osborne
c88a8e8d66
Lower add (mul a, b), c into MACCU / MACCS nodes which translate
...
directly to the maccu / maccs instructions. We handle this in
ExpandADDSUB since after type legalisation it is messy to
recognise these operations.
llvm-svn: 98150
2010-03-10 11:41:08 +00:00
Jim Grosbach
f328c5334f
Change the Value argument to eliminateFrameIndex to a type-tagged value. This
...
is preparatory to having PEI's scavenged frame index value reuse logic
properly distinguish types of frame values (e.g., whether the value is
stack-pointer relative or frame-pointer relative).
No functionality change.
llvm-svn: 98086
2010-03-09 21:45:49 +00:00
Richard Osborne
4077517135
In cases where the carry / borrow unused converted ladd / lsub
...
to an add or a sub.
llvm-svn: 98059
2010-03-09 16:34:25 +00:00
Richard Osborne
e33e24e6cb
Canonicalize ladd constant to RHS.
...
llvm-svn: 98058
2010-03-09 16:13:57 +00:00
Richard Osborne
173efed224
Add DAG combine for ladd / lsub.
...
llvm-svn: 98057
2010-03-09 16:07:47 +00:00
Chris Lattner
1707a88a2c
Sink InstructionSelect() out of each target into SDISel, and rename it
...
DoInstructionSelection. Inline "SelectRoot" into it from DAGISelHeader.
Sink some other stuff out of DAGISelHeader into SDISel.
Eliminate the various 'Indent' stuff from various targets, which dates
to when isel was recursive.
17 files changed, 114 insertions(+), 430 deletions(-)
llvm-svn: 97555
2010-03-02 06:34:30 +00:00
Bill Wendling
5990930d72
Remove dead parameter passing.
...
llvm-svn: 97536
2010-03-02 01:55:18 +00:00
Chris Lattner
21ad1fd291
stop using generated sdnodexforms.
...
llvm-svn: 97485
2010-03-01 19:38:53 +00:00
Richard Osborne
fe30a8a2c1
Fix XCoreTargetLowering::isLegalAddressingMode() to handle VoidTy.
...
Previously LoopStrengthReduce would sometimes be unable to find
a legal formula, causing an assertion failure.
llvm-svn: 97226
2010-02-26 16:44:51 +00:00
Richard Osborne
92fb0be76b
Don't mark call instruction as a barrier.
...
llvm-svn: 96983
2010-02-23 21:08:11 +00:00
Richard Osborne
eb0446c12a
ECALLF, ECALLT shouldn't be marked as barriers.
...
llvm-svn: 96964
2010-02-23 18:29:49 +00:00
Richard Osborne
9abd3b3ca7
Mark unconditional branches as barriers. Found using -verify-machineinstrs
...
llvm-svn: 96960
2010-02-23 18:13:38 +00:00
Richard Osborne
ff660d72eb
Remove unused lowering function LowerJumpTable
...
llvm-svn: 96943
2010-02-23 14:17:20 +00:00
Richard Osborne
7387249531
Lower BR_JT on the XCore to a jump into a series of jump instructions.
...
llvm-svn: 96942
2010-02-23 13:25:07 +00:00
Anton Korobeynikov
ef1862e256
Move TLOF implementations to libCodegen to resolve layering violation.
...
llvm-svn: 96288
2010-02-15 22:37:53 +00:00
David Greene
dd3a290ebf
Remove an assumption of default arguments. This is in anticipation of a
...
change to SelectionDAG build APIs.
llvm-svn: 96227
2010-02-15 16:49:52 +00:00
Chris Lattner
ba70b52fe6
no need to add the instruction count anymore.
...
llvm-svn: 96212
2010-02-15 06:38:41 +00:00
Dan Gohman
92b6122204
Fix "the the" and similar typos.
...
llvm-svn: 95781
2010-02-10 16:03:48 +00:00
Chris Lattner
6d7856867a
print all the newlines at the end of instructions with
...
OutStreamer.AddBlankLine instead of textually.
llvm-svn: 95734
2010-02-10 00:36:00 +00:00
Chris Lattner
edf1e280a2
rejigger the world so that EmitInstruction prints the \n at
...
the end of the instruction instead of expecting the caller to
do it. This currently causes the asm-verbose instruction
comments to be on the next line.
llvm-svn: 95178
2010-02-03 01:09:55 +00:00
Evan Cheng
9057fea7ef
Revert 95130.
...
llvm-svn: 95160
2010-02-02 23:55:14 +00:00
Chris Lattner
643f2f9bc4
refactor code so that LLVMTargetMachine creates the asmstreamer and
...
mccontext instead of having AsmPrinter do it. This allows other
types of MCStreamer's to be passed in.
llvm-svn: 95155
2010-02-02 23:37:42 +00:00
Evan Cheng
48375fbf4f
Pass callsite return type to TargetLowering::LowerCall and use that to check sibcall eligibility.
...
llvm-svn: 95130
2010-02-02 21:29:10 +00:00
Chris Lattner
d7a8482810
convert the last 3 targets to use EmitFunctionBody() now that
...
it has before/end body hooks.
lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp | 49 ++-----------
lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp | 87 ++++++------------------
lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp | 56 +++------------
test/CodeGen/XCore/ashr.ll | 2
4 files changed, 48 insertions(+), 146 deletions(-)
llvm-svn: 94741
2010-01-28 06:22:43 +00:00
Chris Lattner
138a5f1d72
Switch MSP430, SPU, Sparc, and SystemZ to use EmitFunctionBody().
...
Diffstat:
6 files changed, 30 insertions(+), 284 deletions(-)
llvm-svn: 94727
2010-01-28 01:48:52 +00:00
Chris Lattner
8411a9084e
Remove the argument from EmitJumpTableInfo, because it doesn't need it.
...
Move the X86 implementation of function body emission up to
AsmPrinter::EmitFunctionBody, which works by calling the virtual
EmitInstruction method.
llvm-svn: 94716
2010-01-28 01:02:27 +00:00
Chris Lattner
6a127932c1
Drop the argument to AsmPrinter::EmitConstantPool and make it virtual.
...
Overload it in the ARM backend to do nothing, since is does insane
constant pool emission.
llvm-svn: 94708
2010-01-28 00:19:24 +00:00