Commit Graph

73911 Commits

Author SHA1 Message Date
Anders Carlsson 538af0906d Add DeclContext::dump.
llvm-svn: 90974
2009-12-09 17:27:46 +00:00
Chris Lattner 9f9010ef47 Add a minor optimization: if we haven't changed the operands of an
add, there is no need to scan the world to find the same add again.
This invalidates the previous testcase, which wasn't wonderful anyway,
because it needed a run of instcombine to permute the use-lists in 
just the right way to before GVN was run (so it was really fragile).
Not a big loss.

llvm-svn: 90973
2009-12-09 17:27:45 +00:00
Anton Korobeynikov d0a0bc34e3 Add note about loadable modules on windows.
Patch by Gregory Petrosyan!

llvm-svn: 90972
2009-12-09 17:26:02 +00:00
Chris Lattner fa2e536831 fix PR5733, a case where we'd replace an add with a lexically identical
binary operator that wasn't an add.  In this case, a xor.  Whoops.

llvm-svn: 90971
2009-12-09 17:18:49 +00:00
David Goodwin a45fe67667 <rdar://problem/7453528>. Track only physical registers that are valid for the target.
llvm-svn: 90970
2009-12-09 17:18:22 +00:00
Chris Lattner 8f77035568 merge crash-2.ll into crash.ll
llvm-svn: 90969
2009-12-09 17:17:26 +00:00
Zhongxing Xu 1042bf4ae2 Refactor OSAtomic evaluation logic into OSAtomicChecker.
llvm-svn: 90968
2009-12-09 12:23:28 +00:00
Zhongxing Xu 8cca37fae0 Use a temporary destination set such that we can clear fake auto transitions.
Otherwise, even when real evaluation occurs, the previous fake auto 
transitions would still be in the destination set, causing fake state 
bifurcation.

llvm-svn: 90967
2009-12-09 12:16:07 +00:00
Daniel Dunbar 75017b7cef clang -cc1: Mark -i* options as JoinedOrSeparate, since the driver forwards them
directly and one can write '-includefoo' if one really wants to.

llvm-svn: 90966
2009-12-09 10:01:26 +00:00
John McCall 5677499fbf First pass at implementing C++ enum semantics: calculate (and store) an
"integer promotion" type associated with an enum decl, and use this type to
determine which type to promote to.  This type obeys C++ [conv.prom]p2 and
is therefore generally signed unless the range of the enumerators forces
it to be unsigned.

Kills off a lot of false positives from -Wsign-compare in C++, addressing
rdar://7455616

llvm-svn: 90965
2009-12-09 09:09:27 +00:00
Zhongxing Xu 1d153328be OSAtomic simulation: use the original region as the location to load from,
instead of the ElementRegion obtained from casts.

Test cast: the leak cannot occur bacause the true branch cannot be taken.

llvm-svn: 90964
2009-12-09 08:32:57 +00:00
Eric Christopher f92d732c99 Silence conversion warning from 64 to 32-bit.
llvm-svn: 90962
2009-12-09 08:29:32 +00:00
Anders Carlsson c50b340108 Look through using declarations when searching for allocation overloads.
llvm-svn: 90961
2009-12-09 07:39:44 +00:00
Chris Lattner 07df9efb35 change AnalyzeLoadFromClobberingMemInst/AnalyzeLoadFromClobberingStore
to require the load ty/ptr to be passed in, no functionality change.

llvm-svn: 90960
2009-12-09 07:37:07 +00:00
Chris Lattner 0def861ee9 change AnalyzeLoadFromClobberingWrite and clients to pass in type
and pointer instead of the load.  No functionality change.

llvm-svn: 90959
2009-12-09 07:34:10 +00:00
Chris Lattner eea0f58393 enhance NonLocalDepEntry to keep the per-block phi translated address
of the query.

