Daniel Dunbar
a81966a973
MC: Switch to using explicit MCAlignFragments with OnlyAlignAddress bit instead
...
of manually doing padding/editing layout in LayoutSection().
- This probably seems like six-of-one and half-dozen of another, but there
is a method to my madness.
llvm-svn: 103693
2010-05-13 02:34:14 +00:00
Evan Cheng
8d516e4c3e
Bring back VLD1q and VST1q and use them for reloading / spilling Q registers. This allows folding loads and stores into VMOVQ.
...
llvm-svn: 103692
2010-05-13 01:12:06 +00:00
Daniel Dunbar
3fc379596a
MC: Add MCAlignFragment::OnlyAlignAddress bit. This is a bit of magic that says the align fragment shouldn't contribute to the logical section size, it is will be used for cleaning up the code to handle section alignment.
...
llvm-svn: 103690
2010-05-13 01:10:26 +00:00
Daniel Dunbar
ec3a2ac5ed
MC: Add MCSectionData::AddressSize, which is the size of the address space consumed by the section. This can differ from both the section logical size, and the section size on disk (although the current code handles this without making an explicit distinction).
...
llvm-svn: 103689
2010-05-13 01:10:22 +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
d43aee655d
Expand VMOVQQ into a pair of VMOVQ.
...
llvm-svn: 103684
2010-05-13 00:17:02 +00:00
Evan Cheng
533ffa237e
Mark some pattern-less instructions as neverHasSideEffects.
...
llvm-svn: 103683
2010-05-13 00:16:46 +00:00
Chris Lattner
ca57d80f83
fix rdar://7965971 and a fixme: use ParseIdentifier in
...
ParseDirectiveDarwinZerofill instead of hard coding the
check for identifier. This allows quoted symbol names to
be used.
llvm-svn: 103682
2010-05-13 00:10:34 +00:00
Chris Lattner
887e8f9f53
reapply r103668 with a fix. Never make "minor syntax changes"
...
after testing before committing.
llvm-svn: 103681
2010-05-13 00:02:47 +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
Chris Lattner
361c115f23
revert r103668 for now, it is apparently breaking things.
...
llvm-svn: 103677
2010-05-12 23:40:59 +00:00
Chris Lattner
91a836a9c7
moffset forms of moves are x86-32 only, make the parser
...
lower them to the correct x86-64 instructions since we
don't have a clean way to handle this in td files yet.
rdar://7947184
llvm-svn: 103668
2010-05-12 23:13:36 +00:00
Evan Cheng
aef4fc8804
Fix some potential issues in the pseudo instruction expansion phase: copy implicit operands and memoperands. Also, expand instructions even if their defs are "dead" since they may have implicit kill operands.
...
llvm-svn: 103667
2010-05-12 23:13:12 +00:00
Daniel Dunbar
de7caed021
MC: Move MCAlignFragment::EmitNops value out of the constructor.
...
llvm-svn: 103665
2010-05-12 22:56:23 +00:00
Daniel Dunbar
cf11e2a0a5
MC: Eliminate MCZeroFillFragment, it is no longer needed.
...
llvm-svn: 103664
2010-05-12 22:51:38 +00:00
Daniel Dunbar
0040c2c393
MC: Explicitly check that only virtual fragments appear in virtual sections.
...
llvm-svn: 103663
2010-05-12 22:51:35 +00:00
Daniel Dunbar
08bcc3a6fc
MC: Switch MCFillFragment to storing total fill size instead of a count. This allows using ValueSize==0 to represent a virtual fill.
...
llvm-svn: 103662
2010-05-12 22:51:32 +00:00
Daniel Dunbar
d3f60794d8
MC: Drop support for alignment in ZeroFill fragment, we can just use
...
MCAlignFragments for this.
llvm-svn: 103661
2010-05-12 22:51:27 +00:00
Chris Lattner
1960255123
fix the encoding of the obscure "moffset" forms of moves, i386
...
part first. rdar://7947184
llvm-svn: 103660
2010-05-12 22:48:24 +00:00
Nick Lewycky
b5bf752087
Clear CachedFunctionInfo upon Pass::releaseMemory. Because ValueMap will abort
...
on RAUW of functions, this is a correctness issue instead of a mere memory
usage problem.
No testcase until the new MergeFunctions can land.
llvm-svn: 103653
2010-05-12 21:48:15 +00:00
Daniel Dunbar
e8f8a29de5
Simplify.
...
llvm-svn: 103651
2010-05-12 21:47:55 +00:00
Daniel Dunbar
6a495507e5
MC: Factor out MCAssembler::LayoutFragment
...
llvm-svn: 103649
2010-05-12 21:35:25 +00:00
Daniel Dunbar
43dad4fc73
MC: Tweak section layout to not relying on accumulating address value.
...
llvm-svn: 103648
2010-05-12 21:35:22 +00:00
Evan Cheng
fe02735100
Remove a dead fixme.
...
llvm-svn: 103642
2010-05-12 20:20:22 +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
Daniel Dunbar
7b72c3c7a0
MC: Simplify LayoutSection to just take the index of the section to layout.
...
llvm-svn: 103627
2010-05-12 17:56:47 +00:00
Daniel Dunbar
adca38558e
MC: Track section layout order explicitly, and use to simplify.
...
llvm-svn: 103616
2010-05-12 15:42:59 +00:00
Nathan Jeffords
b578f7106d
stylistic change to MCSectionCOFF::PrintSwitchToSection COMDAT handling
...
Made a stylistic changed to the code/comments related to the unsupported COMDAT selection type IMAGE_COMDAT_SELECT_LARGEST based on from Anton Korobeynikov.
llvm-svn: 103590
2010-05-12 07:36: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
Rafael Espindola
3efc86abab
Add support for movi32 of global values to the new (MC) asm printer.
...
llvm-svn: 103576
2010-05-12 05:16:34 +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
4f2b4dd74b
vst instructions are modeled as this:
...
v1024 = REG_SEQUENCE ...
v1025 = EXTRACT_SUBREG v1024, 5
v1026 = EXTRACR_SUBREG v1024, 6
= VSTxx <addr>, v1025, v1026
The REG_SEQUENCE ensures the sources that feed into the VST instruction
are getting the right register allocation so they form a large super-
register. The extract_subreg will be coalesced away all would just work:
v1024 = REG_SEQUENCE ...
= VSTxx <addr>, v1024:5, v1024:6
The problem is if the coalescer isn't run, the extract_subreg instructions
would stick around and there is no assurance v1025 and v1026 will get the
right registers.
As a short term workaround, teach the NEON pre-allocation pass to transfer
the sub-register indices over. An alternative would be do it 2addr pass
when reg_sequence's are eliminated. But that *seems* wrong and require
updating liveness information.
Another alternative is to do this in the scheduler when the instructions are
created. But that would mean somehow the scheduler this has to be done for
correctness reason. That's yucky as well. So for now, we are leaving this
in the target specific pass.
llvm-svn: 103540
2010-05-12 01:42:50 +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
Daniel Dunbar
469dddef0e
MC/X86: Extend suffix matching hack to match 'q' suffix.
...
llvm-svn: 103535
2010-05-12 00:54:20 +00:00
Daniel Dunbar
e5a79692cf
MC/Mach-O/x86_64: Add a new hook for checking whether a particular section can
...
be diced into atoms, and adjust getAtom() to take this into account.
- This fixes relocations to symbols in fixed size literal sections, for
example.
llvm-svn: 103532
2010-05-12 00:38:17 +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
Daniel Dunbar
a033860d55
MC/Mach-O/x86_64: Fix PCrel adjustment for x86_64, which was using the fixup
...
offset instead of the fixup address as intended.
llvm-svn: 103527
2010-05-11 23:53:11 +00:00
Daniel Dunbar
7d7b6cf3b7
MC/Mach-O: As Kevin pointed out, 'Address' is really an offset -- rename to clarify.
...
llvm-svn: 103526
2010-05-11 23:53:07 +00:00
Daniel Dunbar
e43676c164
MC/Mach-O: Fix a crash on invalid.
...
llvm-svn: 103525
2010-05-11 23:53:05 +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
Evan Cheng
e46afad99b
Avoid breaking vstd when reg_sequence is not used.
...
llvm-svn: 103513
2010-05-11 21:07:36 +00:00
Jakob Stoklund Olesen
bea7fa3416
Silence warning
...
llvm-svn: 103508
2010-05-11 20:51:04 +00:00
Bill Wendling
4769f124cd
Simplify this logic of creating a default Features object.
...
llvm-svn: 103507
2010-05-11 20:46:04 +00:00