Commit Graph

8856 Commits

Author SHA1 Message Date
Daniel Dunbar
87641fa6dc Update CMake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95041 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 01:12:20 +00:00
Nate Begeman
39bdc78e6f Kill the Mach-O writer, and temporarily make filetype=obj an error.
The MCStreamer based assemblers will take over for this functionality.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95033 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 23:56:58 +00:00
Mon P Wang
87c46d8a0e Improve EXTRACT_VECTOR_ELT patch based on comments from Duncan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95012 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 22:15:09 +00:00
Chris Lattner
b29d596072 eliminate a bunch of pointless LLVMContext arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95001 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 20:48:08 +00:00
Dale Johannesen
904c2fadbf fix PR 6157. Testcase pending.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94996 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 19:54:53 +00:00
Mon P Wang
c6654ec498 Fixed a couple of optimization with EXTRACT_VECTOR_ELT that assumes the result
type is the same as the element type of the vector.  EXTRACT_VECTOR_ELT can
be used to extended the width of an integer type.  This fixes a bug for
Generic/vector-casts.ll on a ppc750.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94990 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 19:03:18 +00:00
Devang Patel
1ee0cb9a55 Emit declaration DIE for the class static variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94870 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-30 01:08:30 +00:00
Dale Johannesen
ca1346122f Fix a case where debug_value could affect codegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94866 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-30 00:57:47 +00:00
Devang Patel
8cbb6123ac Add size and location info in DW_TAG_class_type descriptor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94822 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-29 18:34:58 +00:00
Duncan Sands
5c2873a74b Change the SREM case to match the logic in the IR version ComputeMaskedBits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94805 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-29 09:45:26 +00:00
Bill Wendling
4533cac557 Assign the ordering of SDNodes in a much less intrusive fashion. After the
"visit*" method is called, take the newly created nodes, walk them in a DFS
fashion, and if they don't have an ordering set, then give it one.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94757 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28 21:51:40 +00:00
Chris Lattner
edfe776ac2 add target hooks for emitting random gunk before and after the function body.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94732 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28 01:58:58 +00:00
Jim Grosbach
ca752c9020 Update of 94055 to track the IR level call site information via an intrinsic.
This allows code gen and the exception table writer to cooperate to make sure
landing pads are associated with the correct invoke locations.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94726 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28 01:45:32 +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
10e7c60c04 emit a 0 byte instead of a noop if a function is empty on darwin.
"0" is nice and target independent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94718 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28 01:06:32 +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
be9dfcef82 rename printVisibility to EmitVisibility and make it private,
constify EmitLinkage.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94705 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28 00:05:10 +00:00
Dale Johannesen
9514fcbae5 If the only use of something is a DEBUG_VALUE, don't
let that stop it from being deleted, and change the
DEBUG_VALUE value to undef.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94694 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27 22:12:36 +00:00
Chandler Carruth
de4c08008a Silence GCC warnings with asserts turned off. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94673 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27 10:27:10 +00:00
Chris Lattner
2cf7251d39 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().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94667 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27 07:21:55 +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
9bc20ab519 mcize label emission for functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94624 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 23:53:39 +00:00
Chris Lattner
111a3193b5 use EmitLinkage for functions as well as globals. One output
change is that we now use ".linkonce discard" for global variables
instead of ".linkonce samesize".  These should be the same, just less
strict.  If anyone is interested in mcizing MCSection for COFF targets,
this should be easy to fix.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94623 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 23:51:52 +00:00
Chris Lattner
a3e8883d71 pull linkage emission code out to a new EmitLinkage function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94621 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 23:47:12 +00:00
Chris Lattner
b406a8141d rearrange some directives, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94620 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 23:41:48 +00:00
Chris Lattner
5c8697488a remove a noop function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94616 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 23:26:29 +00:00
Chris Lattner
b11caedd6f now that enough stuff is constified, move function header printing
logic up from X86 into the common code.  The other targets will 
hopefully start using this soon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94614 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 23:18:44 +00:00
Chris Lattner
eec791afb1 constify a bunch of dwarf stuff now that the registerinfo method
is constified.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94613 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 23:18:02 +00:00
Evan Cheng
11e679324b Allow some automatic tailcall optimization without changing ABI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94611 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 23:13:04 +00:00
Chris Lattner
c618c8aff4 emit jump table an alias ".set" directives through MCStreamer as
assignments.

.set x, a-b

is the same as:

