summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [RegisterScavenger] Remove aliasing registers of operands from the candidate setSilviu Baranga2016-09-061-1/+2
| | | | | | | | | | | | | | | | | | | | Summary: In addition to not including the register operand of the current instruction also don't include any aliasing registers. We can't consider these as candidates because using them will clobber the corresponding register operand of the current instruction. This change doesn't include a test case and it would probably be difficult to produce a stable one since the bug depends on the results of register allocation. Reviewers: MatzeB, qcolombet, hfinkel Subscribers: hfinkel, llvm-commits Differential Revision: https://reviews.llvm.org/D24130 llvm-svn: 280698
* Fix build breakage in r280692Pavel Labath2016-09-063-3/+3
| | | | | | | | | The commit introduced an array of const objects, which libstdc++ does not like. Make the object non-const. Also fix a compiler warning while I'm in there. llvm-svn: 280697
* [AVX-512] Fix masked VPERMI2PS isel when the index comes from a bitcast.Craig Topper2016-09-064-61/+41
| | | | | | We need to bitcast the index operand to a floating point type so that it matches the result type. If not then the passthru part of the DAG will be a bitcast from the index's original type to the destination type. This makes it very difficult to match. The other option would be to add 5 sets of patterns for every other possible type. llvm-svn: 280696
* [AVX-512] Add a test case to show that we don't select masked vpermi2ps when ↵Craig Topper2016-09-061-4/+17
| | | | | | | | | | the index operand comes from a bitcast. It doesn't work because we're looking for a bitcast from the v4i32 index operand to v4f32 for the passthru part of the DAG. But since the index is bitcasted from v2i64 and bitcasts fold, we actually have a bitcast from v2i64 to v4f32 in the passthru part of the DAG. Taken from optimized output from clang's test case. llvm-svn: 280695
* [X86] Remove unused encoding from IntrinsicType enum.Craig Topper2016-09-062-4/+1
| | | | llvm-svn: 280694
* [X86] Fix indentation. NFCCraig Topper2016-09-061-2/+2
| | | | llvm-svn: 280693
* Added the "frame diagnose" command and use its output to make crash info better.Sean Callanan2016-09-0643-4/+2154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When a process stops due to a crash, we get the crashing instruction and the crashing memory location (if there is one). From the user's perspective it is often unclear what the reason for the crash is in a symbolic sense. To address this, I have added new fuctionality to StackFrame to parse the disassembly and reconstruct the sequence of dereferneces and offsets that were applied to a known variable (or fuction retrn value) to obtain the invalid pointer. This makes use of enhancements in the disassembler, as well as new information provided by the DWARF expression infrastructure, and is exposed through a "frame diagnose" command. It is also used to provide symbolic information, when available, in the event of a crash. The algorithm is very rudimentary, and it needs a bunch of work, including - better parsing for assembly, preferably with help from LLVM - support for non-Apple platforms - cleanup of the algorithm core, preferably to make it all work in terms of Operands instead of register/offset pairs - improvement of the GetExpressioPath() logic to make prettier expression paths, and - better handling of vtables. I welcome all suggestios, improvements, and testcases. llvm-svn: 280692
* Revert "bugpoint: Stop threading errors through APIs that never fail"Justin Bogner2016-09-067-90/+112
| | | | | | | | | | | | | This isn't the right thing to do - it turns out a number of the APIs that "never fail" just exit(1) if something bad happens. We can and should thread Error through this instead. That diff will make more sense with this reverted. Sorry for the noise. This reverts r280690 llvm-svn: 280691
* bugpoint: Stop threading errors through APIs that never failJustin Bogner2016-09-067-112/+90
| | | | | | | | | | | | | This simplifies ListReducer and most of its subclasses by removing the std::string &Error that was threaded through all of them but almost never used. If we end up needing error handling in more places here we can reinstate it using llvm::Error instead of these unwieldy strings. The 2 cases (out of 12) that actually can hit the error cases are a little bit awkward now, but those will clean up as I refactor this API further. llvm-svn: 280690
* ARM: workaround bundled operation predicationSaleem Abdulrasool2016-09-062-0/+27
| | | | | | | | | | | | | | | | | | | | | | This is a Windows ARM specific issue. If the code path in the if conversion ends up using a relocation which will form a IMAGE_REL_ARM_MOV32T, we end up with a bundle to ensure that the mov.w/mov.t pair is not split up. This is normally fine, however, if the branch is also predicated, then we end up trying to predicate the bundle. For now, report a bundle as being unpredicatable. Although this is false, this would trigger a failure case previously anyways, so this is no worse. That is, there should not be any code which would previously have been if converted and predicated which would not be now. Under certain circumstances, it may be possible to "predicate the bundle". This would require scanning all bundle instructions, and ensure that the bundle contains only predicatable instructions, and converting the bundle into an IT block sequence. If the bundle is larger than the maximal IT block length (4 instructions), it would require materializing multiple IT blocks from the single bundle. llvm-svn: 280689
* Revert "DebugInfo: use strongly typed enum for debug info flags"Mehdi Amini2016-09-0613-309/+292
| | | | | | This reverts commit r280686, bots are broken. llvm-svn: 280688
* [LTO] Constify (NFC)Mehdi Amini2016-09-061-16/+20
| | | | llvm-svn: 280687
* DebugInfo: use strongly typed enum for debug info flagsMehdi Amini2016-09-0613-292/+309
| | | | | | | | | | | | Use ADT/BitmaskEnum for DINode::DIFlags for the following purposes: * Get rid of unsigned int for flags to avoid problems on platforms with sizeof(int) < 4 * Flags are now strongly typed Patch by: Victor Leschuk <vleschuk@gmail.com> Differential Revision: https://reviews.llvm.org/D23766 llvm-svn: 280686
* Fix DensetSet::insert_as() for MSVC2015 (NFC)Mehdi Amini2016-09-061-3/+2
| | | | | | | | | | | | | The latest MSVC update apparently resolve the call from the const ref variant to itself, leading to an infinite recursion. It is not clear to me why the r-value overload is not selected. `ValueT` is a pointer type, and the functional-style cast in the call `insert_as(ValueT(V), LookupKey);` should result in a r-value ref. A bug in MSVC? Differential Revision: https://reviews.llvm.org/D23956 llvm-svn: 280685
* [AVX-512] Fix v8i64 shift by immediate lowering on 32-bit targets.Craig Topper2016-09-064-18/+18
| | | | llvm-svn: 280684
* CodeGen: ensure that libcalls are always AAPCS CCSaleem Abdulrasool2016-09-066-178/+182
| | | | | | | | | | | | | All of the builtins are designed to be invoked with ARM AAPCS CC even on ARM AAPCS VFP CC hosts. Tweak the default initialisation to ARM AAPCS CC rather than C CC for ARM/thumb targets. The changes to the tests are necessary to ensure that the calling convention for the lowered library calls are honoured. Furthermore, these adjustments cause certain branch invocations to change to branch-and-link since the returned value needs to be moved across registers (d0 -> r0, r1). llvm-svn: 280683
* [AVX-512] Teach fastisel load/store handling to use EVEX encoded ↵Craig Topper2016-09-053-132/+395
| | | | | | | | instructions for 128/256-bit vectors and scalar single/double. Still need to fix the register classes to allow the extended range of registers. llvm-svn: 280682
* [X86] Update fast-isel store test to have more 256 and 512-bit test cases. ↵Craig Topper2016-09-051-18/+719
| | | | | | Add command lines for AVX and AVX512 feature sets. llvm-svn: 280681
* [X86] Update fast-isel vector load test to have more 256 and 512-bit test ↵Craig Topper2016-09-051-82/+651
| | | | | | cases. Add a command line for SKX features too. llvm-svn: 280680
* fix FileCheck variables for test added with r280677Sanjay Patel2016-09-051-2/+2
| | | | | | | The script (utils/update_test_checks.py) seems to have problems with variable names that start with the same string. llvm-svn: 280679
* [Coroutines] Part12: Handle alloca address-takenGor Nishanov2016-09-052-1/+113
| | | | | | | | | | | | | | | | | | | | | | | Summary: Move early uses of spilled variables after CoroBegin. For example, if a parameter had address taken, we may end up with the code like: define @f(i32 %n) { %n.addr = alloca i32 store %n, %n.addr ... call @coro.begin This patch fixes the problem by moving uses of spilled variables after CoroBegin. Reviewers: majnemer Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D24234 llvm-svn: 280678
* [InstCombine] don't assert that division-by-constant has been folded (PR30281)Sanjay Patel2016-09-052-7/+99
| | | | | | | | | | This is effectively a revert of: https://reviews.llvm.org/rL280115 And this should fix https://llvm.org/bugs/show_bug.cgi?id=30281: llvm-svn: 280677
* [InstCombine] revert r280637 because it causes test failures on an ARM botSanjay Patel2016-09-052-55/+55
| | | | | | http://lab.llvm.org:8011/builders/clang-cmake-armv7-a15/builds/14952/steps/ninja%20check%201/logs/FAIL%3A%20LLVM%3A%3Aicmp.ll llvm-svn: 280676
* remove dependence of TestGdbRemoteExitCode.py on parent directory sourceTodd Fiala2016-09-053-4/+391
| | | | | | | | | | | | As Pavel pointed out in a comment on llvm.org/pr30271, the VPATH I was using here to eliminate duplication of a .cpp file had a side effect of attempting to pull in a .o/.obj file from that same parent dir, where other tests can be running in parallel. This is no good. For now, I have removed the VPATH, which should address llvm.org/pr30271. I have also removed the XFAIL. llvm-svn: 280675
* [lit] Downgrade error to warning on gtest crashes during discovery.Ahmed Bougacha2016-09-051-2/+2
| | | | | | | | | | Lots of unittests started failing under asan after r280455. It seems they've been failing for a long time, but lit silently ignored them. Downgrade the error so we can figure out what is going on. Filed http://llvm.org/PR30285. llvm-svn: 280674
* [AVX-512] Integrate mask register copying more completely into ↵Craig Topper2016-09-051-68/+53
| | | | | | | | X86InstrInfo::copyPhysReg and simplify. No functional change intended. The code is now written in terms of source and dest classes with feature checks inside each type of copy instead of having separate functions for each feature set. llvm-svn: 280673
* Add support for targeting armv6-unknown-cloudabi-eabihf.Ed Schouten2016-09-052-0/+7
| | | | | | | I'm in the progress of adding ARMv6 support to CloudABI. On the compiler side, everything seems to work properly with this tiny change applied. llvm-svn: 280672
* [X86][SSE] Add test cases for PR29078Simon Pilgrim2016-09-051-0/+668
| | | | | | 'Failure to recognise i64 sitofp/uitofp conversions that can be performed as i32' llvm-svn: 280671
* [X86][SSE] Add test cases for PR29079Simon Pilgrim2016-09-051-0/+150
| | | | | | 'Failure to recognise uitofp conversions that can be performed as sitofp' llvm-svn: 280670
* Add missing _US_ACTION_MASK constant to unwind.hDimitry Andric2016-09-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | Summary: During building of recent compiler-rt sources on FreeBSD for arm, I noticed that our unwind.h (which originates in libunwind) was missing the `_US_ACTION_MASK` constant: compiler-rt/lib/builtins/gcc_personality_v0.c:187:18: error: use of undeclared identifier '_US_ACTION_MASK' if ((state & _US_ACTION_MASK) != _US_UNWIND_FRAME_STARTING) ^ It appears that both clang's internal unwind.h, and libgcc's unwind.h define this constant as 3, so let's add this to libunwind's version too. Reviewers: logan, kledzik, davide, emaste Subscribers: joerg, davide, aemerson, emaste, llvm-commits Differential Revision: https://reviews.llvm.org/D24222 llvm-svn: 280669
* Intel(R) Memory Protection Extensions (Intel(R) MPX) support.Valentina Giusti2016-09-0517-26/+501
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: The Intel(R) Memory Protection Extensions (Intel(R) MPX) associates pointers to bounds, against which the software can check memory references to prevent out of bound memory access. This patch allows accessing the MPX registers: * bnd0-3: 128-bit registers to hold the bound values, * bndcfgu, bndstatus: 64-bit configuration registers, This patch also adds read/write tests for the MPX registers in the register command tests and adds a new subdirectory for MPX specific tests. Signed-off-by: Valentina Giusti <valentina.giusti@intel.com> Reviewers: labath, granata.enrico, lldb-commits, clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D24187 llvm-svn: 280668
* CODE_OWNERS: bring my entry up to datewhitequark2016-09-051-1/+1
| | | | llvm-svn: 280667
* [ELF][MIPS] Support R_MIPS_TLS_DTPREL64 / R_MIPS_TLS_TPREL64 relocations ↵Simon Atanasyan2016-09-052-2/+41
| | | | | | calculation llvm-svn: 280666
* [ELF][MIPS] Support R_MIPS_TLS_DTPREL32 / R_MIPS_TLS_TPREL32 relocations ↵Simon Atanasyan2016-09-052-4/+23
| | | | | | calculation llvm-svn: 280665
* [ELF][MIPS] Do not create a hidden definition for __tls_get_addr on MIPSSimon Atanasyan2016-09-052-2/+27
| | | | | | | | | On most architectures the linker is required to optimize away any references to __tls_get_addr in case of static linking. As usual a special case is MIPS - libc defines __tls_get_addr itself because there are no TLS optimizations for this architecture. llvm-svn: 280664
* Replace uses of MIUtilParse::CRegexParser with llvm::RegexPavel Labath2016-09-052-31/+35
| | | | | | | | | | | | | | | | Summary: Replace uses of the local MIUtilParse::CRegexParser class with the LLVM support class llvm::Regex. This reduces duplication of code, and makes it possible to remove the MIUtilParse::CRegexParser class that requires LLVM internal implementation headers. Bug: https://llvm.org/bugs/show_bug.cgi?id=29138 Reviewers: dawn, abidh, ki.stfu Subscribers: labath, ki.stfu, lldb-commits Differential Revision: https://reviews.llvm.org/D23882 Author: Michał Górny <mgorny@gentoo.org> llvm-svn: 280662
* [X86][SSE] Regenerate odd shuffle tests with common prefixesSimon Pilgrim2016-09-051-145/+83
| | | | llvm-svn: 280661
* [SimplifyCFG] Add test for sinking inline asm in if/elseOliver Stannard2016-09-051-0/+29
| | | | | | | | | | | | | | | This test code previously caused a failure in the module verifier, because SimplifyCFG created this invalid instruction, which tries to take the address of inline asm: %.sink = select i1 %1, i64 ()* asm "mov $0, #1", "=r", i64 ()* asm %"mov $0, #2", "=r" This has been fixed recently, presumably by James Molloy's patches that re-wrote and changed parts of SimplifyCFG, so this patch just adds a regression test for it. Differential Revision: https://reviews.llvm.org/D24231 llvm-svn: 280660
* clang/test/Modules/compiler_builtins_x86.c: Fix r280658.NAKAMURA Takumi2016-09-051-1/+1
| | | | llvm-svn: 280659
* Attempt to fix buildbots not targetting x86James Molloy2016-09-051-1/+1
| | | | | | r280613 introduced failures for all builds that don't target x86 by default. Add an explicit target to avoid a missing feature diagnostic. llvm-svn: 280658
* asan: allow __asan_{before,after}_dynamic_init without registered globalsDmitry Vyukov2016-09-051-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When optimizing, GCC optimizes away aggressively unused static globals. The __asan_before_dynamic_init/__asan_after_dynamic_init calls are placed in static constructor earlier while the registration of the globals is done later in the compilation process. If all the globals with dynamic initialization are optimized away from some particular TU in between those two, libasan can fail on an assertion that dynamic_init_globals is empty. While I'm going to commit a GCC change which will remove the __asan_before_dynamic_init/__asan_after_dynamic_init in many cases when this happens (basically if the optimizers can prove there are no memory references in between the two calls), there are still testcases where such pair of calls is left, e.g. for struct S { S () { asm volatile ("" : : : "memory"); } }; static S c; int main () { return 0; } with -O2 -fsanitize=address and ASAN_OPTIONS=check_initialization_order=true this still fails the assertion. Trying to avoid this problem on the compiler side would decrease code quality I'm afraid, whether it is making sure for -fsanitize=address we keep around at least one dynamically initialized global if the __asan_before_dynamic_init/__asan_after_dynamic_init pair has been emitted, or adding some artificial global which would be used as the condition for those calls etc. So, can the assertion be instead just removed, this really shouldn't slow down the calls measurably (for __asan_before_dynamic_init it is even cheaper) and the assertion doesn't check something worthwhile anyway (it is sufficient if there is a single dynamically initialized global in any other TU to make it happy). Details in http://gcc.gnu.org/PR77396 Author: Jakub Jelinek llvm-svn: 280657
* [WebAssembly] Unbreak the build.Benjamin Kramer2016-09-051-8/+9
| | | | | | Not sure why ADL isn't working here. llvm-svn: 280656
* [AMDGPU] Refactor FLAT TD instructionsValery Pykhtin2016-09-056-438/+525
| | | | | | Differential revision: https://reviews.llvm.org/D24072 llvm-svn: 280655
* Add check-polly-tests build target.Michael Kruse2016-09-051-5/+9
| | | | | | | | | | | | | | | | | | | | The check-polly-tests target runs regression/unit tests but without checking formatting. This is useful to not having to reload a file in an open editor (which eg. clears the undo buffer, moves cursor/window position) when running polly-update-format. After this change, the following test targets exist: - check-polly-unittests to run unittests only - check-polly-tests to run unit and regression tests - polly-check-format to check formatting using clang-format - check-polly to run them all As a side-effect, when running check-polly, polly-check-format and run in parallel (instead of polly-check-format first). Differential Revision: https://reviews.llvm.org/D24191 llvm-svn: 280654
* [clang-rename] Add comment after namespace closingKirill Bobyrev2016-09-051-2/+3
| | | | llvm-svn: 280653
* Add default_packet_timeout key to the new TestGdbRemoteHostInfo testPavel Labath2016-09-051-1/+2
| | | | | | android targets use this key, so the test should recognize it. llvm-svn: 280652
* [Thumb1] Add relocations for fixups fixup_arm_thumb_{br,bcc}James Molloy2016-09-052-0/+27
| | | | | | | | These need to be mapped through to R_ARM_THM_JUMP{11,8} respectively. Fixes PR30279. llvm-svn: 280651
* [AVX512] Fix v8i1 /v16i1 zext + bitcast lowering pattern. Explicitly zero ↵Igor Breger2016-09-053-4/+94
| | | | | | | | upper bits. Differential Revision: http://reviews.llvm.org/D23983 llvm-svn: 280650
* [X86] Make some static arrays of opcodes const and shrink to uint16_t. NFCCraig Topper2016-09-051-6/+6
| | | | llvm-svn: 280649
* [AVX-512] Simplify X86InstrInfo::copyPhysReg for 128/256-bit vectors with ↵Craig Topper2016-09-0514-168/+112
| | | | | | | | AVX512, but not VLX. We should use the VEX opcodes and trust the register allocator to not use the extended XMM/YMM register space. Previously we were extending to copying the whole ZMM register. The register allocator shouldn't use XMM16-31 or YMM16-31 in this configuration as the instructions to spill them aren't available. llvm-svn: 280648
OpenPOWER on IntegriCloud