aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-11-13Fix a Malloc Checker FP by tracking return values from initWithCharacterllvmorg-3.2.0-rc1Anna Zaks2-20/+132
and other functions. When these functions return null, the pointer is not freed by them/ownership is not transfered. So we should allow the user to free the pointer by calling another function when the return value is NULL. Commits: 167813, 167814, 167868 llvm-svn: 167870
2012-11-133.2 release branch r167707Pawel Wodnicki64-0/+56290
llvm-svn: 167867
2012-11-133.2 release branch 167864Pawel Wodnicki424-0/+60701
llvm-svn: 167865
2012-11-13[analyzer] Follow up to r167762 - precisely determine the adjustmentAnna Zaks2-4/+52
conditions. The adjustment is needed only in case of dynamic dispatch performed by the analyzer - when the runtime declaration is different from the static one. Document this explicitly in the code (by adding a helper). Also, use canonical Decls to avoid matching against the case where the definition is different from found declaration. This fix suppresses the testcase I added in r167762, so add another testcase to make sure we do test commit r167762. llvm-svn: 167797
2012-11-13Merged 167788, and bad CFG construction bug, into the LLVM 3.2 release.Ted Kremenek2-13/+37
llvm-svn: 167789
2012-11-12Merge in analyzer fix r167762, which was a recent regression.Ted Kremenek2-0/+18
llvm-svn: 167776
2012-11-12Merge in r167749, per discussion on cfe-dev that we want ↵Ted Kremenek2-0/+15
-Wimplicit-fallthrough to only be active for C++11 until we come up with a language annotation for this warning that works outside of C++11. llvm-svn: 167775
2012-11-123.2 release branch r167713Pawel Wodnicki13821-0/+2122455
llvm-svn: 167713 llvm-svn: 167708 llvm-svn: 167707 llvm-svn: 167706 llvm-svn: 167704
2012-11-12In Sema::MergeVarDecl we handle merging of storage classes and visibilityRafael Espindola1-25/+6
attributes. In cases where the merged declaration is fully equivalent to the two original ones, some of the code was getLVForDecl was duplicated. Cases that are still handled in getLVForDecl are things like __private_extern__ int N; int N; For which we cannot produce a single merged decl with all the information. llvm-svn: 167703
2012-11-123.2 release branch r167702Pawel Wodnicki9596-0/+1698621
llvm-svn: 167702
2012-11-123.2 release branch r167700Pawel Wodnicki24142-3905343/+0
llvm-svn: 167701
2012-11-12[NVPTX] Fix const modifier on builtinsJustin Holewinski1-7/+7
Some NVVM intrinsics were incorrectly labeled. llvm-svn: 167700
2012-11-12[NVPTX] Add more precise PTX/SM target attributesJustin Holewinski14-11/+117
Each SM and PTX version is modeled as a subtarget feature/CPU. Additionally, PTX 3.1 is added as the default PTX version to be out-of-the-box compatible with CUDA 5.0. Available CPUs for this target: sm_10 - Select the sm_10 processor. sm_11 - Select the sm_11 processor. sm_12 - Select the sm_12 processor. sm_13 - Select the sm_13 processor. sm_20 - Select the sm_20 processor. sm_21 - Select the sm_21 processor. sm_30 - Select the sm_30 processor. sm_35 - Select the sm_35 processor. Available features for this target: ptx30 - Use PTX version 3.0. ptx31 - Use PTX version 3.1. sm_10 - Target SM 1.0. sm_11 - Target SM 1.1. sm_12 - Target SM 1.2. sm_13 - Target SM 1.3. sm_20 - Target SM 2.0. sm_21 - Target SM 2.1. sm_30 - Target SM 3.0. sm_35 - Target SM 3.5. llvm-svn: 167699
2012-11-12Delete a stale comment. No functional change.Meador Inge1-4/+0
llvm-svn: 167698
2012-11-11Move some helper methods to being static functions in the implementation file.Craig Topper2-20/+7
llvm-svn: 167696
2012-11-11Fix binding of nodes in case of forEach..() matchers.Daniel Jasper4-7/+19
When recursively visiting the generated matches, the aggregated bindings need to be copied during the recursion. Otherwise, we they might not be properly overwritten (which is shown by the test), or there might be bound nodes present that were bound on a different matching branch. Review: http://llvm-reviews.chandlerc.com/D112 llvm-svn: 167695
2012-11-11Remove unneeded includes from IdentifierTableNico Weber2-2/+0
llvm-svn: 167694
2012-11-11Delete comment reference to non-existent methodNico Weber1-5/+2
llvm-svn: 167692
2012-11-11Remove hard-coded constant in Transforms/InstCombine/memcmp-1.llMeador Inge1-1/+10
Transforms/InstCombine/memcmp-1.ll has a test case that looks like: @foo = constant [4 x i8] c"foo\00" @hel = constant [4 x i8] c"hel\00" ... %mem1 = getelementptr [4 x i8]* @hel, i32 0, i32 0 %mem2 = getelementptr [4 x i8]* @foo, i32 0, i32 0 %ret = call i32 @memcmp(i8* %mem1, i8* %mem2, i32 3) ret i32 %ret ; CHECK: ret i32 2 The folded return value (2 above) is computed using the system memcmp that the compiler is linked with. This can return different values on different systems. The test was originally written on an OS X 10.7.5 x86-64 box and passed. However, it failed on one of the x86-64 FreeBSD buildbots because the system memcpy on that machine returned a different value (1 instead of 2). I fixed the test by checking the folding constants with regexes. llvm-svn: 167691
2012-11-11s/BCPLComment/LineComment/Nico Weber7-58/+58
llvm-svn: 167690
2012-11-11instcombine: Migrate memset optimizationsMeador Inge6-51/+55
This patch migrates the memset optimizations from the simplify-libcalls pass into the instcombine library call simplifier. llvm-svn: 167689
2012-11-11Update the vectorizer docs.Nadav Rotem1-4/+20
llvm-svn: 167688
2012-11-11instcombine: Migrate memmove optimizationsMeador Inge5-36/+56
This patch migrates the memmove optimizations from the simplify-libcalls pass into the instcombine library call simplifier. llvm-svn: 167687
2012-11-11instcombine: Migrate memcpy optimizationsMeador Inge4-24/+56
This patch migrates the memcpy optimizations from the simplify-libcalls pass into the instcombine library call simplifier. llvm-svn: 167686
2012-11-11Use the isTruncFree and isZExtFree API to figure out of these operations are ↵Nadav Rotem1-2/+10
free. Thanks Andy! llvm-svn: 167685
2012-11-11Fix a comment typo and add comments.Nadav Rotem1-4/+5
llvm-svn: 167684
2012-11-11instcombine: Migrate memcmp optimizationsMeador Inge6-91/+140
This patch migrates the memcmp optimizations from the simplify-libcalls pass into the instcombine library call simplifier. llvm-svn: 167683
2012-11-11instcombine: Migrate strstr optimizationsMeador Inge5-148/+166
This patch migrates the strstr optimizations from the simplify-libcalls pass into the instcombine library call simplifier. llvm-svn: 167682
2012-11-11Add method for replacing instructions to LibCallSimplifierMeador Inge3-6/+44
In some cases the library call simplifier may need to replace instructions other than the library call being simplified. In those cases it may be necessary for clients of the simplifier to override how the replacements are actually done. As such, a new overrideable method for replacing instructions was added to LibCallSimplifier. A new subclass of LibCallSimplifier is also defined which overrides the instruction replacement method. This is because the instruction combiner defines its own replacement method which updates the worklist when instructions are replaced. llvm-svn: 167681
2012-11-11FileCheckize testNico Weber1-4/+4
llvm-svn: 167680
2012-11-11Fix a typo which Matt pointed out.Richard Smith1-1/+1
llvm-svn: 167679
2012-11-10objective-C blocks: Change BLOCK_HAS_EXTENDED_LAYOUT to be 1<<31.Fariborz Jahanian2-6/+6
lower 24bit is currently being used. llvm-svn: 167678
2012-11-10Test commit: clean up C++11 options in lldb (on Linux) build pageDaniel Malea1-2/+2
llvm-svn: 167677
2012-11-10Provide definitions for all functions.Benjamin Kramer1-0/+11
ICC refuses to compile a class in an anonymous namespace if some functions aren't defined. Fixes PR13477. llvm-svn: 167676
2012-11-10instcombine: Migrate strcspn optimizationsMeador Inge6-62/+122
This patch migrates the strcspn optimizations from the simplify-libcalls pass into the instcombine library call simplifier. llvm-svn: 167675
2012-11-10Simplify the SmallVector pretty printer for LLDB a bit and make it work with ↵Benjamin Kramer1-15/+9
reference types. llvm-svn: 167674
2012-11-10Remove unnecessary subtraction and addition by 1 around a couple for loops.Craig Topper1-6/+6
llvm-svn: 167673
2012-11-10Remove empty directory.Duncan Sands0-0/+0
llvm-svn: 167672
2012-11-10Tidy up spacing. No functional change.Craig Topper1-4/+4
llvm-svn: 167671
2012-11-10Removed unimplemented method declaration.Craig Topper1-1/+0
llvm-svn: 167670
2012-11-10Simplify custom emitter code for pcmp(e/i)str(i/m) and make the helper ↵Craig Topper2-96/+42
functions static. llvm-svn: 167669
2012-11-10Rework my implementation of circular-reference finding to not useDouglas Gregor4-17/+43
CXXRecordDecl::forallBases, which does *not* do what I need. Fixes the failure introduced in r167651. llvm-svn: 167668
2012-11-10Add support for libdispatch version 4 structure layout for findingJason Molenda1-7/+24
GCD queue names of threads to ProcessGDBRemote::GetDispatchQueueNameForThread() May need tweaking once this version is rolled out but visual inspection looks fine. <rdar://problem/12333100> llvm-svn: 167667
2012-11-10Don't assume that Modules have directories. They may be in-memory-onlyJason Molenda1-1/+1
things like our favorite "cl_kernels" and so module_directory here can be NULL. llvm-svn: 167666
2012-11-10Add clang support of RTM from TSXMichael Liao8-3/+103
- New options '-mrtm'/'-mno-rtm' are added to enable/disable RTM feature - Builtin macro '__RTM__' is defined if RTM feature is enabled - RTM intrinsic header is added and introduces 3 new intrinsics, namely '_xbegin', '_xend', and '_xabort'. - 3 new builtins are added to keep compatible with gcc, namely '__builtin_ia32_xbegin', '__builtin_ia32_xend', and '__builtin_ia32_xabort'. - Test cases for pre-defined macro and new intrinsic codegen are added. llvm-svn: 167665
2012-11-10-momit-leaf-frame-pointer is a -m option, not a -f option.Richard Smith1-2/+2
llvm-svn: 167664
2012-11-10Convert an improper CodeGen test to a MC test.Evan Cheng2-25/+9
llvm-svn: 167663
2012-11-10Revert "Disable -Wimplicit-fallthrough when not using C++.", pending further ↵Ted Kremenek1-13/+0
discussion on cfe-dev. llvm-svn: 167662
2012-11-10Add a few more test cases for verifying -fno-builtin.Meador Inge1-0/+97
Some holes in testing where discovered while working on the LLVM library call simplifiers. llvm-svn: 167661
2012-11-10instcombine: Query target library information to gate libcall simplificationsMeador Inge2-19/+252
Several of the simplifiers migrated from the simplify-libcalls pass to the instcombine pass were not correctly checking the target library information to gate the simplifications. This patch ensures that the check is made. llvm-svn: 167660