summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [WebAssembly] Add AsmString strings for most instructions.Dan Gohman2015-11-057-135/+212
| | | | | | | | | Mangling type information into MachineInstr opcode names was a temporary measure, and it's starting to get hairy. At the same time, the MC instruction printer wants to use AsmString strings for printing. This patch takes the first step, starting the process of adding AsmStrings for instructions. llvm-svn: 252203
* [WebAssembly] Update wasm builtin functions to match spec changes.Dan Gohman2015-11-054-51/+18
| | | | | | | The page_size operator has been removed from the spec, and the resize_memory operator has been changed to grow_memory. llvm-svn: 252202
* [WebAssembly] Update wasm builtin functions to match spec changes.Dan Gohman2015-11-053-18/+6
| | | | | | | The page_size operator has been removed from the spec, and the resize_memory operator has been changed to grow_memory. llvm-svn: 252201
* ScopInfo: Allocate globally unique memory access identifiersTobias Grosser2015-11-054-17/+115
| | | | | | | | Before this commit memory reference identifiers have only been unique per basic block, but not per (non-affine) ScopStmt. This commit now uses the MemoryAccess base pointer to uniquely identify each Memory access. llvm-svn: 252200
* Mark LWG issue #2234. We already do this; no code change neededMarshall Clow2015-11-051-1/+1
| | | | llvm-svn: 252199
* Better validation when we think a directory might be Xcode.app.Sean Callanan2015-11-051-1/+10
| | | | | | | | | | LLDB could otherwise get confused if it is (for example) in a root that is meant to install into an Xcode.app but hasn't been installed yet. That way Xcode can fall back to the real Xcode.app rather than trying to look for resources inside the root. llvm-svn: 252198
* RunTimeDebugBuilder: Allocate memory _after_ knowing how much is neededTobias Grosser2015-11-051-7/+7
| | | | | | | This fixes a memory corruption issue, where we accessed more memory than actually allocated. llvm-svn: 252197
* replace MachineCombinerPattern namespace and enum with enum class; NFCISanjay Patel2015-11-058-80/+84
| | | | | | | | Also, remove an enum hack where enum values were used as indexes into an array. We may want to make this a real class to allow pattern-based queries/customization (D13417). llvm-svn: 252196
* Implement P0092R1 for C++1zMarshall Clow2015-11-0516-1/+713
| | | | llvm-svn: 252195
* [WebAssembly] Add WebAssemblyMCInstLower.cpp.Dan Gohman2015-11-055-4/+168
| | | | | | | This isn't used yet; it's just a start towards eventually using MC to do instruction printing, and eventually binary encoding. llvm-svn: 252194
* These are the matching changes needed to the lld project for the changes to llvmKevin Enderby2015-11-054-16/+34
| | | | | | | in r252192 that changed the Archive and Child interfaces in libObject. These include Rafael Espindola’s many suggested updates. llvm-svn: 252193
* Reapply r250906 with many suggested updates from Rafael Espindola.Kevin Enderby2015-11-0518-84/+294
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The needed lld matching changes to be submitted immediately next, but this revision will cause lld failures with this alone which is expected. This removes the eating of the error in Archive::Child::getSize() when the characters in the size field in the archive header for the member is not a number. To do this we have all of the needed methods return ErrorOr to push them up until we get out of lib. Then the tools and can handle the error in whatever way is appropriate for that tool. So the solution is to plumb all the ErrorOr stuff through everything that touches archives. This include its iterators as one can create an Archive object but the first or any other Child object may fail to be created due to a bad size field in its header. Thanks to Lang Hames on the changes making child_iterator contain an ErrorOr<Child> instead of a Child and the needed changes to ErrorOr.h to add operator overloading for * and -> . We don’t want to use llvm_unreachable() as it calls abort() and is produces a “crash” and using report_fatal_error() to move the error checking will cause the program to stop, neither of which are really correct in library code. There are still some uses of these that should be cleaned up in this library code for other than the size field. The test cases use archives with text files so one can see the non-digit character, in this case a ‘%’, in the size field. These changes will require corresponding changes to the lld project. That will be committed immediately after this change. But this revision will cause lld failures with this alone which is expected. llvm-svn: 252192
* Python 3 - Turn on absolute imports, and fix existing imports.Zachary Turner2015-11-0517-53/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Absolute imports were introduced in Python 2.5 as a feature (e.g. from __future__ import absolute_import), and made default in Python 3. When absolute imports are enabled, the import system changes in a couple of ways: 1) The `import foo` syntax will *only* search sys.path. If `foo` isn't in sys.path, it won't be found. Period. Without absolute imports, the import system will also search the same directory that the importing file resides in, so that you can easily import from the same folder. 2) From inside a package, you can use a dot syntax to refer to higher levels of the current package. For example, if you are in the package lldbsuite.test.utility, then ..foo refers to lldbsuite.test.foo. You can use this notation with the `from X import Y` syntax to write intra-package references. For example, using the previous locationa s a starting point, writing `from ..support import seven` would import lldbsuite.support.seven Since this is now the default behavior in Python 3, this means that importing from the same directory with `import foo` *no longer works*. As a result, the only way to have portable code is to force absolute imports for all versions of Python. See PEP 0328 [https://www.python.org/dev/peps/pep-0328/] for more information about absolute and relative imports. Differential Revision: http://reviews.llvm.org/D14342 Reviewed By: Todd Fiala llvm-svn: 252191
* Fix build on platforms that don't have dlfcn.hZachary Turner2015-11-051-0/+3
| | | | llvm-svn: 252190
* Python 3 - Fix usage of `unicode` in unittest2.Zachary Turner2015-11-051-1/+4
| | | | llvm-svn: 252189
* Add a comment explaining TypeImpl.Jim Ingham2015-11-051-0/+3
| | | | llvm-svn: 252188
* After some discussion, promote -fobjc-weak to a driver option.John McCall2015-11-055-9/+57
| | | | | | rdar://problem/23415863 llvm-svn: 252187
* [SimplifyLibCalls] Use hasFloatVersion(). NFCI.Davide Italiano2015-11-051-15/+13
| | | | llvm-svn: 252186
* [analyzer] Update RegionStoreManager::getBinding to handle BlockDataRegionsDevin Coughlin2015-11-052-4483/+4853
| | | | | | | | | | | | Update RegionStoreManager::getBinding() to return UnknownVal when trying to get the binding for a BlockDataRegion. Previously, getBinding() would try to cast the BlockDataRegion to a TypedValueRegion and crash. This happened when a block was passed as a parameter to an inlined function for which StackHintGeneratorForSymbol::getMessage() tried to generate a stack hint message. rdar://problem/21291971 llvm-svn: 252185
* Remove Copy and Paste error in a comment.Jim Ingham2015-11-051-1/+1
| | | | llvm-svn: 252184
* Use lldb::pid_t instead of pid_t.Chaoren Lin2015-11-052-8/+8
| | | | | | | | | | Reviewers: granata.enrico Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14388 llvm-svn: 252183
* Revert "Do not build any of the simulator material on non-Darwin"Chaoren Lin2015-11-051-2/+2
| | | | | | | | | | This breaks the cmake build on all non-darwin platforms. This reverts commit ff6cc332dd6654620e3408d06f8f49a0c9b3cd41. rL252179 llvm-svn: 252182
* Python 3 - Apply 2to3 `filter` fixer to unittest2.Zachary Turner2015-11-051-1/+1
| | | | llvm-svn: 252181
* [compiler-rt][aarch64] New tests for 128-bit floating-point builtins, fixes ↵Sergey Dmitrouk2015-11-0513-6/+280
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | of tests and __fixuint Summary: The following tests for 128-bit floating-point type behaved in a strange way, thought it were bugs, but seem to be mistakes in tests: * `fixtfsi` test checked for `0x80000001` as a value returned for number less than can be represented, while `LONG_MIN` should be returned on saturation; * `fixunstfdi` wasn't enabled for AArch64, only for PPC, but there is nothing PPC specific in that test; * `multf3` tried to underflow multiplication by producing result with 16383 exponent, while there are still 112 bits of fraction plus implicit bit, so resultant exponent should be 16497. Tests for some other builtins didn't exist: * `fixtfdi` * `fixtfti` * `fixunstfti` They were made by copying similar files and adjusting for wider types and adding/removing some reasonable/extra checks. Also `__fixuint` seems to have off by one error, updated tests to catch this case. Reviewers: rengolin, zatrazz, howard.hinnant, t.p.northover, jmolloy, enefaim Subscribers: aemerson, llvm-commits, rengolin Differential Revision: http://reviews.llvm.org/D14187 llvm-svn: 252180
* Do not build any of the simulator material on non-DarwinEnrico Granata2015-11-051-2/+2
| | | | llvm-svn: 252179
* Remove redundant namespace specifiers.Rui Ueyama2015-11-051-1/+1
| | | | llvm-svn: 252178
* [DebugInfo] Fix ARM/AArch64 prologue_end position. Related to D11268.Oleg Ranevskyy2015-11-0513-116/+303
| | | | | | | | | | | | | | | | | | | Summary: This review is related to another review request http://reviews.llvm.org/D11268, does the same and merely fixes a couple of issues with it. D11268 is quite old and has merge conflicts against the current trunk. This request - rebases D11268 onto the new trunk; - resolves the merge conflicts; - fixes the prologue_end tests, which do not pass due to the subprogram definitions not marked as distinct. Reviewers: echristo, rengolin, kubabrecka Subscribers: aemerson, rengolin, jyknight, dsanders, llvm-commits, asl Differential Revision: http://reviews.llvm.org/D14338 llvm-svn: 252177
* Add cfi instr for CFA calculation when movpc is expanded to call and popPetar Jovanovic2015-11-052-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the issue of wrong CFA calculation in the following case: 0x08048400 <+0>: push %ebx 0x08048401 <+1>: sub $0x8,%esp 0x08048404 <+4>: **call 0x8048409 <test+9>** 0x08048409 <+9>: **pop %eax** 0x0804840a <+10>: add $0x1bf7,%eax 0x08048410 <+16>: mov %eax,%ebx 0x08048412 <+18>: call 0x80483f0 <bar> 0x08048417 <+23>: add $0x8,%esp 0x0804841a <+26>: pop %ebx 0x0804841b <+27>: ret The highlighted instructions are a product of movpc instruction. The call instruction changes the stack pointer, and pop instruction restores its value. However, the rule for computing CFA is not updated and is wrong on the pop instruction. So, e.g. backtrace in gdb does not work when on the pop instruction. This adds cfi instructions for both call and pop instructions. cfi_adjust_cfa_offset** instruction is used with the appropriate offset for setting the rules to calculate CFA correctly. Patch by Violeta Vukobrat. Differential Revision: http://reviews.llvm.org/D14021 llvm-svn: 252176
* [ARM] Clang gives unintended warning message for 'mthumb' + M-profiles:Alexandros Lamprineas2015-11-051-3/+2
| | | | | | | | | $ clang --target=armv7m-none-eabi -mthumb -march=armv7-m -c test.c clang-3.8: warning: argument unused during compilation: '-mthumb' Differential Revision: http://reviews.llvm.org/D14384 llvm-svn: 252175
* [WebAssembly] Rename ior operator to or to match the specDerek Schuff2015-11-055-13/+13
| | | | | | | | | | | | Summary: The spec uses "or" for inclusive-or and "xor" for exclusive-or Reviewers: sunfish Subscribers: jfb, llvm-commits, dschuff Differential Revision: http://reviews.llvm.org/D14362 llvm-svn: 252174
* Improve OMPT initialization codeJonathan Peyton2015-11-054-10/+26
| | | | | | | | | | | | | | | | | Use of #ifdef OMPT_DEBUG was causing messages to be generated under normal operation when the OpenMP library was compiled with KMP_DEBUG enabled. Elsewhere, KMP_DEBUG evaluates assertions, but never produces messages during normal operation. To avoid this inconsistency, set OMPT_DEBUG using a cmake variable LIBOMP_OMPT_DEBUG. While I was editing the associated ompt-specific.h and ompt-general.c files, make the spacing and comments consistent. Patch by John Mellor-Crummey Differential Revision: http://reviews.llvm.org/D14355 llvm-svn: 252173
* Use per-BB value maps for non-exit BBsMichael Kruse2015-11-052-1/+41
| | | | | | | | | | | For generating scalar writes of non-affine subregions, all except phi writes are generated in the exit block. The phi writes are generated in the incoming block for which we errornously used the same BBMap. This can conflict if a value for one block is synthesized, and then reused for another block which is not dominated by the first block. This is fixed by using block-specific BBMaps for phi writes. llvm-svn: 252172
* Update comment to LoopAccessInfo after r251800. NFCSilviu Baranga2015-11-051-0/+7
| | | | llvm-svn: 252171
* Allow use of private headers in different sub-modules.Manuel Klimek2015-11-054-10/+56
| | | | llvm-svn: 252170
* Check the range of R_X86_64_TPOFF32.Rafael Espindola2015-11-052-2/+18
| | | | llvm-svn: 252169
* [ARM] Compute known bits for ARMISD::CMOVJames Molloy2015-11-051-0/+10
| | | | | | | | | | We can conservatively know that CMOV's known bits are the intersection of known bits for each of its operands. This helps PerformCMOVToBFICombine find more opportunities. I tried hard to create a testcase for this and failed - we have to sufficiently confuse DAG.computeKnownBits which can see through all the cheap tricks I tried to narrow my larger testcase down :( This code is actually exercised in CodeGen/ARM/bfi.ll, there's just no functional difference because DAG.computeKnownBits gets the right answer in that case. llvm-svn: 252168
* Avoid implicit Archive::child_iterator construction.Rafael Espindola2015-11-051-5/+5
| | | | llvm-svn: 252167
* Don't implicitly construct an Archive::child_iterator.Rafael Espindola2015-11-051-6/+5
| | | | llvm-svn: 252166
* [tsan] Fix build warnings on OS XKuba Brecka2015-11-052-2/+12
| | | | | | | | Fixing `tsan_interceptors.cc`, which on OS X produces a bunch of warnings about unused constants and functions. Differential Revision: http://reviews.llvm.org/D14381 llvm-svn: 252165
* Fix a signed/unsigned mismatch warning; NFC.Aaron Ballman2015-11-051-1/+1
| | | | llvm-svn: 252164
* Lint warning fixup for r252160 ("[tsan] Fix pthread_once interceptor for OS X").Kuba Brecka2015-11-051-1/+1
| | | | llvm-svn: 252163
* [tsan] Fix the memcpy interceptor to be memmove compatible on OS XKuba Brecka2015-11-051-1/+4
| | | | | | | | On OS X, memcpy and memmove are actually aliases of the same implementation, which means the interceptor of memcpy is also invoked when memmove is called. The current implementation of the interceptor uses `internal_memcpy` to perform the actual memory operation, which can produce an incorrect result when memmove semantics are expected. Let's call `internal_memmove` instead. Differential Revision: http://reviews.llvm.org/D14336 llvm-svn: 252162
* [tsan] Allow memmove interceptor to be used when TSan is not initializedKuba Brecka2015-11-051-3/+5
| | | | | | | | A call to memmove is used early during new thread initialization on OS X. This patch uses the `COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED` check, similarly to how we deal with other early-used interceptors. Differential Revision: http://reviews.llvm.org/D14377 llvm-svn: 252161
* [tsan] Fix pthread_once interceptor for OS XKuba Brecka2015-11-051-1/+5
| | | | | | | | TSan has a re-implementation of `pthread_once` in its interceptor, which assumes that the `pthread_once_t *once_control` pointer is actually pointing to a "storage" which is zero-initialized and used for the atomic operations. However, that's not true on OS X, where pthread_once_t is a structure, that contains a header (with a magic value) and the actual storage follows after that. This patch skips the header to make the interceptor work on OS X. Differential Revision: http://reviews.llvm.org/D14379 llvm-svn: 252160
* [tsan] Alternative ThreadState storage for OS XKuba Brecka2015-11-054-2/+70
| | | | | | | | This implements a "poor man's TLV" to be used for TSan's ThreadState on OS X. Based on the fact that `pthread_self()` is always available and reliable and returns a valid pointer to memory, we'll use the shadow memory of this pointer as a thread-local storage. No user code should ever read/write to this internal libpthread structure, so it's safe to use it for this purpose. We lazily allocate the ThreadState object and store the pointer here. Differential Revision: http://reviews.llvm.org/D14288 llvm-svn: 252159
* Fix escaping value to subregion entry node phiMichael Kruse2015-11-052-21/+75
| | | | | | | | | An incoming value from a block the is not inside the scop is an external use, even if the phi is inside the scop. A previous fix in r251208 did not apply if the phi is inside a non-affine subregion. We move the check for this phi case before the non-affine subregion check. llvm-svn: 252157
* [x86] Additional small fix for MCU psABI supportAndrey Bokhanko2015-11-052-3/+7
| | | | | | | | This patch fixes one more thing in MCU psABI support: LongDoubleWidth should be set to 64. Differential Revision: http://reviews.llvm.org/D14285 llvm-svn: 252156
* [tsan] Use malloc zone interceptors on OS X, part 2Kuba Brecka2015-11-056-8/+72
| | | | | | | | TSan needs to use a custom malloc zone on OS X, which is already implemented in ASan. This patch uses the sanitizer_common implementation in `sanitizer_malloc_mac.inc` for TSan as well. Reviewed at http://reviews.llvm.org/D14330 llvm-svn: 252155
* revert rev. 252153 due to build failure on ubuntuAsaf Badouh2015-11-057-309/+1
| | | | | | [X86][AVX512] add comi with Sae llvm-svn: 252154
* [X86][AVX512] add comi with SaeAsaf Badouh2015-11-057-1/+309
| | | | | | | | add builtin_ia32_vcomisd and builtin_ia32_vcomisd Differential Revision: http://reviews.llvm.org/D14331 llvm-svn: 252153
OpenPOWER on IntegriCloud