Commit Graph

51271 Commits

Author SHA1 Message Date
Evan Cheng 288fbd2133 Fix a couple of Dwarf bugs.
- Emit DW_AT_byte_size for struct and union of size zero.
- Emit DW_AT_declaration for forward type declaration.

llvm-svn: 60812
2008-12-10 00:15:44 +00:00
Scott Michel a2495508cd CellSPU:
- Fix bug 3185, with misc other cleanups.
- Needed to implement SPUInstrInfo::InsertBranch(). CAUTION: Not sure what
  gets or needs to get passed to InsertBranch() to insert a conditional
  branch. This will abort for now until a good test case shows up.

llvm-svn: 60811
2008-12-10 00:15:19 +00:00
Sebastian Redl d9f7b1c230 Modify the move emulation according to the excellent design of Howard Hinnant. Makes for much nicer syntax when smart pointers are used consistently. Also, start converting internal argument passing of Parser to smart pointers.
llvm-svn: 60809
2008-12-10 00:02:53 +00:00
Ted Kremenek 42a217f4c0 Fix to BasicStoreManager::getElementLValue: If the base region is a symbol, layer an AnonTypedRegion on top of it.
llvm-svn: 60808
2008-12-09 23:50:57 +00:00
Bill Wendling 8008cb9a77 Implement fast-isel conversion of a branch instruction that's branching on an
overflow/carry from the "arithmetic with overflow" intrinsics. It searches the
machine basic block from bottom to top to find the SETO/SETC instruction that is
its conditional. If an instruction modifies EFLAGS before it reaches the
SETO/SETC instruction, then it defaults to the normal instruction emission.

llvm-svn: 60807
2008-12-09 23:19:12 +00:00
Dan Gohman 2d170896ee Rewrite the SDep class, and simplify some of the related code.
The Cost field is removed. It was only being used in a very limited way,
to indicate when the scheduler should attempt to protect a live register,
and it isn't really needed to do that. If we ever want the scheduler to
start inserting copies in non-prohibitive situations, we'll have to
rethink some things anyway.

A Latency field is added. Instead of giving each node a single
fixed latency, each edge can have its own latency. This will eventually
be used to model various micro-architecture properties more accurately.

The PointerIntPair class and an internal union are now used, which
reduce the overall size.

llvm-svn: 60806
2008-12-09 22:54:47 +00:00
Chris Lattner 0318b56f0e loosen up an assertion that isn't valid when called from
invalidateCachedPointerInfo.  Thanks to Bill for sending me
a testcase.

llvm-svn: 60805
2008-12-09 22:45:32 +00:00
Dan Gohman 9356d8f74d Minor code simplification.
llvm-svn: 60804
2008-12-09 22:45:08 +00:00
Fariborz Jahanian ea831ee11c Prevent bogus warning on unimplemented setter/getter when user
has added declaration of these methods in its @interface.

llvm-svn: 60803
2008-12-09 22:43:22 +00:00
Bill Wendling db8ec2d75a Add sub/mul overflow intrinsics. This currently doesn't have a
target-independent way of determining overflow on multiplication. It's very
tricky. Patch by Zoltan Varga!

llvm-svn: 60800
2008-12-09 22:08:41 +00:00
Chris Lattner fa9f99aa12 Teach GVN to invalidate some memdep information when it does an RAUW
of a pointer.  This allows is to catch more equivalencies.  For example,
the type_lists_compatible_p function used to require two iterations of
the gvn pass (!) to delete its 18 redundant loads because the first pass
would CSE all the addressing computation cruft, which would unblock the
second memdep/gvn passes from recognizing them.  This change allows
memdep/gvn to catch all 18 when run just once on the function (as is 
typical :) instead of just 3.

On all of 403.gcc, this bumps up the # reundandancies found from:

     63 gvn    - Number of instructions PRE'd
 153991 gvn    - Number of instructions deleted
  50069 gvn    - Number of loads deleted
to:
     63 gvn    - Number of instructions PRE'd
 154137 gvn    - Number of instructions deleted
  50185 gvn    - Number of loads deleted

+120 loads deleted isn't bad.

