Commit Graph

10965 Commits

Author SHA1 Message Date
Duncan Sands 6c25ca4f2b When passing a parameter using the 'byval' mechanism, inline code needs to be used
to perform the copy, which may be of lots of memory [*].  It would be good if the
fall-back code generated something reasonable, i.e. did the copy in a loop, rather
than vast numbers of loads and stores.  Add a note about this.  Currently target
specific code seems to always kick in so this is more of a theoretical issue rather
than a practical one now that X86 has been fixed.
[*] It's amazing how often people pass mega-byte long arrays by copy...

llvm-svn: 118275
2010-11-05 15:20:29 +00:00
Rafael Espindola 38d0756b88 Add 118023 back, but with proper spelling for .uleb128/.sleb128.
llvm-svn: 118254
2010-11-04 18:17:08 +00:00
Rafael Espindola bbc0ac2236 Revert previous patch. Some targets don't support uleb and say
they do :-(

llvm-svn: 118250
2010-11-04 17:04:24 +00:00
Rafael Espindola cfd6243940 MCize.
llvm-svn: 118249
2010-11-04 16:32:18 +00:00
Duncan Sands 71049f78ed In the calling convention logic, ValVT is always a legal type,
and as such can be represented by an MVT - the more complicated
EVT is not needed.  Use MVT for ValVT everywhere.

llvm-svn: 118245
2010-11-04 10:49:57 +00:00
Jakob Stoklund Olesen a2e098df12 Disable fancy splitting during spilling unless -extra-spiller-splits is given.
This way, InlineSpiller does the same amount of splitting as the standard
spiller. Splitting should really be guided by the register allocator, and
doesn't belong in the spiller at all.

llvm-svn: 118216
2010-11-04 00:32:32 +00:00
Eric Christopher c6418b105a Just return undef for invalid masks or elts, and since we're doing that,
just do it earlier too.

llvm-svn: 118195
2010-11-03 20:44:42 +00:00
Jakob Stoklund Olesen c913201259 Let RegAllocBasic require MachineDominators - they are already available and
splitting needs them.

llvm-svn: 118194
2010-11-03 20:39:26 +00:00
Jakob Stoklund Olesen cbbd819248 Tag debug output as regalloc
llvm-svn: 118193
2010-11-03 20:39:23 +00:00
Duncan Sands 1462777017 Simplify uses of MVT and EVT. An MVT can be compared directly
with a SimpleValueType, while an EVT supports equality and
inequality comparisons with SimpleValueType.

llvm-svn: 118169
2010-11-03 12:17:33 +00:00
Duncan Sands f5dda01f33 Inside the calling convention logic LocVT is always a simple
value type, so there is no point in passing it around using
an EVT.  Use the simpler MVT everywhere.  Rather than trying
to propagate this information maximally in all the code that
using the calling convention stuff, I chose to do a mainly
low impact change instead.

llvm-svn: 118167
2010-11-03 11:35:31 +00:00
Eric Christopher fcc9e6848a If we have an undef mask our Elt will be -1 for our access, handle
this by using an undef as a pointer.

Fixes rdar://8625016

llvm-svn: 118164
2010-11-03 09:36:40 +00:00
Dan Gohman 68fb004616 Fix DAGCombiner to avoid going into an infinite loop when it
encounters (and:i64 (shl:i64 (load:i64), 1), 0xffffffff).
This fixes rdar://8606584.

llvm-svn: 118143
2010-11-03 01:47:46 +00:00
Evan Cheng debf9c502a Two sets of changes. Sorry they are intermingled.
1. Fix pre-ra scheduler so it doesn't try to push instructions above calls to
   "optimize for latency". Call instructions don't have the right latency and
   this is more likely to use introduce spills.
2. Fix if-converter cost function. For ARM, it should use instruction latencies,
   not # of micro-ops since multi-latency instructions is completely executed
   even when the predicate is false. Also, some instruction will be "slower"
   when they are predicated due to the register def becoming implicit input.
   rdar://8598427

llvm-svn: 118135
2010-11-03 00:45:17 +00:00
Andrew Trick 82ae9a95a5 Fixes <rdar://problem/8612856>: During postRAsched, the antidependence
breaker needs to check all definitions of the antidepenent register to
avoid multiple defs of the same new register.

llvm-svn: 118032
2010-11-02 18:16:45 +00:00
Devang Patel e755966913 Simplify.
llvm-svn: 118027
2010-11-02 17:37:00 +00:00
Devang Patel bc741405a7 If value map does not have register for an argument then try to find frame index before giving up.
llvm-svn: 118022
2010-11-02 17:19:03 +00:00
Devang Patel 94f2a2578c Use frameindex, if available, as a last resort to emit debug info for a parameter.
llvm-svn: 118020
2010-11-02 17:01:30 +00:00
Jakob Stoklund Olesen ea26319185 Don't try to split weird critical edges that really aren't:
BB#1: derived from LLVM BB %bb.nph28
    Live Ins: %AL
    Predecessors according to CFG: BB#0
	TEST8rr %reg16384<kill>, %reg16384, %EFLAGS<imp-def>; GR8:%reg16384
	JNE_4 <BB#2>, %EFLAGS<imp-use,kill>
	JMP_4 <BB#2>
    Successors according to CFG: BB#2 BB#2

These double CFG edges only ever occur in bugpoint-generated code, so there is
no need to attempt something clever.

llvm-svn: 117992
2010-11-02 00:58:37 +00:00
Jakob Stoklund Olesen 5c86d22e67 MachineLICM should not claim to be preserving the CFG when it can split critical
edges on demand.

llvm-svn: 117982
2010-11-01 23:59:55 +00:00
Jakob Stoklund Olesen 2551f13c83 Be more precise about verifying missing kill flags.
It is legal for an instruction to have two operands using the same register,
only one a kill. This is interpreted as a kill.

llvm-svn: 117981
2010-11-01 23:59:53 +00:00
Jakob Stoklund Olesen 1e32688e4c When inserting copies during splitting, always use the parent register as the
source, and let rewrite() clean it up.

This way, kill flags on the inserted copies are fixed as well during rewrite().

We can't just assume that all the copies we insert are going to be kills since
critical edges into loop headers sometimes require both source and dest to be
live out of a block.

llvm-svn: 117980
2010-11-01 23:59:48 +00:00
Jakob Stoklund Olesen d7a824006e Add kill flag verification.
At least X86FloatingPoint requires correct kill flags after register allocation,
and targets using register scavenging benefit. Conservative kill flags are not
enough.

llvm-svn: 117960
2010-11-01 21:51:31 +00:00
Jakob Stoklund Olesen a5d4b4ffa2 Update kill flags while rewriting instructions after splitting.
llvm-svn: 117959
2010-11-01 21:51:29 +00:00
Bill Wendling c6627eec13 When we look at instructions to convert to setting the 's' flag, we need to look
at more than those which define CPSR. You can have this situation:

(1)  subs  ...
(2)  sub   r6, r5, r4
(3)  movge ...
(4)  cmp   r6, 0
(5)  movge ...

We cannot convert (2) to "subs" because (3) is using the CPSR set by
(1). There's an analogous situation here:

(1)  sub   r1, r2, r3
(2)  sub   r4, r5, r6
(3)  cmp   r4, ...
(5)  movge ...
(6)  cmp   r1, ...
(7)  movge ...

We cannot convert (1) to "subs" because of the intervening use of CPSR.

llvm-svn: 117950
2010-11-01 20:41:43 +00:00
Jakob Stoklund Olesen ba9a4985a2 Don't assign new registers created during a split to the same stack slot, but
give them individual stack slots once the are actually spilled.

llvm-svn: 117945
2010-11-01 19:49:57 +00:00
Jakob Stoklund Olesen 31fffb62d9 Add basic LiveStacks verification.
When an instruction refers to a spill slot with a LiveStacks entry, check that
the spill slot is live at the instruction.

llvm-svn: 117944
2010-11-01 19:49:52 +00:00
Bill Wendling 7a23c1fb7d The testcase is now XFAILed. Sorry about the breakage.
llvm-svn: 117904
2010-11-01 05:50:55 +00:00
Eric Christopher ef5a1c3ec3 Revert r117876 for now, it's causing more testsuite failures.
llvm-svn: 117879
2010-10-31 22:42:55 +00:00
Bill Wendling 0392f1b437 Disable the peephole optimizer until 186.crafty on armv6 is fixed. This is what
looks like is happening:

Without the peephole optimizer:
  (1)   sub     r6, r6, #32
        orr     r12, r12, lr, lsl r9
        orr     r2, r2, r3, lsl r10
  (x)   cmp     r6, #0
        ldr     r9, LCPI2_10
        ldr     r10, LCPI2_11
  (2)   sub     r8, r8, #32
  (a)   movge   r12, lr, lsr r6
  (y)   cmp     r8, #0
LPC2_10:
        ldr     lr, [pc, r10]
  (b)   movge   r2, r3, lsr r8

With the peephole optimizer:
        ldr     r9, LCPI2_10
        ldr     r10, LCPI2_11
  (1*)  subs    r6, r6, #32
  (2*)  subs    r8, r8, #32
  (a*)  movge   r12, lr, lsr r6
  (b*)  movge   r2, r3, lsr r8

(1) is used by (x) for the conditional move at (a). (2) is used by (y) for the
conditional move at (b). After the peephole optimizer, these the flags resulting
from (1*) are ignored and only the flags from (2*) are considered for both
conditional moves.

llvm-svn: 117876
2010-10-31 22:07:12 +00:00
Nicolas Geoffray 3dbe6cc155 Attach a GCModuleInfo to a MachineFunction.
llvm-svn: 117867
2010-10-31 20:38:38 +00:00
Jakob Stoklund Olesen 80717dd7c6 Include MachineBasicBlock numbers in viewCFG() output.
llvm-svn: 117765
2010-10-30 01:26:19 +00:00
Jakob Stoklund Olesen 0cfc497f19 Make sure copies are inserted after any exception handling labels at the top of
a basic block.

llvm-svn: 117764
2010-10-30 01:26:16 +00:00
Jakob Stoklund Olesen ef54185724 Add SkipPHIsAndLabels from PHIElimination to MachineBasicBlock. It is needed
elsewhere.

llvm-svn: 117763
2010-10-30 01:26:14 +00:00
Jakob Stoklund Olesen db84d8f4fd Disable more of physical register live intervals verification.
llvm-svn: 117762
2010-10-30 01:26:11 +00:00
Jakob Stoklund Olesen 6d808331ae Print out register class of spilled register.
llvm-svn: 117761
2010-10-30 01:26:09 +00:00
Evan Cheng 2b3f25e031 Teach machine cse to eliminate instructions with multiple physreg uses and defs. rdar://8610857.
llvm-svn: 117745
2010-10-29 23:36:03 +00:00
Bob Wilson 08882be86c Remove DAG combiner patch to fold vector splats. Instcombiner does it now.
llvm-svn: 117720
2010-10-29 22:03:02 +00:00
Jakob Stoklund Olesen 0cce30fd34 Fix sign error.
llvm-svn: 117677
2010-10-29 18:21:18 +00:00
Evan Cheng 6c1414f9c2 Avoiding overly aggressive latency scheduling. If the two nodes share an
operand and one of them has a single use that is a live out copy, favor the
one that is live out. Otherwise it will be difficult to eliminate the copy
if the instruction is a loop induction variable update. e.g.

BB:
sub r1, r3, #1
str r0, [r2, r3]
mov r3, r1
cmp
bne BB

=>

BB:
str r0, [r2, r3]
sub r3, r3, #1
cmp
bne BB

This fixed the recent 256.bzip2 regression.

llvm-svn: 117675
2010-10-29 18:09:28 +00:00
Jakob Stoklund Olesen 140542fcea Don't transfer unused values to the new intervals formed by splitting.
llvm-svn: 117673
2010-10-29 17:47:49 +00:00
Benjamin Kramer 25ed920b0e Silence Release build warnings.
llvm-svn: 117671
2010-10-29 17:40:05 +00:00
Jakob Stoklund Olesen dff6a6e4f1 Teach ConnectedVNInfoEqClasses::Classify to deal with unused values.
We don't want unused values forming their own equivalence classes, so we lump
them all together in one class, and then merge them with the class of the last
used value.

llvm-svn: 117670
2010-10-29 17:37:29 +00:00
Jakob Stoklund Olesen 2cdca45861 Never propagate the idom value out of a block that defines its own value.
llvm-svn: 117669
2010-10-29 17:37:25 +00:00
John Thompson e8360b7182 Inline asm multiple alternative constraints development phase 2 - improved basic logic, added initial platform support.
llvm-svn: 117667
2010-10-29 17:29:13 +00:00
Bill Wendling c2d549e007 This may be an ARM target, so check for _Unwind_SjLj_Resume.
llvm-svn: 117643
2010-10-29 07:46:01 +00:00
Jakob Stoklund Olesen 13d7e0d012 Fix broken equivalence class calculation. We could probably also use
EquvivalenceClasses.h except it looks like overkill when elements are continuous
integers.

llvm-svn: 117631
2010-10-29 00:40:59 +00:00
Jakob Stoklund Olesen b98755472e Print out the connected components in the verifier after complaining about their
multiplicity.

llvm-svn: 117630
2010-10-29 00:40:57 +00:00
Jakob Stoklund Olesen a2578fe7f3 Run a verification pass before any splitting to better distribute blame.
llvm-svn: 117629
2010-10-29 00:40:55 +00:00
Devang Patel 6e0d58968d Ignore empty blocks.
llvm-svn: 117615
2010-10-28 22:11:59 +00:00
Jakob Stoklund Olesen dc5e7065a4 One day, physical register live ranges will be sensible.
llvm-svn: 117602
2010-10-28 20:44:22 +00:00
Jakob Stoklund Olesen c9f90c2a32 Replace SplitKit SSA update with an iterative algorithm very similar to the one
in SSAUpdaterImpl.h

Verifying live intervals revealed that the old method was completely wrong, and
we need an iterative approach to calculating PHI placemant. Fortunately, we have
MachineDominators available, so we don't have to compute that over and over
like SSAUpdaterImpl.h must.

Live-out values are cached between calls to mapValue() and computed in a greedy
way, so most calls will be working with very small block sets.

Thanks to Bob for explaining how this should work.

llvm-svn: 117599
2010-10-28 20:34:52 +00:00
Jakob Stoklund Olesen e172a8b794 Make MachineDominators available for SplitEditor. We are going to need it for
proper SSA updating.

This doesn't cause MachineDominators to be recomputed since we are already
requiring MachineLoopInfo which uses dominators as well.

llvm-svn: 117598
2010-10-28 20:34:50 +00:00
Jakob Stoklund Olesen 1005cf323d Add a temporary command line option to verify machine code after each spill or
split.

llvm-svn: 117597
2010-10-28 20:34:47 +00:00
Devang Patel 1c75865037 Do not work too hard to find type's file info. There is a special field to record file info.
llvm-svn: 117588
2010-10-28 19:50:08 +00:00
Devang Patel c4b69051b7 Technically DIFile scope should also be handled here.
llvm-svn: 117563
2010-10-28 17:30:52 +00:00
Bob Wilson f63da12be9 Teach the DAG combiner to fold a splat of a splat. Radar 8597790.
Also do some minor refactoring to reduce indentation.

llvm-svn: 117558
2010-10-28 17:06:14 +00:00
Evan Cheng ff310737e5 Re-commit 117518 and 117519 now that ARM MC test failures are out of the way.
llvm-svn: 117531
2010-10-28 06:47:08 +00:00
Evan Cheng e2c211c1b9 Revert 117518 and 117519 for now. They changed scheduling and cause MC tests to fail. Ugh.
llvm-svn: 117520
2010-10-28 02:00:25 +00:00
Evan Cheng 523fa3a2e8 Fix a major bug in operand latency computation. The use index must be adjusted
by the number of defs first for it to match the instruction itinerary.

llvm-svn: 117518
2010-10-28 01:46:29 +00:00
Evan Cheng cbdf7e874a Putting r117193 back except for the compile time cost. Rather than assuming fallthroughs uses all registers, just gather the union of all successor liveins.
llvm-svn: 117506
2010-10-27 23:17:17 +00:00
Michael J. Spencer 0f83d96852 COFF: Add IMAGE_SCN_MEM_READ to text sections.
There are currently 100 references to COFF::IMAGE_SCN in 6 files
and 11 different functions. Section to attribute mapping really
needs to happen in one place to avoid problems like this.

llvm-svn: 117473
2010-10-27 18:52:29 +00:00
Michael J. Spencer fbdab0d633 Fix whitespace.
llvm-svn: 117472
2010-10-27 18:52:20 +00:00
Jim Grosbach e4992c88a4 Formatting.
llvm-svn: 117453
2010-10-27 16:30:18 +00:00
Jakob Stoklund Olesen 79e1407c11 Handle critical loop predecessors by making both inside and outside registers
live out.

This doesn't prevent us from inserting a loop preheader later on, if that is
better.

llvm-svn: 117424
2010-10-27 00:39:07 +00:00
Jakob Stoklund Olesen 795ed98180 Compute critical loop predecessors in the same way as critical loop exits.
Critical edges going into a loop are not as bad as critical exits. We can handle
them by splitting the critical edge, or by having both inside and outside
registers live out of the predecessor.

llvm-svn: 117423
2010-10-27 00:39:05 +00:00
Jakob Stoklund Olesen 0e7a011a00 Physical registers trivially have multiple connected components all the time.
Only virtuals should be requires to be connected.

llvm-svn: 117422
2010-10-27 00:39:01 +00:00
Dale Johannesen e660f4d072 Use a MemIntrinsicSDNode for ISD::PREFETCH, which touches
memory, so a MachineMemOperand is useful (not propagated
into the MachineInstr yet).  No functional change except
for dump output.

llvm-svn: 117413
2010-10-26 23:11:10 +00:00
Andrew Trick 5f88cc34e1 Remove the vector of live vregs. I thought we would need to track
them, but hopefully we won't. And this is not the right data structure
to do it anyway.

llvm-svn: 117412
2010-10-26 22:58:24 +00:00
Jakob Stoklund Olesen e4f3317cda After splitting, compute connected components of all new registers, not just for
the remainder register.

Example:

bb0:
  x = 1
bb1:
  use(x)
  ...
  x = 2
  jump bb1

When x is isolated in bb1, the inner part breaks into two components, x1 and x2:

bb0:
  x0 = 1
bb1:
  x1 = x0
  use(x1)
  ...
  x2 = 2
  x0 = x2
  jump bb1

llvm-svn: 117408
2010-10-26 22:36:09 +00:00
Jakob Stoklund Olesen 260fa289df Verify that live intervals are connected. If there are multiple connected
components, each should get its own virtual register.

llvm-svn: 117407
2010-10-26 22:36:07 +00:00
Jakob Stoklund Olesen 022e7795cf Call RenumberValues for all new registers created during splitting. This is
necessary to get correct hasPHIKill flags.

llvm-svn: 117406
2010-10-26 22:36:05 +00:00
Jakob Stoklund Olesen 4453324e5b Preserve PHIDef bits in cloned values during splitting.
llvm-svn: 117405
2010-10-26 22:36:02 +00:00
Devang Patel 05561e8b7b Assign source ordering to nodes created for StoreInst.
llvm-svn: 117404
2010-10-26 22:14:52 +00:00
Jakob Stoklund Olesen b7050233fb Teach MachineBasicBlock::print() to annotate instructions and blocks with
SlotIndexes when available.

llvm-svn: 117392
2010-10-26 20:21:46 +00:00
Jakob Stoklund Olesen db594373bd Remmeber to print full live interval on verification error.
llvm-svn: 117391
2010-10-26 20:21:43 +00:00
Andrew Trick 84aef49e32 Jakob's review of the basic register allocator.
llvm-svn: 117384
2010-10-26 18:34:01 +00:00
Devang Patel b5694e702c s/beginScope/beginInstruction/g
s/endScope/endInstruction/g

llvm-svn: 117376
2010-10-26 17:49:02 +00:00
Jakob Stoklund Olesen 9eabfa3a39 Don't verify physical registers going into landing pads.
Magic is happening that we don't understand.

llvm-svn: 117370
2010-10-26 16:49:23 +00:00
Evan Cheng e96b8d7ab6 Use instruction itinerary to determine what instructions are 'cheap'.
llvm-svn: 117348
2010-10-26 02:08:50 +00:00
Nick Lewycky 90b2ac2696 For statistics that are only used in functions declared in !NDEBUG, wrap the
declarations in !NDEBUG to avoid -Wunused-variable warnings. Patch by
Matt Beaumont-Gay!

llvm-svn: 117345
2010-10-26 00:51:57 +00:00
Jakob Stoklund Olesen e2c340c8d0 InlineSpiller can also update LiveStacks.
llvm-svn: 117338
2010-10-26 00:11:35 +00:00
Jakob Stoklund Olesen 7cdc1e5f16 Make the spiller responsible for updating the LiveStacks analysis.
llvm-svn: 117337
2010-10-26 00:11:33 +00:00
Bob Wilson e1961fe289 When the "true" and "false" blocks of a diamond if-conversion are the same,
do not double-count the duplicate instructions by counting once from the
beginning and again from the end.  Keep track of where the duplicates from
the beginning ended and don't go past that point when counting duplicates
at the end.  Radar 8589805.

This change causes one of the MC/ARM/simple-fp-encoding tests to produce
different (better!) code without the vmovne instruction being tested.
I changed the test to produce vmovne and vmoveq instructions but moving
between register files in the opposite direction.  That's not quite the same
but predicated versions of those instructions weren't being tested before,
so at least the test coverage is not any worse, just different.

llvm-svn: 117333
2010-10-26 00:02:24 +00:00
Bob Wilson efd360c535 Change if-conversion to keep track of the extra cost due to microcoded
instructions separately from the count of non-predicated instructions.  The
instruction count is used in places to determine how many instructions to
copy, predicate, etc. and things get confused if that count includes the
extra cost for microcoded ops.

llvm-svn: 117332
2010-10-26 00:02:21 +00:00
Evan Cheng 43d6f34e9f Neuter r117193 as it causes significant post-ra scheduler compile time regression.
llvm-svn: 117329
2010-10-25 23:56:21 +00:00
Devang Patel 43c3f4b63c Simplify.
Do not count use of sdisel for single call instruction.

llvm-svn: 117316
2010-10-25 21:31:46 +00:00
Devang Patel 3bc6d198fb Add counters to count basic blocks and machine basic blocks with out of order line number info.
Add counters to count how many basic blocks are entirely selected by fastisel.

llvm-svn: 117310
2010-10-25 20:55:43 +00:00
Devang Patel a86114b961 Add simple counter to count no. of basic blocks without any line number information. At -O0, these basic block coule cause less than optimial debugging experience.
llvm-svn: 117307
2010-10-25 20:45:32 +00:00
Jakob Stoklund Olesen 912db6d9d0 In which I learn how to forward declare template classes.
llvm-svn: 117272
2010-10-25 17:27:30 +00:00
Chandler Carruth 82058c05f8 Move the remaining attribute macros to systematic names based on the attribute
name and prefixed with 'LLVM_'.

llvm-svn: 117203
2010-10-23 08:40:19 +00:00
Chandler Carruth 9733158bfd Fix a likely bug in an assertion by adding parentheses around '||'. This bug
was found by a GCC warning. ;]

