Commit Graph

56363 Commits

Author SHA1 Message Date
Daniel Dunbar 5903d8c08a Driver: Stub out generic GCC tool selection (missed a file)
llvm-svn: 67109
2009-03-17 22:07:58 +00:00
Daniel Dunbar 04cb029e0b Driver: Stub out generic GCC tool selection.
llvm-svn: 67108
2009-03-17 22:07:31 +00:00
Daniel Dunbar 0a248bb5c2 Driver: Stub out generic GCC tool chain implementation.
llvm-svn: 67107
2009-03-17 21:38:00 +00:00
Daniel Dunbar 71bdee6ea1 Driver: Make sure to get the default arch name from the tool chain, not the
host; the toolchain may differ based on command line arguments.

llvm-svn: 67106
2009-03-17 21:29:52 +00:00
Daniel Dunbar 7a70c5ddbf Driver: Pass HostInfo reference into ToolChain.
llvm-svn: 67105
2009-03-17 21:21:26 +00:00
Douglas Gregor d7e7a51797 Refactor instantiation of declarations within a template into a much
cleaner visitor framework.

Added a visitor for declarations, which is quite similar to the
visitor for statatements.

llvm-svn: 67104
2009-03-17 21:15:40 +00:00
Daniel Dunbar 437b8a5ccc Add BUILTIN_EXPECT Support/Compiler macro.
- Use for exceptional buffer conditions in raw_ostream:write to shave
   off a cycle or two.

 - Please rename if you have a better one.

llvm-svn: 67103
2009-03-17 21:15:18 +00:00
Daniel Dunbar 52e0c70868 Driver: Pass Driver reference down into Host info, which will need it
to pass to ToolChains, which may need Driver specific information (for
example, to form search paths).

llvm-svn: 67102
2009-03-17 20:45:45 +00:00
Daniel Dunbar 62ca7d23ce Driver: Fix typo ArgList destructor.
llvm-svn: 67101
2009-03-17 20:44:29 +00:00
Chris Lattner 4359f3f26f this is apparently passing now. Evan/Dan, please check
to see if this is producing the expected code or not, I'm
not sure what the test was intended to check.

llvm-svn: 67099
2009-03-17 20:23:43 +00:00
Devang Patel 62c72c6826 test case for rev. 67095.
llvm-svn: 67096
2009-03-17 19:47:21 +00:00
Ted Kremenek ea072e3cae retain/release checker: Add support for reasoning about -dealloc.
llvm-svn: 67094
2009-03-17 19:42:23 +00:00
Chris Lattner 2363d0b8b9 Fix codegen to compute the size of an allocation by multiplying the
size by the array amount as an i32 value instead of promoting from
i32 to i64 then doing the multiply.  Not doing this broke wrap-around
assumptions that the optimizers (validly) made.  The ultimate real
fix for this is to introduce i64 version of alloca and remove mallocinst.

This fixes PR3829

llvm-svn: 67093
2009-03-17 19:36:00 +00:00
Douglas Gregor 954f6b27da Implement instantiation of enums within class templates. This isn't
quite as great as it sounds, because, while we can refer to the
enumerator values outside the template, e.g.,

  adder<long, 3, 4>::value

we can't yet refer to them with dependent names, so no Fibonacci
(yet). 

InstantiateClassTemplateSpecialization is getting messy; next commit
will put it into a less-ugly state.

llvm-svn: 67092
2009-03-17 19:05:46 +00:00
Daniel Dunbar b42a26c0a5 Driver: Hide HostInfo implementations.
- Also, normalize arch names a tad and stub out getToolChain
   implementations.

llvm-svn: 67091
2009-03-17 19:00:50 +00:00
Daniel Dunbar c1b70b2039 Driver: Add two option form of ArgList::getLastArg.
llvm-svn: 67090
2009-03-17 18:51:42 +00:00
Chris Lattner e549493a55 Remove a condition which is always true.
llvm-svn: 67089
2009-03-17 17:55:15 +00:00
Daniel Dunbar 7a178a40a1 Driver: Add logic for computing where to put job outputs (pipe,
temporary file, user provided name, derived name).

