summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* AMDGPU: Fix not moving users of s_bfe_i64 to VALUMatt Arsenault2015-08-262-0/+52
| | | | | | | This wouldn't propagate to users of the original BFE and would hit a verifier error. llvm-svn: 246078
* AMDGPU: Don't create intermediate SALU instructionsMatt Arsenault2015-08-262-27/+44
| | | | | | | | | | | | When splitting 64-bit operations, create the correct VALU instructions immediately. This was splitting things like s_or_b64 into the two s_or_b32s and then pushing the new instructions onto the worklist. There's no reason we need to do this intermediate step. llvm-svn: 246077
* git-clang-format the constructor to reduce the diff in a merge.Rafael Espindola2015-08-261-2/+1
| | | | llvm-svn: 246076
* SelectionDAGBuilder: Fix SPDescriptor not resetting GuardRegMatthias Braun2015-08-262-0/+45
| | | | | | | | This was causing problems when some functions use a GuardReg and some don't as can happen when mixing SelectionDAG and FastISel generated functions. llvm-svn: 246075
* FastISel: Avoid adding a successor block twice for degenerate IR.Matthias Braun2015-08-262-3/+20
| | | | | | | | This fixes http://llvm.org/PR24581 Differential Revision: http://reviews.llvm.org/D12350 llvm-svn: 246074
* Expose hasLiveCondCodeDef as a member function of the X86InstrInfo class. NFCAndrew Kaylor2015-08-262-1/+5
| | | | | | | | | This takes the existing static function hasLiveCondCodeDef and makes it a member function of the X86InstrInfo class. This is a useful utility function that an upcoming change would like to use. NFC. Patch by: Kevin B. Smith Differential Revision: http://reviews.llvm.org/D12371 llvm-svn: 246073
* [libcxx] Remove installation rules on Darwin when it would overwrite the ↵Eric Fiselier2015-08-263-15/+38
| | | | | | | | | | | | | | | | | system installation. Summary: On Mac OS X overwriting `/usr/lib/libc++.dylib` can cause your computer to fail to boot. This patch tries to make it harder to do that accidentally. If `CMAKE_SYSTEM_NAME` is `Darwin` and `CMAKE_INSTALL_PREFIX` is `/usr` don't generate installation rules unless the user explicitly provides `LIBCXX_OVERRIDE_DARWIN_INSTALL=ON`. Note that `CMAKE_INSTALL_PREFIX` is always absolute so we don't need to worry about things like `/usr/../usr`. Reviewers: mclow.lists, beanz, jroelofs Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D12209 llvm-svn: 246070
* [libcxx] Add special warning flag detection logic to compiler.pyEric Fiselier2015-08-262-6/+30
| | | | | | | | | | | | Summary: Detecting `-Wno-<warning>` flags can be tricky with GCC (See https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html). This patch adds a special `addWarningFlagIfSupported(<flag>)` method to the test compiler object that can be used to add warning flags. The goal of this patch is to help get the test suite running with more warnings. Reviewers: danalbert, jroelofs Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D11333 llvm-svn: 246069
* [libcxx] Rewrite C++03 __invoke.Eric Fiselier2015-08-265-415/+271
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch rewrites the C++03 `__invoke` and related meta-programming. There are a number of major changes. `__invoke` in C++03 now has a fallback overload for when the invoke expression is ill-formed (similar to C++11). This means that the `__invoke_return` traits will return `__nat` when `__invoke(...)` is ill formed. This would previously cause a compile error. Bullets 1-4 of `__invoke` have been rewritten. In the old version `__invoke` had 32 overloads for bullets 1 and 2, one for each possible cv-qualified function signature with arities 0-3. 64 overloads would be needed to support member functions with varargs. Currently these overloads were fundamentally broken. An example overload looked like: ``` template <class Rp, class Tp, class T1, class A0> Rp __invoke(Rp (Tp::*pm)(A0) const, T1&, A0&) ``` Because `A0` appeared in two different deducible contexts it would have to deduce to be an exact match or the overload would be rejected. This is made even worse because `A0` appears without a reference qualifier in the member function signature and with a reference qualifier as an `__invoke` parameter. This means that only member functions that took all of their arguments by value could be matched. One possible fix would be to make the second occurrence of `A0` appear in a non-deducible context. This way any type convertible to `A0` could be passed as the first parameter. The benefit of this approach is that the signature of the member function enforces the arity and types taken by the `__invoke` signature it generates. However nothing in the `INVOKE` specification requires this behavior. My solution is to use a `__invoke_enable_if<PM_Type, Tp>` metafunction to selectively enable the `__invoke` overloads for bullets 1, 2, 3 and 4. It uses `__member_function_traits` to inspect and extract the return type and class type of the pointer to member. Using `__member_function_traits` to inspect `PM_Type` also allows us to reduce the number of `__invoke` overloads from 32 to 8 and add varargs support at the same time. Because `__invoke_enable_if` knows the exact return type of `__invoke` for bullets 1-4 we no longer need to use `decltype(__invoke(...))` to compute the return type in the `__invoke_return*` traits. This will reduce the problems caused by `#define decltype(X) __typeof__(X)` in C++03. Tests for this change have already been committed. All tests in `test/std/utilities/function.objects` now pass in C++03, previously there were 20 failures. Reviewers: K-ballo, howard.hinnant, mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D11553 llvm-svn: 246068
* Put taskdata variables under KMP_DEBUG guards.Jonathan Peyton2015-08-262-4/+6
| | | | | | | These variables are only used in the TRACE macros and so don't need to be defined unless compiling in debug mode. llvm-svn: 246067
* Fix memory leak in sample profile pass.Diego Novillo2015-08-261-28/+23
| | | | | | | | | | | | | | | | The problem here were the function analyses invoked by the function pass manager from the new IPO pass. I looked at other IPO passes needing dominance information and the only one that requires it (partial inliner) does not use the standard dependency mechanism. This patch mimics what the partial inliner does to compute dominance, post-dominance and loop info. One thing I like about this approach is that I can delay the computation of all this until I actually need it. This should bring the ASAN buildbot back to green. If there's a better way to fix this, I'll do it in a follow-up patch. llvm-svn: 246066
* Replace variables with definitions inside KMP_DEBUG_ASSERT statementsJonathan Peyton2015-08-262-7/+3
| | | | | | | | This change just removes the variables created solely for KMP_DEBUG_ASSERT statements and puts the definition of the removed variables inside the KMP_DEBUG_ASSERT statements. llvm-svn: 246065
* Remove redundant definition of thr in kmp_gsupport.cJonathan Peyton2015-08-261-2/+1
| | | | | | | There is a thr variable with the same definition at the top of this function as the thr variable inside the if block. llvm-svn: 246064
* Don't throw an exception when module cleanup fails.Zachary Turner2015-08-264-6/+35
| | | | | | | Just because one test fails to clean up correctly, it should not prevent other tests from attempting to run. llvm-svn: 246063
* On Windows, use 'del' instead of 'rm' to delete the test executable.Zachary Turner2015-08-261-3/+7
| | | | | | | This is a nasty hack to work around the issue described in https://llvm.org/pr24589 llvm-svn: 246062
* XFAIL environment variable setting test on Windows.Zachary Turner2015-08-261-0/+1
| | | | | | Fixing this is tracked by https://llvm.org/pr24579 llvm-svn: 246061
* Disable Objective C test on non-Darwin platforms.Zachary Turner2015-08-261-2/+1
| | | | llvm-svn: 246060
* Remove unused caller_gtid variable in both z_Linux_util.c and ↵Jonathan Peyton2015-08-262-4/+0
| | | | | | z_Windows_NT_util.c llvm-svn: 246059
* [Sanitizer] Test churn: use %env_tool_opts in sanitizer_common lit tests.Alexey Samsonov2015-08-2610-27/+29
| | | | | | | | This follows the approach we use in ASan and UBSan lit tests to setup tool options in a portable way, and to provide a nice way to specify testsuite-wide defaults. llvm-svn: 246058
* Revert "Fix LLVM C API for DataLayout"Mehdi Amini2015-08-262-21/+22
| | | | | | | | This reverts commit r246052. Third attempt, still unpleasant for some bots. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 246057
* AMDGPU/SI: Report SIFixSGPRLiveRanges changed functionMatt Arsenault2015-08-261-1/+4
| | | | llvm-svn: 246056
* Refactor flaky shared_mutex testsEric Fiselier2015-08-264-22/+39
| | | | llvm-svn: 246055
* [ARM] Error out if float-ab=hard and abi=apcs-gnu on macho platforms.Akira Hatanaka2015-08-262-4/+21
| | | | | | | | | | | | | | | | Error out if -mfloat-abi=hard or -mhard-float is specified on the command line and the target ABI is APCS. Previously clang issued no warnings or errors and just passed the option to the backend, which had no effect on code generation for targets using APCS. This commit corrects the patch commited in r245866, which didn't take into account the fact that not all darwin targets use APCS. rdar://problem/22257950 http://reviews.llvm.org/D12344 llvm-svn: 246054
* Fix LLVM C API for DataLayoutMehdi Amini2015-08-262-22/+21
| | | | | | | | | | | | | | | | | | | | | | | | | We removed access to the DataLayout on the TargetMachine and deprecated the C API function LLVMGetTargetMachineData() in r243114. However the way I tried to be backward compatible was broken: I changed the wrapper of the TargetMachine to be a structure that includes the DataLayout as well. However the TargetMachine is also wrapped by the ExecutionEngine, in the more classic way. A client using the TargetMachine wrapped by the ExecutionEngine and trying to get the DataLayout would break. It seems tricky to solve the problem completely in the C API implementation. This patch tries to address this backward compatibility in a more lighter way in the C++ API. The C API is restored in its original state and the removed C++ API is reintroduced, but privately. The C API is friended to the TargetMachine and should be the only consumer for this API. Reviewers: ributzka Differential Revision: http://reviews.llvm.org/D12263 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 246052
* AMDGPU: Make sure to reserve super registersMatt Arsenault2015-08-262-16/+18
| | | | | | | | I think this could potentially have broken if one of the super registers were allocated that contain v254/v255. llvm-svn: 246051
* Revert "Fix LLVM C API for DataLayout"Mehdi Amini2015-08-262-21/+22
| | | | | | | | This reverts commit r246044. Build broken, still. It builds for me... From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 246049
* AMDGPU: Produce error on dynamic_stackallocMatt Arsenault2015-08-264-0/+30
| | | | llvm-svn: 246048
* [CMake] Add OBJECT_LIBS option to add_compiler_rt_runtime, and refactored ↵Chris Bieneman2015-08-263-50/+59
| | | | | | | | | | | | | | asan call site to use it. Summary: This is one more step to allow us to eliminate platform-specific code from the library CMakeLists files. Subsequent patches will refactor all call sites to use this and other new features. Reviewers: filcab, bogner, kubabrecka, zaks.anna, glider, samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12339 llvm-svn: 246047
* [SimplifyLibCalls] Fix a typoDavid Majnemer2015-08-261-1/+1
| | | | | | | cbrt(sqrt(x)) calculates the sixth root, not the ninth root. cbrt(cbrt(x)) calculates the ninth root. llvm-svn: 246046
* Error checking correction in AArch64 hardware watchpoint codeOmair Javaid2015-08-261-13/+68
| | | | | | Differential Revision: http://reviews.llvm.org/D12328 llvm-svn: 246045
* Fix LLVM C API for DataLayoutMehdi Amini2015-08-262-22/+21
| | | | | | | | | | | | | | | | | | | | | | | | | We removed access to the DataLayout on the TargetMachine and deprecated the C API function LLVMGetTargetMachineData() in r243114. However the way I tried to be backward compatible was broken: I changed the wrapper of the TargetMachine to be a structure that includes the DataLayout as well. However the TargetMachine is also wrapped by the ExecutionEngine, in the more classic way. A client using the TargetMachine wrapped by the ExecutionEngine and trying to get the DataLayout would break. It seems tricky to solve the problem completely in the C API implementation. This patch tries to address this backward compatibility in a more lighter way in the C++ API. The C API is restored in its original state and the removed C++ API is reintroduced, but privately. The C API is friended to the TargetMachine and should be the only consumer for this API. Reviewers: ributzka Differential Revision: http://reviews.llvm.org/D12263 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 246044
* Skip test which is causing ERRORs in dotest.py after r237053Dawn Perchik2015-08-261-0/+1
| | | | | | | | | | | | This test runs fine on its own, but leaves python in a bad state to where all tests that run after it error out. See llvm.org/pr24575. This resolves the concerns raised in http://reviews.llvm.org/rL237053. Reviewed by: clayborg, ted Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12329 llvm-svn: 246043
* [SPARC] Fix stupid oversight in stack realignment support.James Y Knight2015-08-264-3/+38
| | | | | | | | | | | | | | | | | | | | If you're going to realign %sp to get object alignment properly (which the code does), and stack offsets and alignments are calculated going down from %fp (which they are), then the total stack size had better be a multiple of the alignment. LLVM did indeed ensure that. And then, after aligning, the sparc frame code added 96 (for sparcv8) to the frame size, making any requested alignment of 64-bytes or higher *guaranteed* to be misaligned. The test case added with r245668 even tests this exact scenario, and asserted the incorrect behavior, which I somehow failed to notice. D'oh. This change fixes the frame lowering code to align the stack size *after* adding the spill area, instead. Differential Revision: http://reviews.llvm.org/D12349 llvm-svn: 246042
* [docs][Statepoint] Add definitions for base and derived pointersPhilip Reames2015-08-261-0/+17
| | | | | | This section will be expanded over the next few days. This is just some initial content. llvm-svn: 246041
* Change Native Client x86 usr include and link path to match SDK expectationsDerek Schuff2015-08-262-7/+16
| | | | | | | | | | | | GNU multilib style uses x86_64-nacl/include and x86_64-nacl/usr/include but the SDK expects i686-nacl/usr/include for its files. Change the driver to use this. Fixes https://code.google.com/p/nativeclient/issues/detail?id=4108 Differential Revision: http://reviews.llvm.org/D11271 llvm-svn: 246040
* Fix another LoopConvert fail.Angel Garcia Gomez2015-08-262-3/+15
| | | | | | | | | | | | Summary: Prevent LoopConvert from taking as alias anything that comes from a random member function call. Reviewers: alexfh Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D12370 llvm-svn: 246039
* [llvm-mc] Ignore opcode size prefix in 64-bit CALL disassemblyVedant Kumar2015-08-262-0/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a fix for disassembling unusual instruction sequences in 64-bit mode w.r.t the CALL rel16 instruction. It might be desirable to move the check somewhere else, but it essentially mimics the special case handling with JCXZ in 16-bit mode. The current behavior accepts the opcode size prefix and causes the call's immediate to stop disassembling after 2 bytes. When debugging sequences of instructions with this pattern, the disassembler output becomes extremely unreliable and essentially useless (if you jump midway into what lldb thinks is a unified instruction, you'll lose %rip). So we ignore the prefix and consume all 4 bytes when disassembling a 64-bit mode binary. Note: in Vol. 2A 3-99 the Intel spec states that CALL rel16 is N.S. N.S. is defined as: Indicates an instruction syntax that requires an address override prefix in 64-bit mode and is not supported. Using an address override prefix in 64-bit mode may result in model-specific execution behavior. (Vol. 2A 3-7) Since 0x66 is an operand override prefix we should be OK (although we may want to warn about 0x67 prefixes to 0xe8). On the CPUs I tested with, they all ignore the 0x66 prefix in 64-bit mode. Patch by Matthew Barney! Differential Revision: http://reviews.llvm.org/D9573 llvm-svn: 246038
* [ASTMatchers] Add type matcher for SubstTemplateTypeParmType.Samuel Benzaquen2015-08-263-0/+27
| | | | llvm-svn: 246037
* LoopConvert no longer take as alias references to other containers.Angel Garcia Gomez2015-08-262-1/+11
| | | | | | | | | | | | Summary: Fix a bug where modernize-loop-convert check would take as alias a reference to other containers. Add the pertinent test. Reviewers: alexfh Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D12361 llvm-svn: 246034
* [AArch64] Remove a use-after-free when collecting stats.Chad Rosier2015-08-261-4/+4
| | | | | | | The call to mergePairedInsns() deletes MI, so the later use by isUnscaledLdSt() is referencing freed memory. llvm-svn: 246033
* COFF: Print out module-definition files if /verbose is given.Rui Ueyama2015-08-261-7/+10
| | | | | | This is useful for testing. llvm-svn: 246032
* [llvm-objdump] Use the new MinVersion API introduced in r245938. NFC.Davide Italiano2015-08-261-8/+12
| | | | llvm-svn: 246031
* [AArch64] Unify the integer min/max vector selection patterns with the ↵Silviu Baranga2015-08-262-52/+16
| | | | | | | | | | | | | | | | | | | | intrinsic ones Summary: This change lowers the aarch64 integer vector min/max intrinsic nodes to generic min/max nodes and replaces the intrinsic selection patterns with the generic ones. There should already be testing in place for this, so no further tests were added. Reviewers: jmolloy Subscribers: aemerson, llvm-commits, rengolin Differential Revision: http://reviews.llvm.org/D12276 llvm-svn: 246030
* [SROA] Rip out all support for SSAUpdater in SROA.Chandler Carruth2015-08-265-202/+9
| | | | | | | | | | | | | This was only added to preserve the old ScalarRepl's use of SSAUpdater which was originally to avoid use of dominance frontiers. Now, we only need a domtree, and we'll need a domtree right after this pass as well and so it makes perfect sense to always and only use the dom-tree powered mem2reg. This was flag-flipper earlier and has stuck reasonably so I wanted to gut the now-dead code out of SROA before we waste more time with it. Among other things, this will make passmanager porting easier. llvm-svn: 246028
* Convert a bunch of loops to ranged-for and clean up accordingly.Eric Christopher2015-08-261-170/+69
| | | | llvm-svn: 246027
* Make FileManager::getFileSystemOptions consistent with ↵Yaron Keren2015-08-262-3/+4
| | | | | | | | | | CompilerInstance::getFileSystemOpts and CompilerInvocation::getFileSystemOpts by renaming it to getFileSystemOpts, marking the const-returning access method const and adding a non-const version, making the function prototypes identical to CompilerInstance::getFileSystemOpts. llvm-svn: 246026
* Kaleidoscope: Update libdeps corresponding to r246002.NAKAMURA Takumi2015-08-265-0/+5
| | | | llvm-svn: 246025
* Group some of the inline assembly related function prototypes nearEric Christopher2015-08-261-6/+7
| | | | | | each other. llvm-svn: 246024
* COFF: Show real command line options if /verbose is given.Rui Ueyama2015-08-261-0/+9
| | | | llvm-svn: 246023
* Remove XFAIL in test. The bug causing it has been fixed.Eric Fiselier2015-08-261-5/+0
| | | | llvm-svn: 246022
OpenPOWER on IntegriCloud