llvm-svn: 117199
2010-10-23 07:46:14 +00:00
Evan Cheng 15459b695f Properly model the latency of register defs which are 1) function returns or
2) live-outs.

Previously the post-RA schedulers completely ignore these dependencies since
returns, branches, etc. are all scheduling barriers. This patch model the
latencies between instructions being scheduled and the barriers. It also
handle calls by marking their register uses.

llvm-svn: 117193
2010-10-23 02:10:46 +00:00
Jakob Stoklund Olesen 8a09620dc2 Verify LiveIntervals against the CFG, ensuring that live-in values are live-out
of all predecessors.

llvm-svn: 117191
2010-10-23 00:49:09 +00:00
Andrew Trick e8719c51aa Nonvirtual dtor that was accessible enough to be bad.
llvm-svn: 117180
2010-10-22 23:33:19 +00:00
Andrew Trick 1c24605a57 This is a prototype of an experimental register allocation
framework. It's purpose is not to improve register allocation per se,
but to make it easier to develop powerful live range splitting. I call
it the basic allocator because it is as simple as a global allocator
can be but provides the building blocks for sophisticated register
allocation with live range splitting. 

A minimal implementation is provided that trivially spills whenever it
runs out of registers. I'm checking in now to get high-level design
and style feedback. I've only done minimal testing. The next step is
implementing a "greedy" allocation algorithm that does some register
reassignment and makes better splitting decisions.

