Commit Graph

60885 Commits

Author SHA1 Message Date
Dan Gohman
8090e214f7 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
2010-05-14 15:35:10 +00:00
Dan Gohman
89938ce0ad 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
2010-05-14 15:29:31 +00:00
Daniel Dunbar
bd616b69f7 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
2010-05-14 07:47:51 +00:00
Evan Cheng
0ebf356ddf 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
2010-05-14 07:37:40 +00:00
Daniel Dunbar
d11d59e35a 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
2010-05-14 04:31:50 +00:00
Jakob Stoklund Olesen
7ff82e1501 Enable opportunistic coalescing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103764 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-14 04:30:51 +00:00
Evan Cheng
22c687b642 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
2010-05-14 02:13:41 +00:00
Eric Christopher
482eba054a 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
2010-05-14 01:50:28 +00:00
Eric Christopher
c260a3e59a Fix a couple of typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103756 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-14 01:38:54 +00:00
Nick Lewycky
3fa0c8ca96 Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103755 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-14 01:02:48 +00:00
Daniel Dunbar
47b3ec4daa 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
2010-05-14 00:51:14 +00:00
Daniel Dunbar
9005d45a99 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
2010-05-14 00:37:21 +00:00
Daniel Dunbar
11c4111516 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
2010-05-14 00:37:17 +00:00
Daniel Dunbar
337718e09c 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
2010-05-14 00:37:14 +00:00
Daniel Dunbar
afc6acdab7 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
2010-05-14 00:37:11 +00:00
Evan Cheng
7f68719517 Fix comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103749 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-14 00:21:45 +00:00
Jakob Stoklund Olesen
57b6076d34 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
2010-05-14 00:02:23 +00:00
Jakob Stoklund Olesen
7d4f25904d 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
2010-05-14 00:02:20 +00:00
Evan Cheng
dbf67fefea 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
2010-05-13 23:55:47 +00:00
Dale Johannesen
a5afa1cb21 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
2010-05-13 23:50:42 +00:00
Evan Cheng
b9c0e332b3 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
2010-05-13 23:25:21 +00:00
Evan Cheng
b21f5a5511 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
2010-05-13 23:01:26 +00:00
Jakob Stoklund Olesen
c9c4dacd03 Clean up RegAllocFast debug output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103739 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-13 20:43:17 +00:00
Daniel Dunbar
b69fc044db 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
2010-05-13 20:40:12 +00:00
Dan Gohman
e6cd757e68 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
2010-05-13 20:34:42 +00:00
Evan Cheng
1e5a6c46b8 80 col violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103733 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-13 20:14:58 +00:00
Evan Cheng
c4ca40eb5e 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
2010-05-13 20:02:08 +00:00
Bob Wilson
1190c14b54 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
2010-05-13 19:58:24 +00:00
Oscar Fuentes
ed36aac081 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
2010-05-13 19:34:06 +00:00
Dan Gohman
49b4589978 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
2010-05-13 19:24:00 +00:00
Dan Gohman
e1308d86ed 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
2010-05-13 19:19:32 +00:00
Daniel Dunbar
2c18d3b0fe MC: Factor out MCAssembler::ComputeFragmentSize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103724 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-13 18:35:06 +00:00
Daniel Dunbar
f1fd2288f3 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
2010-05-13 18:35:02 +00:00
Jakob Stoklund Olesen
18e05b4692 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
2010-05-13 17:58:15 +00:00
Nick Lewycky
eb7d818969 Actually run the test. Thanks Daniel Dunbar!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103720 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-13 17:41:06 +00:00
Daniel Dunbar
f60c736c64 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
2010-05-13 15:17:26 +00:00
Rafael Espindola
62bacd69c2 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
2010-05-13 13:39:31 +00:00
Daniel Dunbar
49ed921190 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
2010-05-13 08:43:37 +00:00
Daniel Dunbar
09d3465f0e 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
2010-05-13 08:43:34 +00:00
Daniel Dunbar
aa0d350fe5 MC: Add MCAsmLayout::FragmentReplaced() helper function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103709 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-13 08:43:31 +00:00
Chandler Carruth
93ca7b60bf 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
2010-05-13 07:43:47 +00:00
Anton Korobeynikov
61aeed11cd 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
2010-05-13 07:41:57 +00:00
Nick Lewycky
911ae391e8 Remove heinous tabs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103700 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-13 06:45:13 +00:00
Nick Lewycky
12b927bad0 Add testcase for r103653.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103699 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-13 06:00:14 +00:00
Nick Lewycky
33ab0b1568 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
2010-05-13 05:48:45 +00:00
Daniel Dunbar
054be92e1d Fix -Asserts warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103697 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-13 03:50:50 +00:00
Daniel Dunbar
2661f11e46 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
2010-05-13 03:19:50 +00:00
Daniel Dunbar
1860e7dcfd Fix -Asserts warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103694 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-13 03:19:36 +00:00
Daniel Dunbar
61066dbdf2 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
2010-05-13 02:34:14 +00:00
Evan Cheng
69b9f9883e 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
2010-05-13 01:12:06 +00:00