Commit Graph

62852 Commits

Author SHA1 Message Date
Nick Lewycky dcfdce9067 Move a method that creates constant ranges relative to another constant range
per icmp predicate out of predsimplify and into ConstantRange.

Add another utility method that determines whether one range is a subset of
another. Combine with the former to determine whether icmp pred range, range
is known to be true or not.

llvm-svn: 75357
2009-07-11 06:15:39 +00:00
Ted Kremenek da03e8443e Handle insidious corner case exposed by RegionStoreManager when handling void* values that are bound
to symbolic regions and then treated like integers.

llvm-svn: 75356
2009-07-11 04:38:49 +00:00
Zhongxing Xu e00c981feb remove duplicated test cast.
llvm-svn: 75329
2009-07-11 02:33:35 +00:00
Evan Cheng ede2ce71aa Fix up support for OptionalDefOperand when it defaults to an actual register def. I need this to get ready for major Thumb1 surgery.
llvm-svn: 75328
2009-07-11 01:06:50 +00:00
Anders Carlsson 0d14291fbf Fix a test.
llvm-svn: 75327
2009-07-11 01:00:52 +00:00
Ted Kremenek f6f0461a38 Restructure RegionStoreManager::EvalBinOp() as a switch dispatch over different
MemRegion kinds. This allows the compiler to identify what MemRegions we don't
handle for pointer arithmetic.

llvm-svn: 75326
2009-07-11 00:58:27 +00:00
Eli Friedman 55179ca5aa Fix typo (found by gcc warning).
llvm-svn: 75325
2009-07-11 00:57:02 +00:00
Anders Carlsson 43171d6aeb Add another test.
llvm-svn: 75324
2009-07-11 00:55:33 +00:00
Anders Carlsson ae01993a12 Implement more of C++0x 'auto'. A variable with an auto type specifier must have an initializer. Also, move some tests around to match the C++0x draft better.
llvm-svn: 75322
2009-07-11 00:34:39 +00:00
Ted Kremenek f514592197 Fix warning when compiling with optimizations:
warning: ‘OPT’ may be used uninitialized in this function

Now OPT is initialized to NULL. I'm not certain if this is the correct fix;
others please review.

llvm-svn: 75321
2009-07-11 00:21:48 +00:00
Eli Friedman 106f2885d1 Use CreateStackStoreLoad helper in more places.
llvm-svn: 75320
2009-07-11 00:11:07 +00:00
Ted Kremenek 156700fd14 This test passes with RegionStoreManager.
llvm-svn: 75318
2009-07-11 00:07:06 +00:00
Evan Cheng b4dfce2dba Two-address pass should use findCommutedOpIndices to determine what registers are commuted.
llvm-svn: 75317
2009-07-11 00:04:23 +00:00
Ted Kremenek 74a7b9188a This test now passes with RegionStoreManager.
llvm-svn: 75316
2009-07-11 00:03:23 +00:00
Anders Carlsson 9890fb5bf6 Remove some unused code from an experiment that I didn't like.
llvm-svn: 75315
2009-07-10 23:48:10 +00:00
Steve Naroff 7cae42b07a This patch includes a conceptually simple, but very intrusive/pervasive change.
The idea is to segregate Objective-C "object" pointers from general C pointers (utilizing the recently added ObjCObjectPointerType). The fun starts in Sema::GetTypeForDeclarator(), where "SomeInterface *" is now represented by a single AST node (rather than a PointerType whose Pointee is an ObjCInterfaceType). Since a significant amount of code assumed ObjC object pointers where based on C pointers/structs, this patch is very tedious. It should also explain why it is hard to accomplish this in smaller, self-contained patches.

This patch does most of the "heavy lifting" related to moving from PointerType->ObjCObjectPointerType. It doesn't include all potential "cleanups". The good news is additional cleanups can be done later (some are noted in the code). This patch is so large that I didn't want to include any changes that are purely aesthetic.

