summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Sema: prevent assertion on stack return checkingSaleem Abdulrasool2016-02-152-2/+26
| | | | | | | | | | | | | | In the case that the array indexing itself is within a type dependent context, bail out of the evaluation. We would previously try to symbolically evaluate the expression which would then try to evaluate a non-address expression as an address, triggering an assertion in Asserts builds. We only need to consider the array subscript expression itself as in the case that the base itself being type dependent is handled appropriately in EvalAddr. Resolves PR26599. llvm-svn: 260867
* [AST/index] Introduce an option 'SuppressTemplateArgsInCXXConstructors' in ↵Argyrios Kyrtzidis2016-02-157-7/+53
| | | | | | | | | | printing policy. Enable it for USRs and names when indexing. Forward references can have different template argument names; including them makes USRs and names unstable, since the name depends on whether we saw a forward reference or not. llvm-svn: 260866
* silence -Wreturn-type warningsSaleem Abdulrasool2016-02-153-0/+7
| | | | | | | | These codepaths would generate warnings with GCC on linux even though the switch was covered. Add llvm_unreachable markers to indicate that the switch should be covered. NFC. llvm-svn: 260865
* Sema: constify EvalAddr, EvalValSaleem Abdulrasool2016-02-151-139/+146
| | | | | | | Propagate const throughout these methods as they are non-mutating analyzers of state. NFC. llvm-svn: 260864
* [Refactor] Eliminate the global variable "InsnToMemAcc".Hongbin Zheng2016-02-154-21/+43
| | | | | | | | | Eliminate the global variable "InsnToMemAcc" to make Scop/ScopInfo become more protable, such that we can safely use them in a CallGraphSCC pass. Differential Revision: http://reviews.llvm.org/D17238 llvm-svn: 260863
* [FIX] Hoist accesses if AA stated they are invariantJohannes Doerfert2016-02-143-0/+161
| | | | | | | | | | Before this patch it could happen that we did not hoist a load that was a base pointer of another load even though AA already declared the first one as invariant (during ScopDetection). If this case arises we will now skipt the "can be overwriten" check because in this case the over-approximating nature causes us to generate broken code. llvm-svn: 260862
* [test/Index] Set a specific target for the test.Argyrios Kyrtzidis2016-02-141-1/+1
| | | | llvm-svn: 260861
* Split ScopArrayInfo::updateSizes into two functionsJohannes Doerfert2016-02-142-18/+28
| | | | | | | | The former ScopArrayInfo::updateSizes was implicitly divided into an updateElementType and an updateSizes. Now this partitioning is explicit. llvm-svn: 260860
* Separate more constant factors of parametersJohannes Doerfert2016-02-147-48/+59
| | | | | | | | | | | | | | | | | So far we separated constant factors from multiplications, however, only when they are at the outermost level of a parameter SCEV. Now, we also separate constant factors from the parameter SCEV if the outermost expression is a SCEVAddRecExpr. With the changes to the SCEVAffinator we can now improve the extractConstantFactor(...) function at will without worrying about any other code part. Thus, if needed we can implement a more comprehensive extractConstantFactor(...) function that will traverse the SCEV instead of looking only at the outermost level. Four test cases were affected. One did not change much and the other three were simplified. llvm-svn: 260859
* [index] Factor libclang's functionality to determing the mangled name of ↵Argyrios Kyrtzidis2016-02-1410-133/+286
| | | | | | symbols into the clangIndex library. llvm-svn: 260858
* CodeGeneration: Add back verification of generated codeTobias Grosser2016-02-141-0/+3
| | | | | | This got accidentally dropped in r260025 llvm-svn: 260857
* Fix some typos in the clang docSylvestre Ledru2016-02-144-5/+5
| | | | llvm-svn: 260856
* Fix some typos in the llvm docSylvestre Ledru2016-02-148-11/+11
| | | | llvm-svn: 260855
* Revert "[ScopDectect] Allow memory accesses with different element types by ↵Tobias Grosser2016-02-141-1/+1
| | | | | | | | | | | default" This reverts commit https://llvm.org/svn/llvm-project/polly/trunk@260853 We unfortunately still have two bugs left which show only up with -polly-process-unprofitable and which I forgot to test before committing. llvm-svn: 260854
* [ScopDectect] Allow memory accesses with different element types by defaultTobias Grosser2016-02-141-1/+1
| | | | | | | | First support for this feature was committed in r259784. Support for loop invariant load hoisting with different types was added by Johannes Doerfert in r260045. This fixed the last known bug. llvm-svn: 260853
* [X86][AVX] Fixed copy+paste typo in shuffle testSimon Pilgrim2016-02-141-2/+2
| | | | llvm-svn: 260852
* As reported in https://llvm.org/bugs/show_bug.cgi?id=25496, on FreeBSD,Dimitry Andric2016-02-143-2/+27
| | | | | | | | | | | | | | | | C++ programs compiled for profiling (using `-pg`) should be linked with `-lc++_p` (or `-lstdc++_p`, depending on the `-stdlib=` setting), not with the regular C++ libraries. Add a `FreeBSD::AddCXXStdlibLibArgs()` override to handle this, and add a test case for it. While here, extend the test case for the proper passing of -lm and -lm_p. Reviewers: compnerd, davide, dws, emaste Reviewed By: compnerd Differential Revision: http://reviews.llvm.org/D16264 llvm-svn: 260851
* Don't leak the ASTUnit when done with testing.Benjamin Kramer2016-02-141-3/+2
| | | | | | Found by lsan. llvm-svn: 260850
* Use report_fatal_error more consistently in the C API echo testAmaury Sechet2016-02-141-73/+33
| | | | llvm-svn: 260849
* Get constant cloning out of CloneValue so it can be used when creating globals.Amaury Sechet2016-02-141-40/+47
| | | | llvm-svn: 260848
* c-index-test: Fix libdeps corresponding to r260841.NAKAMURA Takumi2016-02-141-0/+3
| | | | llvm-svn: 260847
* Move clone_params aroundAmaury Sechet2016-02-141-78/+76
| | | | llvm-svn: 260846
* Fix star alignment in Core.hAmaury Sechet2016-02-141-2/+2
| | | | llvm-svn: 260845
* [c-index-test] Fix a gcc build error.Argyrios Kyrtzidis2016-02-141-1/+1
| | | | llvm-svn: 260844
* [index] Fix gcc builds.Argyrios Kyrtzidis2016-02-142-2/+3
| | | | llvm-svn: 260843
* [index] Enhance c-index-test tool and have it link and test the clangIndex ↵Argyrios Kyrtzidis2016-02-146-4/+335
| | | | | | library directly. llvm-svn: 260842
* [index] Allow calling createIndexingAction() without passing another action ↵Argyrios Kyrtzidis2016-02-143-27/+63
| | | | | | to wrap over. llvm-svn: 260841
* [TableGen] Remove constant string argument from a method that's only called ↵Craig Topper2016-02-141-5/+5
| | | | | | once. We can just hardcode the string inside. There already other things that make the method not reusable. NFC llvm-svn: 260840
* Fix lib/tsan/go/buildgo.sh for FreeBSD after r243051.Dimitry Andric2016-02-141-13/+14
| | | | | | | | | | FreeBSD also needs to have sanitizer_linux_libcdep.cc included, otherwise linking will fail with "undefined reference to `__sanitizer::GetRSS()'". While here, tabify the FreeBSD part, similar to the other parts. llvm-svn: 260839
* [PM/AA] Wire BasicAA's new pass manager class up to the pass registry.Chandler Carruth2016-02-134-3/+13
| | | | | | | | This ensures that all of the various pieces are working. The next patch will wire up commandline-driven alias analysis chain building and allow BasicAA to work with the AAManager. llvm-svn: 260838
* [OpenMP] Rename the offload entry points.Samuel Antao2016-02-134-95/+78
| | | | | | | | | | | | | | | Summary: Unlike other outlined regions in OpenMP, offloading entry points have to have be visible (external linkage) for the device side. Using dots in the names of the entries can be therefore problematic for some toolchains, e.g. NVPTX. Also the patch drops the column information in the unique name of the entry points. The parsing of directives ignore unknown tokens, preventing several target regions to be implemented in the same line. Therefore, the line information is sufficient for the name to be unique. Also, the preprocessor printer does not preserve the column information, causing offloading-entry detection issues if the host uses an integrated preprocessor and the target doesn't (or vice versa). Reviewers: hfinkel, arpith-jacob, carlo.bertolli, kkwli0, ABataev Subscribers: cfe-commits, fraggamuffin, caomhin Differential Revision: http://reviews.llvm.org/D17179 llvm-svn: 260837
* [PM/AA] Actually wire the AAManager I built for the new pass managerChandler Carruth2016-02-135-2/+23
| | | | | | | | | | | | into the new pass manager and fix the latent bugs there. This lets everything live together nicely, but it isn't really useful yet. I never finished wiring the AA layer up for the new pass manager, and so subsequent patches will change this to do that wiring and get AA stuff more fully integrated into the new pass manager. Turns out this is necessary even to get functionattrs ported over. =] llvm-svn: 260836
* Support: Fix incremental build when re-configuring targetsDuncan P. N. Exon Smith2016-02-134-40/+67
| | | | | | | | | | | | | | r180893 added an indirect include of llvm/Config/Targets.def to llvm/Support/CodeGen.h, which in turn is included by things like llvm/IR/Module.h. After a full build of LLVM and Clang, ninja had to rebuild 1274 files after reconfiguring. This commit strips CodeGen.h back down to just a pile of enums and moves the expensive includes over to CodeGenCWrappers.h (which is only included in two places). This gets ninja down to 88 files if you reconfigure with, e.g., -DLLVM_TARGETS_TO_BUILD=X86. llvm-svn: 260835
* [X86][AVX] Lower shuffles as repeated lane shuffles then lane-crossing shufflesSimon Pilgrim2016-02-139-119/+256
| | | | | | | | | | | | | | | | | | This patch attempts to represent a shuffle as a repeating shuffle (recognisable by is128BitLaneRepeatedShuffleMask) with the source input(s) in their original lanes, followed by a single permutation of the 128-bit lanes to their final destinations. On AVX2 we can additionally attempt to match using 64-bit sub-lane permutation. AVX2 can also now match a similar 'broadcasted' repeating shuffle. This patch has several benefits: * Avoids prematurely matching with lowerVectorShuffleByMerging128BitLanes which can require both inputs to have their input lanes permuted before shuffling. * Can replace PERMPS/PERMD instructions - although these are useful for cross-lane unary shuffling, they require their shuffle mask to be pre-loaded (and increase register pressure). * Matching the repeating shuffle makes use of a lot of existing shuffle lowering. There is an outstanding minor AVX1 regression (combine_unneeded_subvector1 in vector-shuffle-combining.ll) of a previously 128-bit shuffle + subvector splat being converted to a subvector splat + (2 instruction) 256-bit shuffle, I intend to fix this in a followup patch for review. Differential Revision: http://reviews.llvm.org/D16537 llvm-svn: 260834
* [AST] Add a print() method in DeclarationName that accepts a PrintingPolicy.Argyrios Kyrtzidis2016-02-132-27/+54
| | | | llvm-svn: 260833
* Remove Proc feature flags for X86 processors that are used to inherit ↵Craig Topper2016-02-132-38/+34
| | | | | | features from one processor to another. This exposed extra features to the -mattr command line that we shouldn't. Replace with just inherited listconcats. llvm-svn: 260832
* Fix a leak in the generated code for attributes with strings.Benjamin Kramer2016-02-132-7/+20
| | | | | | | | Storing std::strings in attributes simply doesn't work, we never call the destructor. Use an array of StringRefs instead of std::strings and copy the data into memory taken from the ASTContext. llvm-svn: 260831
* [TableGen] Fix comment about 64-bit type I missed when I removed the ↵Craig Topper2016-02-131-1/+1
| | | | | | underlying type in r260808. llvm-svn: 260830
* [libFuzzer] remove std::vector operations from hot paths, NFCKostya Serebryany2016-02-135-31/+38
| | | | llvm-svn: 260829
* [x86-64] allow mfence even with -mno-sse (PR23203)Sanjay Patel2016-02-135-15/+42
| | | | | | | | | | | | | As shown in: https://llvm.org/bugs/show_bug.cgi?id=23203 ...we currently die because lowering believes that mfence is allowed without SSE2 on x86-64, but the instruction def doesn't know that. I don't know if allowing mfence without SSE is right, but if not, at least now it's consistently wrong. :) Differential Revision: http://reviews.llvm.org/D17219 llvm-svn: 260828
* [APInt] No need for a copy when taking min/max of an APInt.Benjamin Kramer2016-02-131-4/+12
| | | | llvm-svn: 260827
* [ConstantFolding] Reduce APInt and APFloat copying.Benjamin Kramer2016-02-132-8/+8
| | | | llvm-svn: 260826
* [AggressiveAntiDepBreaker] Skip some unnecessary BitVector copies.Benjamin Kramer2016-02-131-9/+11
| | | | llvm-svn: 260825
* Use ArrayRef to hide SmallVector details, kill a useless vector copy along ↵Benjamin Kramer2016-02-131-3/+2
| | | | | | the way. llvm-svn: 260824
* RValue refs do not work that way.Benjamin Kramer2016-02-131-1/+2
| | | | llvm-svn: 260823
* Don't copy a DenseMap just to do lookup in it.Benjamin Kramer2016-02-131-6/+1
| | | | | | | Also remove the now unused isPodLike specialization. DenseMap only uses it for copies. llvm-svn: 260822
* Use unique_ptr to manage Scop inside ScopInfo.Hongbin Zheng2016-02-132-13/+7
| | | | llvm-svn: 260821
* Move AccFuncMap from ScopInfo into ScopHongbin Zheng2016-02-132-16/+15
| | | | | | | | Since the origin AccFuncMap in ScopInfo is used by the underlying Scop only, and it must stay alive until we delete the Scop. It will be better if we simply move the origin AccFuncMap in ScopInfo into the Scop class. llvm-svn: 260820
* Do not carry LoopInfo along with a Scop.Hongbin Zheng2016-02-132-50/+67
| | | | | | | | Make Scop become more portable such that we can use it in a CallGraphSCC pass. The first step is to drop the analyses that are only used during Scop construction. This patch drop LoopInfo from Scop. llvm-svn: 260819
* Do not carry DominatorTree along with a Scop.Hongbin Zheng2016-02-132-35/+45
| | | | | | | | Make Scop become more portable such that we can use it in a CallGraphSCC pass. The first step is to drop the analyses that are only used during Scop construction. This patch drop DominatorTree from Scop. llvm-svn: 260818
OpenPOWER on IntegriCloud