llvm-svn: 117174
2010-10-22 23:09:15 +00:00
Jakob Stoklund Olesen 0fb303d3c0 Add more verification of LiveIntervals.
llvm-svn: 117170
2010-10-22 22:48:58 +00:00
Jakob Stoklund Olesen 4cf8fe31bb Be more strict about detecting multi-use blocks for isolation.
When a block has exactly two uses and the register is both live-in and live-out,
don't isolate the block. We would be inserting two copies, so we haven't really
made any progress.

If the live-in and live-out values separate into disconnected components after
splitting, we would be making progress. We can't detect that for now.

llvm-svn: 117169
2010-10-22 22:48:56 +00:00
Evan Cheng 21eedfb5a2 Unbreak build.
llvm-svn: 117155
2010-10-22 21:49:09 +00:00
Evan Cheng 77a38320c7 Transfer implicit ops when forming load multiple and return instructions.
llvm-svn: 117151
2010-10-22 21:29:58 +00:00
Jakob Stoklund Olesen 2d60075590 Be more strict when detecting critical edges before loop splitting.
An exit block with a critical edge must only have predecessors in the loop, or
just before the loop. This guarantees that the inserted copies in the loop
predecessors dominate the exit block.

llvm-svn: 117144
2010-10-22 20:28:23 +00:00
Jakob Stoklund Olesen 9a74301621 Add print methods
llvm-svn: 117143
2010-10-22 20:28:21 +00:00
Michael J. Spencer 0e36e0340a X86: Base _fltused on the FunctionType of the called value instead of the potentially null "CalledFunction". Thanks Duncan!
This is needed for indirect calls.

