Commit Graph

75636 Commits

Author SHA1 Message Date
Duncan Sands 4a8b15dc74 Suppress an unused variable warning when assertions are off;
remove some trailing whitespace while there.

llvm-svn: 93008
2010-01-08 17:51:48 +00:00
Chris Lattner 8c92b57df9 tidy up some stuff duncan pointed out.
llvm-svn: 93007
2010-01-08 17:48:19 +00:00
Johnny Chen ab6e6819b2 Minor change, change the order of two "let Inst{...}" stmts within multiclass
T2I_bin_ii12rs definition.

llvm-svn: 93006
2010-01-08 17:41:33 +00:00
Ted Kremenek ea903067e1 For now, add back clang_getDeclSource().
llvm-svn: 93003
2010-01-08 17:11:32 +00:00
Eric Christopher 7482ad7272 After further thought revert the patch to make fast-isel avoid
putting relocations into the constant pool - this isn't needed
for correctness and in the rare occasion it happens would pull
us out of fast isel for the block.

If fast-isel application startup time ever becomes an issue we
can add better support for these addresses instead of bailing.

llvm-svn: 92995
2010-01-08 08:24:49 +00:00
John McCall 12f97bc48a Change the printing of OR_Deleted overload results to print all the candidates,
not just the viable ones.  This is reasonable because the most common use of
deleted functions is to exclude some implicit conversion during calls;  users
therefore will want to figure out why some other options were excluded.

Started sorting overload results.  Right now it just sorts by location in the
translation unit (after putting viable functions first), but we can do better than
that.

Changed bool OnlyViable parameter to PrintOverloadCandidates to an enum for better
self-documentation.

llvm-svn: 92990
2010-01-08 04:41:39 +00:00
Evan Cheng 58ec4fec88 ReplaceAllUsesOfValueWith may delete other nodes that the one being replaced. Do not delete dead nodes again.
llvm-svn: 92988
2010-01-08 02:36:12 +00:00
Dan Gohman d1e76b957b Use -fno-math-errno by default, and remove the IsMathErrnoDefault
targethook, which is no longer being used. This fixes PR5971.

llvm-svn: 92987
2010-01-08 02:20:44 +00:00
Fariborz Jahanian 39d70940e4 clang ObjC rewriter: generated code used in "for (x in y)" loop uses
incorrect cast, causing compile error (fixes radar 7342867).

llvm-svn: 92986
2010-01-08 01:29:44 +00:00
Evan Cheng b92f263ceb Fix what looks to me obvious instruction definition bugs.
1. CMPXCHG8B and CMPXCHG16B did not specify implicit physical register defs and uses.
2. LCMPXCHG8B is loading 64 bit memory, not 32 bit.

llvm-svn: 92985
2010-01-08 01:29:19 +00:00
John McCall d322416233 Reorganize PrintOverloadCandidates. No functionality change.
llvm-svn: 92979
2010-01-08 00:58:21 +00:00
Eli Friedman 5866fe306d Fix for PR5967: Make const-marking for LLVM globals correct for cases requiring
run-time initialization, and emit run-time initializers aggresively to avoid
ordering issues with deferred globals.

llvm-svn: 92976
2010-01-08 00:50:11 +00:00
Douglas Gregor fa1e36d0de Improve the fix-its for -Wparentheses to ensure that the fix-it
suggestions follow recovery. Additionally, add a note to these
diagnostics which suggests a fix-it for changing the behavior to what
the user probably meant. Examples:

