Commit Graph

56781 Commits

Author SHA1 Message Date
Owen Anderson 76a561f35e Don't assign a new stack slot if the pre-alloc splitter already assigned one.
llvm-svn: 67764
2009-03-26 18:53:38 +00:00
Daniel Dunbar adf511c056 Driver: Forward -fno-common to clang.
- <rdar://problem/6710978> ccc/clang-driver ignore -fno-common

llvm-svn: 67762
2009-03-26 16:37:00 +00:00
Daniel Dunbar 42b91a86f3 Driver: Test case for darwin::Link
llvm-svn: 67761
2009-03-26 16:29:05 +00:00
Daniel Dunbar c196421fbc Driver: Add darwin::Link tool.
- <rdar://problem/6717381> [driver] implement ld argument translation
   in new driver

llvm-svn: 67760
2009-03-26 16:23:12 +00:00
Ted Kremenek 2f41ffe825 Add a high-level intro to the memory regions design document.
llvm-svn: 67759
2009-03-26 16:19:54 +00:00
Jim Grosbach 975c1cb41a fix a few spelling errors and typos
llvm-svn: 67758
2009-03-26 16:17:51 +00:00
Daniel Dunbar dd76524d76 Driver: Fix a number of option definition mismatches (flags instead of
separate, or vice versa).

Also, fix initialization of LinkingOutput variable.

llvm-svn: 67757
2009-03-26 16:12:09 +00:00
Daniel Dunbar b1024880f1 Driver: Print the correct target when printing the version.
llvm-svn: 67756
2009-03-26 16:09:13 +00:00
Steve Naroff 389925dc87 Fix <rdar://problem/6697053> instance variable is protected.
Treat @package the same as @public. The documentation for @package says it is analogous to private_extern for variables/functions. Fully implementing this requires some kind of linker support (so access is denied to code outside the classes executable image). I don't believe GCC fully implements this semantic. Will discuss with Fariborz offline.

llvm-svn: 67755
2009-03-26 16:01:08 +00:00
Daniel Dunbar c7fd57a2f3 Driver: Move GetReleaseVersion to static Driver::GetReleaseVersion method.
llvm-svn: 67754
2009-03-26 15:58:36 +00:00
Daniel Dunbar 4e5696b984 Driver: Add ArgList::AddAllArgsTranslated; for forwarding options to
tools with the name of the option replace, and arguments rendered
separately.

llvm-svn: 67753
2009-03-26 15:39:22 +00:00
Ted Kremenek a32f7a124a Move "regions" analyzer design document to 'docs'.
llvm-svn: 67752
2009-03-26 15:29:38 +00:00
Jim Grosbach 4bae1ac5e8 Use 'bool' for FoundRC
llvm-svn: 67750
2009-03-26 14:45:34 +00:00
Zhongxing Xu 8346601e0b Simplify some code. No functionality change.
llvm-svn: 67748
2009-03-26 08:40:37 +00:00
Zhongxing Xu 2d44866316 Check in some design documents to centralize ideas around region store and the
analysis engine.

llvm-svn: 67747
2009-03-26 08:23:58 +00:00
Eli Friedman 6568eef9f9 Sanity-check argument to indirect goto.
llvm-svn: 67746
2009-03-26 07:32:37 +00:00
Bill Wendling 55a2cd736d Add -f to RUN line.
llvm-svn: 67744
2009-03-26 06:17:54 +00:00
Bill Wendling aa28be652c Pull transform from target-dependent code into target-independent code.
llvm-svn: 67742
2009-03-26 06:14:09 +00:00
Chris Lattner ada1c91537 hopefully fix VC++ build error.
llvm-svn: 67741
2009-03-26 05:56:24 +00:00
Chris Lattner f661d328c4 no need for eh info
llvm-svn: 67740
2009-03-26 05:51:18 +00:00
Chris Lattner 78b7cbe668 fix warning in -asserts mode.
llvm-svn: 67739
2009-03-26 05:29:34 +00:00
Chris Lattner f38fd11a26 fix some warnings in release-asserts mode.
llvm-svn: 67738
2009-03-26 05:28:26 +00:00
Chris Lattner 3c04970f31 fix an apparently real bug exposed by a warning in -asserts mode.
llvm-svn: 67737
2009-03-26 05:28:14 +00:00
Chris Lattner 3871781c7b fix warning in -asserts build.
llvm-svn: 67736
2009-03-26 05:25:59 +00:00
Chris Lattner 984fac5f5f most of this is plumbing to get CompileOptions down into
CodeGenModule.  Once there, add a new NoCommon option to
it and implement -fno-common.

llvm-svn: 67735
2009-03-26 05:00:52 +00:00
Chris Lattner 897b41dd77 make this self contained, declare everything as 'class'.
llvm-svn: 67734
2009-03-26 05:00:03 +00:00
Chris Lattner 5e31037164 sort items.
llvm-svn: 67733
2009-03-26 04:59:37 +00:00
Chris Lattner cea1efaa61 add driver and clang-cc to project.
llvm-svn: 67732
2009-03-26 04:27:05 +00:00
Ted Kremenek 3e31c26f81 analyzer infrastructure: make a bunch of changes to symbolic expressions that
Zhongxing and I discussed by email.

Main changes:
- Removed SymIntConstraintVal and SymIntConstraint
- Added SymExpr as a parent class to SymbolData, SymSymExpr, SymIntExpr
- Added nonloc::SymExprVal to wrap SymExpr
- SymbolRef is now just a typedef of 'const SymbolData*'
- Bunch of minor code cleanups in how some methods were invoked (no functionality change)

This changes are part of a long-term plan to have full symbolic expression
trees. This will be useful for lazily evaluating complicated expressions.