llvm-svn: 90958
2009-12-09 07:31:04 +00:00
Daniel Dunbar d333139411 DeltaAlgorithm: Add a virtual destructor and home.
llvm-svn: 90957
2009-12-09 07:19:48 +00:00
Chris Lattner 0c31547168 change NonLocalDepEntry from being a typedef for an std::pair to be its
own small class.  No functionality change.

llvm-svn: 90956
2009-12-09 07:08:01 +00:00
Ted Kremenek 2cba2ce28f Update checker build.
llvm-svn: 90955
2009-12-09 06:58:36 +00:00
Zhongxing Xu f5448561ed remove dead code.
llvm-svn: 90953
2009-12-09 05:52:12 +00:00
Zhongxing Xu d1dee7e71a Insert instead of assign to the dest node set, since we use the dest node set
repeatedly.

llvm-svn: 90952
2009-12-09 05:48:53 +00:00
Lang Hames 1ab2b49e6d Added a new "splitting" spiller.
When a call is placed to spill an interval this spiller will first try to
break the interval up into its component values. Single value intervals and
intervals which have already been split (or are the result of previous splits)
are spilled by the default spiller.

Splitting intervals as described above may improve the performance of generated
code in some circumstances. This work is experimental however, and it still
miscompiles many benchmarks. It's not recommended for general use yet.

llvm-svn: 90951
2009-12-09 05:39:12 +00:00
Eli Friedman f7195532ee Fix for PR5730: make sure to consistently call
PerformObjectArgumentInitialization from BuildCXXMemberCallExpr.

llvm-svn: 90950
2009-12-09 04:53:56 +00:00
Eli Friedman a958a01e9f Whitespace fix.
llvm-svn: 90949
2009-12-09 04:52:43 +00:00
Anders Carlsson f9812782b7 In CXXRecordDecl::forallBases, add the base to the "queue", so we walk more than one heirarchy of classes. John, please review.
llvm-svn: 90948
2009-12-09 04:26:02 +00:00
Zhongxing Xu 39644a62f9 Add notes to a test case.
llvm-svn: 90947
2009-12-09 04:22:30 +00:00
Ted Kremenek 06ba78d07d Fix crash in DisplayFunction(). ObjCInterfaceDecls can also get passed to this function, but we don't want to display them.
llvm-svn: 90944
2009-12-09 03:45:19 +00:00
Anders Carlsson a038825b1c Don't warn about function templates or function template specializations.
llvm-svn: 90943
2009-12-09 03:44:46 +00:00
Mike Stump aff69af918 Add cleanups for exceptional edges. WIP.
llvm-svn: 90940
2009-12-09 03:35:49 +00:00
John McCall daa3d6bb50 Rename Sema::IsOverload to Sema::CheckOverload. Teach it to ignore unresolved
using value decls;  we optimistically assume they won't turn into conflicts.
Teach it to tell the caller *why* the function doesn't overload with the returned
decl;  this will be useful for using hiding.

llvm-svn: 90939
2009-12-09 03:35:25 +00:00
Anders Carlsson 31c7e88667 Move the missing prototypes checking out into a new function. Don't warn about inline functions. Add a test.
llvm-svn: 90938
2009-12-09 03:30:09 +00:00
Daniel Dunbar 5ea6200d06 Remove spurious extern.
llvm-svn: 90937
2009-12-09 03:26:33 +00:00
Eli Friedman 4f678f3de1 Fix for PR5709: use the computed type of the declaration instead of the
type of the builtin when generating the function declaration for a builtin
library call.

llvm-svn: 90936
2009-12-09 03:05:59 +00:00
Anders Carlsson efa4732747 Pass the current SourceLocation to getAssignOperatorMethod, fixing a crash when the assign operator method needs to be instantiated. Doug, please review the updated default-assignment-operator.cpp change.
llvm-svn: 90935
2009-12-09 03:01:51 +00:00
Daniel Dunbar 0d886ca091 Remove unneeded ';' and a class/struct mismatch (noticed by clang).
llvm-svn: 90934
2009-12-09 02:58:09 +00:00
Ted Kremenek 32c32892f7 Fix a horrid bug in GRExprEngine::CheckerVisit() that was identified
by the test case in PR 5627.  Essentially we shouldn't clear the
ExplodedNodeSet where we deposit newly constructed nodes if that set
is the 'Dst' set passed in.  It is not okay to clear that set because
it may already contain nodes.

