summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Avoid inlining if there is byval arguments with non-alloca address spaceBjorn Pettersson2018-01-102-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: After teaching InlineCost more about address spaces () another fault was detected in the inliner. If an argument has the byval attribute the parameter might be copied to an alloca. That part seems to work fine even if the argument has a different address space than the alloca address space. However, if the address spaces differ, then the inlined function still might refer to the parameter using the original address space (the inliner does not handle that situation very well). This patch avoids the problem by simply disallowing inlining when there are byval arguments with address space that differs from the alloca address space. I'm not really sure how to transform the code if we want to get inlining for this situation. I assume that it never has been working, and that the fixes in r321809 just exposed an old problem. Fault found by skatkov (Serguei Katkov). It is mentioned in follow up comments to https://reviews.llvm.org/D40455. Reviewers: skatkov Reviewed By: skatkov Subscribers: uabelho, eraman, llvm-commits, haicheng Differential Revision: https://reviews.llvm.org/D41898 llvm-svn: 322181
* Correct typo in help textEd Maste2018-01-101-1/+1
| | | | | | Information is a mass noun and doesn't take a plural "s". llvm-svn: 322180
* Missed to add new test case in previous commitJoachim Protze2018-01-101-0/+150
| | | | llvm-svn: 322179
* [OMPT] Fix ompt_task_data handling in implicit barriersJoachim Protze2018-01-102-1/+2
| | | | | | | | Changes to task_data in barrier-begin were not visible at barrier-end Differential Revision: https://reviews.llvm.org/D41176 llvm-svn: 322178
* Fix windows and freebsd builds for r322174 (Environment)Pavel Labath2018-01-102-9/+8
| | | | llvm-svn: 322176
* [X86][SSE] Add v2f64 u2 shuffle testSimon Pilgrim2018-01-101-1/+29
| | | | | | Adds missing coverage for SHUFPD undef argument lowering, and also shows a missed opportunity to remove a unnecessary move compared to 02 shuffle mask. llvm-svn: 322175
* Add Utility/Environment class for handling... environmentsPavel Labath2018-01-1046-459/+429
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: There was some confusion in the code about how to represent process environment. Most of the code (ab)used the Args class for this purpose, but some of it used a more basic StringList class instead. In either case, the fact that the underlying abstraction did not provide primitive operations for the typical environment operations meant that even a simple operation like checking for an environment variable value was several lines of code. This patch adds a separate Environment class, which is essentialy a llvm::StringMap<std::string> in disguise. To standard StringMap functionality, it adds a couple of new functions, which are specific to the environment use case: - (most important) envp conversion for passing into execve() and likes. Instead of trying to maintain a constantly up-to-date envp view, it provides a function which creates a envp view on demand, with the expectation that this will be called as the very last thing before handing the value to the system function. - insert(StringRef KeyEqValue) - splits KeyEqValue into (key, value) pair and inserts it into the environment map. - compose(value_type KeyValue) - takes a map entry and converts in back into "KEY=VALUE" representation. With this interface most of the environment-manipulating code becomes one-liners. The only tricky part was maintaining compatibility in SBLaunchInfo, which expects that the environment entries are accessible by index and that the returned const char* is backed by the launch info object (random access into maps is hard and the map stores the entry in a deconstructed form, so we cannot just return a .c_str() value). To solve this, I have the SBLaunchInfo convert the environment into the "envp" form, and use it to answer the environment queries. Extra code is added to make sure the envp version is always in sync. (This also improves the layering situation as Args was in the Interpreter module whereas Environment is in Utility.) Reviewers: zturner, davide, jingham, clayborg Subscribers: emaste, lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D41359 llvm-svn: 322174
* [AArch64][SVE] Asm: Add support for (mov|dup) of scalarSander de Smalen2018-01-106-0/+187
| | | | | | | | | | | | | | Summary: This patch adds support for 'dup' (Scalar -> SVE) and its corresponding 'mov' alias. Reviewers: fhahn, rengolin, evandro, echristo Reviewed By: fhahn Subscribers: aemerson, javed.absar, tschuett, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D41822 llvm-svn: 322172
* [ARM GlobalISel] Add inst selector tests for G_FNEG s32 and s64Diana Picus2018-01-102-0/+154
| | | | | | | G_FNEG is already handled by the TableGen'erated code. Just add a few tests to make sure everything works as expected. llvm-svn: 322170
* [ARM GlobalISel] Map G_FNEG to the FPR bankDiana Picus2018-01-102-1/+51
| | | | llvm-svn: 322169
* [ARM GlobalISel] Legalize G_FNEG for s32 and s64Diana Picus2018-01-102-1/+83
| | | | | | | | | | | | | For hard float, it is legal. For soft float, we need to lower to 0 - x first, and then we can use the libcall for G_FSUB. This is undoing some of the canonicalization performed by the IRTranslator (which introduces G_FNEG when it sees a 0 - x). Ideally, that canonicalization would be performed by a pre-legalizer pass that would allow targets to opt out of this behaviour rather than dance around it in the legalizer. llvm-svn: 322168
* [dotest] Remove crashinfo hookPavel Labath2018-01-105-108/+0
| | | | | | | | | | | | | | | | Summary: This used to be important when all tests were run in a single process, but that has no longer been the case for a while. Furthermore, this hook fails to build on new mac versions for several people, and it's not clear whether fixing it is worth the effort. Reviewers: jingham, clayborg, davide Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D41871 llvm-svn: 322167
* [TableGen][AsmMatcherEmitter] Generate assembler checks for tied operandsSander de Smalen2018-01-103-0/+159
| | | | | | | | | | | | | | | | | | | | Summary: This extends TableGen's AsmMatcherEmitter with code that generates a table with tied-operand constraints. The constraints are checked when parsing the instruction. If an operand is not equal to its tied operand, the assembler will give an error. Patch [2/3] in a series to add operand constraint checks for SVE's predicated ADD/SUB. Reviewers: olista01, rengolin, mcrosier, fhahn, craig.topper, evandro, echristo Reviewed By: fhahn Subscribers: javed.absar, llvm-commits Differential Revision: https://reviews.llvm.org/D41446 llvm-svn: 322166
* Temporarily revertJonas Paulsson2018-01-102-77/+15
| | | | | | | | "[SystemZ] Check for legality before doing LOAD AND TEST transformations." , due to test failures. llvm-svn: 322165
* [ARM GlobalISel] Legalize s32/s64 G_FCONSTANTDiana Picus2018-01-102-3/+70
| | | | | | | | Legal for hard float. Change to G_CONSTANT for soft float (but preserve the binary representation). llvm-svn: 322164
* [SelectionDAGBuilder] Chain prefetches less aggressively.Jonas Paulsson2018-01-102-7/+99
| | | | | | | | | | | | | Prefetches used to always be chained between any previous and following memory accesses. The problem with this was that later optimizations, such as folding of a load into the user instruction, got disrupted. This patch relaxes the chaining of prefetches in order to remedy this. Reveiw: Hal Finkel https://reviews.llvm.org/D38886 llvm-svn: 322163
* [ARM GlobalISel] Legalize G_CONSTANT for scalars > 32 bitsDiana Picus2018-01-102-3/+15
| | | | | | Make G_CONSTANT narrow for any scalars larger than 32 bits. llvm-svn: 322162
* [SystemZ] Check for legality before doing LOAD AND TEST transformations.Jonas Paulsson2018-01-102-15/+77
| | | | | | | | | | Since a load and test instruction treat its operands as signed, it can only replace a logical compare for EQ/NE uses. Review: Ulrich Weigand https://bugs.llvm.org/show_bug.cgi?id=35662 llvm-svn: 322161
* [OMPT] Fix cast and printf of wait_id in lock testJonas Hahnfeld2018-01-101-1/+1
| | | | | | | | This didn't work on 32 bit platforms. Differential Revision: https://reviews.llvm.org/D41853 llvm-svn: 322160
* [ORC] Incorporate Dave Blaikie's feedback on r319839.Lang Hames2018-01-101-21/+20
| | | | | | | | - Turn some member functions into free functions. - Avoid a redundant map lookup - Simplify a loop index llvm-svn: 322159
* [ExecutionEngine] Remove an unused variable.Lang Hames2018-01-101-1/+0
| | | | | | | Patch by Evgeniy Tyurin. Thanks Evgeniy! Review: https://reviews.llvm.org/D41431 llvm-svn: 322158
* Add explanatory comment to LoadStoreVectorizer.Justin Lebar2018-01-101-0/+32
| | | | | | | | | | Reviewers: arsenm Subscribers: rengolin, sanjoy, wdng, hiraditya, asbirlea Differential Revision: https://reviews.llvm.org/D41890 llvm-svn: 322157
* Revert "[CMake] Install resource files into a share/ directory"Petr Hosek2018-01-102-2/+2
| | | | | | This reverts commit r322153 because it broke the sanitizer bots. llvm-svn: 322156
* Revert "[Driver] Update default sanitizer blacklist location"Petr Hosek2018-01-105-1/+1
| | | | | | This reverts commit r322154 because it broke sanitizer bots. llvm-svn: 322155
* [Driver] Update default sanitizer blacklist locationPetr Hosek2018-01-105-1/+1
| | | | | | | | | This is related to moving the sanitizer blacklists to share/ subdirectory. Differential Revision: https://reviews.llvm.org/D41706 llvm-svn: 322154
* [CMake] Install resource files into a share/ directoryPetr Hosek2018-01-102-2/+2
| | | | | | | | | | | Currently these files are being installed into a root installation directory, but this triggers an error when the installation directory is set to an empty string which is often the case when DESTDIR is used to control the installation destination. Differential Revision: https://reviews.llvm.org/D41673 llvm-svn: 322153
* Rename --icf-data and add a corresponding flag for functions.Rafael Espindola2018-01-1010-9/+100
| | | | | | | | | | When we have --icf=safe we should be able to define --icf=all as a shorthand for --icf=safe --ignore-function-address-equality. For now --ignore-function-address-equality is used only to control access to non preemptable symbols in shared libraries. llvm-svn: 322152
* [analyzer] [NFC] Minor refactoring of trackNullOrUndefValueGeorge Karpenkov2018-01-101-80/+97
| | | | | | | | | Simple refactoring attempt: factor out some code, remove some repetition, use auto where appropriate. Differential Revision: https://reviews.llvm.org/D41751 llvm-svn: 322151
* [analyzer] [NFC] minor FindLastStoreBRVisitor refactoringGeorge Karpenkov2018-01-101-112/+127
| | | | | | Differential Revision: https://reviews.llvm.org/D41790 llvm-svn: 322150
* [analyzer] suppress nullability inference from a macro when result is used ↵George Karpenkov2018-01-102-4/+24
| | | | | | | | | | | | | | | | | | in another macro The current code used to not suppress the report, if the dereference was performed in a macro, assuming it is that same macro. However, the assumption might not be correct, and XNU has quite a bit of code where dereference is actually performed in a different macro. As the code uses macro name and not a unique identifier it might be fragile, but in a worst-case scenario we would simply emit an extra diagnostic. rdar://36160245 Differential Revision: https://reviews.llvm.org/D41749 llvm-svn: 322149
* [WebAssembly] Add InputChunk as common base class for InputSegment and ↵Sam Clegg2018-01-1013-183/+165
| | | | | | | | InputFunction. NFC. Differential Revision: https://reviews.llvm.org/D41419 llvm-svn: 322148
* [cmake] Delete redundant install command for clang-refactor.Don Hinton2018-01-101-2/+0
| | | | | | | | | | | | | Summary: Install targets for clang tools are controlled by CLANG_BUILD_TOOLS, and when OFF, cmake issues the following warning: WARNING: Target "clang-refactor" has EXCLUDE_FROM_ALL set and will not be built by default but an install rule has been provided for it. CMake does not define behavior for this case. Differential Revision: https://reviews.llvm.org/D41807 llvm-svn: 322147
* [MIR] Repurposing '$' sigil used by external symbols. Replacing with '&'.Puyan Lotfi2018-01-1040-198/+198
| | | | | | | | | | Planning to add support for named vregs. This puts is in a conundrum since physregs are named as well. To rectify this we need to use a sigil other than '%' for physregs in MIR. We've settled on using '$' for physregs but first we must repurpose it from external symbols using it, which is what this commit is all about. We think '&' will have familiar semantics for C/C++ users. llvm-svn: 322146
* [WebAssembly] Refactor symbol and symbol table to remove WasmSymbol referencesSam Clegg2018-01-106-93/+91
| | | | | | | | | | | | | | | This WasmSymbol types comes directly from the input objects but we want to be able to represent synthetic symbols too. This is more in line with how the ELF linker represents symbols. This change also removes the logic from Symbol::getVirtualAddress for finding the global address and instead has the InputFile provide this. Differential Revision: https://reviews.llvm.org/D41426 llvm-svn: 322145
* [libcxx] [test] Improve MSVC portability.Stephan T. Lavavej2018-01-103-4/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | test/support/msvc_stdlib_force_include.hpp When testing MSVC's STL with C1XX, simulate a couple more compiler feature-test macros. When testing MSVC's STL, simulate a few library feature-test macros. test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp The vector_size attribute is a non-Standard extension that's supported by Clang and GCC, but not C1XX. Therefore, guard this with `__has_attribute(vector_size)`. Additionally, while these tests pass when MSVC's STL is compiled with Clang, I don't consider this to be a supported scenario for our library, so also guard this with defined(_LIBCPP_VERSION). test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp N4713 23.14.10 [func.not_fn]/1 depicts only `call_wrapper(call_wrapper&&) = default;` and `call_wrapper(const call_wrapper&) = default;`. According to 15.8.2 [class.copy.assign]/2 and /4, this makes call_wrapper non-assignable. Therefore, guard the assignability tests as libc++ specific. Add a (void) cast to tolerate not_fn() being marked as nodiscard. Fixes D41213. llvm-svn: 322144
* [llvm-readobj] Consistent use of ScopedPrinterSam Clegg2018-01-108-72/+88
| | | | | | | | | There were a few places where outs() was being used directly rather than the ScopedPrinter object. Differential Revision: https://reviews.llvm.org/D41370 llvm-svn: 322141
* [ORC] Re-apply r321838 again with a workaround for a bug present in the libcxxLang Hames2018-01-106-0/+767
| | | | | | | | | | | | | version being used on some of the green dragon builders (plus a clang-format). Workaround: AsynchronousSymbolQuery and VSO want to work with JITEvaluatedSymbols anyway, so just use them (instead of JITSymbol, which happens to tickle the bug). The libcxx bug being worked around was fixed in r276003, and there are plans to update the offending builders. llvm-svn: 322140
* LowerTypeTests: Add limited support for aliasesVlad Tsyrklevich2018-01-106-0/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: LowerTypeTests moves some function definitions from individual object files to the merged module, leaving a stub to be called in the merged module's jump table. If an alias was pointing to such a function definition LowerTypeTests would fail because the alias would be left without a definition to point to. This change 1) emits information about aliases to the ThinLTO summary, 2) replaces aliases pointing to function definitions that are moved to the merged module with function declarations, and 3) re-emits those aliases in the merged module pointing to the correct function definitions. The patch does not correctly fix all possible mis-uses of aliases in LowerTypeTests. For example, it does not handle aliases with a different type from the pointed to function. The addition of alias data increases the size of Chrome build artifacts by less than 1%. Reviewers: pcc Reviewed By: pcc Subscribers: mehdi_amini, eraman, mgrang, llvm-commits, eugenis, kcc Differential Revision: https://reviews.llvm.org/D41741 llvm-svn: 322139
* [WebAssembly] Output functions individuallySam Clegg2018-01-0911-214/+266
| | | | | | | | | | | | | The code section is now written out one function at a time rather than all the functions in a given objects being serialized at once. This change lays the groundwork for supporting --gc-sections. Differential Revision: https://reviews.llvm.org/D41315 llvm-svn: 322138
* [LoopRotate] Detect loops with indirect branches better (we're giving up on ↵Michael Zolotukhin2018-01-092-3/+34
| | | | | | them). llvm-svn: 322137
* Reland "Emit Function IDs table for Control Flow Guard"Adrian McCarthy2018-01-0921-2/+353
| | | | | | | | | | | | | | | | | Adds option /guard:cf to clang-cl and -cfguard to cc1 to emit function IDs of functions that have their address taken into a section named .gfids$y for compatibility with Microsoft's Control Flow Guard feature. The original patch didn't have the lit.local.cfg file that restricts the new test to x86, thus the new test was failing on the non-x86 bots. Differential Revision: https://reviews.llvm.org/D40531 The reverts r322008, which was a revert of r322005. This reverts commit a05b89f9aca70597dc79fe97bc49b50b51f525ba. llvm-svn: 322136
* [WebAssembly] Add COMDAT supportSam Clegg2018-01-0913-32/+326
| | | | | | | | | | | | | | This adds COMDAT support to the Wasm object-file format. Spec: https://github.com/WebAssembly/tool-conventions/pull/31 Corresponding LLD change: https://bugs.llvm.org/show_bug.cgi?id=35533, and D40845 Patch by Nicholas Wilson Differential Revision: https://reviews.llvm.org/D40844 llvm-svn: 322135
* [DWARFv5] MC support for MD5 file checksumsPaul Robinson2018-01-0915-39/+147
| | | | | | | Extend .file directive syntax to allow specifying an MD5 checksum for the source file. Emit the checksums in DWARF v5 line tables. llvm-svn: 322134
* Tidy some grammar in some commentsEric Christopher2018-01-092-4/+4
| | | | llvm-svn: 322133
* tempJake Ehrlich2018-01-094-0/+104
| | | | llvm-svn: 322132
* Use a MCExpr for the size of MCFillFragment.Rafael Espindola2018-01-095-20/+46
| | | | | | | This allows the size to be found during ralaxation. This fixes pr35858. llvm-svn: 322131
* [WebAssembly] MC: Use zero for provisional value of undefined symbolsSam Clegg2018-01-093-5/+5
| | | | | | | | | | This is more in line with what happens in the final executable when symbols are undefined (i.e. weak references). Differential Revision: https://reviews.llvm.org/D41840 llvm-svn: 322130
* Add a test.Rafael Espindola2018-01-091-0/+4
| | | | | | Currently we don't have any tests for this error case. llvm-svn: 322129
* This change updates the deployment target for lldb and debugserverJason Molenda2018-01-092-68/+318
| | | | | | | | | | | | | | | | (built with Xcode) from 10.9 to 10.11. It also enables the use of libcompression in debugserver by default (these API are only present in macOS 10.11 and newer -- 10.11 was released c. Sep 2015). I don't know if we have people / bots building lldb on older mac releases; if this turns out to be a problem I will revert the change. There are some parts of lldb (e.g. debugserer's ability to report the OS version #) that only work with 10.10 and this changes the behavior of lldb (whether the older or newer dyld interfaces are used) so there is some importance to updating the min required version. llvm-svn: 322128
* ADT: Add a range-based version of std::copyDavid Blaikie2018-01-091-0/+5
| | | | llvm-svn: 322127
OpenPOWER on IntegriCloud