Commit Graph

83650 Commits

Author SHA1 Message Date
Evan Cheng 83887a7d3a 80 col violation.
llvm-svn: 103733
2010-05-13 20:14:58 +00:00
Howard Hinnant 97ae3d5183 weekly test results
llvm-svn: 103732
2010-05-13 20:10:39 +00:00
Evan Cheng 2ca1bd119e 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 208dc08c2b 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 82135e5a2f 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 7767d2747b 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 5b510c1474 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 454ea716a3 MC: Factor out MCAssembler::ComputeFragmentSize.
llvm-svn: 103724
2010-05-13 18:35:06 +00:00
Daniel Dunbar 2842f25625 Fix const ilist_node::get{Prev,Next}Node() to actually compile. Picky, picky.
llvm-svn: 103723
2010-05-13 18:35:02 +00:00
Howard Hinnant f8bfb45e9b partial [rand.dist.pois.gamma]
llvm-svn: 103722
2010-05-13 17:58:28 +00:00
Jakob Stoklund Olesen 3e0ddc000c 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 23b545ca4b Actually run the test. Thanks Daniel Dunbar!
llvm-svn: 103720
2010-05-13 17:41:06 +00:00
Fariborz Jahanian 1bd96d13b2 Objective-C++ Sema. Fix a bug in instantiation of receivers.
Completes radar 7963410.

llvm-svn: 103719
2010-05-13 17:19:25 +00:00
Douglas Gregor 88d292ccb8 Rework when and how vtables are emitted, by tracking where vtables are
"used" (e.g., we will refer to the vtable in the generated code) and
when they are defined (i.e., because we've seen the key function
definition). Previously, we were effectively tracking "potential
definitions" rather than uses, so we were a bit too eager about emitting
vtables for classes without key functions. 

The new scheme:
  - For every use of a vtable, Sema calls MarkVTableUsed() to indicate
  the use. For example, this occurs when calling a virtual member
  function of the class, defining a constructor of that class type,
  dynamic_cast'ing from that type to a derived class, casting
  to/through a virtual base class, etc.
  - For every definition of a vtable, Sema calls MarkVTableUsed() to
  indicate the definition. This happens at the end of the translation
  unit for classes whose key function has been defined (so we can
  delay computation of the key function; see PR6564), and will also
  occur with explicit template instantiation definitions.
 - For every vtable defined/used, we mark all of the virtual member
 functions of that vtable as defined/used, unless we know that the key
 function is in another translation unit. This instantiates virtual
 member functions when needed.
  - At the end of the translation unit, Sema tells CodeGen (via the
  ASTConsumer) which vtables must be defined (CodeGen will define
  them) and which may be used (for which CodeGen will define the
  vtables lazily). 

From a language perspective, both the old and the new schemes are
permissible: we're allowed to instantiate virtual member functions
whenever we want per the standard. However, all other C++ compilers
were more lazy than we were, and our eagerness was both a performance
issue (we instantiated too much) and a portability problem (we broke
Boost test cases, which now pass).

Notes:
  (1) There's a ton of churn in the tests, because the order in which
  vtables get emitted to IR has changed. I've tried to isolate some of
  the larger tests from these issues.
  (2) Some diagnostics related to
  implicitly-instantiated/implicitly-defined virtual member functions
  have moved to the point of first use/definition. It's better this
  way.
  (3) I could use a review of the places where we MarkVTableUsed, to
  see if I missed any place where the language effectively requires a
  vtable.

Fixes PR7114 and PR6564.

llvm-svn: 103718
2010-05-13 16:44:06 +00:00
Ted Kremenek ecc31c93c2 Don't add a null successor to a CFGBlock when the contents of an @synchronized statement is empty.
Fixes <rdar://problem/7979430>.

llvm-svn: 103717
2010-05-13 16:38:08 +00:00
Ted Kremenek d321413e3d Fold assertion into condition, as it does not hold all the time.
llvm-svn: 103716
2010-05-13 15:38:38 +00:00
Daniel Dunbar 484c6fc825 MC: Add section layout order indices to MCSectionData.
llvm-svn: 103715
2010-05-13 15:17:26 +00:00
Rafael Espindola ba3398bb1a Add an also-emit-llvm option to the gold plugin.
llvm-svn: 103714
2010-05-13 13:39:31 +00:00
Chandler Carruth 5cb1abc6db Testcase for r103712.
llvm-svn: 103713
2010-05-13 12:04:17 +00:00
Chandler Carruth d102f2d5c5 Teach the AKA calculation to look at sugar on the pointee type for pointers and
references. This is a WIP as we should handle function pointers, etc. Reshuffle
the code to do this to facilitate recursing in this manner, and to check for
the type already being printed first rather than last.

