summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [BlockGenerator] Also eliminate dead code not originating from BBTobias Grosser2016-08-095-33/+127
| | | | | | | | | | | | | | | | | After having generated the code for a ScopStmt, we run a simple dead-code elimination that drops all instructions that are known to be and remain unused. Until this change, we only considered instructions for dead-code elimination, if they have a corresponding instruction in the original BB that belongs to ScopStmt. However, when generating code we do not only copy code from the BB belonging to a ScopStmt, but also generate code for operands referenced from BB. After this change, we now also considers code for dead code elimination, which does not have a corresponding instruction in BB. This fixes a bug in Polly-ACC where such dead-code referenced CPU code from within a GPU kernel, which is possible as we do not guarantee that all variables that are used in known-dead-code are moved to the GPU. llvm-svn: 278103
* [include-fixer] Support processing multiple files in one run.Haojian Wu2016-08-099-75/+116
| | | | | | | | | | | | | | | | | | | Summary: Previously, if we pass multiple files or a file pattern (e.g. /path/to/*.cc) to include-fixer, include-fixer will apply all replacements to the first argument, which probably causes crashes. With this patch, include-fixer can process multiple files now. Vim and Emacs integration are tested manually. Reviewers: bkramer Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D23266 llvm-svn: 278102
* Fix clang-tidy crash when a single fix is applied on multiple files.Eric Liu2016-08-096-47/+83
| | | | | | | | | | | | | | | Summary: tooling::Replacements only holds replacements for a single file, so this patch makes Fix a map from file paths to tooling::Replacements so that it can be applied on multiple files. Reviewers: hokein, alexfh Subscribers: Prazek, cfe-commits Differential Revision: https://reviews.llvm.org/D23257 llvm-svn: 278101
* [GPGPU] Pass parameters always by using their own typeTobias Grosser2016-08-092-2/+47
| | | | llvm-svn: 278100
* [clang-rename] fix bug with initializer listsKirill Bobyrev2016-08-093-19/+30
| | | | | | | | | | | Clang-rename is currently not able to find a symbol in initializer list. This patch fixes described issue. Reviewers: alexfh Differential Revision: https://reviews.llvm.org/D23193 llvm-svn: 278099
* [X86] Reduce duplicated code in the execution domain lookup functions by ↵Craig Topper2016-08-091-37/+17
| | | | | | passing tables as an argument. llvm-svn: 278098
* [AVX-512] Add support for execution domain switching masked logical ops ↵Craig Topper2016-08-092-11/+287
| | | | | | | | between floating point and integer domain. This switches PS<->D and PD<->Q. llvm-svn: 278097
* Remove unreachable `return`. NFC.Rui Ueyama2016-08-091-1/+0
| | | | llvm-svn: 278096
* Remove isOutputDynamic and use Out<ELFT>::DynSymTab instead.Rui Ueyama2016-08-094-24/+19
| | | | | | | This patch is to not instantiate DynSymTab and DynStrTab if the output is not a dynamic output. llvm-svn: 278095
* Remove redundant variable.Rui Ueyama2016-08-093-7/+4
| | | | llvm-svn: 278094
* Separate {Preinit,Init,Fini}Arrays from Out<ELFT>::Dynamic.Rui Ueyama2016-08-093-23/+28
| | | | | | | | Even if an output is not a dynamic object, the output may have .{preinit,init,fini} sections. Therefore, managing these sections as Out<ELFT>::Dynamic's members is not correct. llvm-svn: 278093
* [Profile] Implement new API __llvm_profile_dumpXinliang David Li2016-08-095-0/+120
| | | | | | | | | The API is intended to be used by user to do fine grained (per-region) control of profile dumping. Differential Revision: http://reviews.llvm.org/D23106 llvm-svn: 278092
* Do not pass the SymbolTable to writeResult.Rui Ueyama2016-08-093-42/+38
| | | | | | | The SymbolTable is always accessible as Symtab<ELFT>::X, so no need to pass it as an argument. llvm-svn: 278091
* [X86] Remove the Fv packed logical operation alias instructions. Replace ↵Craig Topper2016-08-097-88/+133
| | | | | | | | them with patterns to the regular instructions. This enables execution domain fixing which is why the tests changed. llvm-svn: 278090
* [X86] Cleanup patterns for AVX/SSE for PS operations. Always try to look for ↵Craig Topper2016-08-091-9/+18
| | | | | | | | bitcasts from floating point types. If only AVX1 is supported we also need to handle integer types with floating point ops without looking for bitcasts. Previously SSE1 had a pattern that looked for integer types without bitcasts, but the type wasn't legal with only SSE1 and SSE2 add an identical pattern for the integer instructions. llvm-svn: 278089
* [X86] Remove unnecessary bitcast from the front of AVX1Only 256-bit logical ↵Craig Topper2016-08-096-54/+42
| | | | | | operation patterns. llvm-svn: 278088
* Remove *super* old test suite results doc for Linux and Windows.Eric Fiselier2016-08-093-1005/+0
| | | | | | | | | Neither of these results files has been update in years. Linux now has a dozen or so buildbots tracking it and the Windows results are no longer relevant. I plan on looking into getting a Windows buildbot going using Appveyor in the coming days. llvm-svn: 278087
* X86InstrInfo: Update liveness in classifyLea()Matthias Braun2016-08-093-9/+71
| | | | | | | | | We need to update liveness information when we create COPYs in classifyLea(). This fixes http://llvm.org/28301 llvm-svn: 278086
* Remove redundant local variable.Rui Ueyama2016-08-091-4/+1
| | | | llvm-svn: 278085
* Reduce dependency to OutputSectionFactory.Rui Ueyama2016-08-091-9/+15
| | | | | | | | The Factory class is too object-oriented-ish and easy to be abused. This patch reduces dependency to that class. Eventually we want to remove the dependency to that class from LinkerScript. llvm-svn: 278084
* Do not initialize Out<ELFT>::Opd until needed.Rui Ueyama2016-08-091-10/+6
| | | | | | | This change makes it clear that we need the variable only within writeSections. llvm-svn: 278083
* [WebAssembly] Fix bugs in WebAssemblyLowerEmscriptenExceptions passDerek Schuff2016-08-093-40/+145
| | | | | | | | | | | | | | | | | | * Delete extra '_' prefixes from JS library function names. fixImports() function in JS glue code deals with this for wasm. * Change command-line option names in order to be consistent with asm.js. * Add missing lowering code for llvm.eh.typeid.for intrinsics * Delete commas in mangled function names * Fix a function argument attributes bug. Because we add the pointer to the original callee as the first argument of invoke wrapper, all argument attribute indices have to be incremented by one. Patch by Heejin Ahn Differential Revision: https://reviews.llvm.org/D23258 llvm-svn: 278081
* Consistently use CGSCCAnalysisManagerSean Silva2016-08-091-2/+2
| | | | | | | | | | | Besides a general consistently benefit, the extra layer of indirection allows the mechanical part of https://reviews.llvm.org/D23256 that requires touching every transformation and analysis to be factored out cleanly. Thanks to David for the suggestion. llvm-svn: 278080
* Consistently use LoopAnalysisManagerSean Silva2016-08-0925-32/+43
| | | | | | | | | | | | | | | | | One exception here is LoopInfo which must forward-declare it (because the typedef is in LoopPassManager.h which depends on LoopInfo). Also, some includes for LoopPassManager.h were needed since that file provides the typedef. Besides a general consistently benefit, the extra layer of indirection allows the mechanical part of https://reviews.llvm.org/D23256 that requires touching every transformation and analysis to be factored out cleanly. Thanks to David for the suggestion. llvm-svn: 278079
* Consistently use ModuleAnalysisManagerSean Silva2016-08-0933-37/+37
| | | | | | | | | | | Besides a general consistently benefit, the extra layer of indirection allows the mechanical part of https://reviews.llvm.org/D23256 that requires touching every transformation and analysis to be factored out cleanly. Thanks to David for the suggestion. llvm-svn: 278078
* Consistently use FunctionAnalysisManagerSean Silva2016-08-0983-108/+108
| | | | | | | | | | | Besides a general consistently benefit, the extra layer of indirection allows the mechanical part of https://reviews.llvm.org/D23256 that requires touching every transformation and analysis to be factored out cleanly. Thanks to David for the suggestion. llvm-svn: 278077
* Add lib directory to linker paths when using libunwindPetr Hosek2016-08-091-0/+3
| | | | | | | | | | When using libunwind and not building as standalone project, we need to add LLVM library directory to the list of linker directories to ensure it can find libunwind dependency. Differential Revision: https://reviews.llvm.org/D23287 llvm-svn: 278076
* CodeView: extract the OMF Directory HeaderSaleem Abdulrasool2016-08-095-28/+79
| | | | | | | | | | | | The DebugDirectory contains a pointer to the CodeView info structure which is a derivative of the OMF debug directory. The structure has evolved a bit over time, and PDB 2.0 used a slightly different definition from PDB 7.0. Both of these are specific to CodeView and not COFF. Reflect this by moving the structure definitions into the DebugInfo/CodeView headers. Define a generic DebugInfo union type that can be used to pass around a reference to the DebugInfo irrespective of the versioning. NFC. llvm-svn: 278075
* [x86] split combineVSelectWithAllOnesOrZeros into a helper function; NFCISanjay Patel2016-08-091-47/+61
| | | | llvm-svn: 278074
* [WebAssembly] Fix CFI index to account for padding nullptr functionDerek Schuff2016-08-085-10/+12
| | | | | | | | | | | | | The WebAssembly linker now creates a dummy function at index 0 to prevent miscomparisons with the NULL pointer, see https://github.com/WebAssembly/binaryen/pull/658. Thanks to pcc for pointing out this problem! Patch by Dominic Chen Differential Revision: https://reviews.llvm.org/D23137 llvm-svn: 278073
* The first string table entry should be a null terminated space, not just null.Pete Cooper2016-08-082-2/+71
| | | | | | | This matches the behaviour of ld64 which initializes the string table with ' ' then '\0'. lld only had the '\0' and needed the ' '. llvm-svn: 278071
* Revert "Do not ignore SizeOfOptionalHeader in COFF header even if PE header ↵Rui Ueyama2016-08-081-2/+1
| | | | | | | | is not present." This reverts commit r278066 to unbreak buildbots. llvm-svn: 278070
* Revert r278065 while I investigate some build-bot breakage.Lang Hames2016-08-086-92/+2
| | | | llvm-svn: 278069
* Allow building both shared and static libraryPetr Hosek2016-08-083-24/+63
| | | | | | | | | This change allows building both shared and static version of libc++ in a single build, sharing object files between both versions. Differential Revision: https://reviews.llvm.org/D23232 llvm-svn: 278068
* Allow building both shared and static libraryPetr Hosek2016-08-082-16/+42
| | | | | | | | | This change allows building both shared and static version of libunwind in a single build, sharing object files between both versions. Differential Revision: https://reviews.llvm.org/D23233 llvm-svn: 278067
* Do not ignore SizeOfOptionalHeader in COFF header even if PE header is not ↵Rui Ueyama2016-08-081-1/+2
| | | | | | | | | | | | | | | | | | | present. Attribute SizeOfOptionalHeader is ignored if no PE header is present in the file. This attribute should be ignored according to standard, however there are uses of this field even though it should not be used. This change does not conform to PE/COFF standard, but there are several COFF files without PE header, where you had to add up SizeOfOptionalHeader in order to get proper section headers. Other tools and their own parsers do take this into account. Patch by Marek Milkovič! https://reviews.llvm.org/D22750 llvm-svn: 278066
* [RuntimeDyld][Orc][MCJIT] Add partial weak-symbol support to RuntimeDyld.Lang Hames2016-08-086-2/+92
| | | | | | | | | | | | | | | This patch causes RuntimeDyld to check for existing definitions when it encounters weak symbols. If a definition already exists then the new weak definition is discarded. All symbol lookups within a "logical dylib" should now agree on the address of any given weak symbol. This allows the JIT to better match the behavior of the static linker for C++ code. This support is only partial, as it does not allow strong definitions that occur after the first weak definition (in JIT symbol lookup order) to override the previous weak definitions. Support for this will be added in a future patch. llvm-svn: 278065
* Garbage collection is not around anymore, we can remove our support for it.Greg Clayton2016-08-081-17/+1
| | | | llvm-svn: 278064
* Fix more RegisterInfo initialization issues and quiet hundreds of warnings.Greg Clayton2016-08-0811-727/+727
| | | | llvm-svn: 278063
* [ScopDetection] Remove unused DetectionContexts during expansion.Michael Kruse2016-08-081-1/+6
| | | | | | | | | | | | | | The function expandRegion() frees Region* objects again when it determines that these are not valid SCoPs. However, the DetectionContext added to the DetectionContextMap still holds a reference. The validity is checked using the ValidRegions lookup table. When a new Region is added to that list, it might share the same address, such that the DetectionContext contains two Region* associations that are in ValidRegions, but that are unrelated and of which one has already been free. Also remove the DetectionContext when not a valid expansion. llvm-svn: 278062
* Fix printf warnings.Greg Clayton2016-08-081-2/+2
| | | | llvm-svn: 278061
* Fix RegisterInfo initializers to have all the required initializers after ↵Greg Clayton2016-08-088-229/+229
| | | | | | recent changes. This quiets a few hundred warnings on MacOSX. llvm-svn: 278060
* Do not depend on unwind when building standalonePetr Hosek2016-08-081-4/+3
| | | | | | | | | | When libcxxabi is being built standalone, unwind dependency is not available, so do not use it even when LLVM unwinder is being requested. Differential Revision: https://reviews.llvm.org/D23228 llvm-svn: 278058
* COFF: handle /debugtype optionSaleem Abdulrasool2016-08-083-1/+39
| | | | | | | | | | Add the support infrastructure for the /debugtype option which takes a comma delimited list of debug info to generate. The defaults are based on other options potentially (/driver or /profile). This sets up the infrastructure to allow us to emit RSDS records to get "build id" equivalents on COFF (similar to binutils). llvm-svn: 278056
* Revert "[X86] Support the "ms-hotpatch" attribute."Charles Davis2016-08-0812-168/+22
| | | | | | | | This reverts commit r278048. Something changed between the last time I built this--it takes awhile on my ridiculously slow and ancient computer--and now that broke this. llvm-svn: 278053
* Revert "[Attr] Add support for the `ms_hook_prologue` attribute."Charles Davis2016-08-087-74/+11
| | | | | | | This reverts commit r278050. It depends on r278048, which will be reverted. llvm-svn: 278052
* [Driver] Enable CFI for WebAssemblyDerek Schuff2016-08-081-1/+3
| | | | | | | | | | | Since CFI support has landed in the WebAssembly backend, enable it in the frontend driver. Patch by Dominic Chen Differential Revision: https://reviews.llvm.org/D23244 llvm-svn: 278051
* [Attr] Add support for the `ms_hook_prologue` attribute.Charles Davis2016-08-087-11/+74
| | | | | | | | | | | | | | | | | | | | | | | Summary: Based on a patch by Michael Mueller. This attribute specifies that a function can be hooked or patched. This mechanism was originally devised by Microsoft for hotpatching their binaries (which they're constantly updating to stay ahead of crackers, script kiddies, and other ne'er-do-wells on the Internet), but it's now commonly abused by Windows programs that want to hook API functions. It is for this reason that this attribute was added to GCC--hence the name, `ms_hook_prologue`. Depends on D19908. Reviewers: rnk, aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D19909 llvm-svn: 278050
* InstCombine: Remove a redundant #ifdef NDEBUG. NFCJustin Bogner2016-08-081-2/+0
| | | | | | The DEBUG() macro already does this. llvm-svn: 278049
* [X86] Support the "ms-hotpatch" attribute.Charles Davis2016-08-0812-22/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Based on two patches by Michael Mueller. This is a target attribute that causes a function marked with it to be emitted as "hotpatchable". This particular mechanism was originally devised by Microsoft for patching their binaries (which they are constantly updating to stay ahead of crackers, script kiddies, and other ne'er-do-wells on the Internet), but is now commonly abused by Windows programs to hook API functions. This mechanism is target-specific. For x86, a two-byte no-op instruction is emitted at the function's entry point; the entry point must be immediately preceded by 64 (32-bit) or 128 (64-bit) bytes of padding. This padding is where the patch code is written. The two byte no-op is then overwritten with a short jump into this code. The no-op is usually a `movl %edi, %edi` instruction; this is used as a magic value indicating that this is a hotpatchable function. Reviewers: majnemer, sanjoy, rnk Subscribers: dberris, llvm-commits Differential Revision: https://reviews.llvm.org/D19908 llvm-svn: 278048
OpenPOWER on IntegriCloud