Commit Graph

50077 Commits

Author SHA1 Message Date
Chris Lattner d397fef50d factor the code for simplifying (icmp)|(icmp) into its own function.
llvm-svn: 59402
2008-11-16 05:20:07 +00:00
Chris Lattner 909b969b18 do some computation with apints instead of ConstantInts.
llvm-svn: 59401
2008-11-16 05:14:43 +00:00
Chris Lattner feaea9bdf7 merge a check into a place where it is simpler.
llvm-svn: 59400
2008-11-16 05:10:52 +00:00
Mon P Wang 7a82474387 Improved shuffle normalization to avoid using extract/build when we
can extract using different indexes for two vectors. Added a few tests
for vector shuffles.

llvm-svn: 59399
2008-11-16 05:06:27 +00:00
Chris Lattner 269cbd5770 factor a whole bunch of code out into a helper function.
llvm-svn: 59398
2008-11-16 05:06:21 +00:00
Chris Lattner b37b6e7e96 simplify the conditions on two gigantic if's, decreasing indentation
a bit.  Next step is to factor out into their own helper functions.

llvm-svn: 59397
2008-11-16 04:55:20 +00:00
Zhongxing Xu a3b2ef6fa9 Re-enable array-struct test.
llvm-svn: 59396
2008-11-16 04:47:39 +00:00
Chris Lattner f1be285134 simplify some instcombine matches by using m_Specific
llvm-svn: 59395
2008-11-16 04:46:19 +00:00
Zhongxing Xu c0862044af Fix 80-col violation.
llvm-svn: 59394
2008-11-16 04:44:41 +00:00
Chris Lattner 50b9a15a43 add a new m_Specific pattern that matches only if we have a specific Value*.
llvm-svn: 59393
2008-11-16 04:38:30 +00:00
Chris Lattner fae5e33111 Use new m_SelectCst template to eliminate macros.
llvm-svn: 59392
2008-11-16 04:33:38 +00:00
Chris Lattner 2e692e2a31 add a new template for matching a select between two constants.
llvm-svn: 59391
2008-11-16 04:33:10 +00:00
Chris Lattner 569d78cbb5 simplify code.
llvm-svn: 59390
2008-11-16 04:26:55 +00:00
Chris Lattner c3f3b059d0 Handle the case where there is no "not". It is possible it got
folded into the select.

llvm-svn: 59389
2008-11-16 04:25:26 +00:00
Chris Lattner 5f6d9a313b factor a bunch of copy/paste code out into a helper function.
Eliminate the cases checking for cond?0:-1, since that is already
handled by commutative checking.

llvm-svn: 59388
2008-11-16 04:24:12 +00:00
Zhongxing Xu c1e480a762 Add partial specialization of FoldingSetTrait for ImmutableList.
llvm-svn: 59387
2008-11-16 04:23:49 +00:00
Chris Lattner 645f60141b make this actually test what it is trying to.
llvm-svn: 59386
2008-11-16 04:21:51 +00:00
Zhongxing Xu 788e39687e Fix 80-column violation.
llvm-svn: 59385
2008-11-16 04:14:33 +00:00
Nick Lewycky 625c6f79b2 Don't brute-force analyze cubic or higher polynomials.
If this patch causes a performance regression for anyone, please let me know,
and it can be fixed in a different way with much more effort.

