Commit Graph

68021 Commits

Author SHA1 Message Date
Douglas Gregor 31fae89497 Add an assertion and a test case, in a fruitless attempt to track down an existing bug
llvm-svn: 81885
2009-09-15 18:26:13 +00:00
Chris Lattner c25359e1a3 rename test
llvm-svn: 81884
2009-09-15 18:23:37 +00:00
Chris Lattner 2503b50e4d convert to filecheck
llvm-svn: 81882
2009-09-15 18:23:23 +00:00
Chris Lattner 7ff4a94c4b add missing file
llvm-svn: 81881
2009-09-15 18:03:13 +00:00
Bob Wilson 967bf27de2 Handle AddrMode4 for Thumb2 in rewriteT2FrameIndex. This occurs for
VLDM/VSTM instructions, and without this check, the code assumes that an
offset is allowed, as it would be with VLDR/VSTR.  The asm printer,
however, silently drops the offset, producing incorrect code.  Since the
address register in this case is either the stack or frame pointer, the
spill location ends up conflicting with some other stack slot or with
outgoing arguments on the stack.

llvm-svn: 81879
2009-09-15 17:56:18 +00:00
Sandeep Patel f3369c22a7 Fix superreg use in ARMAsmPrinter. Approved by Anton Korobeynikov.
llvm-svn: 81878
2009-09-15 17:53:11 +00:00
Chris Lattner 840c700654 several major improvements to the sparc backend: support for weak linkage
and PIC codegen.  Patch by Venkatraman Govindaraju!

llvm-svn: 81877
2009-09-15 17:46:24 +00:00
Ted Kremenek 188f62f1cc Fix static analyzer regression when emitting undefined value warnings
with binary operators.  The result of a binary operator may be
undefined even if its operands are well-defined.

llvm-svn: 81874
2009-09-15 17:43:54 +00:00
Fariborz Jahanian c34c179f4b Perform overload resolution when selecting a pointer conversion
function for delete of a class expression and issue
good diagnostic when result is ambiguous.

llvm-svn: 81870
2009-09-15 17:21:47 +00:00
Douglas Gregor 00a511f0c1 Slightly improved template argument deduction for use in partial
ordering, along with another test case for partial ordering of partial
specializations. 