llvm-svn: 60799
2008-12-09 22:06:23 +00:00
Duncan Sands 445071c44f Fix PR3117: not all nodes being legalized. The
essential problem was that the DAG can contain
random unused nodes which were never analyzed.
When remapping a value of a node being processed,
such a node may become used and need to be analyzed;
however due to operands being transformed during
analysis the node may morph into a different one.
Users of the morphing node need to be updated, and
this wasn't happening.  While there I added a bunch
of documentation and sanity checks, so I (or some
other poor soul) won't have to scratch their head
over this stuff so long trying to remember how it
was all supposed to work next time some obscure
problem pops up!  The extra sanity checking exposed
a few places where invariants weren't being preserved,
so those are fixed too.  Since some of the sanity
checking is expensive, I added a flag to turn it
on.  It is also turned on when building with
ENABLE_EXPENSIVE_CHECKS=1.

llvm-svn: 60797
2008-12-09 21:33:20 +00:00
Ted Kremenek 62cc9daae3 Have BasicStoreManager::getLValueElement() have logic similar to BasicStoreManager::getLValueField() (i.e., don't just return the 'base' as the SVal)
llvm-svn: 60795
2008-12-09 21:20:27 +00:00
Chris Lattner 702e46ed54 Teach BasicAA::getModRefInfo(CallSite, CallSite) some
tricks based on readnone/readonly functions.

Teach memdep to look past readonly calls when analyzing
deps for a readonly call.  This allows elimination of a
few more calls from 403.gcc:

before:
     63 gvn    - Number of instructions PRE'd
 153986 gvn    - Number of instructions deleted
  50069 gvn    - Number of loads deleted

after:
     63 gvn    - Number of instructions PRE'd
 153991 gvn    - Number of instructions deleted
  50069 gvn    - Number of loads deleted

5 calls isn't much, but this adds plumbing for the next change.

llvm-svn: 60794
2008-12-09 21:19:42 +00:00
Steve Naroff 70cb0071c9 Add testcase for commit r60781.
llvm-svn: 60793
2008-12-09 20:59:16 +00:00
Fariborz Jahanian 3d8552a75d Support for implementation of property in the case where
the synthesis is in an implementation of s subclass of
a super class where the property has been declared.

llvm-svn: 60792
2008-12-09 20:23:04 +00:00
Sebastian Redl c13f26873f Kick out the proof-of-concept ASTOwner and replace it with ASTOwningResult
llvm-svn: 60791
2008-12-09 20:22:58 +00:00
Ted Kremenek 93041ba483 Add preliminary CFG support for @throw. We basically treat it like a return statement.
llvm-svn: 60790
2008-12-09 20:20:09 +00:00
Ted Kremenek 1857ff4e2c In GRExprEngine treat @throw as an 'abort' that ends the current path. This is a temporary solution.
llvm-svn: 60789
2008-12-09 20:18:58 +00:00
Chris Lattner 41efb68c44 Fix a fixme: allow memdep to see past read-only calls when doing
load dependence queries.  This allows GVN to eliminate a few more
instructions on 403.gcc:

 152598 gvn    - Number of instructions deleted
  49240 gvn    - Number of loads deleted
after:
 153986 gvn    - Number of instructions deleted
  50069 gvn    - Number of loads deleted

llvm-svn: 60786
2008-12-09 19:47:40 +00:00
Chris Lattner 254314e6bc rename getNonLocalDependency -> getNonLocalCallDependency, and remove
pointer stuff from it, simplifying the code a bit.

llvm-svn: 60783
2008-12-09 19:38:05 +00:00
Sebastian Redl 7379577ab0 Lay the groundwork for converting the entire parser-sema chain to smart pointers.
llvm-svn: 60782
2008-12-09 19:36:21 +00:00
Steve Naroff b0498eebc2 Sema::ActOnMethodDeclaration(): Make sure we perform the default function/array conversion for parameter types.
This fixes <rdar://problem/6424064> checker on xcode: (possible bad AST) can the type of a method parameter really have "isFunctionType() == true"?
and http://llvm.org/bugs/show_bug.cgi?id=2997.

llvm-svn: 60781
2008-12-09 19:36:17 +00:00
Chris Lattner b6fc4b8d92 Switch GVN::processNonLocalLoad to using the new
MemDep::getNonLocalPointerDependency method.  There are
some open issues with this (missed optimizations) and
plenty of future work, but this does allow GVN to eliminate
*slightly* more loads (49246 vs 49033).

Switching over now allows simplification of the other code
path in memdep.

llvm-svn: 60780
2008-12-09 19:25:07 +00:00
Chris Lattner 0a5a8d54a9 random cleanups, no functionality change.
llvm-svn: 60779
2008-12-09 19:21:47 +00:00
Chris Lattner 2e41b0e6e7 Fix a serious null termination bug found by David Chisnall!
llvm-svn: 60778
2008-12-09 19:10:54 +00:00
Evan Cheng 058522f1da xfail this for now.
llvm-svn: 60777
2008-12-09 18:43:00 +00:00
Evan Cheng 8f81e4e31b Back out 60748 for now. It's breaking SPASS, 254.gap, and 464.h264ref.
llvm-svn: 60776
2008-12-09 18:21:49 +00:00
Evan Cheng 74a24b260e Cosmetic changes.
llvm-svn: 60771
2008-12-09 17:56:30 +00:00
Nuno Lopes 10ab44a3a2 remove unused var
llvm-svn: 60770
2008-12-09 17:04:06 +00:00
Dan Gohman 7d32974069 Whitespace cleanups.
llvm-svn: 60769
2008-12-09 16:37:48 +00:00
Mikhail Glushenkov e001666100 Remove Clang tests since clang is not installed on the buildbots.
llvm-svn: 60767
2008-12-09 15:11:45 +00:00
Mikhail Glushenkov 5752117a5b Add some rudimentary tests for .
llvm-svn: 60766
2008-12-09 14:41:27 +00:00
Mikhail Glushenkov e5cd77150e Man page typo fix.
llvm-svn: 60765
2008-12-09 14:41:00 +00:00
Mikhail Glushenkov 65b0b2bf28 Support -emit-llvm properly (with -S and -c).
llvm-svn: 60764
2008-12-09 14:40:18 +00:00
Sebastian Redl e0c2affc5e Fill in C++ status table for expressions.
llvm-svn: 60763
2008-12-09 14:40:01 +00:00
Sebastian Redl 17f2c7d251 Consistently use smart pointers for stmt and expr nodes in parser local variables.
llvm-svn: 60761
2008-12-09 13:15:23 +00:00
Steve Naroff 08628db9d2 Fix <rdar://problem/6429113> clang ObjC rewriter: crash rewriting file with Blocks and properties
More fancy footwork to cope with rewriting property 'setters'.

llvm-svn: 60760
2008-12-09 12:56:34 +00:00
Zhongxing Xu 2a46a8ef52 initialize member variable.
llvm-svn: 60759
2008-12-09 12:26:46 +00:00
Zhongxing Xu 2e8123e5bb Add utility method. Remove an unused method.
llvm-svn: 60758
2008-12-09 10:51:19 +00:00
Duncan Sands 3812542a2c Handle a compiler warning.
llvm-svn: 60755
2008-12-09 09:58:11 +00:00
Chris Lattner 4f10733cf3 fix typos gabor noticed
llvm-svn: 60754
2008-12-09 08:38:36 +00:00
Bill Wendling e25d3417f5 Correct my English.
llvm-svn: 60753
2008-12-09 07:55:31 +00:00
Chris Lattner 75510d8d5c restructure the top level non-local ptr dep query to handle
the first block of a query specially.  This makes the "complete query
caching" subsystem more effective, avoiding predecessor queries.  This
speeds up GVN another 4%.

llvm-svn: 60752
2008-12-09 07:52:59 +00:00
Chris Lattner f903fe1df0 rename getNonLocalPointerDepInternal -> getNonLocalPointerDepFromBB
and split its inner loop out into a new GetNonLocalInfoForBlock
function.  No functionality change.

llvm-svn: 60751
2008-12-09 07:47:11 +00:00
Evan Cheng 75900bf5cd DisableGVCompilation should not abort on internal GlobalValue's.
llvm-svn: 60750
2008-12-09 07:31:49 +00:00
Mon P Wang 8a5366332f In LegalizeOp, don't change the result type of CONVERT_RNDSAT when promoting
one of its operand.

llvm-svn: 60749
2008-12-09 07:27:39 +00:00
Nick Lewycky f545749f2b It's easy to handle SLE/SGE when the loop has a unit stride.
llvm-svn: 60748
2008-12-09 07:25:04 +00:00
Chris Lattner aeaec0838b if we have two elements, insert both, don't use std::sort.
This speeds up the new GVN by another 3%

llvm-svn: 60747
2008-12-09 07:05:45 +00:00
Chris Lattner 4d1281cdf2 If we're only adding one new element to 'Cache', insert it into its known
position instead of using a full sort. This speeds up GVN by ~4% with the
new memdep stuff.

llvm-svn: 60746
2008-12-09 06:58:04 +00:00