Commit Graph

46623 Commits

Author SHA1 Message Date
Anton Korobeynikov f01991a0d4 Factor out asmprinters from collector interface.
llvm-svn: 54884
2008-08-17 13:52:35 +00:00
Argyrios Kyrtzidis 00441dfcd4 Type::isIntegerType() returns true for types between Bool and LongLong.
Put WChar between them to make it integer type.

llvm-svn: 54882
2008-08-17 13:24:01 +00:00
Gordon Henriksen bcef14d2e4 Factor GC metadata table assembly generation out of Collector in preparation for splitting AsmPrinter into its own library.
llvm-svn: 54881
2008-08-17 12:56:54 +00:00
Gordon Henriksen dbe06d3b69 Factor GC metadata table assembly generation out of Collector in preparation for splitting AsmPrinter into its own library.
llvm-svn: 54880
2008-08-17 12:08:44 +00:00
Argyrios Kyrtzidis b97ff82bd4 Get raw_ostream.cpp to compile on MSVC.
llvm-svn: 54879
2008-08-17 09:25:21 +00:00
Evan Cheng 5dabe042a6 Revert 54821. It's miscompiling 252.eon and 447.dealII
llvm-svn: 54878
2008-08-17 08:07:31 +00:00
Nick Lewycky 18c6f56c76 I found a better place for this optz'n.
llvm-svn: 54877
2008-08-17 07:54:14 +00:00
Nick Lewycky 18f50b2637 Xor'ing both sides of icmp by sign-bit is equivalent to swapping signedness of
the predicate.

Also, make this optz'n apply in more cases where it's safe to do so.

llvm-svn: 54876
2008-08-17 07:34:14 +00:00
Chris Lattner edceac3861 avoid an extraneous std::string construction
llvm-svn: 54875
2008-08-17 07:24:08 +00:00
Chris Lattner 5d1cfa1229 various updates to match r54873 on mainline.
llvm-svn: 54874
2008-08-17 07:19:51 +00:00
Chris Lattner 17f7165f84 Rework the routines that convert AP[S]Int into a string. Now, instead of
returning an std::string by value, it fills in a SmallString/SmallVector
passed in.  This significantly reduces string thrashing in some cases.

More specifically, this:
 - Adds an operator<< and a print method for APInt that allows you to 
   directly send them to an ostream.
 - Reimplements APInt::toString to be much simpler and more efficient
   algorithmically in addition to not thrashing strings quite as much.

This speeds up llvm-dis on kc++ by 7%, and may also slightly speed up the
asmprinter.  This also fixes a bug I introduced into the asmwriter in a
previous patch w.r.t. alias printing.

llvm-svn: 54873
2008-08-17 07:19:36 +00:00
Chris Lattner 286e5e6c61 printing with an unspecified dest means to print to stdout.
llvm-svn: 54872
2008-08-17 07:09:08 +00:00
Chris Lattner b52817bff0 don't delete a variable on the stack
llvm-svn: 54871
2008-08-17 07:07:01 +00:00
Nick Lewycky 9458d53e49 Fix build on GCC 4.3.
llvm-svn: 54870
2008-08-17 06:40:16 +00:00
Chris Lattner 8fcea67ae9 remove a dead APInt ctor.
llvm-svn: 54869
2008-08-17 04:58:58 +00:00
Chris Lattner 033935df55 avoid string thrashing when formatting names in output. This
speeds up release-asserts llvm-dis on kc++ from 1.86s to 1.04s (~79%)

llvm-svn: 54868
2008-08-17 04:40:13 +00:00
Chris Lattner 393b7cd821 random cleanups.
llvm-svn: 54866
2008-08-17 04:17:45 +00:00
Chris Lattner d3723fc8a2 add support for a cout/cerr analog (outs()/errs()) as well as
a simple adaptor class to give raw output capabilities to 
something that wants to write to an ostream.

llvm-svn: 54865
2008-08-17 04:13:37 +00:00
Chris Lattner 7459c86a29 simplify this code a bit more.
llvm-svn: 54864
2008-08-17 03:54:39 +00:00
Chris Lattner d5bc0683fd opening "-" automatically yields stdout.
llvm-svn: 54863
2008-08-17 03:53:23 +00:00
Ted Kremenek 87aab6c771 Migrate the retain/release checker to not manage the RefBindings::Factory object
directly, but instead have GRStateManager manage it.

llvm-svn: 54862
2008-08-17 03:20:02 +00:00
Chris Lattner 068529a243 remove global variables for output stream.
llvm-svn: 54861
2008-08-17 03:12:02 +00:00
Ted Kremenek 90d488f724 Migrate GRState::ConstEqTy (map used from tracking constants for symbols) to use the generic data map instead.
llvm-svn: 54860
2008-08-17 03:10:22 +00:00
Ted Kremenek edd9a18050 Added GRStateTrait.h, which includes boilerplate code for creating specializations of GRStateTrait<>.
Modified GRStateTrait<ConstNotEq> in GRState to use the boilerplate in GRStateTrait<> for ImmutableMaps.

llvm-svn: 54859
2008-08-17 02:59:30 +00:00
Chris Lattner b5a92f8648 Switch to shared raw_ostream code instead of having it be clang specific.
This also helps the eventual distcc project.

llvm-svn: 54858
2008-08-17 01:47:12 +00:00
Chris Lattner 3394262a33 rename OutputData to 'write' to match ostream.
llvm-svn: 54857
2008-08-17 01:46:05 +00:00
Chris Lattner 3bed934934 remove accidental comment.
llvm-svn: 54856
2008-08-17 01:35:54 +00:00
Chris Lattner 84b94f77c6 add a new raw_ostream class which is an extremely high performance ostream that
can *only* output data (no seeking, reading, etc).  This is adapted from the
clang "-E outputter", and is roughly 10% faster than stdio on darwin and 30%
(or more) faster than std::ostream.

