Commit Graph

56842 Commits

Author SHA1 Message Date
Daniel Dunbar 4aacad1f93 Use not instead of ! in tests.
llvm-svn: 67601
2009-03-24 01:59:55 +00:00
Anders Carlsson 8f0d218598 Handle pointers to arrays of abstract types.
llvm-svn: 67598
2009-03-24 01:46:45 +00:00
Anders Carlsson b0ab31b7f6 Remove a task that's completed now.
llvm-svn: 67596
2009-03-24 01:25:56 +00:00
Anders Carlsson b6da73f2e0 class.abstract is complete. Anything that doesn't work is a bug.
llvm-svn: 67595
2009-03-24 01:24:06 +00:00
Anders Carlsson b5a27b460c More work on diagnosing abstract classes. We can now handle cases like
class C {
  void g(C c);

  virtual void f() = 0;
};

In this case, C is not known to be abstract when doing semantic analysis on g. This is done by recursively traversing the abstract class and checking the types of member functions. 

llvm-svn: 67594
2009-03-24 01:19:16 +00:00
Eli Friedman 94c25c66b5 Fix PR3868 by making Evaluate handle cases like "(long)&a + 4".
llvm-svn: 67593
2009-03-24 01:14:50 +00:00
Eli Friedman 703a77f313 Fix a couple of tests.
llvm-svn: 67592
2009-03-24 01:11:18 +00:00
Daniel Dunbar d5f35ca0bf ccc: Have generic GCC tool chain search the driver directory for
executables (e.g., clang).
 - This matches the clang-driver behavior.

llvm-svn: 67590
2009-03-24 01:06:18 +00:00
Dan Gohman efd2d44aa5 I was convinced that it's ok to allow a second i8 return value
to be returned in DL. LLVM's multiple-return-value support is
not ABI-conforming; front-ends that wish to have code emitted
that conforms to an ABI are currently expected to make
arrangements for this on their own rather than assuming that
multiple-return-values will automatically do the right thing.
This commit doesn't fundamentally change this situation.

llvm-svn: 67588
2009-03-24 01:04:34 +00:00
Dan Gohman f3746cbc56 Minor compile-time optimization; don't bother checking
canClobberPhysRegDefs if the successor node doesn't
clobber any physical registers.

llvm-svn: 67587
2009-03-24 00:50:07 +00:00
Dan Gohman 9a658d72db Add a pre-pass to the burr-list scheduler which makes adjustments to
help out the register pressure reduction heuristics in the case of
nodes with multiple uses. Currently this uses very conservative
heuristics, so it doesn't have a broad impact, but in cases where it
does help it can make a big difference.

llvm-svn: 67586
2009-03-24 00:49:12 +00:00
Douglas Gregor 2134209a2a Cleanup template instantiation for methods, destructors
llvm-svn: 67585
2009-03-24 00:38:23 +00:00
Ted Kremenek 74250d1d68 Update checker build.
llvm-svn: 67584
2009-03-24 00:35:59 +00:00
Daniel Dunbar 06686abfdc Driver: lipo wasn't being called correctly (translation failure from
ccc due to the different way we handle output arguments).

llvm-svn: 67583
2009-03-24 00:24:37 +00:00
Daniel Dunbar b5860facfd ccc/Driver: -r option doesn't take an argument.
llvm-svn: 67581
2009-03-24 00:20:13 +00:00
Evan Cheng a774a99245 Do not emit comments unless -asm-verbose.
llvm-svn: 67580
2009-03-24 00:17:40 +00:00
Douglas Gregor 654b07e029 Template instantiation for destructors. This is somewhat repetitive;
eliminating the duplication is next on the list.

llvm-svn: 67579
2009-03-24 00:15:49 +00:00
Dale Johannesen 32dfb35281 Use a SmallPtrSet instead of std::set.
llvm-svn: 67578
2009-03-23 23:39:20 +00:00
Eli Friedman 2dc5f29ff2 Fix the ABI convention for struct returns on x86 outside of Darwin.
llvm-svn: 67577
2009-03-23 23:26:24 +00:00
Douglas Gregor 1f0ce935e8 Another use of adjustParameterType. Plus, GetTypeForDeclarator will
always get ParmVarDecls with already-adjusted types. Assert it.

