Daniel Dunbar
26fa01eb86
Inline Asm: Ensure buffer is newline terminated to match how the text is printed.
...
- This is a hack, but I can't decide the best place to handle this. Chris?
llvm-svn: 103765
2010-05-14 04:31:50 +00:00
Jakob Stoklund Olesen
892983155c
Enable opportunistic coalescing
...
llvm-svn: 103764
2010-05-14 04:30:51 +00:00
Jakob Stoklund Olesen
f913d9f2b8
Trust kill flags from isel and later passes.
...
llvm-svn: 103748
2010-05-14 00:02:23 +00:00
Jakob Stoklund Olesen
aa38789fd4
Fix an embarrassing runtime regression for RegAllocFast.
...
This loop is quadratic in the capacity for a DenseMap:
while(!map.empty())
map.erase(map.begin());
Instead we now do a normal begin() - end() iteration followed by map.clear().
That also has the nice sideeffect of shrinking the map capacity on demand.
llvm-svn: 103747
2010-05-14 00:02:20 +00:00
Dale Johannesen
9f19b6a761
Implement a correct ui64->f32 conversion. The old
...
one was subject to double rounding in extreme cases.
llvm-svn: 103744
2010-05-13 23:50:42 +00:00
Jakob Stoklund Olesen
b698dfd8c7
Clean up RegAllocFast debug output
...
llvm-svn: 103739
2010-05-13 20:43:17 +00:00
Dan Gohman
33e9c347bf
Teach MachineLICM and MachineSink how to clear kill flags conservatively
...
when they move instructions.
llvm-svn: 103737
2010-05-13 20:34:42 +00:00
Dan Gohman
223379b3a9
Add a utility function for conservatively clearing kill flags, and make
...
use of it in MachineCSE.
llvm-svn: 103726
2010-05-13 19:24:00 +00:00
Dan Gohman
d7b4c5b82e
An Instruction has a trivial kill only if its use is in the same
...
basic block.
llvm-svn: 103725
2010-05-13 19:19:32 +00:00
Jakob Stoklund Olesen
d99818256c
Take allocation hints from copy instructions to/from physregs.
...
This causes way more identity copies to be generated, ripe for coalescing.
llvm-svn: 103686
2010-05-13 00:19:43 +00:00
Jakob Stoklund Olesen
69f3ae8789
More asserts around physreg uses
...
llvm-svn: 103685
2010-05-13 00:19:39 +00:00
Evan Cheng
791573787a
If REG_SEQUENCE source is livein, copy it first. Also, update livevariables information when a copy is introduced.
...
llvm-svn: 103680
2010-05-13 00:00:35 +00:00
Evan Cheng
8134a2e87b
Do not attempt copy coalescing if the source and dest sub-register indices do not match.
...
llvm-svn: 103679
2010-05-12 23:59:42 +00:00
Jakob Stoklund Olesen
7d1323d9a5
Make sure to add kill flags to the last use of a virtreg when it is redefined.
...
The X86 floating point stack pass and others depend on good kill flags.
llvm-svn: 103635
2010-05-12 18:46:03 +00:00
Duncan Sands
bd83ac415f
Remove unused variable. Tweak a comment while there.
...
llvm-svn: 103586
2010-05-12 07:11:33 +00:00
Nathan Jeffords
9952bcf9f6
updated support for the COFF .linkonce
...
Now, the .linkonce directive is emitted as part of MCSectionCOFF::PrintSwitchToSection instead of AsmPrinter::EmitLinkage since it is an attribute of the section the symbol was placed into not the symbol itself.
llvm-svn: 103568
2010-05-12 04:26:09 +00:00
Evan Cheng
5b48257a73
Teach local regalloc about virtual registers with sub-indices.
...
llvm-svn: 103539
2010-05-12 01:29:36 +00:00
Evan Cheng
29c800f0f0
Code clean up.
...
llvm-svn: 103538
2010-05-12 01:27:49 +00:00
Jakob Stoklund Olesen
b3ca444697
Avoid scoping issues, fix buildbots
...
llvm-svn: 103530
2010-05-12 00:11:19 +00:00
Dan Gohman
03e407ed83
Add initial kill flag support to FastISel.
...
llvm-svn: 103529
2010-05-11 23:54:07 +00:00
Daniel Dunbar
5d81e1a0bf
Make Clang happy.
...
llvm-svn: 103528
2010-05-11 23:53:13 +00:00
Jakob Stoklund Olesen
e6eee8913f
Store the Dirty bit in the LiveReg structure instead of a bit vector.
...
llvm-svn: 103522
2010-05-11 23:24:47 +00:00
Jakob Stoklund Olesen
063844f706
Keep track of the last place a live virtreg was used.
...
This allows us to add accurate kill markers, something the scavenger likes.
Add some more tests from ARM that needed this.
llvm-svn: 103521
2010-05-11 23:24:45 +00:00
Dan Gohman
2ace137eb9
Don't set kill flags on uses of CopyFromReg nodes. InstrEmitter doesn't
...
create separate virtual registers for CopyFromReg values, so uses of
them don't necessarily kill the value.
llvm-svn: 103519
2010-05-11 21:59:14 +00:00
Jakob Stoklund Olesen
bea7fa3416
Silence warning
...
llvm-svn: 103508
2010-05-11 20:51:04 +00:00
Jakob Stoklund Olesen
e27902ac68
Simplify the tracking of used physregs to a bulk bitor followed by a transitive
...
closure after allocating all blocks.
Add a few more test cases for -regalloc=fast.
llvm-svn: 103500
2010-05-11 20:30:28 +00:00
Duncan Sands
7d5e4152c3
I got tired of VISIBILITY_HIDDEN colliding with the gcc enum. Rename it
...
to LLVM_LIBRARY_VISIBILITY and introduce LLVM_GLOBAL_VISIBILITY, which is
the opposite, for future use by dragonegg.
llvm-svn: 103495
2010-05-11 20:16:09 +00:00
Dan Gohman
ca2df906ae
Trim #includes and forward declarations.
...
llvm-svn: 103489
2010-05-11 19:11:43 +00:00
Jakob Stoklund Olesen
442e38c4de
Mostly rewrite RegAllocFast.
...
Sorry for the big change. The path leading up to this patch had some TableGen
changes that I didn't want to commit before I knew they were useful. They
weren't, and this version does not need them.
The fast register allocator now does no liveness calculations. Instead it relies
on kill flags provided by isel. (Currently those kill flags are also ignored due
to isel bugs). The allocation algorithm is supposed to work with any subset of
valid kill flags. More kill flags simply means fewer spills inserted.
Registers are allocated from a working set that contains no aliases. That means
most allocations can be done directly without expensive alias checks. When the
working set runs out of registers we do the full alias check to find new free
registers.
llvm-svn: 103488
2010-05-11 18:54:45 +00:00
Dan Gohman
fb6f4da0e0
Implement a bunch more TargetSelectionDAGInfo infrastructure.
...
Move EmitTargetCodeForMemcpy, EmitTargetCodeForMemset, and
EmitTargetCodeForMemmove out of TargetLowering and into
SelectionDAGInfo to exercise this.
llvm-svn: 103481
2010-05-11 17:31:57 +00:00
Douglas Gregor
2f2491405a
Fixes for Microsoft Visual Studio 2010, from Steven Watanabe!
...
llvm-svn: 103457
2010-05-11 06:17:44 +00:00
Evan Cheng
97fc5247c8
It's not safe eliminate copies where src and dst have different sub-register indices.
...
llvm-svn: 103450
2010-05-11 00:20:03 +00:00
Evan Cheng
b4ac902aee
Ensure REG_SEQUENCE source operands are unique.
...
llvm-svn: 103449
2010-05-11 00:04:31 +00:00
Evan Cheng
de3482f4af
Indentation.
...
llvm-svn: 103441
2010-05-10 23:08:19 +00:00
Devang Patel
23f7323e7f
Enable multiple Compile Units in one module.
...
This means now 'llvm-ld a.bc b.bc' will preserve debug info appropriately.
llvm-svn: 103439
2010-05-10 22:49:55 +00:00
Evan Cheng
119fec2a67
It's not safe to propagate implicit_def that defines part of a register.
...
llvm-svn: 103436
2010-05-10 21:25:30 +00:00
Evan Cheng
040646a78e
Clear RegSequences vector after eliminating REG_SEQUENCE instructions.
...
llvm-svn: 103435
2010-05-10 21:24:55 +00:00
Evan Cheng
df350445c6
Be careful with operand promotion. For a binary operation, the source operands may be the same. PR7018. rdar://7939869.
...
llvm-svn: 103419
2010-05-10 19:03:57 +00:00
Evan Cheng
9f622b5659
Re-defined valno is always valno even for partial re-def's.
...
llvm-svn: 103410
2010-05-10 17:33:49 +00:00
Bob Wilson
776d3dcfb4
Fix PR7096. When a block containing multiple defs is tail duplicated, the
...
SSAUpdater for the value from the first def may see uses of undefined values,
because the later defs will not have been updated yet.
llvm-svn: 103407
2010-05-10 17:14:26 +00:00
Duncan Sands
83c7bda62e
Add an assertion to catch attempts to access off the end of the array.
...
Based on a patch by Javier Martinez.
llvm-svn: 103391
2010-05-10 04:54:28 +00:00
Devang Patel
eed188e776
Instead of just verifying compile unit, verify entire type, variable, namespace etc..
...
llvm-svn: 103327
2010-05-07 23:33:41 +00:00
Devang Patel
14f07a8625
Remove DIGlobal.
...
llvm-svn: 103325
2010-05-07 23:19:07 +00:00
Dan Gohman
95040c18f4
SDDbgValues are apparently not being legalized. Fix a symptom of the problem,
...
and not the real problem itself, by dropping debug info for i128 values.
rdar://7958162.
llvm-svn: 103310
2010-05-07 22:19:08 +00:00
Devang Patel
3c2f4664fc
Verify variable directly.
...
llvm-svn: 103305
2010-05-07 22:04:20 +00:00
Chris Lattner
e72e3e9c12
add COFF support for COMDAT sections, patch by Nathan Jeffords!
...
llvm-svn: 103304
2010-05-07 21:49:09 +00:00
Devang Patel
e7333c8318
Verify entire type descriptor not just tag.
...
llvm-svn: 103303
2010-05-07 21:45:47 +00:00
Dale Johannesen
1ee37ac5d4
Fix PR 7087, and probably other things, by extending
...
getConstantFP to accept the two supported long double
target types. This was not the original intent, but
there are other places that assume this works and it's
easy enough to do.
llvm-svn: 103299
2010-05-07 21:35:53 +00:00
Devang Patel
0638b539bb
Wrap const MDNode * inside DIDescriptor.
...
llvm-svn: 103295
2010-05-07 20:54:48 +00:00
Devang Patel
02bb578ffd
Avoid DIDescriptor::getNode(). Use overloaded operators instead.
...
llvm-svn: 103272
2010-05-07 18:11:54 +00:00