Commit Graph

35909 Commits

Author SHA1 Message Date
Chris Lattner
4129ccdb70 Switch MSP430, CellSPU, SystemZ, Darwin/PPC, Alpha, and Sparc to
EmitFunctionHeader:

7 files changed, 16 insertions(+), 210 deletions(-)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94630 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27 00:17:20 +00:00
Evan Cheng
8c86db58c8 Clarify what -tailcallopt option actually do.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94628 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27 00:10:09 +00:00
Jim Grosbach
c90a153ad0 Adjust setjmp instruction sequence to not need 32-bit alignment padding
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94627 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27 00:07:20 +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
Evan Cheng
381993f1f2 Restore to pre-94570 state.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94625 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27 00:00:57 +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
Victor Hernandez
0c81e34a54 Avoid extra calls to MD->getNumOperands()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94618 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 23:29:09 +00:00
Evan Cheng
bbba00c8fa Ignore 'forced' tailcall opt in fastisel mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94617 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 23:28:40 +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
Jakob Stoklund Olesen
43cda021d9 Fix inline cost predictions with SCIENCE.
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94615 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 23:21:56 +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
Chris Lattner
30c6b75ac2 constify a method argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94612 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 23:15:09 +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
Evan Cheng
1613f40bab Delete blank lines that bug me.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94610 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 23:07:57 +00:00
Chris Lattner
844be89d2d call emitconstantpool and emitjumptable like other targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94601 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 22:06:58 +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
Chris Lattner
0b68a009f6 fix CastInst::castIsValid to reject aggregate types, fixing PR6153:
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])
                        ^



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94595 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 21:51:43 +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
Jakob Stoklund Olesen
026ac3ada5 Revert test polarity to match comment and desired outcome. Remove undeserved 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94591 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 21:31:35 +00:00
Jakob Stoklund Olesen
2cd455f363 Remove dead code.
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94590 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 21:31:30 +00:00
Jakob Stoklund Olesen
e3039b6712 Skip calculation of ArgumentWeights if it will never be used.
Save a few bytes by allocating the correct size vector.

No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94589 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 21:31:24 +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
Devang Patel
0fd7f9d7ff Add extra element to composite type. This new element will be used to record c++ class that holds current class's vtable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94586 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 21:14:59 +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
Evan Cheng
2a531673b9 Delete dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94583 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 20:36:21 +00:00
Rafael Espindola
2e2563bf8e Emit .comm alignment in bytes but .align in powers of 2 for ARM ELF.
Original patch by Sandeep Patel and updated by me.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94582 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 20:21:43 +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
b3732fbabd don't set to the default value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94580 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 20:17:34 +00:00
Dan Gohman
c9c36cb3d9 Make the unsigned-range code more consistent with the signed-range code,
and clean up some loose ends.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94572 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 19:19:05 +00:00
Evan Cheng
ddc419c581 Code refactoring, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94570 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 19:04:47 +00:00
Victor Hernandez
d044612489 Switch AllocaDbgDeclares to SmallVector and don't leak DIFactory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94567 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 18:57:53 +00:00
Dan Gohman
155eec7fa9 Fix a typo in a comment that Duncan noticed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94562 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 18:32:54 +00:00
Dan Gohman
ea32d8f465 Remove SIL, DIL, and BPL from the GR8_NOREX allocation order also.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94560 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 18:30:24 +00:00
Dan Gohman
369d4b4c2e SIL, DIL, BPL, and SPL require a REX prefix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94558 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 18:14:22 +00:00
Dan Gohman
93dacadb46 Rename ItCount to BECount, since it holds a backedge-taken count rather
than an iteration count.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94549 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 16:46:18 +00:00
Dan Gohman
f21107c07a Fix ICmpInst::makeConstantRange to use ConstantRange's API properly
in the case of empty and full ranges.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94548 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 16:04:20 +00:00
Dan Gohman
8dcc58e6b4 Fix a typo that several people pointed out. Also, address the case of
wrapping that Duncan pointed out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94547 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 15:56:18 +00:00
Mikhail Glushenkov
21e099a779 Better error message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94544 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 14:55:16 +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
c64daabb70 implement X86 @GOTOFF jump table entries with the new EK_Custom32
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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94516 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 05:02:42 +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
Dan Gohman
52fddd3e36 Fix the the ceiling-division used in computing the MaxBECount so that it doesn't
have trouble with an intermediate add overflowing. Also, be more conservative
about the case where the induction variable in an SLT loop exit can step past
the RHS of the SLT and overflow in a single step.

Make getSignedRange more aggressive, to recover for some common cases which
the above fixes pessimized.