llvm-svn: 54855
2008-08-17 01:35:29 +00:00
Nico Weber 0b79bfe501 honor EscapeSpaces in 2nd overload of EscapeText()
llvm-svn: 54854
2008-08-16 22:24:33 +00:00
Argyrios Kyrtzidis 3014572ea2 Move the C++ Sema tests into a separate SemaCXX directory.
llvm-svn: 54853
2008-08-16 20:53:59 +00:00
Argyrios Kyrtzidis 2ade39061c Move the type checking that Sema::ActOnCastExpr does into a new Sema::CheckCastTypes function so that it can be reused.
llvm-svn: 54852
2008-08-16 20:27:34 +00:00
Argyrios Kyrtzidis 69af9eebd7 Put (argument)-expression-list parsing in a separate function so that it can be re-used.
llvm-svn: 54851
2008-08-16 20:03:01 +00:00
Argyrios Kyrtzidis 16d63a727e C++ casts, (static_cast. dynamic_cast, etc.) can have postfix-expression pieces.
llvm-svn: 54850
2008-08-16 19:45:32 +00:00
Argyrios Kyrtzidis 37779ade44 Move handling of postfix-expression suffixes out of ParseCXXThis and into ParseCastExpression.
No functionality change, this follows the convention of how postfix-expressions are handled.

llvm-svn: 54849
2008-08-16 19:34:46 +00:00
Nick Lewycky 0fb45f60d5 It's spelt "uninitialized".
llvm-svn: 54848
2008-08-16 17:46:53 +00:00
Anton Korobeynikov 16d5d3fba7 PPC/Linux normally uses named section for bss
llvm-svn: 54847
2008-08-16 12:59:02 +00:00
Anton Korobeynikov c3f3aea666 Use proper strings section name for PPC
llvm-svn: 54846
2008-08-16 12:58:46 +00:00
Anton Korobeynikov 93584cd5a0 Use correct name for TLS address resolution routine on x86-64
llvm-svn: 54845
2008-08-16 12:58:29 +00:00
Anton Korobeynikov 2ae5446b62 Add interface for section override. Use this for Sparc, since it should use named BSS section.
llvm-svn: 54844
2008-08-16 12:58:12 +00:00
Anton Korobeynikov bd890b1faf Move SLEB/ULEB size calculation routines from AsmPrinter to TargetAsmInfo. This makes JIT asmprinter-free.
llvm-svn: 54843
2008-08-16 12:57:46 +00:00
Anton Korobeynikov 44b4a9a05d Reduce heap trashing due to std::string construction / concatenation via caching of section flags string representations
llvm-svn: 54842
2008-08-16 12:57:07 +00:00
Nico Weber f1ac2dc883 add missing class declaration
llvm-svn: 54841
2008-08-16 12:36:27 +00:00
Argyrios Kyrtzidis e97dcc1248 Set the SourceRange ending of DeclSpec, when Parser::ParseTypeofSpecifier finishes.
llvm-svn: 54840
2008-08-16 10:21:33 +00:00
Argyrios Kyrtzidis 186a18a4e8 Declarator class considers DeclSpec as immutable; Declarator::getMutableDeclSpec should be used rarely and with care.
Have Declarator accept and use a 'const DeclSpec &', instead of 'DeclSpec &', to make DeclSpec's immutability more explicit.
No functionality change.

llvm-svn: 54839
2008-08-16 09:55:52 +00:00
Daniel Dunbar a94ecd2a0b Add NeXT runtime support for generating methods.
Change CodeGenFunction::EmitParmDecl to take either a ParmVarDecl or an
  ImplicitParamDecl.

Drop hasAggregateLLVMType from CodeGenModule.cpp (use version in
  CodeGenFunction).

Change the Objective-C method generation to use EmitParmDecl for
  implicit parameters.

llvm-svn: 54838
2008-08-16 03:19:19 +00:00
Daniel Dunbar 8bc821ae7c Add CodeGen support for AddrLabelExpr in initializers.
llvm-svn: 54837
2008-08-16 01:41:47 +00:00
Daniel Dunbar a7c8cf6200 Change WarnUnsupported to ErrorUnsupported (in name and in practice).
- We are beyond the point where this shows up often and when it does
   generating miscompiled files is bad.

llvm-svn: 54836
2008-08-16 00:56:44 +00:00
Ted Kremenek ceba6ead45 GRState:
- Remove ConstNotEq from GRState/GRStateManager (!= tracking uses GDM instead).
- GRStateManager now can book-keep "contexts" (e.g., factory objects) for uses
  with data elements stored into the GDM.
- Refactor pretty-printing of states to use GRState::Printer objects
  exclusively. This removed a huge amount of pretty-printing logic from
  GRExprEngine.

CFRefCount
- Simplified some API calls based on refinements to the GDM api.

llvm-svn: 54835
2008-08-16 00:49:49 +00:00
Ted Kremenek 3b977558ce Enhance null-dereference checker test.
llvm-svn: 54834
2008-08-16 00:45:40 +00:00
Daniel Dunbar 7c6d3a7c50 Change ObjCRuntime::LookupClass -> GetClass, and now takes the
ObjCInterfaceDecl.

Change ObjCRuntime::GenerateMessageSendSuper to take the
  ObjCInterfaceDecl for the super class, instead of just its name.

Change EmitObjCMessageExpr to make the right runtime calls for super
  sends in class methods (i.e. a super send with the class object as
  the receiver).

llvm-svn: 54833
2008-08-16 00:25:02 +00:00