llvm-svn: 67731
2009-03-26 03:35:11 +00:00
Bill Wendling 996749e912 Add testcase for r67728.
llvm-svn: 67729
2009-03-26 01:52:47 +00:00
Bill Wendling 94f299f2c5 Match this pattern so that we can generate simpler code:
%a = ...
  %b = and i32 %a, 2
  %c = srl i32 %b, 1
  %d = br i32 %c, 

into

  %a = ...
  %b = and %a, 2
  %c = X86ISD::CMP %b, 0
  %d = X86ISD::BRCOND %c ...

This applies only when the AND constant value has one bit set and the SRL
constant is equal to the log2 of the AND constant. The back-end is smart enough
to convert the result into a TEST/JMP sequence.

llvm-svn: 67728
2009-03-26 01:47:50 +00:00
Bill Wendling 189d67181c Doxygen-ify comments.
llvm-svn: 67727
2009-03-26 01:46:56 +00:00
Anders Carlsson 137108da15 Set the access specifier for templates inside classes.
llvm-svn: 67726
2009-03-26 01:24:28 +00:00
Anders Carlsson 5558ca1d4f Factor the member access specifier setting code into its own function. No intended functionality change.
llvm-svn: 67725
2009-03-26 01:19:02 +00:00
Dale Johannesen db90560c1c Skip debug info one more place. (This one gets
called from llc, not opt, but it's an IR level
optimization nevertheless.)

llvm-svn: 67724
2009-03-26 01:15:07 +00:00
Anders Carlsson dfbbdf6fd5 Handle parsing of templates in member declarations. Pass the AccessSpecifier all the way down to ActOnClassTemplate.
Doug, Sebastian: Plz review! :)

llvm-svn: 67723
2009-03-26 00:52:18 +00:00
Anders Carlsson 2ed6ceba1d Check that the access specifier of a member redeclaration is the same as the original declaration.
llvm-svn: 67722
2009-03-26 00:24:17 +00:00
Eli Friedman 8d7ff4098c Fix for PR3869: actually enforce that the argument of an indirect goto
is of type void*.  I'll try to add the appropriate checking later.

llvm-svn: 67721
2009-03-26 00:18:06 +00:00
Douglas Gregor 97f1f1c46e The injected-class-name of class templates and class template
specializations can be treated as a template. Finally, we can parse
and process the first implementation of Fibonacci I wrote!

Note that this code does not handle all of the cases where
injected-class-names can be treated as templates. In particular,
there's an ambiguity case that we should be able to handle (but
can't), e.g.,

  template <class T> struct Base { }; 
  template <class T> struct Derived : Base<int>, Base<char> {
    typename Derived::Base b;       // error: ambiguous
    typename Derived::Base<double> d;  // OK 
  };

llvm-svn: 67720
2009-03-26 00:10:35 +00:00
Devang Patel 4555618854 Before deleting a basic block, give other loop passes a chance cleanup analysis values, related to the instructions in the basic block.
llvm-svn: 67719
2009-03-25 23:57:48 +00:00
Anders Carlsson a28908d575 Tighten the setAccess assert. We now allow AS_none if the decl contex is not a C++ record decl.
Also, fix fallout from the change.

llvm-svn: 67717
2009-03-25 23:38:06 +00:00
Douglas Gregor ef1a09a336 Implement template instantiation for static data members of class
templates, including in-class initializers. For example:

  template<typename T, T Divisor>
  class X {
  public:
    static const T value = 10 / Divisor;
  };

instantiated with, e.g.,

  X<int, 5>::value

to get the value '2'.

llvm-svn: 67715
2009-03-25 23:32:15 +00:00
Jim Grosbach 292ea55130 Modify getRegisterValueType() to allow for a register being in mutliple
register classes. Before, MVT::Other would be returned anytime a reg was
in multiple register classes. Now, MVT::Other is only returned if the types
for those register classes differ.

llvm-svn: 67714
2009-03-25 23:28:33 +00:00
Fariborz Jahanian f909f92799 More for for objc2's ivar layout map (currently
is not in use).

llvm-svn: 67713
2009-03-25 22:36:49 +00:00
Douglas Gregor 6c2adff380 Pass access specifiers through to member classes and member enums.
llvm-svn: 67710
2009-03-25 22:00:53 +00:00
Douglas Gregor f3430ae300 Fix notes regarding the instantiation of member classes (and test 'em).
llvm-svn: 67708
2009-03-25 21:23:52 +00:00
Douglas Gregor 8ea8fd48f2 Instantiation for member classes of class templates. Note that only
the declarations of member classes are instantiated when the owning
class template is instantiated. The definitions of such member classes
are instantiated when a complete type is required.

This change also introduces the injected-class-name into a class
template specialization.

llvm-svn: 67707
2009-03-25 21:17:03 +00:00
Chris Lattner 51a53f92a5 fix PR3880, fixing a comma swallowing bug handling macros that only take
... arguments.

llvm-svn: 67706
2009-03-25 21:08:24 +00:00
Chris Lattner beb9055000 remove some dead code. ArgTokens can never be empty, because it is always
terminated with an EOF token.  The condition it is trying to check for is
handled by this code above.

    // Empty arguments are standard in C99 and supported as an extension in
    // other modes.
    if (ArgTokens.empty() && !Features.C99)
      Diag(Tok, diag::ext_empty_fnmacro_arg);

llvm-svn: 67705
2009-03-25 21:01:40 +00:00
Ted Kremenek a87b8a9a72 CMake: Also include header files in target when the generator is 'XCode'.
llvm-svn: 67703
2009-03-25 20:34:07 +00:00