Johnny Chen
5b66b31774
MOVi16 should also be marked as a UnaryDP instruction, i.e., it doesn't have a
...
Rn operand.
llvm-svn: 95025
2010-02-01 23:06:04 +00:00
Evan Cheng
a49d8e6d38
Fix PR6196. GV callee may not be a function.
...
llvm-svn: 95017
2010-02-01 22:40:09 +00:00
Bruno Cardoso Lopes
aa8c429a53
MulOp is actually a Mips specific node, so do the match using Opcode. This fixes PR6192
...
llvm-svn: 94977
2010-02-01 12:16:39 +00:00
Evan Cheng
ed8ca56eeb
Undo r94946 now all the tests are passing again.
...
llvm-svn: 94970
2010-02-01 02:13:39 +00:00
Bruno Cardoso Lopes
1cb8b33d61
Fix stack size bug while using o32 abi
...
llvm-svn: 94969
2010-02-01 02:03:24 +00:00
Johnny Chen
b3562f7cf6
For MVNr and MVNs, we need to set Inst{25} = 0 so as not to confuse the decoder.
...
llvm-svn: 94955
2010-01-31 11:22:28 +00:00
Evan Cheng
b33dbc5019
Change TAILJMP's to be varargs and transfer implicit uses over from TCRETURN's. Otherwise the missing uses can make post-regalloc scheduling do bad things. This fixes 403.gcc.
...
llvm-svn: 94950
2010-01-31 07:28:44 +00:00
Evan Cheng
9adc6f46cf
Fix a missing check from my last commit.
...
llvm-svn: 94949
2010-01-31 07:27:31 +00:00
Evan Cheng
7f62def0f9
Avoid recursive sibcall's.
...
llvm-svn: 94946
2010-01-31 06:44:49 +00:00
Eli Friedman
0de0b3677a
Remove a completed item, add a couple new ones.
...
llvm-svn: 94945
2010-01-31 04:55:32 +00:00
Sean Callanan
9aeccadce4
Moved InstallLexer() from the X86-specific AsmLexer
...
to the TargetAsmLexer class so that clients can
actually use the TargetAsmLexer they get from a
Target.
llvm-svn: 94940
2010-01-31 02:28:18 +00:00
Bruno Cardoso Lopes
193e64c699
Fix PR6144. Reload GP before the emission of CALLSEQ_END to guarantee the right reload order
...
llvm-svn: 94915
2010-01-30 18:32:07 +00:00
Bruno Cardoso Lopes
7ee71912ed
Fix mov.d out register by using the FFR register class directly
...
llvm-svn: 94914
2010-01-30 18:29:19 +00:00
Anton Korobeynikov
25df248382
Fix a gross typo: ARMv6+ may or may not support unaligned memory operations.
...
Even if they are suported by the core, they can be disabled
(this is just a configuration bit inside some register).
Allow unaligned memops on darwin and conservatively disallow them otherwise.
llvm-svn: 94889
2010-01-30 14:08:12 +00:00
Evan Cheng
70f714fdbe
Allow more tailcall optimization: calls with inputs that are all passed in registers.
...
llvm-svn: 94873
2010-01-30 01:22:00 +00:00
Evan Cheng
2d5a75b42a
Don't forget to transfer target flag when inserting a tailcall instruction.
...
llvm-svn: 94872
2010-01-30 01:16:15 +00:00
Daniel Dunbar
76e5d70c57
MC/X86 AsmParser: Handle absolute memory operands correctly. We were doing
...
something totally broken and parsing them as immediates, but the .td file also
had the wrong match class so things sortof worked. Except, that is, that we
would parse
movl $0, %eax
as
movl 0, %eax
Feel free to guess how well that worked.
llvm-svn: 94869
2010-01-30 01:02:48 +00:00
Daniel Dunbar
f05d00787a
X86.td: Refactor to bring operands that use print_pcrel_imm together.
...
llvm-svn: 94861
2010-01-30 00:24:12 +00:00
Daniel Dunbar
a97adee959
AsmMatcher/X86: Separate out sublass for memory operands that have no segment
...
register, and use to cleanup a FIXME in X86AsmParser.cpp.
llvm-svn: 94859
2010-01-30 00:24:00 +00:00
Johnny Chen
34a6afc68d
Modified encoding bits specification for VFP instructions. In particular, the D
...
bit (Inst{22}) and the M bit (Inst{5}) should be left unspecified. For binary
format instructions, Inst{6} and Inst{4} need to specified for proper decodings.
llvm-svn: 94855
2010-01-29 23:21:10 +00:00
Evan Cheng
25217ffaed
PPC is not ready for sibcall optimization.
...
llvm-svn: 94853
2010-01-29 23:05:56 +00:00
Dale Johannesen
ad00f03e86
Add assertion to humor the paranoid.
...
llvm-svn: 94843
2010-01-29 21:21:28 +00:00
Bob Wilson
7c42b9d51e
Improve isSafeToLoadUnconditionally to recognize that GEPs with constant
...
indices are safe if the result is known to be within the bounds of the
underlying object.
llvm-svn: 94829
2010-01-29 19:19:08 +00:00
Evan Cheng
297a494f55
Catch more trivial tail call opportunities: no inputs and output types match.
...
llvm-svn: 94804
2010-01-29 06:45:59 +00:00
Sean Callanan
82436d1666
Added a custom TableGen backend to support the
...
enhanced disassembler, and the necessary makefile
rules to build the table for X86.
llvm-svn: 94764
2010-01-29 00:21:04 +00:00
Benjamin Kramer
29063eac23
Replace strcpy with memcpy when we have the length around anyway.
...
llvm-svn: 94746
2010-01-28 18:04:38 +00:00
Chris Lattner
cc9a6f0580
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
Evan Cheng
346af88396
Fix a bug introduced by r94490 where it created a X86ISD::CMP whose output type is different from its inputs.
...
This fixes PR6146.
llvm-svn: 94731
2010-01-28 01:57:22 +00:00
Chris Lattner
125c118cd8
switch blackfin to the default runOnMachineFunction
...
llvm-svn: 94729
2010-01-28 01:54:33 +00:00
Chris Lattner
b662b7c801
eliminate a now-useless class.
...
llvm-svn: 94728
2010-01-28 01:50:22 +00:00
Chris Lattner
fd97a3369e
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
73de5fbfc3
Give AsmPrinter the most common expected implementation of
...
runOnMachineFunction, and switch PPC to use EmitFunctionBody.
The two ppc asmprinters now don't heave to define
runOnMachineFunction.
llvm-svn: 94722
2010-01-28 01:28:58 +00:00
Chris Lattner
fa1f67ea38
switch ARM to EmitFunctionBody().
...
llvm-svn: 94719
2010-01-28 01:10:34 +00:00
Chris Lattner
94a946cac4
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
2b796241a7
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
Chris Lattner
80108921be
don't emit constant pools twice.
...
llvm-svn: 94706
2010-01-28 00:15:18 +00:00
Chris Lattner
56db8c3008
switch ARM to use EmitFunctionHeader.
...
llvm-svn: 94703
2010-01-27 23:58:11 +00:00
Chris Lattner
feba1e2495
eliminate the ARMFunctionInfo::Align member, using
...
MachineFunction::Alignment instead.
llvm-svn: 94701
2010-01-27 23:37:36 +00:00
Chris Lattner
1aef3717bd
switch blackfin to use EmitFunctionHeader. BlackfinAsmPrinter.cpp
...
is now less than 200 LOC!
llvm-svn: 94699
2010-01-27 23:26:37 +00:00
Chris Lattner
5d9fb4b746
switch mips to use the shared EmitFunctionHeader() function
...
llvm-svn: 94698
2010-01-27 23:23:58 +00:00
Dale Johannesen
77b108e17b
Treat MO_REG 0 location as undefined in DEBUG_VALUE,
...
per document.
llvm-svn: 94693
2010-01-27 22:11:16 +00:00
Jeffrey Yasskin
091217be6f
Kill ModuleProvider and ghost linkage by inverting the relationship between
...
Modules and ModuleProviders. Because the "ModuleProvider" simply materializes
GlobalValues now, and doesn't provide modules, it's renamed to
"GVMaterializer". Code that used to need a ModuleProvider to materialize
Functions can now materialize the Functions directly. Functions no longer use a
magic linkage to record that they're materializable; they simply ask the
GVMaterializer.
Because the C ABI must never change, we can't remove LLVMModuleProviderRef or
the functions that refer to it. Instead, because Module now exposes the same
functionality ModuleProvider used to, we store a Module* in any
LLVMModuleProviderRef and translate in the wrapper methods. The bindings to
other languages still use the ModuleProvider concept. It would probably be
worth some time to update them to follow the C++ more closely, but I don't
intend to do it.
Fixes http://llvm.org/PR5737 and http://llvm.org/PR5735 .
llvm-svn: 94686
2010-01-27 20:34:15 +00:00
Chris Lattner
bc1e6f0873
add a new AsmPrinter::EmitFunctionEntryLabel virtual function,
...
which allows targets to override function entry label emission.
Use it to convert linux/ppc to use EmitFunctionHeader().
llvm-svn: 94667
2010-01-27 07:21:55 +00:00
Evan Cheng
85476f304c
Perform trivial tail call optimization for callees with "C" ABI. These are done
...
even when -tailcallopt is not specified and it does not require changing ABI.
First case is the most trivial one. Perform tail call optimization when both
the caller and callee do not return values and when the callee does not take
any input arguments.
llvm-svn: 94664
2010-01-27 06:25:16 +00:00
Chris Lattner
57f064722a
ppc/linux isn't ready for this and it was an accident that it was included.
...
This should fix a bunch of linux buildbot failures.
llvm-svn: 94643
2010-01-27 01:02:43 +00:00
Chris Lattner
2ab11001cc
use existing basic block numbers instead of recomputing
...
a new set of them.
llvm-svn: 94631
2010-01-27 00:20:02 +00:00
Chris Lattner
9da5e1f650
Switch MSP430, CellSPU, SystemZ, Darwin/PPC, Alpha, and Sparc to
...
EmitFunctionHeader:
7 files changed, 16 insertions(+), 210 deletions(-)
llvm-svn: 94630
2010-01-27 00:17:20 +00:00
Evan Cheng
640b58b8d7
Clarify what -tailcallopt option actually do.
...
llvm-svn: 94628
2010-01-27 00:10:09 +00:00
Jim Grosbach
a3575ca846
Adjust setjmp instruction sequence to not need 32-bit alignment padding
...
llvm-svn: 94627
2010-01-27 00:07:20 +00:00
Evan Cheng
67a69dd2ed
Eliminate target hook IsEligibleForTailCallOptimization.
...
Target independent isel should always pass along the "tail call" property. Change
target hook LowerCall's parameter "isTailCall" into a refernce. If the target
decides it's impossible to honor the tail call request, it should set isTailCall
to false to make target independent isel happy.
llvm-svn: 94626
2010-01-27 00:07:07 +00:00