Dan Gohman [Fri, 14 May 2010 15:35:10 +0000 (15:35 +0000)]
Use PassManagerBase, to give clients the option of using either
FunctionPassManager or regular PassManager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103773
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 14 May 2010 15:29:31 +0000 (15:29 +0000)]
Add an isNodeHidden to the graph traits, to support definition of
subgraph views.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103772
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 14 May 2010 07:47:51 +0000 (07:47 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103769
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 14 May 2010 07:37:40 +0000 (07:37 +0000)]
Get rid of the bit twiddling to read / set OpActions and ValueTypeActions. The small saving in memory isn't worth the increase in runtime and code complexity in my opinion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103768
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 14 May 2010 04:31:50 +0000 (04:31 +0000)]
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?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103765
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 14 May 2010 04:30:51 +0000 (04:30 +0000)]
Enable opportunistic coalescing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103764
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 14 May 2010 02:13:41 +0000 (02:13 +0000)]
Added a QQQQ register file to model 4-consecutive Q registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103760
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 14 May 2010 01:50:28 +0000 (01:50 +0000)]
Add AsmParser support for darwin tbss directive.
Nothing uses this yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103757
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 14 May 2010 01:38:54 +0000 (01:38 +0000)]
Fix a couple of typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103756
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 14 May 2010 01:02:48 +0000 (01:02 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103755
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 14 May 2010 00:51:14 +0000 (00:51 +0000)]
MC: Switch to completely lazy layout.
- The eliminates the last major algorithmic problem with MC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103754
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 14 May 2010 00:37:21 +0000 (00:37 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103753
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 14 May 2010 00:37:17 +0000 (00:37 +0000)]
MC: Implicitly assign section addresses when the previous fragment is layed out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103752
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 14 May 2010 00:37:14 +0000 (00:37 +0000)]
MC: Switch MCFragment to storing the layout order index, not its index in the file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103751
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 14 May 2010 00:37:11 +0000 (00:37 +0000)]
MC: Change LayoutSection() to only do the section initializiation.
Also, elimminate MCAsmLayout::set*, which are no longer needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103750
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 14 May 2010 00:21:45 +0000 (00:21 +0000)]
Fix comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103749
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 14 May 2010 00:02:23 +0000 (00:02 +0000)]
Trust kill flags from isel and later passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103748
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 14 May 2010 00:02:20 +0000 (00:02 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103747
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 13 May 2010 23:55:47 +0000 (23:55 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103746
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 13 May 2010 23:50:42 +0000 (23:50 +0000)]
Implement a correct ui64->f32 conversion. The old
one was subject to double rounding in extreme cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103744
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 13 May 2010 23:25:21 +0000 (23:25 +0000)]
Eliminate use of magic numbers to access OpActions. It also has the effect of allowing more than 31 scalar value types. MAX_ALLOWED_VALUETYPE had already been updated to 64 a while back.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103743
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 13 May 2010 23:01:26 +0000 (23:01 +0000)]
Fix up LoadExtActions, TruncStoreActions, and IndexedModeActions representation and setter and getter's so they will continue to work if the number of scalar ValueType's exceeds 31.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103742
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 13 May 2010 20:43:17 +0000 (20:43 +0000)]
Clean up RegAllocFast debug output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103739
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 13 May 2010 20:40:12 +0000 (20:40 +0000)]
MC: Move Layout{Fragment,Section} into MCAsmLayout, and add LayoutFile().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103738
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 13 May 2010 20:34:42 +0000 (20:34 +0000)]
Teach MachineLICM and MachineSink how to clear kill flags conservatively
when they move instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103737
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 13 May 2010 20:14:58 +0000 (20:14 +0000)]
80 col violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103733
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 13 May 2010 20:02:08 +0000 (20:02 +0000)]
Add comment about the pseudo registers QQ, each of which is a pair of Q registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103731
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 13 May 2010 19:58:24 +0000 (19:58 +0000)]
Fix pr7110: For non-Darwin targets UnspilledCS1GPRs may include high registers.
Do not use those for Thumb1 functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103730
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Thu, 13 May 2010 19:34:06 +0000 (19:34 +0000)]
CMake: fixes 64 bit Visual Studio IDE build. Fixes bug 4936.
Patch by Dimitry Andric!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103727
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 13 May 2010 19:24:00 +0000 (19:24 +0000)]
Add a utility function for conservatively clearing kill flags, and make
use of it in MachineCSE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103726
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 13 May 2010 19:19:32 +0000 (19:19 +0000)]
An Instruction has a trivial kill only if its use is in the same
basic block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103725
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 13 May 2010 18:35:06 +0000 (18:35 +0000)]
MC: Factor out MCAssembler::ComputeFragmentSize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103724
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 13 May 2010 18:35:02 +0000 (18:35 +0000)]
Fix const ilist_node::get{Prev,Next}Node() to actually compile. Picky, picky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103723
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 13 May 2010 17:58:15 +0000 (17:58 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103721
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 13 May 2010 17:41:06 +0000 (17:41 +0000)]
Actually run the test. Thanks Daniel Dunbar!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103720
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 13 May 2010 15:17:26 +0000 (15:17 +0000)]
MC: Add section layout order indices to MCSectionData.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103715
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 13 May 2010 13:39:31 +0000 (13:39 +0000)]
Add an also-emit-llvm option to the gold plugin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103714
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 13 May 2010 08:43:37 +0000 (08:43 +0000)]
MC: Move ordinal calculation, to make sure fragments synthesized for layout get assigned ordinals properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103711
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 13 May 2010 08:43:34 +0000 (08:43 +0000)]
MC: Create dummy fragments to avoid ever having empty sections, which simplifies layout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103710
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 13 May 2010 08:43:31 +0000 (08:43 +0000)]
MC: Add MCAsmLayout::FragmentReplaced() helper function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103709
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 13 May 2010 07:43:47 +0000 (07:43 +0000)]
Update tablegen to generate shorts instead of chars for subgroup arrays.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103704
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Thu, 13 May 2010 07:41:57 +0000 (07:41 +0000)]
Properly set thread-local flag on globals during cpp emission
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103702
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 13 May 2010 06:45:13 +0000 (06:45 +0000)]
Remove heinous tabs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103700
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 13 May 2010 06:00:14 +0000 (06:00 +0000)]
Add testcase for r103653.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103699
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 13 May 2010 05:48:45 +0000 (05:48 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103698
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 13 May 2010 03:50:50 +0000 (03:50 +0000)]
Fix -Asserts warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103697
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 13 May 2010 03:19:50 +0000 (03:19 +0000)]
MC: Eliminate MCSectionData::{,Address,File}Size, which can now be computed by
utility functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103695
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 13 May 2010 03:19:36 +0000 (03:19 +0000)]
Fix -Asserts warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103694
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 13 May 2010 02:34:14 +0000 (02:34 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103693
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 13 May 2010 01:12:06 +0000 (01:12 +0000)]
Bring back VLD1q and VST1q and use them for reloading / spilling Q registers. This allows folding loads and stores into VMOVQ.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103692
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 13 May 2010 01:10:28 +0000 (01:10 +0000)]
MC/Mach-O: Add another zerofill test to improve coverage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103691
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 13 May 2010 01:10:26 +0000 (01:10 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103690
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 13 May 2010 01:10:22 +0000 (01:10 +0000)]
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).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103689
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 13 May 2010 00:19:43 +0000 (00:19 +0000)]
Take allocation hints from copy instructions to/from physregs.
This causes way more identity copies to be generated, ripe for coalescing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103686
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 13 May 2010 00:19:39 +0000 (00:19 +0000)]
More asserts around physreg uses
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103685
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 13 May 2010 00:17:02 +0000 (00:17 +0000)]
Expand VMOVQQ into a pair of VMOVQ.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103684
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 13 May 2010 00:16:46 +0000 (00:16 +0000)]
Mark some pattern-less instructions as neverHasSideEffects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103683
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 13 May 2010 00:10:34 +0000 (00:10 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103682
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 13 May 2010 00:02:47 +0000 (00:02 +0000)]
reapply r103668 with a fix. Never make "minor syntax changes"
after testing before committing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103681
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 13 May 2010 00:00:35 +0000 (00:00 +0000)]
If REG_SEQUENCE source is livein, copy it first. Also, update livevariables information when a copy is introduced.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103680
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 12 May 2010 23:59:42 +0000 (23:59 +0000)]
Do not attempt copy coalescing if the source and dest sub-register indices do not match.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103679
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 12 May 2010 23:40:59 +0000 (23:40 +0000)]
revert r103668 for now, it is apparently breaking things.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103677
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 12 May 2010 23:13:36 +0000 (23:13 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103668
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 12 May 2010 23:13:12 +0000 (23:13 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103667
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 12 May 2010 22:56:23 +0000 (22:56 +0000)]
MC: Move MCAlignFragment::EmitNops value out of the constructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103665
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 12 May 2010 22:51:38 +0000 (22:51 +0000)]
MC: Eliminate MCZeroFillFragment, it is no longer needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103664
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 12 May 2010 22:51:35 +0000 (22:51 +0000)]
MC: Explicitly check that only virtual fragments appear in virtual sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103663
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 12 May 2010 22:51:32 +0000 (22:51 +0000)]
MC: Switch MCFillFragment to storing total fill size instead of a count. This allows using ValueSize==0 to represent a virtual fill.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103662
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 12 May 2010 22:51:27 +0000 (22:51 +0000)]
MC: Drop support for alignment in ZeroFill fragment, we can just use
MCAlignFragments for this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103661
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 12 May 2010 22:48:24 +0000 (22:48 +0000)]
fix the encoding of the obscure "moffset" forms of moves, i386
part first. rdar://
7947184
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103660
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 12 May 2010 21:48:15 +0000 (21:48 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103653
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 12 May 2010 21:47:58 +0000 (21:47 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103652
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 12 May 2010 21:47:55 +0000 (21:47 +0000)]
Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103651
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 12 May 2010 21:35:25 +0000 (21:35 +0000)]
MC: Factor out MCAssembler::LayoutFragment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103649
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 12 May 2010 21:35:22 +0000 (21:35 +0000)]
MC: Tweak section layout to not relying on accumulating address value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103648
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 12 May 2010 21:35:19 +0000 (21:35 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103647
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 12 May 2010 20:20:22 +0000 (20:20 +0000)]
Remove a dead fixme.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103642
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 12 May 2010 18:46:03 +0000 (18:46 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103635
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 12 May 2010 18:31:04 +0000 (18:31 +0000)]
Test case for r103633.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103634
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 12 May 2010 17:56:47 +0000 (17:56 +0000)]
MC: Simplify LayoutSection to just take the index of the section to layout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103627
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 12 May 2010 17:56:44 +0000 (17:56 +0000)]
lit: Fix OneCommandPerFileTest format when tests are specified directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103626
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 12 May 2010 17:56:42 +0000 (17:56 +0000)]
lit: Add support for 'lit ... @foo', which reads a list of tests to run from
foo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103625
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 12 May 2010 15:42:59 +0000 (15:42 +0000)]
MC: Track section layout order explicitly, and use to simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103616
91177308-0d34-0410-b5e6-
96231b3b80d8
Nathan Jeffords [Wed, 12 May 2010 07:36:03 +0000 (07:36 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103590
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 12 May 2010 07:11:33 +0000 (07:11 +0000)]
Remove unused variable. Tweak a comment while there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103586
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 12 May 2010 05:16:34 +0000 (05:16 +0000)]
Add support for movi32 of global values to the new (MC) asm printer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103576
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Wed, 12 May 2010 05:04:20 +0000 (05:04 +0000)]
Testcase for llvm 103572 (
7898991).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103574
91177308-0d34-0410-b5e6-
96231b3b80d8
Nathan Jeffords [Wed, 12 May 2010 04:26:09 +0000 (04:26 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103568
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 12 May 2010 01:42:50 +0000 (01:42 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103540
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 12 May 2010 01:29:36 +0000 (01:29 +0000)]
Teach local regalloc about virtual registers with sub-indices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103539
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 12 May 2010 01:27:49 +0000 (01:27 +0000)]
Code clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103538
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 12 May 2010 00:54:20 +0000 (00:54 +0000)]
MC/X86: Extend suffix matching hack to match 'q' suffix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103535
91177308-0d34-0410-b5e6-
96231b3b80d8
Nathan Jeffords [Wed, 12 May 2010 00:52:54 +0000 (00:52 +0000)]
Added a trivial function to modify the flags field of MCSymbolData class. The function takes the value and a mask, and clears the mask bits before applying the value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103534
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 12 May 2010 00:38:17 +0000 (00:38 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103532
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 12 May 2010 00:11:24 +0000 (00:11 +0000)]
Enable a bunch more -regalloc=fast tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103531
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 12 May 2010 00:11:19 +0000 (00:11 +0000)]
Avoid scoping issues, fix buildbots
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103530
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 11 May 2010 23:54:07 +0000 (23:54 +0000)]
Add initial kill flag support to FastISel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103529
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 11 May 2010 23:53:13 +0000 (23:53 +0000)]
Make Clang happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103528
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 11 May 2010 23:53:11 +0000 (23:53 +0000)]
MC/Mach-O/x86_64: Fix PCrel adjustment for x86_64, which was using the fixup
offset instead of the fixup address as intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103527
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 11 May 2010 23:53:07 +0000 (23:53 +0000)]
MC/Mach-O: As Kevin pointed out, 'Address' is really an offset -- rename to clarify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103526
91177308-0d34-0410-b5e6-
96231b3b80d8