llvm-svn: 90931
2009-12-09 02:45:41 +00:00
Chris Lattner 10398e74ae the code in GVN that tries to forward large loads to small
stores is not phi translating, thus it miscompiles really
crazy testcases.  This is from inspection, I haven't seen
this in the wild.

llvm-svn: 90930
2009-12-09 02:43:05 +00:00
Chris Lattner 946b58dd90 add some aborts to #if 0's.
llvm-svn: 90929
2009-12-09 02:41:54 +00:00
Chris Lattner 53d80e2c07 Neil points out that this could be simplified, do it.
llvm-svn: 90927
2009-12-09 02:08:14 +00:00
Chris Lattner 972e6d8d00 Switch GVN and memdep to use PHITransAddr, which correctly handles
phi translation of complex expressions like &A[i+1].  This has the
following benefits:

1. The phi translation logic is all contained in its own class with
   a strong interface and verification that it is self consistent.

2. The logic is more correct than before.  Previously, if intermediate
   expressions got PHI translated, we'd miss the update and scan for
   the wrong pointers in predecessor blocks.  @phi_trans2 is a testcase
   for this.

3. We have a lot less code in memdep.

We can handle phi translation across blocks of things like @phi_trans3,
which is pretty insane :).

This patch should fix the miscompiles of 255.vortex, and I tested it 
with a bootstrap of llvm-gcc, llvm-test and dejagnu of course.

llvm-svn: 90926
2009-12-09 01:59:31 +00:00
Evan Cheng d938faff4b Teach InferPtrAlignment to infer GV+cst alignment and use it to simplify x86 isl lowering code.
llvm-svn: 90925
2009-12-09 01:53:58 +00:00
Mike Stump 85d9968533 Add support for the cleanup attribute for C++; we don't have to copy
all of g++'s bugs.

llvm-svn: 90924
2009-12-09 01:50:36 +00:00
Devang Patel e52b1fa128 Remove tests that are not suitable anymore. Plus they are not testing the original bugfixes anymore. These tests were inserted to check bug fixes in code that handled debug info intrinsics. These intrinsics are no longer used and now llvm parser simply ignores old .dbg intrinsics from these dead tests.
llvm-svn: 90923
2009-12-09 01:46:00 +00:00
Evan Cheng f5938d5d27 Move isConsecutiveLoad to SelectionDAG. It's not target dependent and it's primary used by selectdag passes.
llvm-svn: 90922
2009-12-09 01:36:00 +00:00
Chris Lattner 9af9d0f74e fix a nasty variable that was shadowing the real CurBB but with the wrong value.
llvm-svn: 90920
2009-12-09 01:19:16 +00:00
Evan Cheng 2d412f0cb8 Infer alignment for non-fixed stack object.
llvm-svn: 90919
2009-12-09 01:17:24 +00:00
Evan Cheng 1750009f38 Add const qualifier.
llvm-svn: 90918
2009-12-09 01:10:37 +00:00
Evan Cheng 34a23ea371 Refactor InferAlignment out of DAGCombine.
llvm-svn: 90917
2009-12-09 01:04:59 +00:00
Chris Lattner 11da6b0050 fix many input tracking bugs.
llvm-svn: 90915
2009-12-09 00:56:14 +00:00
Douglas Gregor 40cb9ad391 Implemented an implicit conversion from "noreturn" function types (and
pointers thereof) to their corresponding non-noreturn function
types. This conversion is considered an exact match for
overload-resolution purposes. Note that we are a little more strict
that GCC is, because we encode noreturn in the type system, but that's
a Good Thing (TM) because it does not allow us to pretend that
potentially-returning function pointers are non-returning function
pointers.

Fxies PR5620.

llvm-svn: 90913
2009-12-09 00:47:37 +00:00