Commit Graph

51271 Commits

Author SHA1 Message Date
Dan Gohman c1dee225d0 Ignore IMPLICIT_DEF instructions when computing physreg liveness.
While they appear to provide a normal clobbering def, they don't
in the case of the awkward IMPLICIT_DEF+INSERT_SUBREG idiom. It
would be good to change INSERT_SUBREG; until then, this change
allows post-regalloc scheduling to cope in a mildly conservative
way.

llvm-svn: 60583
2008-12-05 05:30:02 +00:00
Anders Carlsson 98463cd44d This wasn't such a good idea after all as it broke some tests.
llvm-svn: 60582
2008-12-05 05:24:13 +00:00
Anders Carlsson 3bc1d7d3d3 Handle __builtin___CFStringMakeConstantString in Expr::Evaluate.
llvm-svn: 60581
2008-12-05 05:18:05 +00:00
Anders Carlsson 1e495d9860 Make Sema::CheckForConstantInitializer use Expr::Evaluate. This fixes PR3130.
llvm-svn: 60580
2008-12-05 05:09:56 +00:00
Ted Kremenek bd4551cced Change the implementation of symbol_iterator to not use a union and rely on any details of SymbolRef's implementation.
llvm-svn: 60579
2008-12-05 02:56:39 +00:00
Ted Kremenek c9e7622a52 Add SymbolRef::print() and have SymbolicRegion::print() use this method instead of calling SymbolRef::getNumber().
llvm-svn: 60578
2008-12-05 02:45:20 +00:00
Ted Kremenek 3cb81db1b2 Use trait-based profiling of SymbolRefs, avoiding calling getNumber() (which will soon be removed).
llvm-svn: 60577
2008-12-05 02:39:38 +00:00
Ted Kremenek e2c86c30d0 Remove (unused) RegionExtent and subclasses. Extents are now represented easily using SVals.
llvm-svn: 60576
2008-12-05 02:36:00 +00:00
Ted Kremenek d8242f19f7 Rename SymbolID to SymbolRef. This is a precursor to some overhauling of the representation of symbolic values.
llvm-svn: 60575
2008-12-05 02:27:51 +00:00
Zhongxing Xu fbcf1e2623 Rename: FindContext -> FindDeclVisibleInContext.
llvm-svn: 60574
2008-12-05 01:57:57 +00:00
Fariborz Jahanian 521b3a363e Patch for diagnosing type mismatch between
methods in class and its implementation.
This is work in progress.

llvm-svn: 60573
2008-12-05 01:35:25 +00:00
Ted Kremenek 8e942123cb Remove SymbolDataContentsOf (unused).
llvm-svn: 60572
2008-12-05 01:31:31 +00:00
Evan Cheng 2a03c7e977 Re-did 60519. It turns out Darwin's handling of hidden visibility symbols are a bit more complicate than I expected. Both declarations and weak definitions still need a stub indirection. However, the stubs are in data section and they contain the addresses of the actual symbols.
llvm-svn: 60571
2008-12-05 01:06:39 +00:00
Ted Kremenek d368de794a StoreManager::Retrieve and StoreManager::RemoveDeadBindings now take a GRState* argument instead of a Store. This allows them to use the GDM for storing other data.
llvm-svn: 60570
2008-12-05 00:47:52 +00:00
Chris Lattner 5b4927048f -std=c99 defaults blocks to off even on darwin, but -fblocks overrides
even it. 

llvm-svn: 60568
2008-12-05 00:10:44 +00:00
Scott Michel 6ce01ab378 CellSPU: Add new directory under tests/CodeGen/CellSPU to retain tests that
aren't part of the test suite but are generally useful nonetheless, and can
be expanded later to test the backend against the actual Cell SPU system.

There's basically no other good place to put this code, so put it here for
the time being.

- vecoperations.c: Vector shuffles for all supported vector types, tests
  for v16i8 add and multiply.

llvm-svn: 60566
2008-12-05 00:01:00 +00:00
Steve Naroff 22216db0ec Finish up support for <rdar://problem/6213955> clang ObjC rewriter: rewriter doesn't appear to support @property and @synthesize.
llvm-svn: 60565
2008-12-04 23:50:32 +00:00
Chris Lattner 79413956d4 change getCurFunctionDecl to skip through Block contexts to find
the containing block.  Introduce a new getCurFunctionOrMethodDecl
method to check to see if we're in a function or objc method.
Minor cleanups to other related places.  This fixes rdar://6405429.