llvm-svn: 103712
2010-05-13 11:37:24 +00:00
Daniel Dunbar aa8bd69886 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 e73353c720 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 e8845ef4db MC: Add MCAsmLayout::FragmentReplaced() helper function.
llvm-svn: 103709
2010-05-13 08:43:31 +00:00
John McCall 01f21ad97c Rebuild builtin_id * as an ObjCObjectPointerType, where builtin_id is the
magic type that 'id' is a pointer to.

llvm-svn: 103708
2010-05-13 08:39:13 +00:00
Zhongxing Xu 6e8417c0e5 Relax an assertion. Various cases could lead to non-symbol values.
llvm-svn: 103707
2010-05-13 08:26:32 +00:00
John McCall bb4ea81ab9 When performing template argument deduction, match Objective C pointers
against pointer patterns.

llvm-svn: 103706
2010-05-13 07:48:05 +00:00
Chandler Carruth 7100860ef5 Delete a dead function at sabre's request.
llvm-svn: 103705
2010-05-13 07:47:58 +00:00
Chandler Carruth 89e5635a7c Update tablegen to generate shorts instead of chars for subgroup arrays.
llvm-svn: 103704
2010-05-13 07:43:47 +00:00
Chandler Carruth dd8f20dfb6 Update the types for warning option subgroup arrays to 'short', we have more
than 127 groups so this was already failing given -fsigned-char. A subsequent
to commit to TableGen will generate shorts for the arrays themselves.

llvm-svn: 103703
2010-05-13 07:43:05 +00:00
Anton Korobeynikov 449df9698f Properly set thread-local flag on globals during cpp emission
llvm-svn: 103702
2010-05-13 07:41:57 +00:00
Ted Kremenek 3e7199b286 Add test case for <rdar://problem/7880658>.
llvm-svn: 103701
2010-05-13 06:58:45 +00:00
Nick Lewycky 2b3cbac0ee Remove heinous tabs.
llvm-svn: 103700
2010-05-13 06:45:13 +00:00
Nick Lewycky 3230f0ac25 Add testcase for r103653.
llvm-svn: 103699
2010-05-13 06:00:14 +00:00
Nick Lewycky d3c6dfe853 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 5a93253fc8 Fix -Asserts warning.
llvm-svn: 103697
2010-05-13 03:50:50 +00:00
Ted Kremenek 00da2b1546 Remove stale comment.
llvm-svn: 103696
2010-05-13 03:40:51 +00:00
Daniel Dunbar d83889bd87 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 a58dc0ffdb Fix -Asserts warning.
llvm-svn: 103694
2010-05-13 03:19:36 +00:00
Daniel Dunbar c7c53ea715 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 9de7cfe3f4 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 e35c88d5ad MC/Mach-O: Add another zerofill test to improve coverage.
llvm-svn: 103691
2010-05-13 01:10:28 +00:00
Daniel Dunbar a6780da661 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 4dac59dcb7 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
Chris Lattner c96f1fbd8d add a couple of key functions for classes without them.
llvm-svn: 103688
2010-05-13 01:02:19 +00:00
Ted Kremenek 12e0f2937e Specially handle CaseStmts in CursorVisitor because they can be nested and walking them
can blow out the stack.

llvm-svn: 103687
2010-05-13 00:25:00 +00:00
Jakob Stoklund Olesen 0ba2e2a568 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 680b74941f More asserts around physreg uses
llvm-svn: 103685
2010-05-13 00:19:39 +00:00
Evan Cheng 2f736c9577 Expand VMOVQQ into a pair of VMOVQ.
llvm-svn: 103684
2010-05-13 00:17:02 +00:00
Evan Cheng 79efd71962 Mark some pattern-less instructions as neverHasSideEffects.
llvm-svn: 103683
2010-05-13 00:16:46 +00:00
Chris Lattner 8cb4728a15 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