llvm-svn: 117061
2010-10-21 20:49:23 +00:00
Jakob Stoklund Olesen f4bbe50fc3 Don't include the destination interval in the union when computing
Parent - union(Y, ...). Doh.

llvm-svn: 117042
2010-10-21 18:47:08 +00:00
Jakob Stoklund Olesen 7c9d584ebc Permit landing pad successor blocks when verifying basic blocks that end in an
unconditional branch.

llvm-svn: 117041
2010-10-21 18:47:06 +00:00
Duncan Sands 2f16b91ce0 The variable liTRC is not used for anything useful, zap it
(gcc-4.6 warning).

llvm-svn: 117022
2010-10-21 16:04:43 +00:00
Duncan Sands ee4eb2bad1 Remove some variables that are never really used
(gcc-4.6 warns about these).

llvm-svn: 117021
2010-10-21 16:03:28 +00:00
Michael J. Spencer 83ce5f181f CodeGen-Windows: Only emit _fltused if a VarArg function is called with floating point args.
This should be the minimum set of functions that could possibly need it.

llvm-svn: 116978
2010-10-21 00:08:21 +00:00
Jakob Stoklund Olesen a3b61d32d8 Remember to keep track of rematted values.
llvm-svn: 116962
2010-10-20 22:50:42 +00:00
Evan Cheng 87066f0677 More accurate estimate / tracking of register pressure.
- Initial register pressure in the loop should be all the live defs into the
  loop. Not just those from loop preheader which is often empty.