By making the ObjC types truly built-in, they are much easier to work with (and require fewer "hacks"). For example, there is no need for ASTContext::isObjCIdStructType() or ASTContext::isObjCClassStructType()! We believe this change (and the follow-up cleanups) will pay dividends over time. 

Given the amount of code change, I do expect some fallout from this change (though it does pass all of the clang tests). If you notice any problems, please let us know asap! Thanks.

llvm-svn: 75314
2009-07-10 23:34:53 +00:00
Evan Cheng 1297799096 Use findCommutedOpIndices to find the operands to commute.
llvm-svn: 75312
2009-07-10 23:26:12 +00:00
Bob Wilson a51f8ebf1a Add superclasses of ARM Neon quad registers. The Q2PR class contains pairs of
quad registers and the Q4PR class holds sets of 4 quad registers.

llvm-svn: 75309
2009-07-10 23:09:06 +00:00
Bob Wilson 73fd66c06b Add new vector types for 192-bit, 348-bit and 512-bit sizes.
These are needed to represent ARM Neon struct datatypes containing 2, 3 or 4
separate vectors.

llvm-svn: 75308
2009-07-10 23:05:09 +00:00
Chris Lattner 2745607dc6 remove the "debug" modifier, it is only used by one instruction which can
never be generated.

llvm-svn: 75305
2009-07-10 22:34:11 +00:00
Ted Kremenek 94575aacc1 Restructure RegionStoreManager::getSizeInElements() to use a switch statement
over the types of MemRegions. This allows the compiler to warn us which regions
are not handled, and also is a little faster.

llvm-svn: 75304
2009-07-10 22:30:06 +00:00
Eli Friedman fd9b1094b8 Fix silly mistake I made applying patch to fix test.
llvm-svn: 75303
2009-07-10 22:27:56 +00:00
Bob Wilson bf8e4c1128 Refactor TableGen's llvm::getName to share code with llvm::getEnumName,
since names are the same for almost all the types.

llvm-svn: 75302
2009-07-10 22:25:24 +00:00
Chris Lattner 07cadaf113 add support for .zerofill, patch by Kevin Enderby!
llvm-svn: 75301
2009-07-10 22:20:30 +00:00
Jeffrey Yasskin 228be77c19 Oops. s/#if defined(USE_OPROFILE)/#if USE_OPROFILE/. We #define
USE_OPROFILE to 0 on some paths through configure, which does the
wrong thing with #if defined().

llvm-svn: 75300
2009-07-10 22:13:21 +00:00
Chris Lattner a6009306c2 make pcrel and non-pcrel global printing more similar.
llvm-svn: 75298
2009-07-10 21:57:21 +00:00
Ted Kremenek e057d4e5a9 Rename test file.
llvm-svn: 75297
2009-07-10 21:48:43 +00:00
Ted Kremenek 3fcf628b40 RegionStoreManager also passes this test file.
llvm-svn: 75296
2009-07-10 21:48:10 +00:00
Ted Kremenek 488495e491 RegionStoreManager now correctly passes this test file.
llvm-svn: 75295
2009-07-10 21:45:10 +00:00
Ted Kremenek 6cb2a34e3c Test case in test/Analysis/xfail_regionstore_wine_crash.c no longer fails, so
move this case to 'test/Analysis/misc-ps.m' to test with both BasicStoreManager
and RegionStoreManager.

llvm-svn: 75294
2009-07-10 21:43:30 +00:00
David Goodwin 73f4e3f442 Support remote execute for ARM.
llvm-svn: 75292
2009-07-10 21:39:28 +00:00
Anders Carlsson 7ca3f6feea Fix type of 'this' and add a decltype test.
llvm-svn: 75291
2009-07-10 21:35:09 +00:00
Evan Cheng 7997cbf2d5 Undo my brain cramp.
llvm-svn: 75290
2009-07-10 21:31:42 +00:00
Ted Kremenek bf73ad47a8 Revert r75281 and simply remove the assertion in NewCastRegion that
CodeTextRegions can only be casted to FunctionPointer or BlockPointerTypes. This
simply isn't true. We can handle bogus operations on CodeTextRegions (e.g, an
array access) elsewhere.