llvm-svn: 81869
2009-09-15 16:51:42 +00:00
Anders Carlsson 160e635ba6 Add test case.
llvm-svn: 81868
2009-09-15 16:36:17 +00:00
Anders Carlsson 1450adbbf9 Code generation of Conditional operators that are lvalues (but that aren't bitfields).
llvm-svn: 81867
2009-09-15 16:35:24 +00:00
Douglas Gregor be999390eb Implement partial ordering of class template partial specializations
(C++ [temp.class.order]).

llvm-svn: 81866
2009-09-15 16:23:51 +00:00
Fariborz Jahanian 44dfbbb69f Update for inherited conversion function support.
llvm-svn: 81865
2009-09-15 16:15:23 +00:00
Dan Gohman 94262db4d4 Teach ValueTracking how to look through GlobalAliases. GlobalAliases are
not folded in the constant folder because the constant folder doesn't
simplify ConstantExpr operands.

llvm-svn: 81864
2009-09-15 16:14:44 +00:00
Anders Carlsson 01ccf998d5 Use getTrueExpr/getFalseExpr as suggested by Doug.
llvm-svn: 81863
2009-09-15 16:03:44 +00:00
Dan Gohman 0ea0e1b4af Fix an accidental inversion of the inbounds flag.
llvm-svn: 81862
2009-09-15 16:00:30 +00:00
Dan Gohman e4532f30b1 When a constant's type is refined, update the constant in place
instead of cloning and RAUWing it.

 - Make AbstractTypeUser a friend of Value so that it can offer
   its subclasses a way to update a Value's type in place. This
   is better than a universally visible setType method on Value,
   and it's sufficient for the immediate need.

 - Eliminate the constant "convert" functions. This eliminates a
   lot of logic duplication, and fixes a complicated bug where a
   constant can't actually be cloned during the type refinement
   process because some of the types that its folder needs are
   half-destroyed, being in the middle of refinement themselves.

 - Move the getValType functions from being static overloaded
   functions in Constants.cpp to be members of class template
   specializations in ConstantsContext.h. This means that the
   code ends up getting instantiated twice, however it also
   makes it possible to eliminate all "convert" functions, so
   it's not a big net code size increase. And if desired, the
   duplicate instantiations could be eliminated with some
   reorganization.

llvm-svn: 81861
2009-09-15 15:58:07 +00:00
Dan Gohman f3a9e18dd6 Use llvm-link -S instead of using llvm-dis.
llvm-svn: 81860
2009-09-15 15:38:31 +00:00
Dan Gohman 2b09de986c Give llvm-link a -S option.
llvm-svn: 81859
2009-09-15 15:35:07 +00:00
Dan Gohman 972c9c5e0a Don't bother using a PassManager just to print a Module.
llvm-svn: 81858
2009-09-15 15:33:42 +00:00
Dan Gohman d29cafc083 Restore a comment that was lost in the merge.
llvm-svn: 81857
2009-09-15 15:09:54 +00:00
Dan Gohman 1f58f0e187 Fix apostrophos.
llvm-svn: 81856
2009-09-15 15:08:33 +00:00
Anders Carlsson 6b2737d591 If a conversion operator exists in a base class, make sure to cast the object to that base class.
llvm-svn: 81852
2009-09-15 07:42:44 +00:00
Nick Lewycky 7465cd769c Add more newlines to make up for the ones removed from the end of instructions.
llvm-svn: 81851
2009-09-15 07:08:25 +00:00
Evan Cheng edb2287722 Forgot this.
llvm-svn: 81850
2009-09-15 07:05:12 +00:00
Evan Cheng a38ff3edae Another try at early partial coalescing. Identity phi source copies (their sources are defined by phi join def) are coalesced. And the phi join copy is backward copy propagated into the other copies.
Still miscompiling some tests. :-(

llvm-svn: 81849
2009-09-15 06:45:16 +00:00
Chris Lattner d7490a4763 convert to filecheck
llvm-svn: 81848
2009-09-15 06:34:29 +00:00
Anders Carlsson 110b07b848 When performing an user defined conversion sequence, perform the initial standard conversion sequence. This lets us remove a workaround in SemaCompleteConstructorCall.
llvm-svn: 81847
2009-09-15 06:28:28 +00:00
Nick Lewycky c5cb3bd927 Forbid arrays of function-type and structures with function-typed fields.
While I'm there, change code that does:
  SomeTy == Type::getFooType(Context)
into:
  SomeTy->getTypeID() == FooTyID
to decrease the amount of useless type creation which may involve locking, etc.

llvm-svn: 81846
2009-09-15 06:28:26 +00:00
Chris Lattner ee8f74f5d1 fix PR4963: folding insertvalue would sometimes turn a packed struct into
an unpacked one.

llvm-svn: 81845
2009-09-15 06:28:12 +00:00
Anders Carlsson 611da28725 Revert for real.
llvm-svn: 81844
2009-09-15 05:49:31 +00:00
Chris Lattner e0987215f0 add a new CallGraphNode::replaceCallEdge method and use it from
argpromote to avoid invalidating an iterator.  This fixes PR4977.
All clang tests now pass with expensive checking (on my system 
at least).

llvm-svn: 81843
2009-09-15 05:40:35 +00:00
Anders Carlsson e5506884cc Whoops, didn't mean to commit this.
llvm-svn: 81842
2009-09-15 05:31:01 +00:00
Anders Carlsson 4e66cda3f7 Only reuse an already existing ImplicitCastExpr if the cast kinds are the same.
llvm-svn: 81841
2009-09-15 05:28:24 +00:00
Chris Lattner e9a4992399 add newline to debug dump
llvm-svn: 81840
2009-09-15 05:14:57 +00:00
Anders Carlsson d3bc31f04f Get rid of the CastInfo struct.
llvm-svn: 81839
2009-09-15 05:13:45 +00:00
Chris Lattner d4d966f500 make -debug-pass=Executions show information about what call graph nodes
are in the SCC for each execution of a CGSCC pass.

llvm-svn: 81838
2009-09-15 05:03:04 +00:00
Anders Carlsson 7cd39e0721 Handle reinterpret_cast between integral types and pointer types.
llvm-svn: 81837
2009-09-15 04:48:33 +00:00
Chris Lattner f82f27be3f add some missing quotes in debug output
llvm-svn: 81836
2009-09-15 04:45:26 +00:00
Anders Carlsson 04c3bf4fab Codegen support for nullptr from C++0x.
llvm-svn: 81835
2009-09-15 04:39:46 +00:00
Chris Lattner 2b979ef128 switch scciterator to use DenseMap instead of std::map
llvm-svn: 81834
2009-09-15 04:37:49 +00:00
Chris Lattner 30fceaba05 this is failing on linux hosts, force a triple.
llvm-svn: 81833
2009-09-15 04:27:29 +00:00
Ted Kremenek b66229464e Per feedback from Eli, recognize in the transfer function logic for
__builtin_offsetof in the static analyzer that __builtin_offsetof is
not guaranteed to return an integer constant.  We will need to shore
this up later, but now at least we have correct support for when this
*is* an integer constant.

llvm-svn: 81830
2009-09-15 04:19:09 +00:00
Ted Kremenek 8e780355b7 Remove invalid add_dependencies line to unbreak the CMake build.
llvm-svn: 81827
2009-09-15 04:06:36 +00:00
Mikhail Glushenkov 0adf07eb9e Get rid of GetProcessId in Win32/Program.inc.
GetProcessId was introduced only in XP. As a bonus, this change makes Program
objects copyable, since Program is now basically a PID.

llvm-svn: 81826
2009-09-15 03:39:45 +00:00
Ted Kremenek 3413f277d0 Fix typo in comment.
llvm-svn: 81825
2009-09-15 03:28:00 +00:00
Chris Lattner 170c116aa7 merge one more in.
llvm-svn: 81824
2009-09-15 02:27:23 +00:00
Chris Lattner 42aaa6e443 merge some more cmov tests into cmov.ll
llvm-svn: 81823
2009-09-15 02:25:21 +00:00
Chris Lattner baf78e5b52 merge two cmov tests into one.
llvm-svn: 81822
2009-09-15 02:22:47 +00:00