Evan Cheng
fac0fdc6a0
Perform sibcall in some cases when arguments are passes memory. Look for cases
...
where callee's arguments are already in the caller's own caller's stack and
they line up perfectly. e.g.
extern int foo(int a, int b, int c);
int bar(int a, int b, int c) {
return foo(a, b, c);
}
llvm-svn: 95053
2010-02-02 02:22:50 +00:00
Johnny Chen
cab2ca005d
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
efa391da81
Fix PR6196. GV callee may not be a function.
...
llvm-svn: 95017
2010-02-01 22:40:09 +00:00
Bruno Cardoso Lopes
7099d40968
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
dcc1816642
Undo r94946 now all the tests are passing again.
...
llvm-svn: 94970
2010-02-01 02:13:39 +00:00
Bruno Cardoso Lopes
2a49e86448
Fix stack size bug while using o32 abi
...
llvm-svn: 94969
2010-02-01 02:03:24 +00:00
Johnny Chen
15f2bf96d8
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
e86a191862
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
c3c18b9fe9
Fix a missing check from my last commit.
...
llvm-svn: 94949
2010-01-31 07:27:31 +00:00
Evan Cheng
b5f97d871c
Avoid recursive sibcall's.
...
llvm-svn: 94946
2010-01-31 06:44:49 +00:00
Eli Friedman
28884d637b
Remove a completed item, add a couple new ones.
...
llvm-svn: 94945
2010-01-31 04:55:32 +00:00
Sean Callanan
5458663492
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
dcd6d1450f
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
a82b8ade4d
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
f7651ec593
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
40ae22e14d
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
5acba193ef
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
23e8bc782c
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
ee85d3388b
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
e92f9cffdb
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
377da9a33c
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
5964860340
PPC is not ready for sibcall optimization.
...
llvm-svn: 94853
2010-01-29 23:05:56 +00:00
Dale Johannesen
9e9159cd4d
Add assertion to humor the paranoid.
...
llvm-svn: 94843
2010-01-29 21:21:28 +00:00
Bob Wilson
f897b7b37e
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
2cbd1b19db
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
59ba2433b0
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
3b01285b76
Replace strcpy with memcpy when we have the length around anyway.
...
llvm-svn: 94746
2010-01-28 18:04:38 +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
Evan Cheng
7e26fdaa78
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
5051cd2c50
switch blackfin to the default runOnMachineFunction
...
llvm-svn: 94729
2010-01-28 01:54:33 +00:00
Chris Lattner
3bc2ff4750
eliminate a now-useless class.
...
llvm-svn: 94728
2010-01-28 01:50:22 +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
95118672e3
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
68736fc18c
switch ARM to EmitFunctionBody().
...
llvm-svn: 94719
2010-01-28 01:10:34 +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
Chris Lattner
13333b7560
don't emit constant pools twice.
...
llvm-svn: 94706
2010-01-28 00:15:18 +00:00
Chris Lattner
7e98bbe5a3
switch ARM to use EmitFunctionHeader.
...
llvm-svn: 94703
2010-01-27 23:58:11 +00:00
Chris Lattner
21062f0348
eliminate the ARMFunctionInfo::Align member, using
...
MachineFunction::Alignment instead.
llvm-svn: 94701
2010-01-27 23:37:36 +00:00
Chris Lattner
73288be43c
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
e21bc14932
switch mips to use the shared EmitFunctionHeader() function
...
llvm-svn: 94698
2010-01-27 23:23:58 +00:00
Dale Johannesen
4b9e510f8f
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
fb10587e50
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
d20734ccba
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
381bc804d6
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
37c57e69df
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
b35edb72c3
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
2743ad432d
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
40c3104c01
Clarify what -tailcallopt option actually do.
...
llvm-svn: 94628
2010-01-27 00:10:09 +00:00
Jim Grosbach
e96f9c1cab
Adjust setjmp instruction sequence to not need 32-bit alignment padding
...
llvm-svn: 94627
2010-01-27 00:07:20 +00:00