summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Change the SREM case to match the logic in the IR version ComputeMaskedBits.Duncan Sands2010-01-291-8/+17
| | | | llvm-svn: 94805
* Assign the ordering of SDNodes in a much less intrusive fashion. After theBill Wendling2010-01-283-691/+171
| | | | | | | "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
* add target hooks for emitting random gunk before and after the function body.Chris Lattner2010-01-281-0/+6
| | | | llvm-svn: 94732
* Update of 94055 to track the IR level call site information via an intrinsic.Jim Grosbach2010-01-284-6/+36
| | | | | | | 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
* Give AsmPrinter the most common expected implementation of Chris Lattner2010-01-281-3/+2
| | | | | | | | runOnMachineFunction, and switch PPC to use EmitFunctionBody. The two ppc asmprinters now don't heave to define runOnMachineFunction. llvm-svn: 94722
* emit a 0 byte instead of a noop if a function is empty on darwin.Chris Lattner2010-01-281-4/+2
| | | | | | "0" is nice and target independent. llvm-svn: 94718
* Remove the argument from EmitJumpTableInfo, because it doesn't need it.Chris Lattner2010-01-281-11/+66
| | | | | | | | Move the X86 implementation of function body emission up to AsmPrinter::EmitFunctionBody, which works by calling the virtual EmitInstruction method. llvm-svn: 94716
* Drop the argument to AsmPrinter::EmitConstantPool and make it virtual.Chris Lattner2010-01-281-2/+3
| | | | | | | Overload it in the ARM backend to do nothing, since is does insane constant pool emission. llvm-svn: 94708
* rename printVisibility to EmitVisibility and make it private,Chris Lattner2010-01-281-6/+5
| | | | | | constify EmitLinkage. llvm-svn: 94705
* If the only use of something is a DEBUG_VALUE, don'tDale Johannesen2010-01-271-0/+14
| | | | | | | let that stop it from being deleted, and change the DEBUG_VALUE value to undef. llvm-svn: 94694
* Silence GCC warnings with asserts turned off. No functionality change.Chandler Carruth2010-01-272-3/+3
| | | | llvm-svn: 94673
* add a new AsmPrinter::EmitFunctionEntryLabel virtual function,Chris Lattner2010-01-271-2/+9
| | | | | | | which allows targets to override function entry label emission. Use it to convert linux/ppc to use EmitFunctionHeader(). llvm-svn: 94667
* Eliminate target hook IsEligibleForTailCallOptimization.Evan Cheng2010-01-271-9/+0
| | | | | | | | | 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
* mcize label emission for functions.Chris Lattner2010-01-261-5/+5
| | | | llvm-svn: 94624
* use EmitLinkage for functions as well as globals. One outputChris Lattner2010-01-261-31/+4
| | | | | | | | | 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
* pull linkage emission code out to a new EmitLinkage function.Chris Lattner2010-01-261-43/+46
| | | | llvm-svn: 94621
* rearrange some directives, no functionality change.Chris Lattner2010-01-261-3/+3
| | | | llvm-svn: 94620
* remove a noop function.Chris Lattner2010-01-261-3/+0
| | | | llvm-svn: 94616
* now that enough stuff is constified, move function header printingChris Lattner2010-01-261-1/+69
| | | | | | | logic up from X86 into the common code. The other targets will hopefully start using this soon. llvm-svn: 94614
* constify a bunch of dwarf stuff now that the registerinfo methodChris Lattner2010-01-266-13/+13
| | | | | | is constified. llvm-svn: 94613
* Allow some automatic tailcall optimization without changing ABI.Evan Cheng2010-01-261-6/+1
| | | | llvm-svn: 94611
* emit jump table an alias ".set" directives through MCStreamer as Chris Lattner2010-01-262-4/+10
| | | | | | | | | | | | assignments. .set x, a-b is the same as: x = a-b llvm-svn: 94596
* Use AssertingVH, just to be paranoid.Devang Patel2010-01-261-2/+4
| | | | llvm-svn: 94593
* Emit DW_AT_containing_type attribute for a class if containing type is known.Devang Patel2010-01-261-0/+5
| | | | llvm-svn: 94587
* Eliminate SetDirective, and replace it with HasSetDirective.Chris Lattner2010-01-262-7/+7
| | | | | | | | | | | 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
* eliminate MCAsmInfo::NeedsSet: we now just use .set on any platformChris Lattner2010-01-262-8/+5
| | | | | | that has it. llvm-svn: 94581
* eliminate the TargetLowering::UsesGlobalOffsetTable bool, which isChris Lattner2010-01-262-11/+11
| | | | | | | subsumed by TargetLowering::getJumpTableEncoding(). Change uses of it to be more specific. llvm-svn: 94529
* Now that printPICJumpTableSetLabel is not overloaded,Chris Lattner2010-01-261-22/+18
| | | | | | | inline it into its only caller, allowing us to simplify it and hoist bits out of the loop. llvm-svn: 94528
* Move getJTISymbol from MachineJumpTableInfo to MachineFunction,Chris Lattner2010-01-263-25/+27
| | | | | | | | | | | | | | | | | | 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
* add a new MachineJumpTableInfo::getJTISymbol method,Chris Lattner2010-01-263-20/+40
| | | | | | use it to implement the default TargetLowering::getPICJumpTableRelocBaseExpr llvm-svn: 94523
* stub out a new target hook, need some refactoring before I canChris Lattner2010-01-261-0/+11
| | | | | | implement it. llvm-svn: 94521
* simplify asmprinter: only emit .set directives when entries haveChris Lattner2010-01-261-5/+7
| | | | | | | EK_LabelDifference32 kind and the target has .set support. Simplify X86AsmPrinter::printPICJumpTableSetLabel to make use of recent helpers. llvm-svn: 94518
* rename printPICJumpTableEntry -> EmitJumpTableEntry,Chris Lattner2010-01-261-19/+10
| | | | | | | make it private and non-virtual. It handles the non-pic case too, so just use it, simplifying EmitJumpTableInfo. llvm-svn: 94517
* add a new MachineBasicBlock::getSymbol method, replacingChris Lattner2010-01-262-15/+23
| | | | | | the AsmPrinter::GetMBBSymbol. llvm-svn: 94515
* New PBQP solver.Lang Hames2010-01-2612-2056/+1503
| | | | | | | | | * 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
* make MachineFunction keep track of its ID and make Chris Lattner2010-01-263-8/+14
| | | | | | | | MachineFunctionAnalysis dole them out, instead of having AsmPrinter do both. Have the AsmPrinter::SetupMachineFunction method set the 'AsmPrinter::MF' variable. llvm-svn: 94509
* Add support for target-specific 32-bit custom-lowered Chris Lattner2010-01-262-5/+8
| | | | | | jump table entries. llvm-svn: 94505
* switch jump table entry emission to be based on EntryKindChris Lattner2010-01-261-16/+39
| | | | | | instead of magic variables. llvm-svn: 94500
* Implement cond ? -1 : 0 with sbb.Evan Cheng2010-01-261-0/+8
| | | | llvm-svn: 94490
* Generate DEBUG_VALUE comments on x86. The (limited)Dale Johannesen2010-01-261-0/+3
| | | | | | | dbg.declare's we currently generate go through both register allocators without perturbing the results. llvm-svn: 94480
* Rearrange handling of jump tables. Highlights:Chris Lattner2010-01-256-65/+131
| | | | | | | | | | | | | | | | | | 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
* prep work to support a future where getJumpTableInfo will returnChris Lattner2010-01-251-3/+4
| | | | | | | a null pointer for functions with no jump tables. No functionality change. llvm-svn: 94469
* eliminate redundant argument to EmitJumpTableInfoChris Lattner2010-01-251-2/+3
| | | | llvm-svn: 94464
* mcstreamerize gprel32 emission.Chris Lattner2010-01-251-2/+3
| | | | llvm-svn: 94452
* mcize the non-gprel cases of AsmPrinter::printPICJumpTableEntryChris Lattner2010-01-251-13/+13
| | | | llvm-svn: 94450
* handle the _set_ symbol with an MCSymbol.Chris Lattner2010-01-251-5/+12
| | | | llvm-svn: 94449
* rename MAI::PICJumpTableDirective to MAI::GPRel32Directive toChris Lattner2010-01-251-9/+7
| | | | | | make it clear what it is, instead of how it is used. llvm-svn: 94448
* pull the non-pic jump table case out of printPICJumpTableEntryChris Lattner2010-01-251-10/+13
| | | | | | | and MCize the non-pic case. Now printPICJumpTableEntry really is just about printing PIC entries. llvm-svn: 94446
* remove JumpTableDirective, it is always null.Chris Lattner2010-01-251-1/+2
| | | | llvm-svn: 94445
* sink an arm specific method out of asmprinter into the ARMAsmPrinter andChris Lattner2010-01-251-13/+0
| | | | | | rename it to avoid shadowing. llvm-svn: 94440
OpenPOWER on IntegriCloud