1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

8791 Commits

Author SHA1 Message Date
Mon P Wang
65b01b6ce7 Improve EXTRACT_VECTOR_ELT patch based on comments from Duncan
llvm-svn: 95012
2010-02-01 22:15:09 +00:00
Chris Lattner
af2e10ddef eliminate a bunch of pointless LLVMContext arguments.
llvm-svn: 95001
2010-02-01 20:48:08 +00:00
Dale Johannesen
1483e87700 fix PR 6157. Testcase pending.
llvm-svn: 94996
2010-02-01 19:54:53 +00:00
Mon P Wang
f9fa3aa2c0 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.

llvm-svn: 94990
2010-02-01 19:03:18 +00:00
Devang Patel
70713c75da Emit declaration DIE for the class static variables.
llvm-svn: 94870
2010-01-30 01:08:30 +00:00
Dale Johannesen
9774a29dc0 Fix a case where debug_value could affect codegen.
llvm-svn: 94866
2010-01-30 00:57:47 +00:00
Devang Patel
022d4a7fc0 Add size and location info in DW_TAG_class_type descriptor.
llvm-svn: 94822
2010-01-29 18:34:58 +00:00
Duncan Sands
6b277c2823 Change the SREM case to match the logic in the IR version ComputeMaskedBits.
llvm-svn: 94805
2010-01-29 09:45:26 +00:00
Bill Wendling
d408e7be4e 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.

llvm-svn: 94757
2010-01-28 21:51:40 +00:00
Chris Lattner
641dab84e4 add target hooks for emitting random gunk before and after the function body.
llvm-svn: 94732
2010-01-28 01:58:58 +00:00
Jim Grosbach
7474937004 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.

llvm-svn: 94726
2010-01-28 01:45:32 +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
df1662f0e6 emit a 0 byte instead of a noop if a function is empty on darwin.
"0" is nice and target independent.

llvm-svn: 94718
2010-01-28 01:06:32 +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
de4b09beb9 rename printVisibility to EmitVisibility and make it private,
constify EmitLinkage.

llvm-svn: 94705
2010-01-28 00:05:10 +00:00
Dale Johannesen
74ab14a99f 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.

llvm-svn: 94694
2010-01-27 22:12:36 +00:00
Chandler Carruth
866dc92123 Silence GCC warnings with asserts turned off. No functionality change.
llvm-svn: 94673
2010-01-27 10:27:10 +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
237629e476 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
Chris Lattner
45b23cf9b5 mcize label emission for functions.
llvm-svn: 94624
2010-01-26 23:53:39 +00:00
Chris Lattner
ef32178400 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.

llvm-svn: 94623
2010-01-26 23:51:52 +00:00
Chris Lattner
ae28b4785d pull linkage emission code out to a new EmitLinkage function.
llvm-svn: 94621
2010-01-26 23:47:12 +00:00
Chris Lattner
2706f29888 rearrange some directives, no functionality change.
llvm-svn: 94620
2010-01-26 23:41:48 +00:00
Chris Lattner
8fe5535cec remove a noop function.
llvm-svn: 94616
2010-01-26 23:26:29 +00:00
Chris Lattner
a0df0a28fa 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.

llvm-svn: 94614
2010-01-26 23:18:44 +00:00
Chris Lattner
7dbd5458b2 constify a bunch of dwarf stuff now that the registerinfo method
is constified.

llvm-svn: 94613
2010-01-26 23:18:02 +00:00
Evan Cheng
c674548602 Allow some automatic tailcall optimization without changing ABI.
llvm-svn: 94611
2010-01-26 23:13:04 +00:00
Chris Lattner
ee2b6b1cc5 emit jump table an alias ".set" directives through MCStreamer as
assignments.

.set x, a-b

is the same as:

x = a-b

llvm-svn: 94596
2010-01-26 21:53:08 +00:00
Devang Patel
4563d073d3 Use AssertingVH, just to be paranoid.
llvm-svn: 94593
2010-01-26 21:39:14 +00:00
Devang Patel
84b21559f8 Emit DW_AT_containing_type attribute for a class if containing type is known.
llvm-svn: 94587
2010-01-26 21:16:06 +00:00
Chris Lattner
325a36c358 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.

llvm-svn: 94585
2010-01-26 20:40:54 +00:00
Chris Lattner
044439c9bc eliminate MCAsmInfo::NeedsSet: we now just use .set on any platform
that has it.

llvm-svn: 94581
2010-01-26 20:20:43 +00:00
Chris Lattner
967a37fb26 eliminate the TargetLowering::UsesGlobalOffsetTable bool, which is
subsumed by TargetLowering::getJumpTableEncoding().  Change uses of
it to be more specific.

llvm-svn: 94529
2010-01-26 06:53:37 +00:00
Chris Lattner
b711ded671 Now that printPICJumpTableSetLabel is not overloaded,
inline it into its only caller, allowing us to simplify it
and hoist bits out of the loop.

llvm-svn: 94528
2010-01-26 06:42:44 +00:00
Chris Lattner
d87c50833a 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.

llvm-svn: 94526
2010-01-26 06:28:43 +00:00
Chris Lattner
a9b1ea03e9 add a new MachineJumpTableInfo::getJTISymbol method,
use it to implement the default TargetLowering::getPICJumpTableRelocBaseExpr

llvm-svn: 94523
2010-01-26 05:58:28 +00:00
Chris Lattner
3b2bf7ab66 stub out a new target hook, need some refactoring before I can
implement it.

llvm-svn: 94521
2010-01-26 05:30:30 +00:00
Chris Lattner
b020478ce5 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.

llvm-svn: 94518
2010-01-26 05:15:20 +00:00
Chris Lattner
945bbf606f rename printPICJumpTableEntry -> EmitJumpTableEntry,
make it private and non-virtual.  It handles the non-pic
case too, so just use it, simplifying EmitJumpTableInfo.

llvm-svn: 94517
2010-01-26 05:10:10 +00:00
Chris Lattner
b4a5d00176 add a new MachineBasicBlock::getSymbol method, replacing
the AsmPrinter::GetMBBSymbol.

llvm-svn: 94515
2010-01-26 04:55:51 +00:00
Lang Hames
91856859d6 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.

llvm-svn: 94514
2010-01-26 04:49:58 +00:00
Chris Lattner
d25ec1b3bd 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.

llvm-svn: 94509
2010-01-26 04:35:26 +00:00
Chris Lattner
5ee5b62838 Add support for target-specific 32-bit custom-lowered
jump table entries.

llvm-svn: 94505
2010-01-26 04:05:28 +00:00
Chris Lattner
d0c077cef7 switch jump table entry emission to be based on EntryKind
instead of magic variables.

llvm-svn: 94500
2010-01-26 03:43:22 +00:00
Evan Cheng
548d00d77c Implement cond ? -1 : 0 with sbb.
llvm-svn: 94490
2010-01-26 02:00:44 +00:00
Dale Johannesen
d75f9dc3ff Generate DEBUG_VALUE comments on x86. The (limited)
dbg.declare's we currently generate go through both
register allocators without perturbing the results.

llvm-svn: 94480
2010-01-26 00:09:58 +00:00
Chris Lattner
efdc572e44 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.

llvm-svn: 94470
2010-01-25 23:26:13 +00:00
Chris Lattner
e3f214b438 prep work to support a future where getJumpTableInfo will return
a null pointer for functions with no jump tables.  No functionality
change.

llvm-svn: 94469
2010-01-25 23:22:00 +00:00
Chris Lattner
1e05dd3446 eliminate redundant argument to EmitJumpTableInfo
llvm-svn: 94464
2010-01-25 22:41:33 +00:00