llvm-svn: 59384
2008-11-16 04:14:25 +00:00
Oscar Fuentes 08c4a35caa CMake: MSVC: Pass list of components the right way to msvc_llvm_config
and siblings. Support targets whose name does not end on
`CodeGen'. Remove a performance bottleneck.

llvm-svn: 59383
2008-11-16 04:13:19 +00:00
Zhongxing Xu ceca80619f Enhances SCA to process untyped region to typed region conversion.
- RegionView and RegionViewMap is introduced to assist back-mapping from
   super region to subregions.
 - GDM is used to carry RegionView information.
 - AnonTypedRegion is added to represent a typed region introduced by pointer
   casting. Later AnonTypedRegion can be used in other similar cases, e.g.,
   malloc()'ed region.
 - The specific conversion is delegated to store manager.

llvm-svn: 59382
2008-11-16 04:07:26 +00:00
Chris Lattner 68d2da2a19 rearrange some code, no functionality change.
llvm-svn: 59381
2008-11-16 03:56:24 +00:00
Chris Lattner e02c7c7ad2 if we're going to use a macro, use it maximally. no functionality change.
llvm-svn: 59380
2008-11-16 03:54:57 +00:00
Oscar Fuentes b5b8bd85fd CMake: Forces linking of the rest of architecture targets and its
respective asm printers on MSVC.

Based on a patch by Scott Graham.

llvm-svn: 59379
2008-11-15 22:51:03 +00:00
Oscar Fuentes ba4eb2a9db Adds extern "C" ints to the .cpp files that use RegisterTarget, as
well as 2 files that use "Registrator"s. These are to be used by the
MSVC builds, as the Win32 linker does not include libs that are
otherwise unreferenced, even if global constructors in the lib have
side-effects.

Patch by Scott Graham!

llvm-svn: 59378
2008-11-15 21:36:30 +00:00
Chris Lattner e132e2432a Start implementing support for @synchonized with the darwin ObjC API.
Patch by Fariborz!

llvm-svn: 59377
2008-11-15 21:26:17 +00:00
Oscar Fuentes 7e17369255 CMake: Removed some cruft.
llvm-svn: 59376
2008-11-15 20:51:18 +00:00
Anders Carlsson ee0d90fe30 Check in code that uses tryEvaluate for emitting constant exprs (not used yet).
llvm-svn: 59375
2008-11-15 20:45:50 +00:00
Oscar Fuentes 757a012bf1 CMake: Recursively invokes cmake using the right directories.
LLVM_MAIN_SRC_DIR and LLVM_BINARY_DIR are not the cmake top level
directories when LLVM is embedded on the build of other project.

Fixes PR #3072.

llvm-svn: 59374
2008-11-15 20:35:25 +00:00
Nick Lewycky 6ce60407b2 Clean up some strange whitespace.
llvm-svn: 59373
2008-11-15 20:32:33 +00:00
Anders Carlsson c2480a5589 Handle padding in the constant CFString struct. Fixes PR3046.
llvm-svn: 59372
2008-11-15 18:54:24 +00:00
Anders Carlsson c9dacf4fdd Use IgnoreParenCasts. No functionality change.
llvm-svn: 59371
2008-11-15 18:52:06 +00:00
Nick Lewycky 967aeeb400 Correct this error message.
llvm-svn: 59370
2008-11-15 17:50:47 +00:00
Zhongxing Xu cfbc7cef61 Add Profile method to ImmutableList.
llvm-svn: 59362
2008-11-15 09:26:02 +00:00
Duncan Sands da8d2873ed When splitting a SHUFFLE_VECTOR, try to have the result
use SHUFFLE_VECTOR instead.  If not practical, fall back
to the old scheme of building the split result by hand
using a BUILD_VECTOR.

llvm-svn: 59361
2008-11-15 09:25:38 +00:00
Zhongxing Xu 461b4f4276 Use the allocator of ExplodedGraph. The whole static analysis module uses it.
llvm-svn: 59359
2008-11-15 08:19:58 +00:00
Anders Carlsson 312045115e Fix silly bug spotted by Daniel Dunbar
llvm-svn: 59358
2008-11-15 06:35:36 +00:00
Mon P Wang f414cbc1fd Add missing widen operations, fixed widening for extracting a subvector,
and when loading/storing a widen vector, make sure that they are loaded
and stored in consecutive order.

llvm-svn: 59357
2008-11-15 06:05:52 +00:00
Zhongxing Xu 6a276cf5b7 Improve zero value generation.
llvm-svn: 59356
2008-11-15 05:18:50 +00:00
Zhongxing Xu fe354a200a Add isUnsigned option.
llvm-svn: 59355
2008-11-15 05:17:04 +00:00
Ted Kremenek 1b2dace792 Reduce permissiveness of assertion.
llvm-svn: 59354
2008-11-15 05:00:27 +00:00
Ted Kremenek 9f748e23e3 Updated checker build.
llvm-svn: 59353
2008-11-15 04:57:19 +00:00
Ted Kremenek 3ebd7dea7e Add a test case for compound assignments that lazily symbolicate the value of the LHS when the computation type is an integer of more bits.
llvm-svn: 59352
2008-11-15 04:44:13 +00:00
Ted Kremenek 4413714946 Reverted part of r59335: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20081110/009243.html
In that patch I added a bogus type promotion for unary '!'.

The real bug was more fallout from edges cases with compound assignments and conjured symbolic values.  Now the conjured value has the type of the LHS expression, and we do a promotion to the computation type.  We also now correctly do a conversion from the computation type back to the LHS type.

llvm-svn: 59349
2008-11-15 04:01:56 +00:00
Ted Kremenek ac172fc574 Re-enable an assertion that I mistakenly removed.
llvm-svn: 59348
2008-11-15 02:35:08 +00:00
Oscar Fuentes 2c10b22b62 CMake: Adds header and TableGen files to Visual Studio solution. A new
dummy library, `llvm_headers_do_not_build', is created for containing
all header and TableGen files under include/llvm.

llvm-svn: 59346
2008-11-15 02:08:08 +00:00
Anders Carlsson d0e4f2b106 Handle complex return values.
llvm-svn: 59345
2008-11-15 01:29:05 +00:00
Evan Cheng 9c205bf03c Fix fuitos encoding.
llvm-svn: 59344
2008-11-15 00:40:57 +00:00
Ted Kremenek 519a223056 Use the correct QualType when creating the '0' constant.
llvm-svn: 59343
2008-11-15 00:40:08 +00:00
Oscar Fuentes dc8d56e76e CMake: Moved generation of Intrinsics.gen to
include/llvm/CMakeLists.txt. Does it with the `tablegen' cmake macro.

llvm-svn: 59342
2008-11-15 00:24:38 +00:00