llvm-svn: 60564
2008-12-04 23:50:19 +00:00
Chris Lattner 2ca529ce61 instead of forcing blocks on by default, make them default to off, but let
specific targets default them to on.  Default blocks to on on 10.6 and later.
Add a -fblocks option that allows the user to override the target's default.
Use -fblocks in the various testcases that use blocks.

llvm-svn: 60563
2008-12-04 23:20:07 +00:00
Fariborz Jahanian 5271058c75 Output better diagnostics for continuation class
property attribute mis-specification.

llvm-svn: 60562
2008-12-04 22:56:16 +00:00
Chris Lattner c7c6dd4d97 replace useNeXTRuntimeAsDefault with a generic hook that allows targets
to specify their default language options.

llvm-svn: 60561
2008-12-04 22:54:33 +00:00
Ted Kremenek 123a35a81c Have raw_fd_ostream keep track of the position in the file to make tell() go faster by not requiring a flush().
llvm-svn: 60560
2008-12-04 22:51:11 +00:00
Ted Kremenek 1aed3ddffa Remove unneeded assertion.
llvm-svn: 60559
2008-12-04 22:47:11 +00:00
Ted Kremenek bf28bceb10 Remove unneeded assertion. We already know that FE->getName() is an absolute path.
llvm-svn: 60558
2008-12-04 22:36:44 +00:00
Sebastian Redl 33a3101d43 Code cleanup in new handling.
llvm-svn: 60557
2008-12-04 22:20:51 +00:00
Ted Kremenek baedbf47f6 Use 'free' to release PerIDCache since it was allocated using calloc().
llvm-svn: 60556
2008-12-04 22:09:37 +00:00
Devang Patel 8c84d28250 Enable LoopIndexSplit pass.
llvm-svn: 60555
2008-12-04 21:40:31 +00:00
Devang Patel c56423b500 Rewrite code that 1) filters loops and 2) calculates new loop bounds.
This fixes many bugs. I will add more test cases in a separate check-in.

Some day, the code that manipulates CFG and updates dom. info could use refactoring help.

llvm-svn: 60554
2008-12-04 21:38:42 +00:00
Owen Anderson 0bcbe8f6a8 Factor out some common code.
llvm-svn: 60553
2008-12-04 21:20:30 +00:00
Scott Michel ea3c49d43d CellSPU: Fix bug 3055
- Add v4f32, v2f64 to LowerVECTOR_SHUFFLE
- Look for vector rotate in shuffle elements, generate a vector rotate
  instead of a full-blown shuffle when opportunity presents itself.
- Generate larger test harness and fix a few interesting but obscure bugs.

llvm-svn: 60552
2008-12-04 21:01:44 +00:00
Ted Kremenek 561370c23e Add 'expected-warning' to make test case pass.
llvm-svn: 60548
2008-12-04 19:44:23 +00:00
Ted Kremenek d58e74182e Add another static analyzer test case involving attribute(nonnull).
llvm-svn: 60547
2008-12-04 19:39:12 +00:00
Ted Kremenek 7d71db77d2 Fix bug in attribute(nonnull) processing where not all of the parameter indices in nonnull(...) were actually processed.
llvm-svn: 60546
2008-12-04 19:38:33 +00:00
Steve Naroff f8d556881e Fix build breakage from my previous commit.
Will discuss with Chris...

llvm-svn: 60545
2008-12-04 19:10:03 +00:00
Ted Kremenek 3f0e5c88d9 Add another test case for attribute(nonnull) checking.
llvm-svn: 60544
2008-12-04 18:35:53 +00:00
Duncan Sands 471a654711 When allocating a stack temporary, use the correct
number of bytes for types such as i1 which are not
a multiple of 8 bits in length.

llvm-svn: 60543
2008-12-04 18:08:40 +00:00
Sebastian Redl f84512a360 Fix some diagnostics and enhance test cases. Now tests member new and ambiguous overloads.
llvm-svn: 60542
2008-12-04 17:24:46 +00:00
Scott Michel 187250bd94 Missing closing brace and reverse conditional condition on NDEBUG
llvm-svn: 60541
2008-12-04 17:16:59 +00:00
Steve Naroff 4588d0f060 Several things...
- Implement RewritePropertySetter(). While the routine is simple, there were some tricky changes to RewriteFunctionBodyOrGlobalInitializer(), the main rewriter loop. It also required some additional instance data to distinguish setters from getters, as well as some changes to RewritePropertyGetter().

- Implement FIXME: for pretty printing ObjCPropertyRefExpr's.