Thanks, Anders!

llvm-svn: 67576
2009-03-23 23:17:00 +00:00
Douglas Gregor f4f296de01 Template instantiation for the declarations of member functions within
a class template. At present, we can only instantiation normal
methods, but not constructors, destructors, or conversion operators.

As ever, this contains a bit of refactoring in Sema's type-checking. In
particular:

  - Split ActOnFunctionDeclarator into ActOnFunctionDeclarator
    (handling the declarator itself) and CheckFunctionDeclaration
    (checking for the the function declaration), the latter of which
    is also used by template instantiation.
  - We were performing the adjustment of function parameter types in
    three places; collect those into a single new routine.
  - When the type of a parameter is adjusted, allocate an
    OriginalParmVarDecl to keep track of the type as it was written.
  - Eliminate a redundant check for out-of-line declarations of member
    functions; hide more C++-specific checks on function declarations
    behind if(getLangOptions().CPlusPlus).

llvm-svn: 67575
2009-03-23 23:06:20 +00:00
Evan Cheng 7fe1b0f50f Fix a bug in spill weight computation. If the alias is a super-register, and the super-register is in the register class we are trying to allocate. Then add the weight to all sub-registers of the super-register even if they are not aliases.
e.g. allocating for GR32, bh is not used, updating bl spill weight.                                                                                                        
     bl should get the same spill weight otherwise it will be choosen                                                                                              
     as a spill candidate since spilling bh doesn't make ebx available.
This fix PR2866.

llvm-svn: 67574
2009-03-23 22:57:19 +00:00
Ted Kremenek f718f0112e Deallocate 'DeclRefExpr's in correctly formed '#pragma unused'
llvm-svn: 67573
2009-03-23 22:50:47 +00:00
Ted Kremenek af6543455f A test case to test that -warn-dead-stores does not emit a warning for stores to variables marked with '#pragma unused'.
llvm-svn: 67570
2009-03-23 22:30:58 +00:00
Ted Kremenek fd14fade2f Implement '#pragma unused'.
llvm-svn: 67569
2009-03-23 22:28:25 +00:00
Ted Kremenek c8e54db801 Add sanity check in Clang TableGen backend to check if 'Component' is a string.
llvm-svn: 67565
2009-03-23 21:54:33 +00:00
Daniel Dunbar 95953ce31c Driver: Make argument parsing fast.
On a synthetic command line consisting of almost all defined options,
this drops wall time from .00494 to .00336 and user time from .00258
to .00105.

On the same benchmark, clang-driver is about 15% faster than the
primary gcc driver and almost twice as fast as the gcc driver driver.

llvm-svn: 67564
2009-03-23 21:50:40 +00:00
Dale Johannesen 93eefa0043 Fix internal representation of fp80 to be the
same as a normal i80 {low64, high16} rather
than its own {high64, low16}.  A depressing number
of places know about this; I think I got them all.
Bitcode readers and writers convert back to the old
form to avoid breaking compatibility.

llvm-svn: 67562
2009-03-23 21:16:53 +00:00
John Mosby 2441a7df96 README.txt: test commit w/blank line appended
llvm-svn: 67560
2009-03-23 21:00:45 +00:00
Anders Carlsson 6a07775423 Add SemaTypeInstantiateDecl.cpp
llvm-svn: 67559
2009-03-23 20:47:43 +00:00
Dan Gohman ed0e8d44ce When unfolding a load during scheduling, the new operator node has
a data dependency on the load node, so it really needs a
data-dependence edge to the load node, even if the load previously
existed.

And add a few comments.

llvm-svn: 67554
2009-03-23 20:20:43 +00:00
Ted Kremenek 673a4eef07 Update checker build.
llvm-svn: 67553
2009-03-23 19:53:30 +00:00
Daniel Dunbar ee4d1feb44 Driver: Fix off by one in computation of first searchable option.
llvm-svn: 67552
2009-03-23 19:19:19 +00:00
Fariborz Jahanian aedcfa49b9 Must allow for strong cast of floats as well (objc2 gc).
llvm-svn: 67551
2009-03-23 19:10:40 +00:00
Anders Carlsson eb0c532faa More improvements to abstract type checking. Handle arrays correctly, and make sure to check parameter types before they decay.
llvm-svn: 67550
2009-03-23 19:10:31 +00:00
Daniel Dunbar 1773177a99 Driver: Add two special groups of "whitelisted" options which we know
clang doesn't support, and don't want to warn are unused. Eventually
these should disappear.