This addresses rdar://7561161.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94512 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 04:40:18 +00:00
Chris Lattner
1e459c4467 don't bother setting the AsmPrinter::MF ivar, now that
AsmPrinter::SetupMachineFunction sets it.  Note that systemz
and msp430 didn't.  Yay for reduced inconsistency! :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94510 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 04:38:11 +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
Dan Gohman
153f1ebeb8 Add a comment about a missed opportunity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94507 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 04:13:15 +00:00
Dan Gohman
df6d5e0394 Print empty and full sets specially.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94506 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 04:12:55 +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
Daniel Dunbar
c690aab230 Unbreak MSVC/CMake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94502 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 03:56:22 +00:00
Chris Lattner
13af11acbf make jit jump table emission be based on the EntryKind instead of magic variables.
JITInfo::getPICJumpTableEntry can probably be removed now, but I don't plan to do 
this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94501 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 03:47:15 +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
Victor Hernandez
b9768b0731 In mem2reg, for all alloca/stores that get promoted where the alloca has an associated llvm.dbg.declare instrinsic, insert an llvm.dbg.var intrinsic before each store.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94493 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 02:42:15 +00:00
Victor Hernandez
e685f230b6 Add MDNode::getIfExists(), an efficient way to determine if a value is used by metadata (since metadata does not appear in a value's use list)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94492 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 02:36:35 +00:00
Victor Hernandez
4cf292a86d Assert when debug intrinsic insert functions are passed empty arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94491 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 02:07:38 +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
11609fa2e3 Accept immediate as value of a dbg_value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94489 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 01:54:26 +00:00
Sean Callanan
7dcef4c475 Added the implementation of the Intel-specific
TargetAsmLexer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94482 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 01:00:10 +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
Sean Callanan
cf2e3d108d Added the TargetAsmLexer implementation for AT&T syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94479 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 00:08:25 +00:00
Dale Johannesen
6ec25f570f use findDebugLoc in more places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94477 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 00:03:12 +00:00
Jim Grosbach
1f9b48ad87 Minor jump table cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94475 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 23:50:13 +00:00
Chris Lattner
5e1df8d1f7 in 32-bit pic mode for targets with a GOT, x86 emits jump table
entries with @GOTOFF whih is EK_GPRel32BlockAddress.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94474 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 23:38:14 +00:00
Chris Lattner
281e7767df fix quoting problem jim noticed!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94472 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 23:28:03 +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
Chris Lattner
b1e803985d prep work to support a future where getJumpTableInfo will return
a null pointer for functions with no jump tables.  No functionality
change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94469 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 23:22:00 +00:00
Chris Lattner
da63b3ad63 add a method to get the alignment of an integer type even
when we don't have one laying around.  Useful if you don't
have an llvmcontext handy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94468 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 23:18:11 +00:00
Johnny Chen
aeb326aad7 Make it SP, LR, PC for GPR Register Class instead of LR, SP, PC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94465 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 22:54:29 +00:00
Chris Lattner
44e87255e9 eliminate redundant argument to EmitJumpTableInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94464 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 22:41:33 +00:00
Johnny Chen
541ba7dd92 Implemented ARMInstPrinter::printThumbS4ImmOperand().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94457 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 22:13:10 +00:00
Sean Callanan
436c48485c Implemented the dialect decision logic for the X86
TargetAsmLexer.  Dialect-specific lexing code will
be placed in the functions LexTokenATT() and
LexTokenIntel().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94456 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 21:59:20 +00:00
Johnny Chen
e43b6c9695 Fixed the order of GPR RegisterClass regs to be: ..., R10, R11, R12, ...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94455 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 21:56:35 +00:00
Dan Gohman
26793ed974 Fix the bitcode reader to deserialize nuw/nsw/etc. bits properly in the case
of a forward-reference, which doesn't use an "abbrev" encoding.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94454 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 21:55:39 +00:00
Chris Lattner
718fb59801 mcstreamerize gprel32 emission.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94452 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 21:28:50 +00:00
Bob Wilson
0988639963 Remove check for an impossible condition: the condition of the while loop has
already checked that TmpBB->getSinglePredecessor() is non-null.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94451 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 21:28:05 +00:00
Chris Lattner
1aca249252 mcize the non-gprel cases of AsmPrinter::printPICJumpTableEntry
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94450 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 21:22:22 +00:00
Chris Lattner
798d125659 handle the _set_ symbol with an MCSymbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94449 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 21:17:10 +00:00
Chris Lattner
78f485afb7 rename MAI::PICJumpTableDirective to MAI::GPRel32Directive to
make it clear what it is, instead of how it is used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94448 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 21:10:10 +00:00
Chris Lattner
a86106ed88 pull the non-pic jump table case out of printPICJumpTableEntry
and MCize the non-pic case.  Now printPICJumpTableEntry really
is just about printing PIC entries.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94446 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 21:01:58 +00:00
Chris Lattner
cba386ccac remove JumpTableDirective, it is always null.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94445 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 20:52:54 +00:00
Chris Lattner
0890cf124f mcize jump table symbol manipulation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94441 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 19:51:38 +00:00
Chris Lattner
bfcb09688c sink an arm specific method out of asmprinter into the ARMAsmPrinter and
rename it to avoid shadowing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94440 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 19:39:52 +00:00
Chris Lattner
3a39f8cec8 remove dead code: the x86 target never sets usesGlobalOffsetTable,
even on x86-32/elf which uses a GOT.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94439 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 19:23:04 +00:00
Chris Lattner
d32e803073 wirte up .file and .file to the mc asmparser.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94438 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 19:02:58 +00:00
Chris Lattner
a6594fc715 mcstreamerize .file and .file. This also fixes an issue where the
normal form of .file would fail if the filename had a weird character
in it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94437 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 18:58:59 +00:00
Chris Lattner
a800f7c464 emit ELF .type directives through MCStreamer instead of doing it textually.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94436 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 18:33:40 +00:00
Chris Lattner
ed0ab15170 add symbol attribute support for the ELF .type directive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94435 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 18:30:45 +00:00
Bob Wilson
032742972f Change Value::getUnderlyingObject to have the MaxLookup value specified as a
parameter with a default value, instead of just hardcoding it in the
implementation.  The limit of MaxLookup = 6 was introduced in r69151 to fix
a performance problem with O(n^2) behavior in instcombine, but the scalarrepl
pass is relying on getUnderlyingObject to go all the way back to an AllocaInst.
Making the limit part of the method signature makes it clear that by default
the result is limited and should help avoid similar problems in the future.
This fixes pr6126.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94433 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 18:26:54 +00:00
Victor Hernandez
aee6a656e8 Revert r94260 until findDbgDeclare() is made more efficient
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94432 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 17:52:13 +00:00
Chris Lattner
1947f242d4 add a comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94417 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 07:53:05 +00:00
Chris Lattner
99328add83 emit the .size directive for global variables on ELF through
mcstreamer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94416 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 07:52:13 +00:00
Chris Lattner
6559d7688e all supported target now have aligned common support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94413 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 07:29:13 +00:00
Chris Lattner
d960d3ae79 Remove support for i386 tiger tools for aligned common symbols.
Previously we would just silently miscompile code that used aligned
common's, now at least you'll get a build error.  tiger-ppc already
triggered the build error because it didn't have a version of this
logic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94412 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 07:26:17 +00:00
Chris Lattner
6c23b1f6fe don't set value to its default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94411 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 07:23:14 +00:00
Chris Lattner
4a80f4f7c8 coff targets support alignment on .comm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94410 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 07:20:44 +00:00
Jim Grosbach
546ae6ec77 ARM does accept the .comm directive alignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94408 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 04:59:07 +00:00
Rafael Espindola
f166ed7324 Fix PR6134.
We are not emitting alignments on Darwin for "bar". Not sure what is the
correct way to do it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94400 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 02:27:39 +00:00
Chris Lattner
75f9b4b63a linux/ppc does use alignment in bytes, not pow-2. This fixes PR6129.
It looks like linux/arm and linux/mips have the same setting, which 
are probably wrong.  Someone who cares about ARM and MIPS should 
investigate with the testcase in PR6129.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94381 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 20:54:45 +00:00
Chris Lattner
843cf187f7 don't reset the default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94380 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 20:53:12 +00:00
Chris Lattner
43b5f9312d make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94378 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 20:43:08 +00:00
Chris Lattner
c0f8a361f5 mark some libraries that currently require RTTI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94377 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 20:22:08 +00:00
Chris Lattner
43dc2e6d76 reassociate should do this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94374 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 20:17:09 +00:00
Chris Lattner
10c4245103 add a note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94373 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 20:01:41 +00:00
Chris Lattner
3586e5eccf fix some issues where we weren't emitting enough newlines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94370 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 19:01:06 +00:00
Chris Lattner
a801362e84 when emitting DIEs, emit the comment on the same line as the directive.
This fixes FrontendObjC/2009-11-30-Objc-ID.m


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94369 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 18:54:17 +00:00
Chris Lattner
3f6bfdaeda move PR5945 here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94350 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 02:27:03 +00:00
Chris Lattner
75f265fbbb fix a parsing problem on instructions like:
movw	$8, (_cost_table_-L97$pb)+66(%eax)

After the parens, we could still have a binop.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94345 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 01:07:33 +00:00
Mon P Wang
6fb474bd3c It seems better to scalarize vectors of size 1 instead of widening them.
Add support to widen SETCC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94342 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 00:24:43 +00:00
Chris Lattner
abb992d6a3 change the canonical form of "cond ? -1 : 0" to be
"sext cond" instead of a select.  This simplifies some instcombine
code, matches the policy for zext (cond ? 1 : 0 -> zext), and allows
us to generate better code for a testcase on ppc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94339 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 00:09:49 +00:00
Mon P Wang
eb38ebf15c Improved widening loads by adding support for wider loads if
the alignment allows.  Fixed a bug where we didn't use a
vector load/store for PR5626.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94338 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 00:05:03 +00:00
Chris Lattner
f7d0d163c5 fix a potential overflow issue Eli pointed out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94336 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 23:31:46 +00:00
Nick Lewycky
44540740ae Speculatively revert r94322 to see if it fixes darwin selfhost buildbot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94331 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 20:32:12 +00:00
Chris Lattner
d668839cb9 third bug from PR6119: the xor dupe extension allows
for arbitrary terminators in predecessors, don't assume
it is a conditional or uncond branch.  The testcase shows
an example where they can happen with switches.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94323 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 19:21:31 +00:00
Nick Lewycky
dbeecede80 Teach DAE that even though it can't modify the function signature of an
externally visible function, it can still find all callers of it and replace
the parameters to a dead argument with undef.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94322 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 19:19:34 +00:00
Chris Lattner
2dd7657a5b add an early out to ProcessBranchOnXOR to speed it up,
handle the case when we can infer an input to the xor
from all inputs that agree, instead of going into an
infinite loop.  Another part of PR6199


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94321 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 19:16:25 +00:00
Chris Lattner
8231fd1e6c fix a crash in jump threading, PR6119
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94319 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 18:56:07 +00:00
Chris Lattner
818ff34bc0 implement a simple instcombine xform that has been in the
readme forever.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94318 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 18:49:30 +00:00
Chris Lattner
a9cf5b3cc9 add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94317 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 18:42:37 +00:00
Chris Lattner
aa306c2cc1 add some notes, making posix-memalign be nocapture would be an easy improvement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94312 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 17:59:23 +00:00
Bill Wendling
187361b056 Remove the '-disable-scheduling' flag and replace it with the 'source' option of
the '-pre-RA-sched' flag. It actually makes more sense to do it this way. Also,
keep track of the SDNode ordering by default. Eventually, we would like to make
this ordering a way to break a "tie" in the scheduler. However, doing that now
breaks the "CodeGen/X86/abi-isel.ll" test for 32-bit Linux.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94308 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 10:26:57 +00:00
Benjamin Kramer
e88a8e6fbf Respect operator precedence (and silence a gcc 4.3 warning).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94304 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 09:54:23 +00:00
Chris Lattner
9eb158d5b4 mcize lcomm, simplify .comm, extend both to support 64-bit sizes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94299 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 07:47:02 +00:00
Chris Lattner
f9f93e4388 resolve a fixme: the "nonexecutable stack directive" is actually
a .section.  Switch to it with SwitchSection.

However, I think that this directive should be safe on any ELF target.
If so, we should hoist it up out of the X86 and SystemZ targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94298 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 07:21:06 +00:00
Chris Lattner
74670b26fc remove a dead call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94297 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 07:17:54 +00:00
Chris Lattner
1b46f433e0 use helpers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94296 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 07:00:21 +00:00
Chris Lattner
152a29bfa6 mcize visibility directives.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94295 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 06:53:23 +00:00
Chris Lattner
a5ad93a10a move the various directive enums out of the MCStreamer class
into a new MCDirectives.h file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94294 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 06:39:22 +00:00
Chris Lattner
52492ac0d0 Change constantexpr global variable initializers to convert the constants
to MCExpr then emit them through MCStreamer with EmitValue.  I think all
global variable initializers are now going through mcstreamer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94293 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 06:17:14 +00:00
Eric Christopher
e9625cf698 Don't lower splat vector load to relative to the esp if the
stack may be misaligned.

Update test accordingly.

Patch by Evan Cheng!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94291 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 06:02:43 +00:00
Chris Lattner
3a9be0ee36 mcstreamerize .no_dead_strip and .reference for static ctors/dtors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94290 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 05:51:36 +00:00
Eric Christopher
7672d04f77 Reapply 94059 while fixing the calling convention setup
for strcpy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94287 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 05:29:06 +00:00
Chris Lattner
d4acde2f49 remove unneeded directive set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94286 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 05:28:25 +00:00
Chris Lattner
64c2b24498 use some helpers instead of duplicating logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94285 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 05:26:25 +00:00
Chris Lattner
3924868a95 mcize jump table and constant pool entry labels, .local on elf,
and some .weak directives.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94284 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 05:19:23 +00:00
Chris Lattner
05f845314a emit .ascii and .asciz through MCStreamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94282 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 04:54:10 +00:00
Chris Lattner
33b1758e16 simplify code a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94281 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 04:42:42 +00:00
Mon P Wang
e4a0a151a5 InstCombine should not fold sext/zext of a vector and a bitcast to a scalar to a sext/zext
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94280 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 04:35:57 +00:00
Ted Kremenek
b2dc8f3b00 Update CMake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94278 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 04:01:37 +00:00
Chris Lattner
4cf202ba06 remove one form of EmitString, just use EmitBytes instead. We must
be careful to add a \0 at the end though, because EmitString didn't
do this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94277 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 03:11:46 +00:00
Sean Callanan
e88f55254c Added the skeleton for the implementation of the X86
target-specific AsmLexer, and added the appropriate
registration calls.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94275 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 02:43:15 +00:00
Sean Callanan
e9b466d4f0 Modified the register matcher function in AsmMatcher to
be static.  Also made it possible for clients to get it
and no other functions from ...GenAsmMatcher.inc by
defining REGISTERS_ONLY before including GenAsmMatcher.inc.
This sets the stage for target-specific lexers that can
identify registers and return AsmToken::Register as
appropriate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94266 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 00:40:33 +00:00
Devang Patel
2e369930dc Avoid using "Type" as the variable name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94262 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 00:26:28 +00:00
Victor Hernandez
b6aebc2f46 In mem2reg, for all alloca/stores that get promoted where the alloca has an associated llvm.dbg.declare instrinsic, insert an llvm.dbg.var intrinsic before each store
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94260 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 00:17:34 +00:00
Chris Lattner
12e555c36c teach MCAsmStreamer::EmitBytes to use .ascii and .asciz
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94259 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 00:15:00 +00:00
Victor Hernandez
06203127a7 Make sure ValueFn starts off empty
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94256 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 00:03:28 +00:00
Evan Cheng
42dae2d5ba Enable pre-regalloc scheduling load clustering by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94255 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 23:49:45 +00:00
Evan Cheng
afc36739cd Be more conservative with clustering f32 / f64 loads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94254 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 23:49:11 +00:00
Chris Lattner
faca5497a2 move "EOL" from asmprinter to dwarfprinter. It should eventually
be completely eliminated, but today is not that day.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94253 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 23:47:11 +00:00
Chris Lattner
f537ce1752 remove uses of EOL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94252 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 23:43:14 +00:00
Chris Lattner
245834dde5 add a new EmitCFAByte method and use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94251 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 23:40:08 +00:00
Chris Lattner
894d75aa01 move uleb printing from asmprinter to dwarfprinter, mcize,
cleanup and eliminate a bunch more uses of "EOL".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94250 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 23:18:42 +00:00
Jeffrey Yasskin
bf1f76b493 Make OProfile support compile again after r93630 removed
DebugLocTuple.  Also use an AssertingVH to ensure that MDNodes aren't
destroyed while the FilenameCache is using them.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94245 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 23:04:39 +00:00
Chris Lattner
bb9078a6b2 move sleb printing out of asmprinter into dwarf printer, make clients
handle the comment better, MCize the non-.sleb case.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94244 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 22:56:55 +00:00
Devang Patel
bc5201f837 Remove MetadataBase class because it is not adding significant value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94243 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 22:52:10 +00:00
Dale Johannesen
1caedd056d Ignore DEBUG_VALUE when building live intervals;
this makes the code work transparently the same
whether they're there or not.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94240 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 22:38:21 +00:00
Chris Lattner
f61ed8eb32 add a new DwarfPrinter::EmitEncodingByte method which handles
pretty printing encoding comments and eliminates redundancy on
the client side.  We now get pretty dwarf like this again:

        .byte   255                                         ## @LPStart Encoding = omit
        .byte   0                                           ## @TType Encoding = absptr
        .byte   0x28                                        ## @TType base offset
        .byte   3                                           ## Call site Encoding = udata4
        .byte   0x1a                                        ## Call site table size
...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94239 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 22:38:16 +00:00
Chris Lattner
066c9acca3 rename the dwarf class to DwarfPrinter. This matches the filename
and much more accurately describes what it is all about.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94233 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 22:23:57 +00:00
Chris Lattner
3c65335f06 fix indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94232 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 22:19:51 +00:00
Chris Lattner
0ad9c911f5 inline away the trivial AsmPrinter::EOL() method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94230 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 22:09:00 +00:00
Chris Lattner
0595324ed8 inline AsmPrinter::PrintHex into its two trivial callers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94228 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 21:57:56 +00:00
Chris Lattner
523a508576 change this to be a static function instead of a method on asmprinter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94227 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 21:50:41 +00:00
Chris Lattner
88ad3de713 make the loop comment printer print out a much better structured
output.  An example:

        .align  4, 0x90
LBB1_5:                                                     ## %while.cond3
                                                            ##   Parent Loop BB1_1 Depth=1
                                                            ## =>  This Loop Header: Depth=2
                                                            ##       Child Loop BB1_8 Depth 3
                                                            ##       Child Loop BB1_6 Depth 3



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94225 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 21:43:28 +00:00
Chris Lattner
14ca177beb Changes to fix buffering that I forgot to commit with previous patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94222 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 21:16:10 +00:00
Chris Lattner
965df54254 For blocks that are not loop headers, just print their loop depth and header BB.
For loop headers, print Inner loop along with the other stuff so it doesn't take
an extra line.  We now get stuff like this:

LBB1_4:                                                     ## %land.end
                                                            ##   in Loop: Header=BB1_1 Depth=1
        notb    %al
        testb   $1, %al
        jne     LBB1_8

and:

LBB1_6:                                                     ## %while.cond7
                                                            ## Inner Loop Header: Depth=3
                                                            ##     Inside Loop BB1_5 Depth 2
                                                            ##   Inside Loop BB1_1 Depth 1

which still isn't great for loop headers, but is much less verbose.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94221 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 21:11:06 +00:00
Chris Lattner
d8d0aee26a reenable the label loop comments and switch them to use the formatted
comment emission stuff.  I'm going to rewrite this though because the
current output doesn't make sense.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94215 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 21:00:45 +00:00
Daniel Dunbar
8a3ee718cd Mark EH_RETURN64 as CodeGenOnly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94205 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 20:16:37 +00:00
Benjamin Kramer
b0706d1859 Another strncmp -> StringRef.startswith simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94203 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 20:00:21 +00:00
Chris Lattner
0fd90fd8d1 Convert some more random-comment-printing stuff to use
AddComment and GetCommentOS.  Add a blank line between globals
(even in non-verbose mode) to make the assembly more readable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94202 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 19:52:01 +00:00
Chris Lattner
d79d9dce47 add a new MCAsmStreamer::GetCommentOS method to simplify stuff
that doesn't want to use twines.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94199 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 19:17:48 +00:00
Bob Wilson
8a23e0b07b Revert 94059. It is breaking the MultiSource/Benchmarks/Prolangs-C/bison
test on ARM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94198 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 19:16:40 +00:00
Chris Lattner
6a9157913c add missing break, PR6114, patch by M Wahab.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94197 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 19:11:53 +00:00
Victor Hernandez
02d574d7a8 Fix/strengthen verification of llvm.dbg.declare
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94195 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 19:06:12 +00:00
Victor Hernandez
29fa5e9886 Keep ignoring pointer-to-pointer bitcasts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94194 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 19:05:05 +00:00
Chris Lattner
7481ae6572 use both the Mangler and the CBE's mangler for identifiers,
this should fix a problem duncan saw handling symbols with '.' in them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94192 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 18:33:00 +00:00
Chris Lattner
d32c7cfa24 rename addComment -> AddComment for consistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94190 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 18:21:35 +00:00
Benjamin Kramer
a46918d2b1 Simplify some uses of str(n)cmp with StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94189 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 18:21:23 +00:00
Torok Edwin
b0a5baefaa Fix TimeValue::now() on Unix.
TimeValue()::now().toEpochTime() is supposed to be the same as time(),
but it wasn't, because toEpoch subtracted PosixZeroTime, but now()
didn't add PosixZeroTime!
Add a unittest to check this works.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94178 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 15:51:31 +00:00
Dan Gohman
12bdbf1ca8 Revert r94066, which was the patch which added a Verifier pass after
LoopStrengthReduce, as it's causing too much trouble (even with the
old LoopStrengthReduce code).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94172 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 10:48:28 +00:00
Chris Lattner
7d1e49c983 add comment support to the rest of the directives.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94168 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 07:36:39 +00:00
Chris Lattner
d5a7e357a2 stop using strtoll, it gives windows heartburn.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94167 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 07:34:12 +00:00
Chris Lattner
86e2211d0a Add the ability for MCStreamer to emit comments on the same line as directives.
Switch over the asm-verbose comment for double values to use it.  We now get:

_x:
	.long	343597384                                   ## double 1.231200e+02
	.long	1079953326

For example, note that the comment is on the same line as the .long.  Woo.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94166 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 07:29:22 +00:00
Chris Lattner
07404415ab pass "-fasm-verbose" into createAsmStreamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94165 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 07:06:15 +00:00
Chris Lattner
e73a31f667 Stop building RTTI information for *most* llvm libraries. Notable
missing ones are libsupport, libsystem and libvmcore.  libvmcore is
currently blocked on bugpoint, which uses EH.  Once it stops using
EH, we can switch it off.

This #if 0's out 3 unit tests, because gtest requires RTTI information.
Suggestions welcome on how to fix this.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94164 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 06:49:46 +00:00
Chris Lattner
6eeb7345f2 give PassNameParser a home.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94162 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 06:29:25 +00:00
Chris Lattner
36fe19837c add an out-of-line virtual method to CmpInst to give it a home.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94161 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 06:25:37 +00:00
Chris Lattner
476e9bd114 elimiante the dynamic_cast's from opt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94160 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 06:03:06 +00:00
Chris Lattner
c5e5b3c830 drop the pass name from the output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94158 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 05:52:51 +00:00
Chris Lattner
5a66cb9a44 eliminate dynamic_cast from this file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94157 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 05:46:59 +00:00
Chris Lattner
77c95ed74a eliminate a bunch more unneeded dynamic_cast's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94156 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 05:37:10 +00:00
Chris Lattner
3660ecabbb eliminate a bunch of dynamic_cast's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94155 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 05:24:46 +00:00
Chris Lattner
5e664b8f7c eliminate a bunch of dynamic_cast's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94154 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 04:55:08 +00:00
Evan Cheng
c589e03865 Teach pre-regalloc scheduler to schedule loads from nearby addresses. It may improve cache locality. This is controlled by -cluster-loads for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94148 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 03:36:51 +00:00
Evan Cheng
96dc115ef3 Add two target hooks to determine whether two loads are near and should be scheduled together.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94147 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 03:34:51 +00:00
Chris Lattner
46dc583ad5 add new file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94132 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 01:58:44 +00:00
Chris Lattner
be343b3ca3 move some files out of the llvm-mc tool into the MCParser library so
other tools can link it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94131 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 01:58:08 +00:00
Chris Lattner
0d6eee44d0 forgot to svn add these, doh.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94130 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 01:55:10 +00:00
Chris Lattner
c6ef277a0b create a new MCParser library and move some stuff into it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94129 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 01:44:57 +00:00
Chris Lattner
af0d301f43 stub out a new TargetAsmLexer interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94125 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 00:58:59 +00:00
Dan Gohman
7979b72feb Revert LoopStrengthReduce.cpp to pre-r94061 for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94123 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 00:46:49 +00:00
Jim Grosbach
d5d2baec26 Fix PR5694. The CMN instructions set the flags differently from CMP, so they
cannot be directly interchanged for comparisons against negated values.
Disable the CMN instructions for the time being.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94119 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 00:08:13 +00:00
Victor Hernandez
edd7966809 No need to look through bitcasts for DbgInfoIntrinsic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94114 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21 23:09:12 +00:00
Victor Hernandez
e31dc355b2 DbgInfoIntrinsic no longer appear in an instruction's use list
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94113 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21 23:08:36 +00:00
Victor Hernandez
a4c77622f7 No need to look through bitcasts for DbgInfoIntrinsic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94112 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21 23:07:15 +00:00
Victor Hernandez
6c146eefbf DbgInfoIntrinsics no longer appear in an instruction's use list; so clean up looking for them in use iterations and remove OnlyUsedByDbgInfoIntrinsics()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94111 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21 23:05:53 +00:00
Dan Gohman
eca35b76ce When inserting expressions for post-increment users which contain
loop-variant components, adds must be inserted after the increment.
Keep track of the increment position for this case, and insert
these adds in the correct location.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94110 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21 23:01:22 +00:00
Dan Gohman
940bd3e236 Include IVUsers information in LSR's debug output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94108 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21 22:46:32 +00:00
Dan Gohman
8b0ade3eb8 Prune the search for candidate formulae if the number of register
operands exceeds the number of registers used in the initial
solution, as that wouldn't lead to a profitable solution anyway.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94107 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21 22:42:49 +00:00
Evan Cheng
80ffc965f5 Trim unneeded includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94105 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21 21:44:43 +00:00
Dan Gohman
2f524587b6 Add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94104 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21 21:31:09 +00:00
Chris Lattner
839a0159c4 It turns out that this #include is needed because otherwise
ValueMapper.cpp ends up calling an out of line 
__ZNK4llvm12PATypeHolder3getEv, which is a template and llvm-config
determines arbitrarily to use the one in libipo.  This sucks, but
keeping the #include is a reasonable workaround.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94103 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21 21:29:25 +00:00
Chris Lattner
7bc3bcebb0 unbreak the build, apparently without this transformutils starts depending on libipa?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94102 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21 21:20:51 +00:00
Chris Lattner
1b3ef34b75 tidy up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94101 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21 21:05:54 +00:00
Chris Lattner
d3a6d90da7 tidy up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94100 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21 21:01:47 +00:00
Chris Lattner
717ce2b8d8 remove dead .erase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94098 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21 20:43:39 +00:00
Jim Grosbach
f38a33cd0a back this out for now. Growing Function is not good.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94097 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21 20:10:22 +00:00
Chris Lattner
26141721d5 fix a problem with a missing _, testcase pending.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94095 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21 19:58:19 +00:00
Victor Hernandez
589423cd63 Don't need to include IntrinsicInst.h any more
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94092 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21 19:33:59 +00:00
Victor Hernandez
f42fae1674 No need to map NULL operands of metadata
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94091 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21 19:26:20 +00:00
Dan Gohman
82b5a30724 Make the parser include the lower level error message in its own error
message, to be more informative.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94072 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21 10:15:06 +00:00
Dan Gohman
5e5442c98b Avoid printing a spurious semicolon when there is no filename.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94071 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21 10:13:27 +00:00
Dan Gohman
c37e3d5d7c When re-using an existing cast for a user, it's still necessary to call
rememberInstruction so that future users of that user will be inserted
in the correct position. This fixes the Darwin selfhost.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94070 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21 10:08:42 +00:00
Nick Lewycky
401f3258f6 Fix a crasher trying to fold each element in a comparison between two vectors
if one of the vectors didn't have elements (such as undef). Fixes PR 6096.