llvm-svn: 67088
2009-03-17 17:53:55 +00:00
Daniel Dunbar 106c22b2bb Driver: Add list of temporary and result files to Compilation.
llvm-svn: 67087
2009-03-17 17:51:56 +00:00
Daniel Dunbar 527e2b3f8c Add ArgList::MakeArgString and make ArgList::Make* const.
- Slightly strange, but the idea is that the ArgList data structure
   is primarily a list of arguments; we want to allow clients to still
   add argument strings to an ArgList to avoid worrying about string
   lifetimes (or unnecessary string copying).

llvm-svn: 67086
2009-03-17 17:51:18 +00:00
Evan Cheng 8216785663 Add newline at end of file.
llvm-svn: 67085
2009-03-17 17:08:25 +00:00
Scott Michel df52d3d477 CellSPU:
Revert inadvertent mis-fix of fneg.

llvm-svn: 67084
2009-03-17 16:45:16 +00:00
Daniel Dunbar af41991c8f Minimal raw_ostream unit tests
llvm-svn: 67083
2009-03-17 16:14:59 +00:00
Sanjiv Gupta 88e15b258f r66870 missed this out.
llvm-svn: 67082
2009-03-17 15:46:15 +00:00
Gabor Greif 31a082fd7a typo
llvm-svn: 67081
2009-03-17 11:39:38 +00:00
Gabor Greif bda5a94c79 typo
llvm-svn: 67080
2009-03-17 11:38:29 +00:00
Duncan Sands fb5c74ef4b Reapply r67049, with the test adjusted for darwin
(which produces "call L_f$stub" rather than "call f").

llvm-svn: 67079
2009-03-17 09:46:22 +00:00
Mon P Wang 523c0852c6 Fix a problem with DAGCombine where we were building an illegal build
vector shuffle mask. Forced the mask to be built using i32.  Note: this will
be irrelevant once vector_shuffle no longer takes a build vector for the
shuffle mask.

llvm-svn: 67076
2009-03-17 06:33:10 +00:00
Anders Carlsson e73e3ecc04 Initialize the cleanup.dst variable if necessary. Fixes PR3789.
llvm-svn: 67075
2009-03-17 05:53:35 +00:00
Anders Carlsson e8911a9a13 We want to grep the output, not the input :-)
llvm-svn: 67074
2009-03-17 05:49:13 +00:00
Daniel Dunbar 6865a9e975 Fix unused variable warning in -Asserts mode.
llvm-svn: 67073
2009-03-17 04:12:06 +00:00
Dan Gohman d6e571b202 Recognize bswapl as bswap too.
llvm-svn: 67072
2009-03-17 02:45:40 +00:00
Dan Gohman 77a9279d80 Recognize "bswapq" as an alternate spelling for the bswap instruction.
llvm-svn: 67071
2009-03-17 02:17:27 +00:00
Daniel Dunbar 076b0b649b raw_ostream: Return '*this' explicitly (instead of implicitly via
write) to expose more alias information.

llvm-svn: 67070
2009-03-17 01:53:36 +00:00
Daniel Dunbar 64fa3860ed raw_ostream: Put all exceptional conditions in raw_ostream::write
under a single branch.

Also, add a FIXME for formatted output.

llvm-svn: 67069
2009-03-17 01:36:56 +00:00
Evan Cheng 76f1b47ec9 Spiller may unfold load / mod / store instructions as an optimization when the would be loaded value is available in a register. It needs to check if it's legal to clobber the register. Also, the register can contain values of multiple spill slots, make sure to check all instead of just the one being unfolded.
llvm-svn: 67068
2009-03-17 01:23:09 +00:00
Scott Michel 839ad0a5f3 CellSPU:
- Fix fabs, fneg for f32 and f64.
- Use BuildVectorSDNode.isConstantSplat, now that the functionality exists
- Continue to improve i64 constant lowering. Lower certain special constants
  to the constant pool when they correspond to SPU's shufb instruction's
  special mask values. This avoids the overhead of performing a shuffle on a
  zero-filled vector just to get the special constant when the memory load
  suffices.

