summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Reapply: [asan] On OS X, log reports to syslog and os_trace"Juergen Ributzka2015-11-0414-178/+46
| | | | | | | Looks like this commit is deadlocking the ASAN tests on the green dragon bot (http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA/). llvm-svn: 252076
* llvm-config: Add --has-rtti optionTom Stellard2015-11-045-0/+15
| | | | | | | | | | | | | | | | | | | | | | Summary: This prints NO if LLVM was built with -fno-rtti or an equivalent flag and YES otherwise. The reasons to add -has-rtti rather than adding -fno-rtti to --cxxflags are: 1. Building LLVM with -fno-rtti does not always mean that client applications need this flag. 2. Some compilers have a different flag for disabling rtti, and the compiler being used to build LLVM may not be the compiler being used to build the application. Reviewers: echristo, chandlerc, beanz Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11849 llvm-svn: 252075
* [X86][SSE] Add general memory folding for (V)INSERTPS instructionSimon Pilgrim2015-11-048-71/+141
| | | | | | | | | | | | | | | | This patch improves the memory folding of the inserted float element for the (V)INSERTPS instruction. The existing implementation occurs in the DAGCombiner and relies on the narrowing of a whole vector load into a scalar load (and then converted into a vector) to (hopefully) allow folding to occur later on. Not only has this proven problematic for debug builds, it also prevents other memory folds (notably stack reloads) from happening. This patch removes the old implementation and moves the folding code to the X86 foldMemoryOperand handler. A new private 'special case' function - foldMemoryOperandCustom - has been added to deal with memory folding of instructions that can't just use the lookup tables - (V)INSERTPS is the first of several that could be done. It also tweaks the memory operand folding code with an additional pointer offset that allows existing memory addresses to be modified, in this case to convert the vector address to the explicit address of the scalar element that will be inserted. Unlike the previous implementation we now set the insertion source index to zero, although this is ignored for the (V)INSERTPSrm version, anything that relied on shuffle decodes (such as unfolding of insertps loads) was incorrectly calculating the source address - I've added a test for this at insertps-unfold-load-bug.ll Differential Revision: http://reviews.llvm.org/D13988 llvm-svn: 252074
* [IR] Add bounds checking to paramHasAttrSanjoy Das2015-11-042-4/+10
| | | | | | | | | | | | | | | | | Summary: This is intended to make a later change simpler. Note: adding this bounds checking required fixing `X86FastISel`. As far I can tell I've preserved original behavior but a careful review will be appreciated. Reviewers: reames Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14304 llvm-svn: 252073
* Add "zero_memory" option to IRMemoryMap::FindSpace & IRMemoryMap::Malloc. ↵Jim Ingham2015-11-047-15/+99
| | | | | | | | Zero out the Expression ResultVariable so it's in a known initial state. llvm-svn: 252072
* Asan: utility function to determine first wrongly poisoned byte inMike Aizatsky2015-11-044-12/+36
| | | | | | | | container. Differential Revision: http://reviews.llvm.org/D14341 llvm-svn: 252071
* Orc: Streamline some lambda usage in a unit testDavid Blaikie2015-11-041-9/+5
| | | | llvm-svn: 252070
* Fixed a link.Alexander Kornienko2015-11-041-1/+1
| | | | llvm-svn: 252069
* Fixed header levels.Alexander Kornienko2015-11-041-2/+2
| | | | llvm-svn: 252068
* Revert r252001 as it brake TestCppIncompleteTypes on all platformsTamas Berghammer2015-11-041-17/+0
| | | | llvm-svn: 252067
* Removed mentions of clang-modernize, added a short description of clang-tidy.Alexander Kornienko2015-11-041-33/+9
| | | | llvm-svn: 252066
* Fix TestMemoryRead after r252035Tamas Berghammer2015-11-041-1/+1
| | | | llvm-svn: 252065
* [modules] Generalize the workaround for multiple ambiguous definitions ofRichard Smith2015-11-047-33/+87
| | | | | | | | | | | | | internal linkage entities in different modules from r250884 to apply to all names, not just function names. This is really awkward: we don't want to merge internal-linkage symbols from separate modules, because they might not actually be defining the same entity. But we don't want to reject programs that use such an ambiguous symbol if those internal-linkage symbols are in fact equivalent. For now, we're resolving the ambiguity by picking one of the equivalent definitions as an extension. llvm-svn: 252063
* Relax the check for ninja.Rafael Espindola2015-11-041-2/+2
| | | | | | On fedora the ninja executable is called ninja-build :-( llvm-svn: 252062
* [Concepts] Add diagnostics which fall under [dcl.spec.concept]p1Nathan Wilson2015-11-042-0/+7
| | | | | | | | | | | | Summary: Diagnose when the 'concept' specifier is used on a typedef or function parameter. Reviewers: rsmith, hubert.reinterpretcast, aaron.ballman, faisalv Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D14316 llvm-svn: 252061
* Created new X86 FMA3 opcodes (FMA*_Int) that are used now for lowering of ↵Andrew Kaylor2015-11-044-286/+1057
| | | | | | | | | | | | | | scalar FMA intrinsics. Patch by Slava Klochkov The key difference between FMA* and FMA*_Int opcodes is that FMA*_Int opcodes are handled more conservatively. It is illegal to commute the 1st operand of FMA*_Int instructions as the upper bits of scalar FMA intrinsic result must be taken from the 1st operand, but such commute transformation would change those upper bits and invalidate the intrinsic's result. Reviewers: Quentin Colombet, Elena Demikhovsky Differential Revision: http://reviews.llvm.org/D13710 llvm-svn: 252060
* OS X: fix the Xcode debugserver lookup code when LLDB.framework does not ↵Todd Fiala2015-11-041-2/+12
| | | | | | | | | | | | | contain a debugserver LLDB recently started supporting LLDB.framework without a debugserver in it. When that happens, the Xcode-included debugserver is searched for and used. This change fixes the code that looks for Xcode when the housing process is not Xcode. In particular, this addresses the problem where python is running the test suite and the LLDB.framework does not contain a debugserver. llvm-svn: 252059
* Fix test infrastructure when using xunit output.Todd Fiala2015-11-041-2/+2
| | | | | | Our test reporting infrastructure needed module names to change based on the python package layout. llvm-svn: 252058
* [ARM] Combine CMOV into BFI where possibleJames Molloy2015-11-043-0/+129
| | | | | | | | | | | | | | If we have a CMOV, OR and AND combination such as: if (x & CN) y |= CM; And: * CN is a single bit; * All bits covered by CM are known zero in y; Then we can convert this to a sequence of BFI instructions. This will always be a win if CM is a single bit, will always be no worse than the TST & OR sequence if CM is two bits, and for thumb will be no worse if CM is three bits (due to the extra IT instruction). llvm-svn: 252057
* clang-cl: Parse the /guard:cf[-] flag (PR25400)Hans Wennborg2015-11-042-0/+3
| | | | llvm-svn: 252056
* Improving the diagnostic for cases where the attribute only appertains to a ↵Aaron Ballman2015-11-045-9/+12
| | | | | | function with a prototype. llvm-svn: 252055
* [ThinLTO] Always set linkage type to external when converting aliasTeresa Johnson2015-11-042-2/+15
| | | | | | | | When converting an alias to a non-alias when the aliasee is not imported, ensure that the linkage type is set to external so that it is a valid linkage type. Added a test case that exposed this issue. llvm-svn: 252054
* Whitespace fixup for r252052. NFC.Kuba Brecka2015-11-041-1/+2
| | | | llvm-svn: 252053
* [tsan] Use malloc zone interceptors on OS X, part 1 (refactoring)Kuba Brecka2015-11-043-344/+388
| | | | | | | | TSan needs to use a custom malloc zone on OS X, which is already implemented in ASan. This patch is a refactoring patch (NFC) that extracts this from ASan into sanitizer_common, where we can reuse it in TSan. Reviewed at http://reviews.llvm.org/D14330 llvm-svn: 252052
* [SimplifyCFG] Merge conditional storesJames Molloy2015-11-043-4/+554
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can often end up with conditional stores that cannot be speculated. They can come from fairly simple, idiomatic code: if (c & flag1) *a = x; if (c & flag2) *a = y; ... There is no dominating or post-dominating store to a, so it is not legal to move the store unconditionally to the end of the sequence and cache the intermediate result in a register, as we would like to. It is, however, legal to merge the stores together and do the store once: tmp = undef; if (c & flag1) tmp = x; if (c & flag2) tmp = y; if (c & flag1 || c & flag2) *a = tmp; The real power in this optimization is that it allows arbitrary length ladders such as these to be completely and trivially if-converted. The typical code I'd expect this to trigger on often uses binary-AND with constants as the condition (as in the above example), which means the ending condition can simply be truncated into a single binary-AND too: 'if (c & (flag1|flag2))'. As in the general case there are bitwise operators here, the ladder can often be optimized further too. This optimization involves potentially increasing register pressure. Even in the simplest case, the lifetime of the first predicate is extended. This can be elided in some cases such as using binary-AND on constants, but not in the general case. Threading 'tmp' through all branches can also increase register pressure. The optimization as in this patch is enabled by default but kept in a very conservative mode. It will only optimize if it thinks the resultant code should be if-convertable, and additionally if it can thread 'tmp' through at least one existing PHI, so it will only ever in the worst case create one more PHI and extend the lifetime of a predicate. This doesn't trigger much in LNT, unfortunately, but it does trigger in a big way in a third party test suite. llvm-svn: 252051
* Allow compound assignment expressions to be contracted when licensed by the ↵Stephen Canon2015-11-041-1/+1
| | | | | | language or pragma. llvm-svn: 252050
* [tsan] Handle libdispatch worker threads on OS XKuba Brecka2015-11-046-13/+63
| | | | | | | | On OS X, GCD worker threads are created without a call to pthread_create. We need to properly register these threads with ThreadCreate and ThreadStart. This patch uses a libpthread API (`pthread_introspection_hook_install`) to get notifications about new threads and about threads that are about to be destroyed. Differential Revision: http://reviews.llvm.org/D14328 llvm-svn: 252049
* Error out when faced with value names containing '\0'Filipe Cabecinhas2015-11-043-1/+9
| | | | | | Bug found with afl-fuzz. llvm-svn: 252048
* Silence "enumeral and non-enumeral type in conditional expression" warning; NFC.Aaron Ballman2015-11-041-1/+1
| | | | llvm-svn: 252047
* Silence an extra semicolon warning; NFC.Aaron Ballman2015-11-041-1/+1
| | | | llvm-svn: 252046
* Initialize member field.Erik Verbruggen2015-11-041-1/+1
| | | | llvm-svn: 252045
* [tsan] Shadow memory setup for OS XKuba Brecka2015-11-045-108/+136
| | | | | | | | Updating the shadow memory initialization in `tsan_platform_mac.cc` to also initialize the meta shadow and to mprotect the memory ranges that need to be avoided. Differential Revision: http://reviews.llvm.org/D14324 llvm-svn: 252044
* [ELF] elfiamcu triple should imply e_machine == EM_IAMCUMichael Kuperstein2015-11-047-5/+32
| | | | | | Differential Revision: http://reviews.llvm.org/D14109 llvm-svn: 252043
* [X86] DAGCombine should not introduce FILD in soft-float modeMichael Kuperstein2015-11-042-2/+17
| | | | | | | The x86 "sitofp i64 to double" dag combine, in 32-bit mode, lowers sitofp directly to X86ISD::FILD (or FILD_FLAG). This should not be done in soft-float mode. llvm-svn: 252042
* Improve modernize-make-unique matcher.Angel Garcia Gomez2015-11-042-3/+10
| | | | | | | | | | | | Summary: "std::unique_ptr<int>" is not the same type as "std::unique_ptr<int, std::default_delete<int>>", unless we insert a "hasCanonicalType" in the middle. Probably it also happens in other cases related to default template argument. Reviewers: klimek Subscribers: alexfh, cfe-commits Differential Revision: http://reviews.llvm.org/D14291 llvm-svn: 252041
* Revert "[PatternMatch] Switch to use ValueTracking::matchSelectPattern"James Molloy2015-11-041-24/+39
| | | | | | This was breaking the modules build and is being reverted while we reach consensus on the right way to solve this layering problem. This reverts commit r251785. llvm-svn: 252040
* Fix unit tests on Windows: handle env vars with non-ASCII chars.Pawel Bylica2015-11-041-38/+70
| | | | | | | | | | | | Summary: On Windows we have to take UTF16 encoded env vars and convert them to UTF8. This patch fixes CopyEnvironment helper function used by process unit tests. Reviewers: yaron.keren Subscribers: yaron.keren, llvm-commits Differential Revision: http://reviews.llvm.org/D14278 llvm-svn: 252039
* [OperandBundles] Refactor; NFCI.Sanjoy Das2015-11-041-4/+10
| | | | | | Extract out a helper function `operandBundleFromBundleOpInfo`. llvm-svn: 252038
* [OperandBundles] Refactor; NFCISanjoy Das2015-11-041-5/+16
| | | | | | | | Intended to make later changes simpler. Exposes `getBundleOperandsStartIndex` and `getBundleOperandsEndIndex`, and uses them for the computation in `getNumTotalBundleOperands`. llvm-svn: 252037
* [Sema] Implement __make_integer_seqDavid Majnemer2015-11-0423-4/+308
| | | | | | | | | | | | | | | | | | This new builtin template allows for incredibly fast instantiations of templates like std::integer_sequence. Performance numbers follow: My work station has 64 GB of ram + 20 Xeon Cores at 2.8 GHz. __make_integer_seq<std::integer_sequence, int, 90000> takes 0.25 seconds. std::make_integer_sequence<int, 90000> takes unbound time, it is still running. Clang is consuming gigabytes of memory. Differential Revision: http://reviews.llvm.org/D13786 llvm-svn: 252036
* Option letter o was already in use; use an uppercase E insteadEnrico Granata2015-11-041-1/+1
| | | | llvm-svn: 252035
* Fix Clang-tidy modernize-use-override warnings, other minor fixes.Eugene Zelenko2015-11-042-9/+10
| | | | | | Differential revision: http://reviews.llvm.org/D14310 llvm-svn: 252034
* [LVI] Update a comment to clarify what's actually happening and whyPhilip Reames2015-11-041-3/+22
| | | | llvm-svn: 252033
* [CVP] Fold return values if possiblePhilip Reames2015-11-042-1/+52
| | | | | | | | | | | | In my previous change to CVP (251606), I made CVP much more aggressive about trying to constant fold comparisons. This patch is a reversal in direction. Rather than being agressive about every compare, we restore the non-block local restriction for most, and then try hard for compares feeding returns. The motivation for this is two fold: * The more I thought about it, the less comfortable I got with the possible compile time impact of the other approach. There have been no reported issues, but after talking to a couple of folks, I've come to the conclusion the time probably isn't justified. * It turns out we need to know the context to leverage the full power of LVI. In particular, asking about something at the end of it's block (the use of a compare in a return) will frequently get more precise results than something in the middle of a block. This is an implementation detail, but it's also hard to get around since mid-block queries have to reason about possible throwing instructions and don't get to use most of LVI's block focused infrastructure. This will become particular important when combined with http://reviews.llvm.org/D14263. Differential Revision: http://reviews.llvm.org/D14271 llvm-svn: 252032
* Add a few useful methods to ThreadSafeDense{Map,Set}. Not used yet.Jim Ingham2015-11-042-1/+28
| | | | llvm-svn: 252031
* Revert "Python 3 - Don't add the _d suffix to the symlink on Windows."Zachary Turner2015-11-044-30/+2
| | | | | | | | | | | | This reverts commit e59c95ca936f5a0a8abb987b8605fd8bf82b03b6. This was a mistake on my part. The real problem was with my environment. I was using a release interpreter to try to load my debug extension module. I noticed this after I finally managed to get into my extension module's init method, and then it segfaulted with heap errors due to mismatched CRT (debug vs. release) llvm-svn: 252030
* Fix a shadowed ivar in SearchFilterByModuleListAndCU.Jim Ingham2015-11-041-2/+1
| | | | llvm-svn: 252029
* [StatepointLowering] Remove distinction between call and invoke safepointsIgor Laevsky2015-11-043-24/+56
| | | | | | | | | | | | There is no point in having invoke safepoints handled differently than the call safepoints. All relevant decisions could be made by looking at whether or not gc.result and gc.relocate lay in a same basic block. This change will allow to lower call safepoints with relocates and results in a different basic blocks. See test case for example. Differential Revision: http://reviews.llvm.org/D14158 llvm-svn: 252028
* Fix the test case for Windows.Alexey Samsonov2015-11-041-1/+1
| | | | llvm-svn: 252027
* Python 3 - Don't add the _d suffix to the symlink on Windows.Zachary Turner2015-11-044-2/+30
| | | | | | | | | | | In Python 2, a debug extension module required an _d suffix, so for example the extension module `_lldb` would be backed by the file `_lldb_d.pyd` if built in debug mode, and `_lldb.pyd` if built in release mode. In Python 2, although undocumented, this seems to no longer be the case, and even for a debug extension module, the interpreter will only look for the `_lldb.pyd` name. llvm-svn: 252026
OpenPOWER on IntegriCloud