Nick Lewycky
70113e8a1b
Remove VISIBILITY_HIDDEN from the classes in this directory. Fixes bug 5507.
...
llvm-svn: 89075
2009-11-17 09:17:08 +00:00
Nick Lewycky
549b6439f3
Revert r88939.
...
llvm-svn: 89066
2009-11-17 08:11:44 +00:00
Bill Wendling
dcecc143ae
Refactor the code that creates the "dot-label" difference. This may be used in
...
more than one place. No intended functionality change.
llvm-svn: 89024
2009-11-17 01:23:53 +00:00
Jakob Stoklund Olesen
6ac8f7ec34
Enable -split-phi-edges by default
...
llvm-svn: 89021
2009-11-17 01:07:22 +00:00
Dan Gohman
fc21555ca5
Remove the optimizations that convert BRCOND and BR_CC into
...
unconditional branches or fallthroghes. Instcombine/SimplifyCFG
should be simplifying branches with known conditions.
This fixes some problems caused by these transformations not
updating the MachineBasicBlock CFG.
llvm-svn: 89017
2009-11-17 00:47:23 +00:00
Dan Gohman
04717dcf0a
Initialize the new AsmPrinterFlags field to 0, fixing uses of
...
uninitialized memory.
llvm-svn: 88985
2009-11-16 22:49:38 +00:00
Devang Patel
aad93dd4c0
Revert r88939.
...
llvm-svn: 88973
2009-11-16 21:53:40 +00:00
Dan Gohman
22377c8327
Sink a #include <map> to where it's actually needed.
...
llvm-svn: 88956
2009-11-16 20:40:47 +00:00
Dan Gohman
0679a637b3
Fix a typo in a comment.
...
llvm-svn: 88953
2009-11-16 20:35:59 +00:00
Bob Wilson
ead1392ff4
Fix a comment.
...
llvm-svn: 88940
2009-11-16 19:33:27 +00:00
Devang Patel
9263c9d854
Add VISIBILITY_HIDDEN marker.
...
llvm-svn: 88939
2009-11-16 19:20:48 +00:00
Bob Wilson
72925c0154
Fix some comments.
...
llvm-svn: 88932
2009-11-16 18:54:08 +00:00
Bob Wilson
eca4a0c2e4
Whitespace: be consistent with pointer syntax.
...
llvm-svn: 88929
2009-11-16 18:08:46 +00:00
Bob Wilson
04825f6c4b
Clean up whitespace.
...
llvm-svn: 88927
2009-11-16 17:56:13 +00:00
David Greene
6469fa6824
Support spill comments.
...
Have the asm printer emit a comment if an instruction is a spill or
reload and have the spiller mark copies it introdues so the asm printer
can also annotate those.
llvm-svn: 88911
2009-11-16 15:12:23 +00:00
Evan Cheng
ea46259f53
Check if subreg index is zero.
...
llvm-svn: 88899
2009-11-16 06:31:49 +00:00
Evan Cheng
2fa416debd
For some targets, a copy can use a register multiple times, e.g. ppc.
...
llvm-svn: 88895
2009-11-16 05:52:06 +00:00
Lang Hames
bd7b181f94
Fixes the bug exposed by Anton's test case in PR 5495:
...
Make sure when ProcessImplicitDefs removes a copy which kills its source reg that it
removes the copy from said reg's Kills list.
llvm-svn: 88881
2009-11-16 02:07:31 +00:00
Lang Hames
ce9d705846
Fix for the original bug in PR5495 - Look at uses as well as defs when determining the PHI-copy insert point.
...
- Patch by Andrew Canis!
llvm-svn: 88880
2009-11-16 02:00:09 +00:00
Lang Hames
4d30650e61
Added an assert to the PBQP allocator to catch infinite cost solutions which might otherwise lead to miscompilations.
...
llvm-svn: 88829
2009-11-15 04:39:51 +00:00
Jim Grosbach
b81732e2f7
Do not merge jump tables this early. Branch folding will do any necessary
...
merges, and until then, it's useful to keep the tables separate for ease
of manipulation.
llvm-svn: 88806
2009-11-14 20:15:03 +00:00
Jim Grosbach
e4dfaf99cd
Add function to replace a destination MBB in a single jump table
...
llvm-svn: 88804
2009-11-14 20:09:13 +00:00
Sanjiv Gupta
b38d6287b8
revert 88761 as it fails builds.
...
llvm-svn: 88762
2009-11-14 07:22:25 +00:00
Sanjiv Gupta
3db18af363
Fix debug info crashes for PIC16.
...
llvm-svn: 88761
2009-11-14 06:19:49 +00:00
Evan Cheng
b8c04e1226
Added getSubRegIndex(A,B) that returns subreg index of A to B. Use it to replace broken code in VirtRegRewriter.
...
llvm-svn: 88753
2009-11-14 03:42:17 +00:00
Evan Cheng
9b46e74f42
- Change TargetInstrInfo::reMaterialize to pass in TargetRegisterInfo.
...
- If destination is a physical register and it has a subreg index, use the
sub-register instead.
This fixes PR5423.
llvm-svn: 88745
2009-11-14 02:55:43 +00:00
Evan Cheng
c56b0a0f14
Fix PR5412: Fix an inverted check and another missing sub-register check.
...
llvm-svn: 88738
2009-11-14 02:09:09 +00:00
Dan Gohman
b36274632d
Enable the tail call optimization when the caller returns undef.
...
llvm-svn: 88737
2009-11-14 02:06:30 +00:00
Jakob Stoklund Olesen
2ece9d4854
Fix bug in -split-phi-edges.
...
When splitting an edge after a machine basic block with fall-through, we
forgot to insert a jump instruction. Fix this by calling updateTerminator() on
the fall-through block when relevant.
Also be more precise in PHIElimination::isLiveIn.
llvm-svn: 88728
2009-11-14 00:38:13 +00:00
Jakob Stoklund Olesen
28f746c6fa
Update MachineDominator information
...
llvm-svn: 88727
2009-11-14 00:38:06 +00:00
Lang Hames
8b2d2c7537
Added an API to the SlotIndexes pass to allow new instructions to be inserted into the numbering.
...
PreAllocSplitting is now using this API to insert code.
llvm-svn: 88725
2009-11-14 00:02:51 +00:00
Evan Cheng
e2907b91de
Fix PR5411. Bug in UpdateKills. A reg def partially define its super-registers.
...
llvm-svn: 88719
2009-11-13 23:16:41 +00:00
Jakob Stoklund Olesen
a8d26951eb
Fix PHIElimination optimization that uses MBB->getBasicBlock.
...
The BasicBlock associated with a MachineBasicBlock does not necessarily
correspond to the code in the MBB.
Don't insert a new IR BasicBlock when splitting critical edges. We are not
supposed to modify the IR during codegen, and we should be able to do just
fine with a NULL BB.
llvm-svn: 88707
2009-11-13 21:56:15 +00:00
Jakob Stoklund Olesen
ec4eff6c6a
Add MachineFunction::verify() to call the machine code verifier directly.
...
llvm-svn: 88706
2009-11-13 21:56:09 +00:00
Jakob Stoklund Olesen
28a81d4c5a
Fix polarity of a CFG check in machine verifier.
...
llvm-svn: 88704
2009-11-13 21:55:54 +00:00
Dan Gohman
30f404fb4a
Use .data() instead of .c_str() when nul-termination is not needed.
...
llvm-svn: 88703
2009-11-13 21:55:31 +00:00
David Greene
97a1f550d1
Move DebugInfo checks into EmitComments and remove them from
...
target-specific AsmPrinters. Not all comments need DebugInfo.
Re-enable the line numbers comment test.
llvm-svn: 88697
2009-11-13 21:34:57 +00:00
Dan Gohman
972293611d
When optimizing for size, don't tail-merge unless it's likely to be a
...
code-size win, and not when it's only likely to be code-size neutral,
such as when only a single instruction would be eliminated and a new
branch would be required.
This fixes rdar://7392894.
llvm-svn: 88692
2009-11-13 21:02:15 +00:00
Evan Cheng
f629fdcab2
Fix PR5410: LiveVariables lost subreg def:
...
D0<def,dead> = ...
...
= S0<use, kill>
S0<def> = ...
...
D0<def> =
The first D0 def is correctly marked dead, however, livevariables should have
added an implicit def of S0 or we end up with a use without a def.
llvm-svn: 88690
2009-11-13 20:36:40 +00:00
David Goodwin
e1d06f2239
Allow target to specify regclass for which antideps will only be broken along the critical path.
...
llvm-svn: 88682
2009-11-13 19:52:48 +00:00
Dan Gohman
01b65e1e48
Don't let a noalias difference disrupt the tailcall optimization.
...
llvm-svn: 88672
2009-11-13 18:49:38 +00:00
Devang Patel
7f5ae01388
Ignore nameless variables.
...
llvm-svn: 87069
2009-11-13 02:25:26 +00:00
Dale Johannesen
f57a58c4fe
Adjust isConstantSplat to allow for big-endian targets.
...
PPC is such a target; make it work.
llvm-svn: 87060
2009-11-13 01:45:18 +00:00
Bill Wendling
af38b4195e
Simplify code a bit
...
llvm-svn: 87040
2009-11-12 23:13:08 +00:00
Bill Wendling
507f0b33a6
Refactor code that checks if it's a call to a "nounwind" function.
...
llvm-svn: 87036
2009-11-12 21:59:20 +00:00
David Greene
1e8e66866e
Do some cleanups suggested by Chris.
...
llvm-svn: 87034
2009-11-12 21:49:55 +00:00
David Greene
7c84128066
Set the ReloadReuse AsmPrinter flag where appropriate.
...
llvm-svn: 87030
2009-11-12 21:07:54 +00:00
Daniel Dunbar
be0325cd14
Fix -Asserts warning.
...
llvm-svn: 87024
2009-11-12 20:53:43 +00:00
Bill Wendling
63f6c52635
If there's more than one function operand to a call instruction, be conservative
...
and don't assume that the call doesn't throw. It would be nice if there were a
way to determine which is the callee and which is a parameter. In practice, the
architecture we care about normally only have one operand for a call instruction
(x86 and arm).
llvm-svn: 87023
2009-11-12 20:51:53 +00:00
David Greene
58e7c6145b
Add a bool flag to StackObjects telling whether they reference spill
...
slots. The AsmPrinter will use this information to determine whether to
print a spill/reload comment.
Remove default argument values. It's too easy to pass a wrong argument
value when multiple arguments have default values. Make everything
explicit to trap bugs early.
Update all targets to adhere to the new interfaces..
llvm-svn: 87022
2009-11-12 20:49:22 +00:00