Commit Graph

51352 Commits

Author SHA1 Message Date
Bill Wendling 0864a75ebf If ADD, SUB, or MUL have an overflow bit that's used, don't do transformation on
them. The DAG combiner expects that nodes that are transformed have one value
result.

llvm-svn: 60857
2008-12-10 22:36:00 +00:00
Steve Naroff c68cfcfd03 The "real" fix for <rdar://problem/6424347> clang on xcode: Assertion failed: (0 && "unexpected type"), function mergeTypes,
Commit r60845 was premature.

llvm-svn: 60852
2008-12-10 22:14:21 +00:00
Evan Cheng d5021730c8 Preliminary ARM debug support based on patch by Mikael of FlexyCore.
llvm-svn: 60851
2008-12-10 21:54:21 +00:00
Evan Cheng 01fa50ca4f Some code clean up.
llvm-svn: 60850
2008-12-10 21:49:05 +00:00
Douglas Gregor 9aa8b55d10 Fix PR clang/3175: CheckAddressOfOperand does not handle references to class vars
llvm-svn: 60849
2008-12-10 21:26:49 +00:00
Douglas Gregor 872ffce257 Some cleanups to the dependent-types commit, as suggested by Sebastian
llvm-svn: 60848
2008-12-10 20:57:37 +00:00
Steve Naroff 13ac125edf Fix <rdar://problem/6424347> clang on xcode: Assertion failed: (0 && "unexpected type"), function mergeTypes,
llvm-svn: 60845
2008-12-10 20:07:25 +00:00
Bill Wendling 517d05fd00 Only perform SETO/SETC to JO/JC conversion if extractvalue is coming from an arithmetic with overflow instruction.
llvm-svn: 60844
2008-12-10 19:44:24 +00:00
Ted Kremenek d40ab7b72a Declare PerIDCache as IdentifierInfo** instead of void*. This is just cleaner. No performance change.
llvm-svn: 60843
2008-12-10 19:40:23 +00:00
Steve Naroff 68e167df8e Fix <rdar://problem/6418623> Bogus block type compatibility warning.
llvm-svn: 60842
2008-12-10 17:49:55 +00:00
Nuno Lopes 9499385621 fix typo. thanks Baldrick for noticing
llvm-svn: 60841
2008-12-10 16:11:10 +00:00
Nuno Lopes 65e877eabb add gcc 4.1.2 from redhat to the list of broken compilers
llvm-svn: 60840
2008-12-10 16:01:22 +00:00
Steve Naroff df70577b9c Fix regression caused by fixing <rdar://problem/6429113> clang ObjC rewriter: crash rewriting file with Blocks and properties
llvm-svn: 60839
2008-12-10 14:53:27 +00:00
Duncan Sands ec1b9b6869 Update these instructions to the 2.4 release.
llvm-svn: 60838
2008-12-10 14:24:58 +00:00
Duncan Sands 09ed3bba2b For amusement, implement SADDO, SSUBO, UADDO, USUBO
for promoted integer types, eg: i16 on ppc-32, or
i24 on any platform.  Complete support for arbitrary
precision integers would require handling expanded
integer types, eg: i128, but I couldn't be bothered.

llvm-svn: 60834
2008-12-10 12:30:42 +00:00
Duncan Sands 8aace1fd08 Mention the Ada and Fortran front-ends.
llvm-svn: 60833
2008-12-10 10:50:58 +00:00
Duncan Sands c52b616ccf Don't dereference the end() iterator. This was
causing a bunch of failures when running
"make ENABLE_EXPENSIVE_CHECKS=1 check".

llvm-svn: 60832
2008-12-10 09:38:36 +00:00
Mon P Wang 68d4eee062 Added a little more information that vector shifts require vector shift amount.
llvm-svn: 60831
2008-12-10 08:55:09 +00:00
Douglas Gregor 7307d6ca96 Use a scoped object to manage entry/exit from a parser scope rather than explicitly calling EnterScope/ExitScope
llvm-svn: 60830
2008-12-10 06:34:36 +00:00
Mon P Wang 4637c3c698 Fixed a bug when trying to optimize a extract vector element of a
bit convert that changes the number of elements of a shuffle.

llvm-svn: 60829
2008-12-10 03:59:02 +00:00
Evan Cheng 0b77319742 Fix MachineCodeEmitter to use uintptr_t instead of intptr_t. This avoids some overflow issues. Patch by Thomas Jablin.
llvm-svn: 60828
2008-12-10 02:32:19 +00:00
Anders Carlsson a726c1763a Append an extra newline to the module inline asm if it's not empty.
llvm-svn: 60827
2008-12-10 02:21:04 +00:00
Bill Wendling f482f379ef Whitespace changes.
llvm-svn: 60826
2008-12-10 02:01:32 +00:00
Dale Johannesen 40e3b209b1 Rewrite instructions for configuring external tests
to reflect reality.

llvm-svn: 60825
2008-12-10 01:58:32 +00:00
Evan Cheng 15e0481d39 Fix a bug introduced by r59265. If lazy compilation is disabled, return actual function ptr instead of ptr to stub if function is already compiled.
llvm-svn: 60822
2008-12-10 01:33:59 +00:00
Chris Lattner 56fe52e287 move an entry, add some notes, remove a completed item (IMPLICIT_DEF)
llvm-svn: 60821
2008-12-10 01:30:48 +00:00
Chris Lattner 2e84a548d6 Allow basicaa to walk through geps with identical indices in
parallel, allowing it to decide that P/Q must alias if A/B
must alias in things like:
 P = gep A, 0, i, 1
 Q = gep B, 0, i, 1

This allows GVN to delete 62 more instructions out of 403.gcc.

llvm-svn: 60820
2008-12-10 01:04:47 +00:00
Ted Kremenek a30391c31f Updated checker build.
llvm-svn: 60819
2008-12-10 00:50:24 +00:00
Bill Wendling 4eb2dcdc45 Whitespace fixes.
llvm-svn: 60818
2008-12-10 00:28:22 +00:00
Dan Gohman 43a120303b Update CalcLatency to work in terms of edge latencies, rather than
node latencies. Use CalcLatency instead of manual code in
CalculatePriorities to keep it consistent. Previously it
computed slightly different results.

llvm-svn: 60817
2008-12-10 00:24:36 +00:00
Fariborz Jahanian 7572ac5614 Patch to allow a getter call using property dot-syntax notation.
llvm-svn: 60816
2008-12-10 00:21:50 +00:00
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