llvm-svn: 67067
2009-03-17 01:15:45 +00:00
Daniel Dunbar 2d603dae2c raw_ostream: Rework implementation of unbuffered streams so outputting
a single character requires only one branch to follow slow path.
 - Never use a buffer when writing on an unbuffered stream.

 - Move default buffer size to header.

llvm-svn: 67066
2009-03-17 01:13:35 +00:00
Dale Johannesen 87077356be Fix a debug info dependency in jump threading.
llvm-svn: 67064
2009-03-17 00:38:24 +00:00
Anders Carlsson 4916c466da Handle ImplicitCastExprs when instantiating templates.
llvm-svn: 67063
2009-03-17 00:28:02 +00:00
Devang Patel bd93351c42 Fix struct field's debug info.
llvm-svn: 67062
2009-03-16 23:47:53 +00:00
Douglas Gregor 9fa1ab7d0c Fix a problem noticed by Anders, where we were creating
IntegerLiterals during instantiation when we should be creating either
a boolean literal (CXXBoolLiteralExpr) or a character literal
(CharacterLiteral).

llvm-svn: 67061
2009-03-16 23:35:25 +00:00
Daniel Dunbar db7a36cdac raw_ostream: Replace flush_impl with write_impl, which takes data to
write as arguments.
 - Add raw_ostream::GetNumBytesInBuffer.
 - Privatize buffer pointers.
 - Get rid of slow and unnecessary code for writing out large strings.

llvm-svn: 67060
2009-03-16 23:29:31 +00:00
Sebastian Redl 0f8b23f71f Almost complete implementation of rvalue references. One bug, and a few unclear areas. Maybe Doug can shed some light on some of the fixmes.
llvm-svn: 67059
2009-03-16 23:22:08 +00:00
Douglas Gregor 23d75bb326 Build system changes to use TableGen to generate the various
diagnostics. This builds on the patch that Sebastian committed and
then revert. Major differences are:

  - We don't remove or use the current ".def" files. Instead, for now,
    we just make sure that we're building the ".inc" files.
  - Fixed CMake makefiles to run TableGen and build the ".inc" files
    when needed. Tested with both the Xcode and Makefile generators
    provided by CMake, so it should be solid.
  - Fixed normal makefiles to handle out-of-source builds that involve
    the ".inc" files.

I'll send a separate patch to the list with Sebastian's changes that
eliminate the use of the .def files.

llvm-svn: 67058
2009-03-16 23:06:59 +00:00
Daniel Dunbar d24535fe3c raw_ostream: Lift out flush_nonempty.
- Flush a known non-empty buffers; enforces the interface to
   flush_impl and kills off HandleFlush (which I saw no reason to be
   an inline method, Chris?).

 - Clarify invariant that flush_impl is only called with OutBufCur >
   OutBufStart.

 - This also cleary collects all places where we have to deal with the
   buffer possibly not existing.

 - A few more comments and fixing the unbuffered behavior remain in
   this commit sequence.

llvm-svn: 67057
2009-03-16 22:55:06 +00:00
Douglas Gregor 6d1ec14f0f CMake: Build system fixes for XCode. llvm-config still causes us some serious trouble, but it's less serious than it used to be
llvm-svn: 67056
2009-03-16 22:53:26 +00:00
Daniel Dunbar 8786218b0c Make raw_ostream::operator<<(const void *) fast; it doesn't matter but
it is easy.

llvm-svn: 67054
2009-03-16 22:08:44 +00:00
Daniel Dunbar 7a9bb9eeec Add slow path for single character write, and use exclusively for
single characters writes outside of the fast path in raw_ostream.h

llvm-svn: 67053
2009-03-16 22:00:17 +00:00
Douglas Gregor d36792c86f CMake: Make sure to build TableGen'd files in the binary directory
llvm-svn: 67052
2009-03-16 21:35:18 +00:00