Fix an issue in the constant folder where fcmp (<2 x %ty>, <2 x %ty>) would
have <2 x i1> type if constant folding was successful and i1 type if it wasn't.
This exposed a related issue in the bitcode reader.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94069 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21 07:03:21 +00:00
Dan Gohman
fca3706478 Run the verifier after LSR, to help catch use-before-def errors before
they reach codegen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94066 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21 03:51:36 +00:00
Dan Gohman
a10756ee65 Re-implement the main strength-reduction portion of LoopStrengthReduction.
This new version is much more aggressive about doing "full" reduction in
cases where it reduces register pressure, and also more aggressive about
rewriting induction variables to count down (or up) to zero when doing so
reduces register pressure.

It currently uses fairly simplistic algorithms for finding reuse
opportunities, but it introduces a new framework allows it to combine
multiple strategies at once to form hybrid solutions, instead of doing
all full-reduction or all base+index.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94061 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21 02:09:26 +00:00
Eric Christopher
ed1a4c7eab Add strcpy_chk -> strcpy support for "don't know" object size
answers.  This will update as object size checking gets better information.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94059 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21 01:04:38 +00:00
Evan Cheng
94da721d8c Fix a minor issue in x86 load / store folding table. movups does an unaligned load so it doesn't require 16-byte alignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94058 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21 00:55:14 +00:00
Jim Grosbach
d0a0c382ea Make sure that landing pad entries in the EH call site table are in the proper
order for SjLj style exception handling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94055 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21 00:43:30 +00:00
Chris Lattner
0527344853 simplify this code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94048 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-20 23:30:28 +00:00
Jim Grosbach
8d77cc8c5f SjLj EH introduces can introduce an additional edge to a landing pad and pad
normalization needs to take this into account.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94046 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-20 23:03:55 +00:00
Chris Lattner
73a1aa0966 eliminate FnStubInfo, using MachineModuleInfoMachO instead.
this makes function stub emission determinstic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94033 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-20 21:36:48 +00:00
Dale Johannesen
73e884bb3e make findDebugLoc a class method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94032 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-20 21:36:02 +00:00
Chris Lattner
917d628256 split function stub printing out to its own function,
no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94030 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-20 21:19:44 +00:00
Chris Lattner
d3ec0b5446 eliminate the GVStubs and HiddenGVStubs maps, and use
MachineModuleInfoMachO instead.  This eliminates two sources
of nondeterministic output in the ppc backend, but function
stubs are still bad.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94029 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-20 21:16:14 +00:00
Chris Lattner
0e94facb5f don't forget to initialize an instance variable!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94021 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-20 20:48:59 +00:00
David Greene
cf495bc2e5 When XDEBUG is enabled, check for SelectionDAG cycles at some key
points.  This will help us find future problems like the one
described in PR6019.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94019 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-20 20:13:31 +00:00
Chris Lattner
1bc76d48d4 adopt getAdjustedAnalysisPointer in a few more passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94018 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-20 20:09:02 +00:00
Chris Lattner
fc570e4bff adopt getAdjustedAnalysisPointer in two more passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94017 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-20 19:53:32 +00:00
Chris Lattner
cdac3a380b adopt getAdjustedAnalysisPointer in BasicCallGraph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94015 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-20 19:51:46 +00:00
Chris Lattner
2033097b1f add some new methods to adjust this pointers. Not used yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94013 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-20 19:26:14 +00:00
Chris Lattner
b0bedd6ebb don't send null pointers through the constantexpr codepath unneededly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94010 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-20 17:57:50 +00:00
Chris Lattner
f958dd2e1c reduce redundant are's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94008 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-20 17:53:51 +00:00