Jakob Stoklund Olesen
4715605740
When verifying two-address instructions, check the following:
...
- Kill is implicit when use and def registers are identical.
- Only virtual registers can differ.
Add a -verify-fast-regalloc to run the verifier before the fast allocator.
llvm-svn: 103797
2010-05-14 20:28:32 +00:00
Kevin Enderby
dc13d89540
Fix so "int3" is correctly accepted, added "into" and fixed "int" with an
...
argument, like "int $4", to not get an Assertion error.
llvm-svn: 103791
2010-05-14 19:16:02 +00:00
Evan Cheng
ab9e0f7315
Model VLD*_UPD and VLD*odd_UPD pair with REG_SEQUENCE.
...
llvm-svn: 103790
2010-05-14 18:54:59 +00:00
Daniel Dunbar
89a1d9036a
MC/Mach-O/x86_64: Darwin's special "signed_N" relocation types should only be
...
used to replace a normal relocation, not a reference to a GOT entry.
llvm-svn: 103789
2010-05-14 18:53:40 +00:00
Jakob Stoklund Olesen
3eac02b22f
Simplify the handling of physreg defs and uses in RegAllocFast.
...
This adds extra security against using clobbered physregs, and it adds kill
markers to physreg uses.
llvm-svn: 103784
2010-05-14 18:03:25 +00:00
Dan Gohman
dc05cdd475
Set isTerminator on TRAP instructions.
...
llvm-svn: 103778
2010-05-14 16:46:02 +00:00
Dan Gohman
c0438974b2
Don't use isBarrier for the PowerPC sync instruction. isBarrier is for
...
control barriers, not memory ordering barriers.
llvm-svn: 103777
2010-05-14 16:42:16 +00:00
Dan Gohman
b0f18b9c6c
Add mayLoad and mayStore flags to instructions which missed them.
...
llvm-svn: 103776
2010-05-14 16:34:55 +00:00
Daniel Dunbar
3c261b3ff8
XFAIL the test I added with vg_leak, apparently it is the first and only llc
...
-filetype=obj test, and -filetype=obj leaks a few objects. Added a FIXME, we
need to sort out the ownership model for the various MC objects.
llvm-svn: 103769
2010-05-14 07:47:51 +00:00
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
Evan Cheng
2af2c9fa14
Added a QQQQ register file to model 4-consecutive Q registers.
...
llvm-svn: 103760
2010-05-14 02:13:41 +00:00
Eric Christopher
ebea91f168
Add AsmParser support for darwin tbss directive.
...
Nothing uses this yet.
llvm-svn: 103757
2010-05-14 01:50:28 +00:00
Eric Christopher
0b3085ae2e
Fix a couple of typos.
...
llvm-svn: 103756
2010-05-14 01:38:54 +00:00
Daniel Dunbar
7fee3c7b28
MC: Switch to completely lazy layout.
...
- The eliminates the last major algorithmic problem with MC.
llvm-svn: 103754
2010-05-14 00:51:14 +00:00
Daniel Dunbar
66c2ccec2d
MC: Extend MCAsmLayout to explicitly track which fragments have been layed out, and enforce several invariants to LayoutFragment to ensure we only do layout in a sensible order.
...
llvm-svn: 103753
2010-05-14 00:37:21 +00:00
Daniel Dunbar
bfc0b2083d
MC: Implicitly assign section addresses when the previous fragment is layed out.
...
llvm-svn: 103752
2010-05-14 00:37:17 +00:00
Daniel Dunbar
11467b2eaa
MC: Switch MCFragment to storing the layout order index, not its index in the file.
...
llvm-svn: 103751
2010-05-14 00:37:14 +00:00
Daniel Dunbar
b2a98e0a16
MC: Change LayoutSection() to only do the section initializiation.
...
Also, elimminate MCAsmLayout::set*, which are no longer needed.
llvm-svn: 103750
2010-05-14 00:37:11 +00:00
Evan Cheng
d1f60c198d
Fix comments.
...
llvm-svn: 103749
2010-05-14 00:21:45 +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
Evan Cheng
775549c9e7
Adding a v8i64 512-bit vector type. This will be used to model ARM NEON intrinsics which translate into a pair of vld / vst instructions that can load / store 8 consecutive 64-bit (D) registers.
...
llvm-svn: 103746
2010-05-13 23:55:47 +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
Daniel Dunbar
86825a9719
MC: Move Layout{Fragment,Section} into MCAsmLayout, and add LayoutFile().
...
llvm-svn: 103738
2010-05-13 20:40:12 +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
Evan Cheng
a36135d02f
Add comment about the pseudo registers QQ, each of which is a pair of Q registers.
...
llvm-svn: 103731
2010-05-13 20:02:08 +00:00
Bob Wilson
eaa62c4861
Fix pr7110: For non-Darwin targets UnspilledCS1GPRs may include high registers.
...
Do not use those for Thumb1 functions.
llvm-svn: 103730
2010-05-13 19:58:24 +00:00
Oscar Fuentes
7712b9a40b
CMake: fixes 64 bit Visual Studio IDE build. Fixes bug 4936.
...
Patch by Dimitry Andric!
llvm-svn: 103727
2010-05-13 19:34:06 +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
Daniel Dunbar
b142c00db4
MC: Factor out MCAssembler::ComputeFragmentSize.
...
llvm-svn: 103724
2010-05-13 18:35: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
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
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
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
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