summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Silence GCC warnings with asserts turned off. No functionality change.Chandler Carruth2010-01-272-3/+3
| | | | llvm-svn: 94673
* Make SMDiagnostic::Print a const method.Mikhail Glushenkov2010-01-271-1/+1
| | | | llvm-svn: 94672
* Trailing whitespace.Mikhail Glushenkov2010-01-271-19/+19
| | | | llvm-svn: 94671
* add a new AsmPrinter::EmitFunctionEntryLabel virtual function,Chris Lattner2010-01-272-55/+32
| | | | | | | which allows targets to override function entry label emission. Use it to convert linux/ppc to use EmitFunctionHeader(). llvm-svn: 94667
* Perform trivial tail call optimization for callees with "C" ABI. These are doneEvan Cheng2010-01-272-5/+30
| | | | | | | | | 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
* merge two ifsChris Lattner2010-01-271-3/+1
| | | | llvm-svn: 94650
* some cleanups.Chris Lattner2010-01-271-14/+15
| | | | llvm-svn: 94649
* no need to check for nullChris Lattner2010-01-271-1/+1
| | | | llvm-svn: 94648
* ppc/linux isn't ready for this and it was an accident that it was included.Chris Lattner2010-01-271-2/+0
| | | | | | This should fix a bunch of linux buildbot failures. llvm-svn: 94643
* When converting dbg.declare to dbg.value, attach promoted store's debug ↵Victor Hernandez2010-01-271-1/+4
| | | | | | metadata to dbg.value llvm-svn: 94634
* Linker needs to do deep-copy of function-local metadata to update references ↵Victor Hernandez2010-01-271-1/+13
| | | | | | to function arguments llvm-svn: 94632
* use existing basic block numbers instead of recomputing Chris Lattner2010-01-271-23/+4
| | | | | | a new set of them. llvm-svn: 94631
* Switch MSP430, CellSPU, SystemZ, Darwin/PPC, Alpha, and Sparc to Chris Lattner2010-01-277-210/+16
| | | | | | | | EmitFunctionHeader: 7 files changed, 16 insertions(+), 210 deletions(-) llvm-svn: 94630
* Clarify what -tailcallopt option actually do.Evan Cheng2010-01-271-1/+1
| | | | llvm-svn: 94628
* Adjust setjmp instruction sequence to not need 32-bit alignment paddingJim Grosbach2010-01-272-5/+4
| | | | llvm-svn: 94627
* Eliminate target hook IsEligibleForTailCallOptimization.Evan Cheng2010-01-2725-70/+83
| | | | | | | | | 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
* Restore to pre-94570 state.Evan Cheng2010-01-271-0/+6
| | | | llvm-svn: 94625
* 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-262-32/+5
| | | | | | | | | 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
* Avoid extra calls to MD->getNumOperands()Victor Hernandez2010-01-261-1/+1
| | | | llvm-svn: 94618
* Ignore 'forced' tailcall opt in fastisel mode.Evan Cheng2010-01-261-5/+0
| | | | llvm-svn: 94617
* remove a noop function.Chris Lattner2010-01-261-3/+0
| | | | llvm-svn: 94616
* Fix inline cost predictions with SCIENCE.Jakob Stoklund Olesen2010-01-261-28/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | After running a batch of measurements, it is clear that the inliner metrics need some adjustments: Own argument bonus: 20 -> 5 Outgoing argument penalty: 0 -> 5 Alloca bonus: 10 -> 5 Constant instr bonus: 7 -> 5 Dead successor bonus: 40 -> 5*(avg instrs/block) The new cost metrics are generaly 25 points higher than before, so we may need to move thresholds. With this change, InlineConstants::CallPenalty becomes a political correction: if (!isa<IntrinsicInst>(II) && !callIsSmall(CS.getCalledFunction())) NumInsts += InlineConstants::CallPenalty + CS.arg_size(); The code size is accurately modelled by CS.arg_size(). CallPenalty is added because calls tend to take a long time, so it may not be worth it to inline a function with lots of calls. All of the political corrections are in the InlineConstants namespace: IndirectCallBonus, CallPenalty, LastCallToStaticBonus, ColdccPenalty, NoreturnPenalty. llvm-svn: 94615
* now that enough stuff is constified, move function header printingChris Lattner2010-01-263-89/+91
| | | | | | | 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
* constify a method argument.Chris Lattner2010-01-267-16/+19
| | | | llvm-svn: 94612
* Allow some automatic tailcall optimization without changing ABI.Evan Cheng2010-01-261-6/+1
| | | | llvm-svn: 94611
* Delete blank lines that bug me.Evan Cheng2010-01-261-2/+0
| | | | llvm-svn: 94610
* call emitconstantpool and emitjumptable like other targets.Chris Lattner2010-01-261-0/+4
| | | | llvm-svn: 94601
* 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
* fix CastInst::castIsValid to reject aggregate types, fixing PR6153:Chris Lattner2010-01-262-31/+20
| | | | | | | | llvm-as: t.ll:1:25: error: invalid cast opcode for cast from '[4 x i8]' to '[1 x i32]' @x = constant [1 x i32] bitcast ([4 x i8] c"abcd" to [1 x i32]) ^ llvm-svn: 94595
* Use AssertingVH, just to be paranoid.Devang Patel2010-01-261-2/+4
| | | | llvm-svn: 94593
* Revert test polarity to match comment and desired outcome. Remove undeserved ↵Jakob Stoklund Olesen2010-01-261-2/+2
| | | | | | | | | | | | | | bonus. A GEP with all constant indices is already considered free by analyzeBasicBlock(), so don't give it an extra bonus in CountCodeReductionForAlloca(). This patch should remove a small positive bias toward inlining functions with variable-index GEPs, and remove a smaller negative bias from functions with all-constant index GEPs. llvm-svn: 94591
* Remove dead code.Jakob Stoklund Olesen2010-01-261-3/+0
| | | | | | | | | | Functions containing indirectbr are marked NeverInline by analyzeBasicBlock(), so there is no point in giving indirectbr special treatment in CountCodeReductionForConstant. It is never called. No functional change intended. llvm-svn: 94590
* Skip calculation of ArgumentWeights if it will never be used.Jakob Stoklund Olesen2010-01-261-0/+6
| | | | | | | | Save a few bytes by allocating the correct size vector. No functional change intended. llvm-svn: 94589
* Emit DW_AT_containing_type attribute for a class if containing type is known.Devang Patel2010-01-261-0/+5
| | | | llvm-svn: 94587
* Add extra element to composite type. This new element will be used to record ↵Devang Patel2010-01-261-3/+5
| | | | | | c++ class that holds current class's vtable. llvm-svn: 94586
* Eliminate SetDirective, and replace it with HasSetDirective.Chris Lattner2010-01-2619-22/+15
| | | | | | | | | | | 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
* Delete dead code.Evan Cheng2010-01-262-7/+0
| | | | llvm-svn: 94583
* Emit .comm alignment in bytes but .align in powers of 2 for ARM ELF.Rafael Espindola2010-01-265-2/+7
| | | | | | Original patch by Sandeep Patel and updated by me. llvm-svn: 94582
* eliminate MCAsmInfo::NeedsSet: we now just use .set on any platformChris Lattner2010-01-265-11/+5
| | | | | | that has it. llvm-svn: 94581
* don't set to the default value.Chris Lattner2010-01-261-1/+0
| | | | llvm-svn: 94580
* Make the unsigned-range code more consistent with the signed-range code,Dan Gohman2010-01-261-25/+29
| | | | | | and clean up some loose ends. llvm-svn: 94572
* Code refactoring, no functionality change.Evan Cheng2010-01-263-28/+27
| | | | llvm-svn: 94570
* Switch AllocaDbgDeclares to SmallVector and don't leak DIFactoryVictor Hernandez2010-01-261-1/+4
| | | | llvm-svn: 94567
* Fix a typo in a comment that Duncan noticed.Dan Gohman2010-01-261-1/+1
| | | | llvm-svn: 94562
* Remove SIL, DIL, and BPL from the GR8_NOREX allocation order also.Dan Gohman2010-01-261-11/+5
| | | | llvm-svn: 94560
* SIL, DIL, BPL, and SPL require a REX prefix.Dan Gohman2010-01-261-6/+3
| | | | llvm-svn: 94558
OpenPOWER on IntegriCloud