llvm-svn: 75285
2009-07-10 21:24:45 +00:00
David Greene c97b778b3c Make changes suggested by Chris and eliminate newly-added raw_ostream
hooks as they're no longer needed.

The major change with this patch is to make formatted_raw_ostream usable
by any client of raw_ostream.

llvm-svn: 75283
2009-07-10 21:14:44 +00:00
Ted Kremenek 6c94771a0b Fix crash in StoreManager::NewCastRegion regarding handling casts to void*,
void**, void***, etc.  Such casts should just pass the region through.

llvm-svn: 75281
2009-07-10 21:11:16 +00:00
Jeffrey Yasskin efbc3a52b6 Regenerate configure after r75279.
llvm-svn: 75280
2009-07-10 21:09:55 +00:00
Jeffrey Yasskin bf3d6ba557 Add a --with-oprofile flag to configure, which uses OProfile's agent
library to tell it the addresses of JITted functions.  For a
particular program, this changes the opreport -l output from:

samples %    image name        symbol name
48182  98.9729 anon (tgid:19412 range:0x7f12ccaab000-0x7f12cdaab000) anon (tgid:19412 range:0x7f12ccaab000-0x7f12cdaab000)
11     0.0226  libstdc++.so.6.0.9    /usr/lib/libstdc++.so.6.0.9

to:

samples %    image name        symbol name
24565  60.7308 19814.jo        fib_left
15365  37.9861 19814.jo        fib_right
22     0.0544  ld-2.7.so       do_lookup_x

llvm-svn: 75279
2009-07-10 21:08:20 +00:00
Chris Lattner 25e7f91559 code model is never set to default.
llvm-svn: 75278
2009-07-10 21:03:06 +00:00
Chris Lattner 7dce9919e1 fix indentation
llvm-svn: 75277
2009-07-10 21:01:59 +00:00
Chris Lattner 21c2940553 remove the now-dead TM argument to these methods.
llvm-svn: 75276
2009-07-10 21:00:45 +00:00
Chris Lattner ba4d73310a make PIC vs DynamicNoPIC be explicit in PICStyles.
llvm-svn: 75275
2009-07-10 20:58:47 +00:00
Chris Lattner bd3e560f1a some minor simplifications.
llvm-svn: 75274
2009-07-10 20:53:38 +00:00
Chris Lattner e2f524f176 add a couple of predicates to test for "stub style pic in PIC mode" and "stub style pic in dynamic-no-pic" mode.
llvm-svn: 75273
2009-07-10 20:47:30 +00:00
Dan Gohman 028e6158c2 Remove ScalarEvolution::hasSCEV, which isn't being used, and which
breaks encapsulation. Also remove a dead prototype for setSCEV.

llvm-svn: 75272
2009-07-10 20:25:29 +00:00
Eli Friedman 837f574ee9 Use /usr/bin/env trick to find python. Patch by Krister Walfridsson.
llvm-svn: 75271
2009-07-10 20:15:12 +00:00
Fariborz Jahanian 3554b5a37c Patch to build list of inherited virtual base classes
in their order of construction for each class and use it 
to to check on propery order of base class construction 
under -Wreorder option.

llvm-svn: 75270
2009-07-10 20:13:23 +00:00
Duncan Sands 48d983c86e Avoid compiler warnings when assertions are turned off.
llvm-svn: 75269
2009-07-10 20:10:14 +00:00
Eli Friedman 7d369cd2a6 Misc fixes to fix tests on OpenBSD, per email to cfe-commits. Patches
by Jonathan Gray and Krister Walfridsson.

llvm-svn: 75268
2009-07-10 20:10:06 +00:00
Duncan Sands 45210aab86 Avoid compiler warnings if assertions turned off.
llvm-svn: 75267
2009-07-10 20:07:07 +00:00