x = a-b



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94596 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 21:53:08 +00:00
Devang Patel
3139fcf9ed Use AssertingVH, just to be paranoid.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94593 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 21:39:14 +00:00
Devang Patel
b554499871 Emit DW_AT_containing_type attribute for a class if containing type is known.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94587 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 21:16:06 +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
Chris Lattner
6a315c358c eliminate MCAsmInfo::NeedsSet: we now just use .set on any platform
that has it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94581 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 20:20:43 +00:00
Chris Lattner
f1214cbf3c eliminate the TargetLowering::UsesGlobalOffsetTable bool, which is
subsumed by TargetLowering::getJumpTableEncoding().  Change uses of
it to be more specific.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94529 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 06:53:37 +00:00
Chris Lattner
3b131d7cc4 Now that printPICJumpTableSetLabel is not overloaded,
inline it into its only caller, allowing us to simplify it
and hoist bits out of the loop.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94528 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 06:42:44 +00:00
Chris Lattner
589c6f620e Move getJTISymbol from MachineJumpTableInfo to MachineFunction,
which is more convenient, and change getPICJumpTableRelocBaseExpr
to take a MachineFunction to match.

Next, move the X86 code that create a PICBase symbol to
X86TargetLowering::getPICBaseSymbol from 
X86MCInstLower::GetPICBaseSymbol, which was an asmprinter specific 
library.  This eliminates a 'gross hack', and allows us to
implement X86ISelLowering::getPICJumpTableRelocBaseExpr which now
calls it.

This in turn allows us to eliminate the 
X86AsmPrinter::printPICJumpTableSetLabel method, which was the
only overload of printPICJumpTableSetLabel.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94526 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 06:28:43 +00:00
Chris Lattner
beeb93e6ba add a new MachineJumpTableInfo::getJTISymbol method,
use it to implement the default TargetLowering::getPICJumpTableRelocBaseExpr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94523 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 05:58:28 +00:00
Chris Lattner
13e97a29d9 stub out a new target hook, need some refactoring before I can
implement it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94521 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 05:30:30 +00:00
Chris Lattner
e35df92eca simplify asmprinter: only emit .set directives when entries have
EK_LabelDifference32 kind and the target has .set support.  Simplify
X86AsmPrinter::printPICJumpTableSetLabel to make use of recent helpers.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94518 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 05:15:20 +00:00
Chris Lattner
6bf1def159 rename printPICJumpTableEntry -> EmitJumpTableEntry,
make it private and non-virtual.  It handles the non-pic
case too, so just use it, simplifying EmitJumpTableInfo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94517 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 05:10:10 +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
Lang Hames
030c4bfbc9 New PBQP solver.
* Fixed a reduction bug which occasionally led to infinite-cost (invalid)
  register allocation solutions despite the existence finite-cost solutions.
* Significantly reduced memory usage (>50% reduction).
* Simplified a lot of the solver code.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94514 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 04:49:58 +00:00
Chris Lattner
b84822fb7b make MachineFunction keep track of its ID and make
MachineFunctionAnalysis dole them out, instead of having
AsmPrinter do both.  Have the AsmPrinter::SetupMachineFunction
method set the 'AsmPrinter::MF' variable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94509 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 04:35:26 +00:00
Chris Lattner
85fe07866a Add support for target-specific 32-bit custom-lowered
jump table entries.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94505 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 04:05:28 +00:00
Chris Lattner
ff537cec2e switch jump table entry emission to be based on EntryKind
instead of magic variables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94500 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 03:43:22 +00:00
Evan Cheng
8c7ecaf524 Implement cond ? -1 : 0 with sbb.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94490 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 02:00:44 +00:00
Dale Johannesen
5ed17ae92a Generate DEBUG_VALUE comments on x86. The (limited)
dbg.declare's we currently generate go through both
register allocators without perturbing the results.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94480 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 00:09:58 +00:00
Chris Lattner
071c62fad0 Rearrange handling of jump tables. Highlights:
1. MachineJumpTableInfo is now created lazily for a function the first time
   it actually makes a jump table instead of for every function.
2. The encoding of jump table entries is now described by the
   MachineJumpTableInfo::JTEntryKind enum.  This enum is determined by the
   TLI::getJumpTableEncoding() hook, instead of by lots of code scattered
   throughout the compiler that "knows" that jump table entries are always
   32-bits in pic mode (for example).
3. The size and alignment of jump table entries is now calculated based on
   their kind, instead of at machinefunction creation time.

Future work includes using the EntryKind in more places in the compiler,
eliminating other logic that "knows" the layout of jump tables in various
situations.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94470 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 23:26:13 +00:00