Commit Graph

2095 Commits

Author SHA1 Message Date
Chris Lattner
d269a6e460 make MachineModuleInfoMachO hold non-const MCSymbol*'s instead
of const ones.  non-const ones aren't very useful, because you can't
even, say, emit them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95205 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-03 06:18:30 +00:00
Chris Lattner
850d2e2a1b print instructions through the mcstreamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95181 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-03 01:16:28 +00:00
Chris Lattner
d1ff72b8a7 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95178 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-03 01:09:55 +00:00
Chris Lattner
0d883e3f84 sink handling of target-independent machine instrs (other
than DEBUG_VALUE :(  ) into the target indep AsmPrinter.cpp
file.   This allows elimination of the 
NO_ASM_WRITER_BOILERPLATE hack among other things.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95177 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-03 01:00:52 +00:00
Jim Grosbach
985d45dea3 As of r79039, we still try to eliminate the frame pointer on leaf functions,
even when -disable-fp-elim is specified.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95161 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 23:56:14 +00:00
Evan Cheng
022d9e1cef Revert 95130.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95160 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 23:55:14 +00:00
Chris Lattner
56591ab218 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95155 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 23:37:42 +00:00
Chris Lattner
55fed86353 tidy some targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95146 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 22:13:21 +00:00
Chris Lattner
33fabd7cc1 detemplatize ARM code emitter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95138 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 21:48:51 +00:00
Chris Lattner
e0faa54705 remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95134 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 21:38:59 +00:00
Chris Lattner
f1d6b107d2 eliminate all the dead addSimpleCodeEmitter implementations.
eliminate random "code emitter" stuff in Alpha, except for
the JIT path.  Next up, remove the template cruft.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95131 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 21:31:47 +00:00
Evan Cheng
942619695f Pass callsite return type to TargetLowering::LowerCall and use that to check sibcall eligibility.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95130 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 21:29:10 +00:00
Johnny Chen
9474d550ff Added t2BFI (Bitfield Insert) entry for disassembler, with blank pattern field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95112 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 19:31:58 +00:00
Johnny Chen
92e63d817f MOVi16 should also be marked as a UnaryDP instruction, i.e., it doesn't have a
Rn operand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95025 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 23:06:04 +00:00
Johnny Chen
48d5ccf86a For MVNr and MVNs, we need to set Inst{25} = 0 so as not to confuse the decoder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94955 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-31 11:22:28 +00:00
Anton Korobeynikov
90cfc130d6 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94889 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-30 14:08:12 +00:00
Johnny Chen
69a8c7f497 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94855 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-29 23:21:10 +00:00
Chris Lattner
d49fe1b6bc 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94722 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28 01:28:58 +00:00
Chris Lattner
a786ceac5c switch ARM to EmitFunctionBody().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94719 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28 01:10:34 +00:00
Chris Lattner
14c38ec2af 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94716 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28 01:02:27 +00:00
Chris Lattner
a2406190ca 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94708 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28 00:19:24 +00:00
Chris Lattner
953ebb769a switch ARM to use EmitFunctionHeader.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94703 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27 23:58:11 +00:00
Chris Lattner
7d7dab0278 eliminate the ARMFunctionInfo::Align member, using
MachineFunction::Alignment instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94701 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27 23:37:36 +00:00
Jeffrey Yasskin
f0356fe140 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94686 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27 20:34:15 +00:00
Jim Grosbach
c90a153ad0 Adjust setjmp instruction sequence to not need 32-bit alignment padding
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94627 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27 00:07:20 +00:00
Evan Cheng
0c439eb2c8 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94626 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27 00:07:07 +00:00
Chris Lattner
30c6b75ac2 constify a method argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94612 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 23:15:09 +00:00
Chris Lattner
cee63322ea Eliminate SetDirective, and replace it with HasSetDirective.
Default HasSetDirective to true, since most targets have it.

The targets that claim to not have it probably do, or it is
spelled differently. These include Blackfin, Mips, Alpha, and
PIC16.  All of these except pic16 are normal ELF targets, so
they almost certainly have it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94585 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 20:40:54 +00:00
Rafael Espindola
2e2563bf8e Emit .comm alignment in bytes but .align in powers of 2 for ARM ELF.
Original patch by Sandeep Patel and updated by me.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94582 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 20:21:43 +00:00
Chris Lattner
b3732fbabd don't set to the default value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94580 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 20:17:34 +00:00
Chris Lattner
f71cb015c1 add a new MachineBasicBlock::getSymbol method, replacing
the AsmPrinter::GetMBBSymbol.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94515 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 04:55:51 +00:00
Chris Lattner
1e459c4467 don't bother setting the AsmPrinter::MF ivar, now that
AsmPrinter::SetupMachineFunction sets it.  Note that systemz
and msp430 didn't.  Yay for reduced inconsistency! :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94510 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 04:38:11 +00:00
Jim Grosbach
1f9b48ad87 Minor jump table cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94475 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 23:50:13 +00:00
Chris Lattner
281e7767df fix quoting problem jim noticed!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94472 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 23:28:03 +00:00
Chris Lattner
b1e803985d prep work to support a future where getJumpTableInfo will return
a null pointer for functions with no jump tables.  No functionality
change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94469 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 23:22:00 +00:00
Johnny Chen
aeb326aad7 Make it SP, LR, PC for GPR Register Class instead of LR, SP, PC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94465 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 22:54:29 +00:00
Johnny Chen
541ba7dd92 Implemented ARMInstPrinter::printThumbS4ImmOperand().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94457 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 22:13:10 +00:00
Johnny Chen
e43b6c9695 Fixed the order of GPR RegisterClass regs to be: ..., R10, R11, R12, ...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94455 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 21:56:35 +00:00
Chris Lattner
0890cf124f mcize jump table symbol manipulation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94441 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 19:51:38 +00:00
Chris Lattner
bfcb09688c sink an arm specific method out of asmprinter into the ARMAsmPrinter and
rename it to avoid shadowing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94440 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 19:39:52 +00:00
Jim Grosbach
546ae6ec77 ARM does accept the .comm directive alignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94408 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 04:59:07 +00:00
Rafael Espindola
f166ed7324 Fix PR6134.
We are not emitting alignments on Darwin for "bar". Not sure what is the
correct way to do it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94400 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 02:27:39 +00:00
Chris Lattner
43b5f9312d make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94378 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 20:43:08 +00:00
Chris Lattner
9eb158d5b4 mcize lcomm, simplify .comm, extend both to support 64-bit sizes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94299 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 07:47:02 +00:00
Chris Lattner
1b46f433e0 use helpers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94296 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 07:00:21 +00:00
Chris Lattner
a5ad93a10a move the various directive enums out of the MCStreamer class
into a new MCDirectives.h file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94294 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 06:39:22 +00:00
Chris Lattner
e73a31f667 Stop building RTTI information for *most* llvm libraries. Notable
missing ones are libsupport, libsystem and libvmcore.  libvmcore is
currently blocked on bugpoint, which uses EH.  Once it stops using
EH, we can switch it off.

This #if 0's out 3 unit tests, because gtest requires RTTI information.
Suggestions welcome on how to fix this.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94164 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 06:49:46 +00:00
Chris Lattner
c6ef277a0b create a new MCParser library and move some stuff into it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94129 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 01:44:57 +00:00
Jim Grosbach
d5d2baec26 Fix PR5694. The CMN instructions set the flags differently from CMP, so they
cannot be directly interchanged for comparisons against negated values.
Disable the CMN instructions for the time being.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94119 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 00:08:13 +00:00
Chris Lattner
ea3cb40fab inline and radically simplify printDataDirective. It will eventually
go completely away.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93994 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-20 07:33:29 +00:00