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
Daniel Dunbar
b142c00db4
MC: Factor out MCAssembler::ComputeFragmentSize.
...
llvm-svn: 103724
2010-05-13 18:35:06 +00:00
Daniel Dunbar
10ef3afee3
Fix const ilist_node::get{Prev,Next}Node() to actually compile. Picky, picky.
...
llvm-svn: 103723
2010-05-13 18:35:02 +00:00
Jakob Stoklund Olesen
ed8dd53c85
Fix complete badness in bugpoint's IsARMArchitecture() function.
...
The revision history for this function is interesting, with multiple layers of
wrongness being introduced one at a time.
This fixes a weird issue where bugpoint -run-llc would suddenly exit 13 half way
through isolating a miscompilation.
llvm-svn: 103721
2010-05-13 17:58:15 +00:00
Nick Lewycky
fc4c30e9e3
Actually run the test. Thanks Daniel Dunbar!
...
llvm-svn: 103720
2010-05-13 17:41:06 +00:00
Daniel Dunbar
5a601f9e09
MC: Add section layout order indices to MCSectionData.
...
llvm-svn: 103715
2010-05-13 15:17:26 +00:00
Rafael Espindola
bc6fabbd3e
Add an also-emit-llvm option to the gold plugin.
...
llvm-svn: 103714
2010-05-13 13:39:31 +00:00
Daniel Dunbar
aa67ae072c
MC: Move ordinal calculation, to make sure fragments synthesized for layout get assigned ordinals properly.
...
llvm-svn: 103711
2010-05-13 08:43:37 +00:00
Daniel Dunbar
e72ef430f7
MC: Create dummy fragments to avoid ever having empty sections, which simplifies layout.
...
llvm-svn: 103710
2010-05-13 08:43:34 +00:00
Daniel Dunbar
5ef1bcbb97
MC: Add MCAsmLayout::FragmentReplaced() helper function.
...
llvm-svn: 103709
2010-05-13 08:43:31 +00:00
Chandler Carruth
d37bcf5e2c
Update tablegen to generate shorts instead of chars for subgroup arrays.
...
llvm-svn: 103704
2010-05-13 07:43:47 +00:00
Anton Korobeynikov
fa0c92ab6c
Properly set thread-local flag on globals during cpp emission
...
llvm-svn: 103702
2010-05-13 07:41:57 +00:00
Nick Lewycky
e343761a2a
Remove heinous tabs.
...
llvm-svn: 103700
2010-05-13 06:45:13 +00:00
Nick Lewycky
38e49fbf52
Add testcase for r103653.
...
llvm-svn: 103699
2010-05-13 06:00:14 +00:00
Nick Lewycky
4cb49bc5a4
Replace the core comparison login in merge functions. We can now merge
...
vector<>::push_back() in:
int foo(vector<int> &a, vector<unsigned> &b) {
a.push_back(10);
b.push_back(11);
}
to two calls to the same push_back function, or fold away the two copies of
push_back() in:
struct T { int; };
struct S { char; };
vector<T*> t;
vector<S*> s;
void f(T *x) { t.push_back(x); }
void g(S *x) { s.push_back(x); }
but leave f() and g() separate, since they refer to two different global
variables.
llvm-svn: 103698
2010-05-13 05:48:45 +00:00
Daniel Dunbar
5759287db9
Fix -Asserts warning.
...
llvm-svn: 103697
2010-05-13 03:50:50 +00:00
Daniel Dunbar
561f55c1af
MC: Eliminate MCSectionData::{,Address,File}Size, which can now be computed by
...
utility functions.
llvm-svn: 103695
2010-05-13 03:19:50 +00:00
Daniel Dunbar
03bd9216df
Fix -Asserts warning.
...
llvm-svn: 103694
2010-05-13 03:19:36 +00:00
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
f254edca8d
MC/Mach-O: Add another zerofill test to improve coverage.
...
llvm-svn: 103691
2010-05-13 01:10:28 +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
8578537b17
lit: Fix a sh lexing bug which caused annotate-token.m to fail when run with the
...
internal shell parser; we weren't lexing the quotes in a command like::
clang -DFOO='hello'
correctly.
llvm-svn: 103652
2010-05-12 21:47:58 +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
Daniel Dunbar
78bb7f4dc9
ADT: Add ilist_node::get{Prev,Next}Node, which return the adjacent node or null.
...
- This provides a convenient alternative to using something llvm::prior or
manual iterator access, for example::
if (T *Prev = foo->getPrevNode())
...
instead of::
iterator it(foo);
if (it != begin()) {
--it;
...
}
- Chris, please review.
llvm-svn: 103647
2010-05-12 21:35:19 +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
Devang Patel
2c350fe8a7
Test case for r103633.
...
llvm-svn: 103634
2010-05-12 18:31:04 +00:00