- Jan 27, 2010
-
-
Chris Lattner authored
llvm-svn: 94616
-
Jakob Stoklund Olesen authored
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
-
Chris Lattner authored
logic up from X86 into the common code. The other targets will hopefully start using this soon. llvm-svn: 94614
-
Chris Lattner authored
is constified. llvm-svn: 94613
-
Chris Lattner authored
llvm-svn: 94612
-
Evan Cheng authored
llvm-svn: 94611
-
Evan Cheng authored
llvm-svn: 94610
-
- Jan 26, 2010
-
-
Chris Lattner authored
llvm-svn: 94601
-
Chris Lattner authored
assignments. .set x, a-b is the same as: x = a-b llvm-svn: 94596
-
Chris Lattner authored
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
-
Devang Patel authored
llvm-svn: 94593
-
Jakob Stoklund Olesen authored
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
-
Jakob Stoklund Olesen authored
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
-
Jakob Stoklund Olesen authored
Save a few bytes by allocating the correct size vector. No functional change intended. llvm-svn: 94589
-
Devang Patel authored
llvm-svn: 94587
-
Devang Patel authored
Add extra element to composite type. This new element will be used to record c++ class that holds current class's vtable. llvm-svn: 94586
-
Chris Lattner authored
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
-
Evan Cheng authored
llvm-svn: 94583
-
Rafael Espindola authored
Original patch by Sandeep Patel and updated by me. llvm-svn: 94582
-
Chris Lattner authored
that has it. llvm-svn: 94581
-
Chris Lattner authored
llvm-svn: 94580
-
Dan Gohman authored
and clean up some loose ends. llvm-svn: 94572
-
Evan Cheng authored
llvm-svn: 94570
-
Victor Hernandez authored
llvm-svn: 94567
-
Dan Gohman authored
llvm-svn: 94562
-
Dan Gohman authored
llvm-svn: 94560
-
Dan Gohman authored
llvm-svn: 94558
-
Dan Gohman authored
than an iteration count. llvm-svn: 94549
-
Dan Gohman authored
in the case of empty and full ranges. llvm-svn: 94548
-
Dan Gohman authored
wrapping that Duncan pointed out. llvm-svn: 94547
-
Mikhail Glushenkov authored
llvm-svn: 94544
-
Chris Lattner authored
subsumed by TargetLowering::getJumpTableEncoding(). Change uses of it to be more specific. llvm-svn: 94529
-
Chris Lattner authored
inline it into its only caller, allowing us to simplify it and hoist bits out of the loop. llvm-svn: 94528
-
Chris Lattner authored
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
-
Chris Lattner authored
use it to implement the default TargetLowering::getPICJumpTableRelocBaseExpr llvm-svn: 94523
-
Chris Lattner authored
implement it. llvm-svn: 94521
-
Chris Lattner authored
EK_LabelDifference32 kind and the target has .set support. Simplify X86AsmPrinter::printPICJumpTableSetLabel to make use of recent helpers. llvm-svn: 94518
-
Chris Lattner authored
make it private and non-virtual. It handles the non-pic case too, so just use it, simplifying EmitJumpTableInfo. llvm-svn: 94517
-
Chris Lattner authored
jump table entry kind, instead of overloading AsmPrinter::printPICJumpTableEntry. This has a pretty horrible and inefficient FIXME around how @GOTOFF is currently smashed into the mcsymbol name, but otherwise this is much cleaner. llvm-svn: 94516
-
Chris Lattner authored
the AsmPrinter::GetMBBSymbol. llvm-svn: 94515
-