t.cpp:2:9: warning: & has lower precedence than ==; == will be evaluated first
      [-Wparentheses]
  if (i & j == k) {
        ^~~~~~~~
          (     )
t.cpp:2:9: note: place parentheses around the & expression to evaluate it first
  if (i & j == k) {
        ^
      (    )

t.cpp:14:9: warning: using the result of an assignment as a condition
without
      parentheses [-Wparentheses]
  if (i = f()) {
      ~~^~~~~
      (      )
t.cpp:14:9: note: use '==' to turn this assignment into an equality
comparison
  if (i = f()) {
        ^
        ==

llvm-svn: 92975
2010-01-08 00:20:23 +00:00
David Chisnall df34917a38 Export a public symbol for classes with the GNU runtime.
llvm-svn: 92973
2010-01-08 00:14:31 +00:00
Eric Christopher e0297b9206 Remove extraneous include.
llvm-svn: 92972
2010-01-08 00:05:33 +00:00
Tobias Grosser bd9f372f0a Add assert to check dominance dfs numbers.
Compare the dominance information calculated using a dominance tree walk to the
information calculated based on DFS numbers, if XDEBUG is enabled.

llvm-svn: 92969
2010-01-07 23:50:41 +00:00
Tobias Grosser bbe375e2fe Remove workaround in PostDominators
Remove a FIXME and unify code that was necessary to work around broken
updateDFSNumbers().  Before updateDFSNumbers() did not work correctly for post
dominators.

llvm-svn: 92968
2010-01-07 23:50:25 +00:00
Tobias Grosser 35e234bf24 Fix DFS number calculation for postdominators
The DFS number calculation for postdominators was broken. In the case of
multiple exits that form the post dominator root nodes, do not iterate over
all exits, but start from the virtual root node. Otherwise bbs, that are not
post dominated by any exit but by the virtual root node, will never be assigned
a DFS number.

llvm-svn: 92967
2010-01-07 23:50:06 +00:00
Chris Lattner 35d3b9dcd0 teach ComputeNumSignBits to look through PHI nodes.
llvm-svn: 92964
2010-01-07 23:44:37 +00:00
Chris Lattner 7b6a068801 filecheckize
llvm-svn: 92963
2010-01-07 23:42:23 +00:00
Chris Lattner 3057c37959 Enhance instcombine to reason more strongly about promoting computation
that feeds into a zext, similar to the patch I did yesterday for sext.
There is a lot of room for extension beyond this patch.

llvm-svn: 92962
2010-01-07 23:41:00 +00:00
Ted Kremenek 32b79317a2 More crashtracer enhancements to CIndex. When "popping" a crashtracer string
restore to the one most recently created.

llvm-svn: 92959
2010-01-07 23:13:53 +00:00
Douglas Gregor b15af899fb Add an "implicit" bit to CXXThisExpr, so that we can track
implicitness without losing track of the (logical or actual) location
where "this" would occur in the source.

llvm-svn: 92958
2010-01-07 23:12:05 +00:00
Fariborz Jahanian bc6811c32e Fixes a bug where we were rewriting two definitions of
_objc_method (part of radar 7490408).

llvm-svn: 92957
2010-01-07 22:51:18 +00:00
Mike Stump a52cf2ca3f Add checker for type infos.
llvm-svn: 92956
2010-01-07 22:50:03 +00:00
Ted Kremenek 7a5ede2ff0 Tidy up crashtracer logic in CIndex.
llvm-svn: 92955
2010-01-07 22:49:05 +00:00
Mike Stump 0015eb93c6 Add checked for VTTs.
llvm-svn: 92954
2010-01-07 22:28:10 +00:00
Mike Stump 24e9b0048c Detailed vtable checker.
llvm-svn: 92953
2010-01-07 22:21:26 +00:00
Fariborz Jahanian 1444230c40 Fixes a bug in my last patch (related to radar 7490331).
llvm-svn: 92952
2010-01-07 22:15:31 +00:00
Chris Lattner dab2cd543f Fix rdar://7517201, a regression introduced by r92849.
When folding a and(any_ext(load)) both the any_ext and the
load have to have only a single use.

This removes the anyext-uses.ll testcase which started failing
because it is unreduced and unclear what it is testing.

llvm-svn: 92950
2010-01-07 21:59:23 +00:00
Chris Lattner 88de38453f factor this code better and reduce nesting at the same
time, no functionality change.

llvm-svn: 92948
2010-01-07 21:53:27 +00:00
David Greene 0b09877c3d Revert r92939. These intrinsics get matched to LLVM instructions,
so removing at Chris' request.

llvm-svn: 92947
2010-01-07 21:43:58 +00:00
Evan Cheng 16b75ce19c APInt'fy TargetLowering::SimplifySetCC to fix PR5963.
llvm-svn: 92943
2010-01-07 20:58:44 +00:00
Mike Stump 441793352d 1/2 off all structs should not have any virtual functions.
Replace magic numbers with uuids.

llvm-svn: 92941
2010-01-07 20:55:28 +00:00
David Greene 5b053c5278 Add some "missing" instrinsics to make the SSE intrinsic set a bit more
orthogonal.

llvm-svn: 92939
2010-01-07 19:47:43 +00:00
Benjamin Kramer b757a82902 Simplify code. No intended functionality/performance change.
llvm-svn: 92938
2010-01-07 19:46:15 +00:00
Eric Christopher 9f569bdf38 If the data requires a relocation then don't attempt to
add it to the constant pool for fast-isel. We already
don't add it for the normal case.

llvm-svn: 92934
2010-01-07 19:45:14 +00:00
Eric Christopher 36ef435eca We need to put any kind of data with a relocation into a
not-readonly segment on darwin.

llvm-svn: 92933
2010-01-07 19:44:05 +00:00
Mike Stump 2a83635337 Add a descriptive tag to each line to make the exact differences
easier to understand.

llvm-svn: 92932
2010-01-07 19:39:43 +00:00
Devang Patel fcfee0ff35 Use separate namespace for named metadata.
llvm-svn: 92931
2010-01-07 19:39:36 +00:00
John McCall 64fe233704 When parsing an identifier as an expression in C++, only try to annotate it
as a type or scope token if the next token requires it.

This eliminates a lot of redundant lookups in C++, but there's room for
improvement;  a better solution would do a single lookup whose kind and
results would be passed through the parser.

llvm-svn: 92930
2010-01-07 19:29:58 +00:00
Mike Stump bd0c5da5fc Don't use two argument mixing function.
llvm-svn: 92929
2010-01-07 19:24:27 +00:00
Mike Stump a771b0ad52 Also generate the .s files.
llvm-svn: 92928
2010-01-07 19:19:39 +00:00
Mike Stump 53b926c56f Add a testcase generator for vtable/rtti testing. WIP.
llvm-svn: 92927
2010-01-07 18:58:28 +00:00
Kovarththanan Rajaratnam d4ca3e3f06 Fix occurrence typo
llvm-svn: 92926
2010-01-07 18:46:52 +00:00
Fariborz Jahanian 9ab6349f2a Avoid error when convering a pointer to integer in
rewriting.

llvm-svn: 92925
2010-01-07 18:31:42 +00:00
Fariborz Jahanian 0f3aecf272 Fix rewriting of ivars. Fixes radar 7490331.
llvm-svn: 92924
2010-01-07 18:18:32 +00:00
Kovarththanan Rajaratnam 49c8da95a3 Convert from char pointer to char array
llvm-svn: 92923
2010-01-07 18:11:14 +00:00
Ted Kremenek db2ef3732f Fix typo: rename Rewriter::getRewritenText() -> Rewriter::getRewrittenText().
llvm-svn: 92922
2010-01-07 18:00:35 +00:00
Chris Lattner 9e4e45a3b6 constant materialization could be improved.
llvm-svn: 92921
2010-01-07 17:53:10 +00:00