- Changed ObjCPropertyRefExpr::getSourceRange() to point to the end of the property name (not the beginning). Also made a minor name change from "Loc"->"IdLoc" (to make it clear the Loc does not point to the ".").
 

llvm-svn: 60540
2008-12-04 16:24:46 +00:00
Daniel Dunbar 2c4efe68ea Mention an optimization opportunity pointed out by Chris.
llvm-svn: 60535
2008-12-04 09:05:45 +00:00
Chris Lattner 8f723670ce Start simplifying a switch that has a successor that is a switch.
llvm-svn: 60534
2008-12-04 06:31:07 +00:00
Chris Lattner 5cee4626b8 This code is apparently quite confused. In the meantime,
get it building when NDEBUG is set.

llvm-svn: 60532
2008-12-04 06:14:27 +00:00
Bill Wendling 6949f6135b Temporarily revert r60519. It was causing a bootstrap failure:
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/xgcc -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/bin/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/lib/ -isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/include -isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/sys-include -DHAVE_CONFIG_H -I. -I../../../llvm-gcc.src/libgomp -I. -I../../../llvm-gcc.src/libgomp/config/posix -I../../../llvm-gcc.src/libgomp -Wall -pthread -Werror -O2 -g -O2 -MT barrier.lo -MD -MP -MF .deps/barrier.Tpo -c ../../../llvm-gcc.src/libgomp/barrier.c  -fno-common -DPIC -o .libs/barrier.o
checking for sys/file.h... /var/folders/zG/zGE-ZJOGFiGjv0B5cs5oYE+++TM/-Tmp-//cc34Jg5P.s:13:non-relocatable subtraction expression, "_gomp_tls_key" minus "L1$pb"
/var/folders/zG/zGE-ZJOGFiGjv0B5cs5oYE+++TM/-Tmp-//cc34Jg5P.s:13:symbol: "_gomp_tls_key" can't be undefined in a subtraction expression
make[4]: *** [barrier.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/xgcc -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/bin/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/lib/ -isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/include -isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/sys-include -DHAVE_CONFIG_H -I. -I../../../llvm-gcc.src/libgomp -I. -I../../../llvm-gcc.src/libgomp/config/posix -I../../../llvm-gcc.src/libgomp -Wall -pthread -Werror -O2 -g -O2 -MT alloc.lo -MD -MP -MF .deps/alloc.Tpo -c ../../../llvm-gcc.src/libgomp/alloc.c -o alloc.o >/dev/null 2>&1
yes
checking for sys/param.h... make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-target-libgomp] Error 2
make[1]: *** Waiting for unfinished jobs....

llvm-svn: 60527
2008-12-04 04:07:00 +00:00
Scott Michel 40f54d2257 CellSPU:
- First patch from Nehal Desai, a new contributor at Aerospace. Nehal's patch
  fixes sign/zero/any-extending loads for integers and floating point. Example
  code, compiled w/o debugging or optimization where he first noticed the bug:

  int main(void) {
    float a = 99.0;
    printf("%d\n", a);
    return 0;
  }

  Verified that this code actually works on a Cell SPU.

Changes by Scott Michel:
- Fix bug in the value type list constructed by SPUISD::LDRESULT to include
  both the load result's result and chain, not just the chain alone.
- Simplify LowerLOAD and remove extraneous and unnecessary chains.
- Remove unused SPUISD pseudo instructions.

llvm-svn: 60526
2008-12-04 03:02:42 +00:00
Dan Gohman 44f57df254 Use register names instead of numbers in debug output.
llvm-svn: 60525
2008-12-04 02:15:26 +00:00
Dan Gohman 30cad9c192 Make debug output more informative.
llvm-svn: 60524
2008-12-04 02:14:57 +00:00
Ted Kremenek 677779ab36 Revamp RegionStoreManager::RemoveDeadBindings. This method now does a complete mark-and-sweep of the store, removing dead regions and recording the set of live and dead symbols appropriately.
llvm-svn: 60523
2008-12-04 02:08:27 +00:00
Ted Kremenek 4a3f1efd25 Revise bogus comment I just committed.
llvm-svn: 60522
2008-12-04 02:07:20 +00:00
Ted Kremenek 4cef8c2d58 Add comment to test case for documentation.
llvm-svn: 60521
2008-12-04 02:06:27 +00:00
Ted Kremenek 8e8cc81aec Update comment.
llvm-svn: 60520
2008-12-04 02:06:04 +00:00