summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Cloning: Clean up the interface to the CloneFunction function.Peter Collingbourne2016-05-105-56/+32
| | | | | | | | | | | | | | | | | | | | | Remove the ModuleLevelChanges argument, and the ability to create new subprograms for cloned functions. The latter was added without review in r203662, but it has no in-tree clients (all non-test callers pass false for ModuleLevelChanges [1], so it isn't reachable outside of tests). It also isn't clear that adding a duplicate subprogram to the compile unit is always the right thing to do when cloning a function within a module. If this functionality comes back it should be accompanied with a more concrete use case. Furthermore, all in-tree clients add the returned function to the module. Since that's pretty much the only sensible thing you can do with the function, just do that in CloneFunction. [1] http://llvm-cs.pcc.me.uk/lib/Transforms/Utils/CloneFunction.cpp/rCloneFunction Differential Revision: http://reviews.llvm.org/D18628 llvm-svn: 269110
* [InstCombine] Fold icmp ugt/ult (udiv i32 C2, X), C1.Chad Rosier2016-05-102-3/+112
| | | | | | | | | | This patch adds support for two optimizations: icmp ugt (udiv C2, X), C1 -> icmp ule X, C2/(C1+1) icmp ult (udiv C2, X), C1 -> icmp ugt X, C2/C1 Differential Revision: http://reviews.llvm.org/D20123 llvm-svn: 269109
* [VFS] Change unittest to try appeasing win10 buildbotBruno Cardoso Lopes2016-05-101-2/+2
| | | | | | | http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/5103 Follow up from r269100. llvm-svn: 269108
* ScheduleDAGInstrs: Comment on why subreg defs are not seen as uses; NFCMatthias Braun2016-05-101-0/+4
| | | | | | | | Usually subregister definitions are consider uses of the remaining lanes that did not get defined. Add a comment why the code in ScheduleDAGInstrs does not add use dependencies regardless. llvm-svn: 269107
* [SystemZ] Add support for additional branch extended mnemonicsKit Barton2016-05-103-15/+130
| | | | | | | | | | | | | Added support for extended mnemonics for the following branch instructions and load/store-on-condition opcodes: BR, LOCR, LOCGR, LOC, LOCG, STOC, STOCG Phabricator: http://reviews.llvm.org/D19729 Committing on behalf of Zhan Liau llvm-svn: 269106
* [SCCP] Partially propagate informations when the input is not fully defined.Davide Italiano2016-05-102-0/+4
| | | | | | | | | | With this patch: %r1 = lshr i64 -1, 4294967296 -> undef Before this patch: %r1 = lshr i64 -1, 4294967296 -> 0 llvm-svn: 269105
* [CMake] Add some extra variables to LLVMConfig.cmake.inChris Bieneman2016-05-101-0/+2
| | | | | | | | Compiler-RT needs LLVM_LIBRARY_DIR, LLVM_BINARY_DIR. Setting these in LLVMConfig.cmake will allow Compiler-RT to not need to run llvm-config as long as the LLVMConfig.cmake module is in the CMake module path. llvm-svn: 269104
* Debug Info: Prevent DW_AT_abstract_origin from being emitted twiceAdrian Prantl2016-05-102-7/+57
| | | | | | | | | | | | for the same subprogram. This fixes a bug where DW_AT_abstract_origin is being emitted twice for the same subprogram if a function is both inlined and emitted in the same translation unit, by restoring the pre-r266446 behavior. http://reviews.llvm.org/D20072 llvm-svn: 269103
* Add a link to the format description.Rafael Espindola2016-05-101-0/+2
| | | | llvm-svn: 269102
* ARM: stop emitting blx instructions for most calls on MachO.Tim Northover2016-05-1029-180/+129
| | | | | | | | | | | I'm really not sure why we were in the first place, it's the linker's job to convert between BL/BLX as necessary. Even worse, using BLX left Thumb calls that could be locally resolved completely unencodable since all offsets to BLX are multiples of 4. rdar://26182344 llvm-svn: 269101
* [VFS] Reconstruct the VFS overlay tree for more accurate lookupBruno Cardoso Lopes2016-05-102-2/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The way we currently build the internal VFS overlay representation leads to inefficient path search and might yield wrong answers when asked for recursive or regular directory iteration. Currently, when reading an YAML file, each YAML root entry is placed inside a new root in the filesystem overlay. In the crash reproducer, a simple "@import Foundation" currently maps to 43 roots, and when looking up paths, we traverse a directory tree for each of these different roots, until we find a match (or don't). This has two consequences: - It's slow. - Directory iteration gives incomplete results since it only return results within one root - since contents of the same directory can be declared inside different roots, the result isn't accurate. This is in part fault of the way we currently write out the YAML file when emitting the crash reproducer - we could generate only one root and that would make it fast and correct again. However, we should not rely on how the client writes the YAML, but provide a good internal representation regardless. This patch builds a proper virtual directory tree out of the YAML representation, allowing faster search and proper iteration. Besides the crash reproducer, this potentially benefits other VFS clients. llvm-svn: 269100
* [WebAssembly] Reduce strictness of static destructor testDerek Schuff2016-05-101-6/+3
| | | | | | It didn't work on non-asserts builds llvm-svn: 269099
* [AMDGPU][NFC] Rename SIInsertNops -> SIDebuggerInsertNopsKonstantin Zhuravlyov2016-05-104-19/+21
| | | | | | Differential Revision: http://reviews.llvm.org/D20117 llvm-svn: 269098
* LPM: Drop require<loops> from these tests, it's redundant. NFCJustin Bogner2016-05-102-2/+2
| | | | | | | | The LoopPassManager needs to calculate the loops analysis in order to iterate over the loops at all. Requiring it is redundant and just adds noise to the RUN lines here. llvm-svn: 269097
* Make "@name =" mandatory for globals in .ll files.Rafael Espindola2016-05-1031-139/+99
| | | | | | | | | | | | | | | | | | | | | | | An oddity of the .ll syntax is that the "@var = " in @var = global i32 42 is optional. Writing just global i32 42 is equivalent to @0 = global i32 42 This means that there is a pretty big First set at the top level. The current implementation maintains it manually. I was trying to refactor it, but then started wondering why keep it a all. I personally find the above syntax confusing. It looks like something is missing. This patch removes the feature and simplifies the parser. llvm-svn: 269096
* In some cases, type lookup has to deal with situations where it cannot ↵Enrico Granata2016-05-101-1/+23
| | | | | | | | | | reconstruct a compile unit or a function, but it still has a valid symbol - and it can use that in order to figure out the preferential language for lookups This is not the right thing for all clients (notably the expression parser), so put it in type lookup specific code Fixes rdar://problem/22422313 llvm-svn: 269095
* Re-apply r269081 and r269082 with a fix for MSVC.Peter Collingbourne2016-05-104-51/+134
| | | | llvm-svn: 269094
* Enable loopreroll for sext of loop control only IVLawrence Hu2016-05-101-186/+0
| | | | | | | | | This patch extend loopreroll to allow the instruction chain of loop control only IV has sext. Differential Revision: http://reviews.llvm.org/D19820 llvm-svn: 269093
* Fix PR26655: Bail out if all regs of an inst BUNDLE have the correct kill flagMandeep Singh Grang2016-05-103-27/+59
| | | | | | | | | | | | | | | | | | | | Summary: While setting kill flags on instructions inside a BUNDLE, we bail out as soon as we set kill flag on a register. But we are missing a check when all the registers already have the correct kill flag set. We need to bail out in that case as well. This patch refactors the old code and simply makes use of the addRegisterKilled function in MachineInstr.cpp in order to determine whether to set/remove kill on an instruction. Reviewers: apazos, t.p.northover, pete, MatzeB Subscribers: MatzeB, davide, llvm-commits Differential Revision: http://reviews.llvm.org/D17356 llvm-svn: 269092
* Revert r269081 and r269082 while I try to find the right incantation to fix ↵Peter Collingbourne2016-05-104-133/+51
| | | | | | MSVC build. llvm-svn: 269091
* [PGO] resubmit r268969Rong Xu2016-05-103-1/+14
| | | | | | Put the test into a target specific directory. llvm-svn: 269090
* Introduce CGCXXABI::canCallMismatchedFunctionTypeDerek Schuff2016-05-105-11/+24
| | | | llvm-svn: 269089
* more cleanupDerek Schuff2016-05-101-4/+4
| | | | llvm-svn: 269088
* Clarify condition, remove redundant checkDerek Schuff2016-05-101-5/+7
| | | | llvm-svn: 269087
* Clean up condition, add ARM to testDerek Schuff2016-05-102-8/+10
| | | | llvm-svn: 269086
* Do not register incompatible C++ destructors with __cxa_atexitDerek Schuff2016-05-103-4/+42
| | | | | | | | | | | | | | | | | | | | | | Summary: For a static object with a nontrivial destructor, clang generates an initializer function (__cxx_global_var_init) which registers that object's destructor using __cxa_atexit. However some ABIs (ARM, WebAssembly) use destructors that return 'this' instead of having void return (which does not match the signature of function pointers passed to __cxa_atexit). This results in undefined behavior when the destructors are called. All the calling conventions I know of on ARM can tolerate this, but WebAssembly requires the signatures of indirect calls to match the called function. This patch disables that direct registration of destructors for ABIs that have this-returning destructors. Subscribers: aemerson, jfb, cfe-commits, dschuff Differential Revision: http://reviews.llvm.org/D19275 llvm-svn: 269085
* Enable loopreroll for sext of loop control only IVLawrence Hu2016-05-102-12/+219
| | | | | | | This patch extend loopreroll to allow the instruction chain of loop control only IV has sext. llvm-svn: 269084
* [WebAssembly] Preliminary fast-isel support.Dan Gohman2016-05-109-9/+580
| | | | llvm-svn: 269083
* Use doxygen style comments.Peter Collingbourne2016-05-101-5/+5
| | | | llvm-svn: 269082
* WholeProgramDevirt: Move logic for finding devirtualizable call sites to ↵Peter Collingbourne2016-05-104-51/+133
| | | | | | | | | | | | | Analysis. The plan is to eventually make this logic simpler, however I expect it to be a little tricky for the foreseeable future (at least until we're rid of pointee types), so move it here so that it can be reused to build a summary index for devirtualization. Differential Revision: http://reviews.llvm.org/D20005 llvm-svn: 269081
* Simplify LLParser::ParseOptionalLinkage. NFC.Rafael Espindola2016-05-101-19/+34
| | | | llvm-svn: 269080
* clang/test/CodeGen/avx512f-builtins.c: Fix for -Asserts.NAKAMURA Takumi2016-05-101-15/+15
| | | | llvm-svn: 269079
* [X86][AVX512] Added another masked shuffle combine from load testSimon Pilgrim2016-05-101-0/+13
| | | | llvm-svn: 269077
* [ScheduleDAG] Make sure to process all def operands before any use operandsKrzysztof Parzyszek2016-05-102-8/+45
| | | | | | | | | | | | | | | | | An example from Hexagon where things went wrong: %R0<def> = L2_loadrigp <ga:@fp04> ; load function address J2_callr %R0<kill>, ..., %R0<imp-def> ; call *R0, return value in R0 ScheduleDAGInstrs::buildSchedGraph would visit all instructions going backwards, and in each instruction it would visit all operands in their order on the operand list. In the case of this call, it visited the use of R0 first, then removed it from the set Uses after it visited the def. This caused the DAG to be missing the data dependence edge on R0 between the load and the call. Differential Revision: http://reviews.llvm.org/D20102 llvm-svn: 269076
* [PR27599] [SystemZ] [SelectionDAG] Fix extension of atomic cmpxchg result.Marcin Koscielnicki2016-05-105-9/+108
| | | | | | | | | | | | Currently, SelectionDAG assumes 8/16-bit cmpxchg returns either a sign extended result, or a zero extended result. SystemZ takes a third option by returning junk in the high bits (rotated contents of the other bytes in the memory word). In that case, don't use Assert*ext, and zero-extend the result ourselves if a comparison is needed. Differential Revision: http://reviews.llvm.org/D19800 llvm-svn: 269075
* Invalidate unprofitable SCoPs after creationJohannes Doerfert2016-05-103-6/+54
| | | | | | | | | | If a profitable run is performed we will check if the SCoP seems to be profitable after creation but before e.g., dependence are computed. This is needed as SCoP detection only approximates the actual SCoP representation. In the end this should allow us to be less conservative during the SCoP detection while keeping the compile time in check. llvm-svn: 269074
* Update my email address. Nadav Rotem2016-05-102-2/+2
| | | | llvm-svn: 269073
* Fix typo.Rafael Espindola2016-05-101-1/+1
| | | | llvm-svn: 269072
* [libcxx] Prefer C++14 over C++11 when building libc++experimental.Eric Fiselier2016-05-102-1/+12
| | | | | | | | | | | | | | | | | | Summary: Currently libc++experimental builds with C++11. This patch changes that to C++14 when supported by the compiler. Although nothing currently requires C++14 the upcoming <experimental/memory_resource> implementation would benefit from it. [1] Note that libc++.so continues to build with C++11 and is unaffected by this change. [1] <experimental/memory_resource> provides global resources which must exist for the entire lifetime of the program. In order to ensure that a global resource can be used during program termination there destructors must never be invoked. The only way to do this, while also allowing "constant initialization", is to use a C++14 union. Reviewers: mclow.lists Subscribers: pete, cfe-commits Differential Revision: http://reviews.llvm.org/D19992 llvm-svn: 269070
* [CMake] Pass LLVM_LIBDIR_SUFFIX into Compiler-RTChris Bieneman2016-05-101-0/+1
| | | | | | Not passing this causes Compiler-RT to fail to configure on multi-lib systems. llvm-svn: 269069
* [X86][AVX] Added some shuffle combine from load testsSimon Pilgrim2016-05-102-0/+80
| | | | | | As discussed on D19198 - we need to check what happens when we shuffle with different value type to the load llvm-svn: 269068
* [ThinLTO] Add option to emit imports files for distributed backendsTeresa Johnson2016-05-109-0/+145
| | | | | | | | | | | | | | | | | | | | | Summary: Add support for emission of plaintext lists of the imported files for each distributed backend compilation. Used for distributed build file staging. Invoked with new gold-plugin thinlto-emit-imports-files option, which is only valid with thinlto-index-only (i.e. for distributed builds), or from llvm-lto with new -thinlto-action=emitimports value. Depends on D19556. Reviewers: joker.eph Subscribers: llvm-commits, joker.eph Differential Revision: http://reviews.llvm.org/D19636 llvm-svn: 269067
* [ELF] - Implemented -z combrelocs/nocombreloc.George Rimar2016-05-1015-17/+130
| | | | | | | | | | | | | | | | | This is the option which sorts relocs to optimize dynamic linker performance. -z combelocs is the default in gold, also it ignores -z nocombreloc, this patch do the same. Patch sorts relocations by symbols only and do not create any DT_REL[A]COUNT entries. That is different with what gold/bfd do. More information about option is here: http://www.airs.com/blog/archives/186 http://people.redhat.com/jakub/prelink.pdf, p.2 Differential revision: http://reviews.llvm.org/D19528 llvm-svn: 269066
* [clang-tidy] Lift parsing of sequence of names functions to utils.Etienne Bergeron2016-05-106-53/+87
| | | | | | | | | | | | | | | | Summary: Lift some common code used by multiple checkers. This function is also used by checkers that are coming. It is quite common for a checker to parse a list of names. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19846 llvm-svn: 269065
* Weaken profitability constraints during ScopDetectionJohannes Doerfert2016-05-104-7/+41
| | | | | | | | Regions with one affine loop can be profitable if the loop is distributable. To this end we will allow them to be treated as profitable if they contain at least two non-trivial basic blocks. llvm-svn: 269064
* Remove unused diagnostic. NFC.Benjamin Kramer2016-05-101-1/+0
| | | | llvm-svn: 269063
* [docs] Fix unexpected indentation in HowToCrossCompileLLVM.rstRenato Golin2016-05-101-0/+3
| | | | | | | Seems like my sphynx version is different than the one in the bot, as it accepted everything locally. I think this is the right fix... llvm-svn: 269062
* [FIX] Cleanup isl objects prior to early exitJohannes Doerfert2016-05-102-5/+67
| | | | llvm-svn: 269061
* Handle llvm.assume inside the SCoPJohannes Doerfert2016-05-109-30/+186
| | | | | | | | | | The assumption attached to an llvm.assume in the SCoP needs to be combined with the domain of the surrounding statement but can nevertheless be used to refine the context. This fixes the problems mentioned in PR27067. llvm-svn: 269060
* Restore "[ThinLTO] Emit individual index files for distributed backends"Teresa Johnson2016-05-1011-104/+488
| | | | | | | | | | | | | | | | | | | This restores commit r268627: Summary: When launching ThinLTO backends in a distributed build (currently supported in gold via the thinlto-index-only plugin option), emit an individual index file for each backend process as described here: http://lists.llvm.org/pipermail/llvm-dev/2016-April/098272.html ... Differential Revision: http://reviews.llvm.org/D19556 Address msan failures by avoiding std::prev on map.end(), the theory is that this is causing issues due to some known UB problems in __tree. llvm-svn: 269059
OpenPOWER on IntegriCloud