- When an instruction is hoisted, update register pressure from loop preheader
  to the original BB.
- Treat only use of a virtual register as kill since the code is still SSA.

llvm-svn: 116956
2010-10-20 22:03:58 +00:00
Jakob Stoklund Olesen 2edaa2fb24 Move some of the InlineSpiller rematerialization code into LiveRangeEdit.
llvm-svn: 116951
2010-10-20 22:00:51 +00:00
Dale Johannesen 320a553319 Remove Synthesizable from the Type system; as MMX vector
types are no longer Legal on X86, we don't need it.
No functional change.  8499854.

llvm-svn: 116947
2010-10-20 21:32:10 +00:00
Jakob Stoklund Olesen 9b131a004f When SimpleRegisterCoalescing is trimming kill flags on a physical register
operand, also check if subregisters are killed.

Add <imp-def> operands for subregisters that remain alive after a super register
is killed.

I don't have a testcase for this that reproduces on trunk. <rdar://problem/8441758>

llvm-svn: 116940
2010-10-20 18:45:55 +00:00
Dan Gohman a94cc6dfe8 Make CodeGen TBAA-aware.
llvm-svn: 116890
2010-10-20 00:31:05 +00:00
Jim Grosbach bbdc5d2ef9 Add a pre-dispatch SjLj EH hook on the unwind edge for targets to do any
setup they require. Use this for ARM/Darwin to rematerialize the base
pointer from the frame pointer when required. rdar://8564268

llvm-svn: 116879
2010-10-19 23:27:08 +00:00
Jakob Stoklund Olesen a4941690cc Shrink MachineOperand from 40 to 32 bytes on 64-bit hosts.
Pull an unsigned out of the Contents union such that it has the same size as two
pointers and no padding.

Arrange members such that the Contents union and all pointers can be 8-byte
aligned without padding.

This speeds up code generation by 0.8% on a 64-bit host. 32-bit hosts should be
unaffected.

llvm-svn: 116857
2010-10-19 20:56:32 +00:00
Evan Cheng 63c7608c34 Re-enable register pressure aware machine licm with fixes. Hoist() may have
erased the instruction during LICM so UpdateRegPressureAfter() should not
reference it afterwards.

llvm-svn: 116845
2010-10-19 18:58:51 +00:00
Owen Anderson 6c18d1aac0 Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which
must be called in the pass's constructor.  This function uses static dependency declarations to recursively initialize
the pass's dependencies.

Clients that only create passes through the createFooPass() APIs will require no changes.  Clients that want to use the
CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h
before parsing commandline arguments.

I have tested this with all standard configurations of clang and llvm-gcc on Darwin.  It is possible that there are problems
with the static dependencies that will only be visible with non-standard options.  If you encounter any crash in pass
registration/creation, please send the testcase to me directly.

llvm-svn: 116820
2010-10-19 17:21:58 +00:00
Daniel Dunbar 418204e523 Revert r116781 "- Add a hook for target to determine whether an instruction def
is", which breaks some nightly tests.

llvm-svn: 116816
2010-10-19 17:14:24 +00:00
NAKAMURA Takumi 392f084f46 lib/CodeGen/TargetLoweringObjectFileImpl.cpp: Tweak to emit ".{section}${name}" instead of ".{section}$linkonce_{name}" for linkonce sections.
It seems GNU ld/PECOFF relies on section names, linking with g++'s libstdc++.a would fail.

llvm-svn: 116791
2010-10-19 03:24:42 +00:00
Andrew Trick 2006bbef7d Fix for machine licm assert: RCCost <= RegPressure[RCId]
in MultiSource/Benchmarks/VersaBench/beamformer/beamformer.
SmallSet.insert returns true if the element is inserted.

llvm-svn: 116790
2010-10-19 02:50:50 +00:00
Evan Cheng 8249dfe6ce - Add a hook for target to determine whether an instruction def is
"long latency" enough to hoist even if it may increase spilling. Reloading
  a value from spill slot is often cheaper than performing an expensive
  computation in the loop. For X86, that means machine LICM will hoist
  SQRT, DIV, etc. ARM will be somewhat aggressive with VFP and NEON
  instructions.
- Enable register pressure aware machine LICM by default.

llvm-svn: 116781
2010-10-19 00:55:07 +00:00
Bill Wendling 337a31133b Don't recompute MachineRegisterInfo in the Optimize* method.
llvm-svn: 116750
2010-10-18 21:22:31 +00:00
Dan Gohman 52dacc0d7f Add TypeBasedAliasAnalysis to the standard pass lists. Note that it
is currently inert by default.

