Fariborz Jahanian
26de2e594b
Fixes a bogus error when declaring an extern "C" array.
...
(fixes radar 7457109).
llvm-svn: 90986
2009-12-09 21:39:38 +00:00
Evan Cheng
493b882f80
Optimize splat of a scalar load into a shuffle of a vector load when it's legal. e.g.
...
vector_shuffle (scalar_to_vector (i32 load (ptr + 4))), undef, <0, 0, 0, 0>
=>
vector_shuffle (v4i32 load ptr), undef, <1, 1, 1, 1>
iff ptr is 16-byte aligned (or can be made into 16-byte aligned).
llvm-svn: 90984
2009-12-09 21:00:30 +00:00
Mike Stump
f16b8c30d9
Add throw support. WIP.
...
llvm-svn: 90982
2009-12-09 19:24:08 +00:00
Fariborz Jahanian
a5fee26d28
Codegen. support for ObjCIsaExpr AST which until now
...
was not needed (fixes radar 7453430).
llvm-svn: 90981
2009-12-09 19:05:56 +00:00
Dan Gohman
220b196c94
Reuse the Threshold value to size these containers because it's
...
currently somewhat convenient for them to have the same value.
llvm-svn: 90980
2009-12-09 18:48:53 +00:00
Devang Patel
9ccfb641d1
Reapply r90858, a cleanup patch.
...
llvm-svn: 90979
2009-12-09 18:24:21 +00:00
Chris Lattner
ca5f9cb18b
fix hte last remaining known (by me) phi translation bug. When we reanalyze
...
clobbers to forward pieces of large stores to small loads, we need to consider
the properly phi translated pointer in the store block.
llvm-svn: 90978
2009-12-09 18:21:46 +00:00
Chris Lattner
f8ba1253f1
change GetStoreValueForLoad to use IRBuilder, which is cleaner and
...
implicitly constant folds.
llvm-svn: 90977
2009-12-09 18:13:28 +00:00
Mike Stump
d0caa82b36
Fix 80-col violation.
...
llvm-svn: 90976
2009-12-09 18:09:35 +00:00
Bob Wilson
1c5a6fb299
Fix a comment.
...
llvm-svn: 90975
2009-12-09 18:05:27 +00:00
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