Here is a more readable list than is in the diff:

W options: -Wall, -Wcast-align, -Wchar-align, -Wchar-subscripts,
-Werror, -Wextra, -Winline, -Wint-to-pointer-cast, -Wmissing-braces,
-Wmost, -Wnested-externs, -Wno-format-y2k, -Wno-four-char-constants,
-Wno-missing-field-initializers, -Wno-trigraphs, -Wno-unknown-pragmas,
-Wno-unused-parameter, -Wparentheses, -Wpointer-arith,
-Wpointer-to-int-cast, -Wreturn-type, -Wshorten-64-to-32, -Wswitch,
-Wunused-function, -Wunused-label, -Wunused-value, -Wunused-variable,
-Wwrite-strings.

f options: -fasm-blocks, -fmessage-length=.

llvm-svn: 67549
2009-03-23 19:03:36 +00:00
Daniel Dunbar 453d79a2db Driver: Check that options are ordered properly (outside of
Release-Asserts mode).

Also, avoid searching through option groups (which will never match).

llvm-svn: 67548
2009-03-23 18:41:45 +00:00
Evan Cheng 4dc0c6697f Update test for pr3864.
llvm-svn: 67545
2009-03-23 18:27:36 +00:00
Evan Cheng f858466018 Fix PR3391 and PR3864. Reg allocator infinite looping.
llvm-svn: 67544
2009-03-23 18:24:37 +00:00
Chris Lattner 656711a36b use isa<>
llvm-svn: 67543
2009-03-23 17:57:53 +00:00
Anders Carlsson 0d5ca29b78 It's an error to try to allocate an abstract object using new.
llvm-svn: 67542
2009-03-23 17:49:10 +00:00
Douglas Gregor 893c2c963a Fix PR3855. When we encounter an incompatible redeclaration of a
library function, accept this declaration and pretend that we do not
know that this is a library function. autoconf depends on this
(broken) behavior.

llvm-svn: 67541
2009-03-23 17:47:24 +00:00
Dan Gohman f477262e69 Don't set SUnit::hasPhysRegDefs to true unless the defs are
actually have uses, which reflects the way it's used.

llvm-svn: 67540
2009-03-23 17:39:36 +00:00
Chris Lattner 5030e5eabe The individual pieces of an invalid paste as still candidates for expansion.
This matters in assembler mode, where this is silently allowed.
This fixes rdar://6709206.

llvm-svn: 67539
2009-03-23 17:32:45 +00:00
Ted Kremenek b294d196b3 analyzer: Provide temporary workaround for false positive reported by
<rdar://problem/6704930> involving SimpleConstraintManager not reasoning well
about symbolic constraint values involving arithmetic operators.

llvm-svn: 67534
2009-03-23 17:10:25 +00:00
Douglas Gregor d6b05f705b Tighten up the determination of whether a function declaration has a
prototype. Thanks Eli!

llvm-svn: 67533
2009-03-23 16:26:51 +00:00
Chris Lattner 6ad3bc2e7f if the driver decides to run clang on a .s file, treat it as a .S file.
llvm-svn: 67532
2009-03-23 16:24:37 +00:00
Dan Gohman a366da1bf7 Fix canClobberPhysRegDefs to check all SDNodes grouped together
in an SUnit, instead of just the first one. This fix is needed
by some upcoming scheduler changes.

llvm-svn: 67531
2009-03-23 16:23:01 +00:00
Douglas Gregor d4eca014e0 Thanks to Eli for pointing out my misreading of 6.2.2p5
llvm-svn: 67530
2009-03-23 16:17:01 +00:00
Daniel Dunbar 76ce7416ae Driver: Setup file and program search paths in tool chains.
llvm-svn: 67529
2009-03-23 16:15:50 +00:00