llvm-svn: 116732
2010-10-18 18:50:27 +00:00
Dan Gohman 02538ac4d3 Make BasicAliasAnalysis a normal AliasAnalysis implementation which
does normal initialization and normal chaining. Change the default
AliasAnalysis implementation to NoAlias.

Update StandardCompileOpts.h and friends to explicitly request
BasicAliasAnalysis.

Update tests to explicitly request -basicaa.

llvm-svn: 116720
2010-10-18 18:04:47 +00:00
Jim Grosbach a3aa17b376 Trivial grammar tweak.
llvm-svn: 116710
2010-10-18 16:29:26 +00:00
Michael J. Spencer 5e683250ee X86-Windows: Emit an undefined global __fltused symbol when targeting Windows
if any floating point arguments are passed to an external function.

llvm-svn: 116665
2010-10-16 08:25:41 +00:00
Michael J. Spencer d3ea25e66e Whitespace!
llvm-svn: 116664
2010-10-16 08:25:21 +00:00
Evan Cheng 44436302fb More machine LICM work. It now tracks register pressure for path from preheader to current BB and use the information determine whether hoisting is worthwhile.
llvm-svn: 116654
2010-10-16 02:20:26 +00:00
Jakob Stoklund Olesen 20d103e74e Remove unused accessor.
llvm-svn: 116580
2010-10-15 16:06:40 +00:00
Jakob Stoklund Olesen 3f1f7b67e3 Eliminate curli from SplitEditor. Use the LiveRangeEdit reference instead.
llvm-svn: 116547
2010-10-15 00:34:01 +00:00
Jakob Stoklund Olesen 0f3e98ce2e Move stack slot assignments into LiveRangeEdit.
All registers created during splitting or spilling are assigned to the same
stack slot as the parent register.

When splitting or rematting, we may not spill at all. In that case the stack
slot is still assigned, but it will be dead.

llvm-svn: 116546
2010-10-15 00:16:55 +00:00
Jakob Stoklund Olesen 72911e49fa Create a new LiveRangeEdit class to keep track of the new registers created when
splitting or spillling, and to help with rematerialization.

Use LiveRangeEdit in InlineSpiller and SplitKit. This will eventually make it
possible to share remat code between InlineSpiller and SplitKit.

llvm-svn: 116543
2010-10-14 23:49:52 +00:00
Jakob Stoklund Olesen f11318018a Only split around a loop if the live range has uses outside the loop periphery.
Before we would also split around a loop if any peripheral block had multiple
uses. This could cause repeated splitting when splitting a different live range
would insert uses into the periphery.

Now -spiller=inline passes the nightly test suite again.

llvm-svn: 116494
2010-10-14 18:26:45 +00:00
Evan Cheng d62719c3fa Register pressure and instruction latency aware machine LICM. Work in progress.
llvm-svn: 116465
2010-10-14 01:16:09 +00:00
Owen Anderson c266a36625 Analysis groups need to initialize their default implementations.
llvm-svn: 116441
2010-10-13 21:49:58 +00:00
Owen Anderson 8ac477ffb5 Begin adding static dependence information to passes, which will allow us to
perform initialization without static constructors AND without explicit initialization
by the client.  For the moment, passes are required to initialize both their
(potential) dependencies and any passes they preserve.  I hope to be able to relax
the latter requirement in the future.

llvm-svn: 116334
2010-10-12 19:48:12 +00:00
Jakob Stoklund Olesen 57feeed92f Replace FindLiveRangeContaining() with getVNInfoAt() in LiveIntervalAnalysis.
This helps hiding the LiveRange class which really should be private.

llvm-svn: 116244
2010-10-11 21:45:03 +00:00
Jakob Stoklund Olesen 2f6531eb8c Properly handle reloading and spilling around partial redefines in
LocalRewriter.

This is a bit of a hack that adds an implicit use operand to model the
read-modify-write nature of a partial redef. Uses and defs are rewritten in
separate passes, and a single operand would never be processed twice.

<rdar://problem/8518892>

llvm-svn: 116210
2010-10-11 18:10:36 +00:00
Chris Lattner 1ef5e84c31 Per discussion with Sanjiv, remove the PIC16 target from mainline. When/if
it comes back, it will be largely a rewrite, so keeping the old codebase
in tree isn't helping anyone.

llvm-svn: 116190
2010-10-11 05:44:40 +00:00
Chris Lattner eb313a46fc fix the default va_arg expansion (in the realignment case) to not implicitly
truncate the stack pointer to 32-bits on a 64-bit machine.

llvm-svn: 116169
2010-10-10 18:36:26 +00:00
Benjamin Kramer d84bb168cc Silence compiler warning.
llvm-svn: 116156
2010-10-09 16:36:44 +00:00
Jakob Stoklund Olesen 959fcc6c63 Rename SplitEditor::rewrite to finish() and break it out into a couple of new
functions: computeRemainder and rewrite.

When the remainder breaks up into multiple components, remember to rewrite those
uses as well.

llvm-svn: 116121
2010-10-08 23:42:21 +00:00
Evan Cheng df2aae0c5a Avoid compiler warning: comparison between signed and unsigned integer.
llvm-svn: 116119
2010-10-08 23:01:57 +00:00
Jakob Stoklund Olesen b1b0ef7d03 Extract method ProcessUses from LocalRewriter::RewriteMBB. Both parent and child
are still way too long, but it's a start.

No functional change intended.

llvm-svn: 116116
2010-10-08 22:14:41 +00:00
Anton Korobeynikov fc3642b205 Do not check that the bodies of two defs of same linkonce global are the same.
Such a check does not make any sense in presense of inlining and other compiler-dependent stuff.
This should fix bunch of warnings on mingw32.

llvm-svn: 116113
2010-10-08 21:50:04 +00:00
Jakob Stoklund Olesen 05cae8326d Classify value numbers into connected components in linear time.
llvm-svn: 116105
2010-10-08 21:19:28 +00:00
Rafael Espindola af8b4871a8 Call InitSections in llc and clang so that the binaries produced by them
are easier to diff with those produced by llvm-mc.

llvm-svn: 116095
2010-10-08 19:37:38 +00:00
Evan Cheng 4ac0d16c40 Don't waste time unfolding simple loads. The unfolded copy won't be hoisted.
llvm-svn: 116081
2010-10-08 18:59:19 +00:00
Evan Cheng 8c5e7e51bd Fix operand latency computation in cases where the definition operand is
implicit. e.g.
%D6<def>, %D7<def> = VLD1q16 %R2<kill>, 0, ..., %Q3<imp-def>                                                                                                                                                                              
%Q1<def> = VMULv8i16 %Q1<kill>, %Q3<kill>, ...

The real definition indices are 0,1.

llvm-svn: 116080
2010-10-08 18:42:25 +00:00
Devang Patel dd1c289a6a Line number 0 indicates there is no source line/file name info available for this construct.
llvm-svn: 116061
2010-10-08 17:18:54 +00:00
Jakob Stoklund Olesen 0f1677e190 After splitting, the remaining LiveInterval may be fragmented into multiple
connected components. These components should be allocated different virtual
registers because there is no reason for them to be allocated together.

Add the ConnectedVNInfoEqClasses class to calculate the connected components,
and move values to new LiveIntervals.

Use it from SplitKit::rewrite by creating new virtual registers for the
components.

llvm-svn: 116006
2010-10-07 23:34:34 +00:00
Owen Anderson df7a4f2515 Now with fewer extraneous semicolons!
llvm-svn: 115996
2010-10-07 22:25:06 +00:00
Devang Patel 3a24f9230a Provie a clearner interface so that FE can decide whether a function has prototype or not.
llvm-svn: 115988
2010-10-07 22:03:01 +00:00
Jakob Stoklund Olesen 9bfd9679f9 Print more loop info.
llvm-svn: 115951
2010-10-07 18:47:07 +00:00
Jakob Stoklund Olesen 7c31730053 Print out MBB number when rewriting.
llvm-svn: 115950
2010-10-07 18:47:05 +00:00
Owen Anderson 80fc0762f3 Add initialization routines for CodeGen.
llvm-svn: 115949
2010-10-07 18:41:20 +00:00
Jakob Stoklund Olesen 49715fd494 Cache interval iterators in SplitEditor::addTruncSimpleRange so we only have to
do one find().

llvm-svn: 115929
2010-10-07 17:56:39 +00:00
Jakob Stoklund Olesen 9575af4b06 Clean up debug printing.
llvm-svn: 115928
2010-10-07 17:56:35 +00:00
Jakob Stoklund Olesen 18842783cc Add MachineRegisterInfo::constrainRegClass and use it in MachineCSE.
This function is intended to be used when inserting a machine instruction that
trivially restricts the legal registers, like LEA requiring a GR32_NOSP
argument.

llvm-svn: 115875
2010-10-06 23:54:39 +00:00
Jakob Stoklund Olesen 1a065e4e5b Skip unused registers when verifying LiveIntervals.
llvm-svn: 115874
2010-10-06 23:54:35 +00:00
Owen Anderson ad8134f03b Hide analysis group registration behind a macro, just like pass registration.
llvm-svn: 115835
2010-10-06 21:02:27 +00:00
Devang Patel 9a33ec24eb Add support for DW_TAG_unspecified_parameters.
llvm-svn: 115833
2010-10-06 20:50:40 +00:00
Nick Lewycky ec0da969fb Remove unused variables.
llvm-svn: 115802
2010-10-06 18:11:50 +00:00
Dan Gohman aadc5596f1 ComputeLinearIndex doesn't need its TLI argument.
llvm-svn: 115792
2010-10-06 16:18:29 +00:00
Evan Cheng 49d4c0bd18 - Add TargetInstrInfo::getOperandLatency() to compute operand latencies. This
allow target to correctly compute latency for cases where static scheduling
  itineraries isn't sufficient. e.g. variable_ops instructions such as
  ARM::ldm.
  This also allows target without scheduling itineraries to compute operand
  latencies. e.g. X86 can return (approximated) latencies for high latency
  instructions such as division.
- Compute operand latencies for those defined by load multiple instructions,
  e.g. ldm and those used by store multiple instructions, e.g. stm.

llvm-svn: 115755
2010-10-06 06:27:31 +00:00
Jakob Stoklund Olesen 4d5156c7d0 Count uses in all nested loops, not just the deepest.
llvm-svn: 115710
2010-10-05 23:10:12 +00:00
Jakob Stoklund Olesen 56e2925e6c Remove SplitAnalysis::removeUse. It was only used to make SplitAnalysis
reusable, but that is no longer relevant since a split will always replace the
original.

llvm-svn: 115709
2010-10-05 23:10:09 +00:00
Jakob Stoklund Olesen 0445e2a053 dupli always has an interval now.
llvm-svn: 115708
2010-10-05 23:10:04 +00:00
Jakob Stoklund Olesen 2dfa8be26a We can split around loops with multiple exits now.
llvm-svn: 115696
2010-10-05 22:19:35 +00:00
Jakob Stoklund Olesen 89d276aa48 Update SplitEditor API to reflect the fact that the original live interval is
never kept after splitting.

Keeping the original interval made sense when the split region doesn't modify
the register, and the original is spilled. We can get the same effect by
detecting reloaded values when spilling around copies.

llvm-svn: 115695
2010-10-05 22:19:33 +00:00
Jakob Stoklund Olesen b46d32367f Intervals are half-open.
llvm-svn: 115694
2010-10-05 22:19:29 +00:00
Jakob Stoklund Olesen 671bab1c7d When we find a reaching definition, make sure it is visited from all paths by
erasing it from the visited set. That ensures we create the right phi defs.

llvm-svn: 115666
2010-10-05 20:36:28 +00:00
Jakob Stoklund Olesen b0cedd5f96 Don't use nextIndex to check for live out of instruction.
Insert copy after defining instruction.

Fix LiveIntervalMap::extendTo to properly handle live segments starting before
the current basic block.

Make sure the open live range is extended to the inserted copy's use slot.

llvm-svn: 115665
2010-10-05 20:36:25 +00:00
Jakob Stoklund Olesen 9a414901db Tweak VNInfo printing.
llvm-svn: 115650
2010-10-05 18:48:57 +00:00
Jakob Stoklund Olesen 1c9afa1aeb Add assert for valid slot indexes.
llvm-svn: 115649
2010-10-05 18:48:55 +00:00
Owen Anderson d8d1dcc09a Use a more efficient lowering of uint64_t --> float that can take advantage of hardware signed integer conversion without
having to do a double cast (uint64_t --> double --> float).  This is based on the algorithm from compiler_rt's __floatundisf
for X86-64.

llvm-svn: 115634
2010-10-05 17:24:05 +00:00
Evan Cheng c8d6cfd730 This DAG combine BRCOND transformation can look pass truncate of the operand:
//   %a = ...                                                                                                                                                                                  
    //   %b = and i32 %a, 2                                                                                                                                                                        
    //   %c = srl i32 %b, 1                                                                                                                                                                        
    //   brcond i32 %c ...                                                                                                                                                                         
    //                                                                                                                                                                                             
    // into                                                                                                                                                                                        
    //                                                                                                                                                                                             
    //   %a = ...                                                                                                                                                                                  
    //   %b = and i32 %a, 2                                                                                                                                                                        
    //   %c = setcc eq %b, 0                                                                                                                                                                       
    //   brcond %c ...

Make sure it restores local variable N1, which corresponds to the condition operand if it fails to match.

This apparently breaks TCE but since that backend isn't in the tree I don't have a test for it.

llvm-svn: 115571
2010-10-04 22:41:01 +00:00
Lang Hames 4108e7e192 Removed the older style (in-allocator) problem construction system from the PBQP allocator. Problem construction is now done exclusively with the new builders.
llvm-svn: 115502
2010-10-04 12:13:07 +00:00
Jakob Stoklund Olesen 4088ceaf28 Stop using LiveRange in MachineVerifier.
llvm-svn: 115408
2010-10-02 05:24:46 +00:00
Bob Wilson c57c220d20 Fix a miscompile in 186.crafty for Thumb2 that was exposed by Evan's
scheduling change in svn 115121.  The CriticalAntiDepBreaker had bad
liveness information.  It was calculating the KillIndices for one scheduling
region in a basic block, rescheduling that region so the KillIndices were
no longer valid, and then using those wrong KillIndices to make decisions
for the next scheduling region.  I've not been able to reduce a small
testcase for this.  Radar 8502534.

llvm-svn: 115400
2010-10-02 01:49:29 +00:00
Jakob Stoklund Olesen bfea05afd6 Drop the use of LiveInterval::iterator and the LiveRange class in
RemoveCopyByCommutingDef.

llvm-svn: 115386
2010-10-01 23:52:27 +00:00
Jakob Stoklund Olesen 28792c4a3d When RemoveCopyByCommutingDef is creating additional identity copies, just use
LiveInterval::MergeValueNumberInto instead of trying to extend LiveRanges and
getting it wrong.

This fixed PR8249 where a valno with a multi-segment live range was defined by
an identity copy created by RemoveCopyByCommutingDef. Some of the live
segments disappeared.

llvm-svn: 115385
2010-10-01 23:52:25 +00:00
Jakob Stoklund Olesen 8fd5b3c071 Pretty up the debug output during RemoveCopyByCommutingDef.
llvm-svn: 115384
2010-10-01 23:52:22 +00:00
Devang Patel e1c714647c Add support to let FE mark explict methods as explict in debug info.
llvm-svn: 115378
2010-10-01 23:31:40 +00:00
Jim Grosbach 0091535361 Nuke trailing whitespace.
llvm-svn: 115377
2010-10-01 23:29:12 +00:00
Owen Anderson f31f33ea89 Thread the determination of branch prediction hit rates back through the if-conversion heuristic APIs. For now,
stick with a constant estimate of 90% (branch predictors are good!), but we might find that we want to provide
more nuanced estimates in the future.

llvm-svn: 115364
2010-10-01 22:45:50 +00:00
Devang Patel d3fe5fa5d1 Fix code gen crash reported in PR 8235. We still lose debug info for the unused argument here. This is a known limitation recorded debuginfo-tests/trunk/dbg-declare2.ll function 'f6' test case.
llvm-svn: 115323
2010-10-01 19:00:44 +00:00
Gabor Greif 47a3b8c30b typo
llvm-svn: 115310
2010-10-01 10:32:19 +00:00
Chris Lattner f08bfdc29f fix typo
llvm-svn: 115300
2010-10-01 06:54:02 +00:00
Chris Lattner a205055857 fix rdar://8494845 + PR8244 - a miscompile exposed by my patch in r101350
llvm-svn: 115294
2010-10-01 05:36:09 +00:00
Dale Johannesen dd224d2333 Massive rewrite of MMX:
The x86_mmx type is used for MMX intrinsics, parameters and
return values where these use MMX registers, and is also
supported in load, store, and bitcast.

Only the above operations generate MMX instructions, and optimizations
do not operate on or produce MMX intrinsics. 

MMX-sized vectors <2 x i32> etc. are lowered to XMM or split into
smaller pieces.  Optimizations may occur on these forms and the
result casted back to x86_mmx, provided the result feeds into a
previous existing x86_mmx operation.

The point of all this is prevent optimizations from introducing
MMX operations, which is unsafe due to the EMMS problem.

llvm-svn: 115243
2010-09-30 23:57:10 +00:00
Jakob Stoklund Olesen 665aa6efcc When isel is emitting instructions for an x86 target without CMOV, the CFG is
edited during emission.

If the basic block ends in a switch that gets lowered to a jump table, any
phis at the default edge were getting updated wrong. The jump table data
structure keeps a pointer to the header blocks that wasn't getting updated
after the MBB is split.

This bug was exposed on 32-bit Linux when disabling critical edge splitting in
codegen prepare.

The fix is to uipdate stale MBB pointers whenever a block is split during
emission.

llvm-svn: 115191
2010-09-30 19:44:31 +00:00
Devang Patel bea08d1c85 Let FE mark a variable as artificial variable.
llvm-svn: 115102
2010-09-29 23:07:21 +00:00
Evan Cheng 4a010fd1ea Model Cortex-a9 load to SUB, RSB, ADD, ADC, SBC, RSC, CMN, MVN, or CMP
pipeline forwarding path.

llvm-svn: 115098
2010-09-29 22:42:35 +00:00
Benjamin Kramer 2016f0eaac Silence msvc warnings.
llvm-svn: 115097
2010-09-29 22:38:50 +00:00
Devang Patel cb03b14089 Add support to let FE encode method access specifier.
llvm-svn: 115089
2010-09-29 21:44:16 +00:00
Owen Anderson 0cd522428c UnreachableBlockElim could incorrectly return false when it had not modified the CFG, but HAD modified some PHI nodes. Fixes PR8174.
llvm-svn: 115083
2010-09-29 20:57:19 +00:00
Devang Patel a1bd5a1fad Assign DW_ACCESS_public accessibility attribute to members by default.
llvm-svn: 115067
2010-09-29 19:08:08 +00:00
Bill Wendling b0b2c57149 Revert r114997. It was causing a failure on darwin10-selfhost.
llvm-svn: 115002
2010-09-28 23:11:55 +00:00