summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add optimization bisect opt-in calls for PowerPC passesAndrew Kaylor2016-04-279-3/+28
| | | | | | Differential Revision: http://reviews.llvm.org/D19554 llvm-svn: 267769
* Added a testcase for the IR interpreter, ensuring that it behaves like the JIT.Sean Callanan2016-04-273-0/+84
| | | | | | <rdar://problem/25785338> llvm-svn: 267768
* [CodeGenPrepare] Don't sink a cast past its userDavid Majnemer2016-04-272-0/+37
| | | | | | | | | | The sink cast machinery is supposed to sink casts as close to their user as possible. However, an EH pad is the first instruction in it's basic block. Don't sink if the user is an EH pad. This fixes PR27536. llvm-svn: 267767
* Refactor debugging code, NFC.Than McIntosh2016-04-271-31/+30
| | | | | | | | | | | | | | | | | Summary: Refactor debugging routines to reduce code duplication. Remove a couple of #include's that were not needed. Don't require MachineDominator as a prereq for this pass (not needed). These changes split off from http://reviews.llvm.org/D18827. Reviewers: wmi, gbiv, qcolombet Subscribers: llvm-commits, davidxl, jevinskie Differential Revision: http://reviews.llvm.org/D18992 llvm-svn: 267766
* [NVPTX] Run NVVMReflect at the beginning of IR passes.Justin Lebar2016-04-272-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently the NVVMReflect pass is run at the beginning of our backend passes. But really, it should be run as early as possible, as it's simply resolving an "if" statement in code. So copy it into TargetMachine::addEarlyAsPossiblePasses. We still run it at the beginning of the backend passes, since it's needed for correctness when lowering to nvptx. (Specifically, NVVMReflect changes each call to the __nvvm_reflect function or llvm.nvvm.reflect intrinsic into an integer constant, based on the pass's configuration. Clearly we miss many optimization opportunities if we perform this transformation at the beginning of codegen.) Reviewers: rnk Subscribers: tra, llvm-commits, jholewinski Differential Revision: http://reviews.llvm.org/D18616 llvm-svn: 267765
* Call TargetMachine::addEarlyAsPossiblePasses from BackendUtil.Justin Lebar2016-04-271-0/+8
| | | | | | | | | | | | | | | Summary: As of D18614, TargetMachine exposes a hook to add a set of passes that should be run as early as possible. Invoke this hook from clang when setting up the pass manager. Reviewers: chandlerc Subscribers: rnk, cfe-commits, tra Differential Revision: http://reviews.llvm.org/D18617 llvm-svn: 267764
* Add TargetMachine::addEarlyAsPossiblePasses, and call it from opt.Justin Lebar2016-04-272-11/+25
| | | | | | | | | | | | | | Summary: This is a hook to allow TargetMachine to install passes at the EP_EarlyAsPossible PassManagerBuilder extension point. Reviewers: chandlerc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D18614 llvm-svn: 267763
* [LIR] Set attributes on memset_pattern16.Ahmed Bougacha2016-04-272-0/+6
| | | | | | | | | "inferattrs" will deduce the attribute, but it will be too late for many optimizations. Set it ourselves when creating the call. Differential Revision: http://reviews.llvm.org/D17598 llvm-svn: 267762
* [LIR] Reuse variable. NFCI.Ahmed Bougacha2016-04-271-1/+1
| | | | llvm-svn: 267761
* [InferAttrs] Mark memset_pattern16 params nocapture.Ahmed Bougacha2016-04-272-1/+3
| | | | | | Differential Revision: http://reviews.llvm.org/D19471 llvm-svn: 267760
* [TLI] Unify LibFunc attribute inference. NFCI.Ahmed Bougacha2016-04-273-795/+730
| | | | | | | | | | | | | Now the pass is just a tiny wrapper around the util. This lets us reuse the logic elsewhere (done here for BuildLibCalls) instead of duplicating it. The next step is to have something like getOrInsertLibFunc that also sets the attributes. Differential Revision: http://reviews.llvm.org/D19470 llvm-svn: 267759
* [TLI] Unify LibFunc signature checking. NFCI.Ahmed Bougacha2016-04-278-711/+599
| | | | | | | | | I tried to be as close as possible to the strongest check that existed before; cleaning these up properly is left for future work. Differential Revision: http://reviews.llvm.org/D19469 llvm-svn: 267758
* [TLI] Fix indentation. NFC.Ahmed Bougacha2016-04-271-1/+1
| | | | llvm-svn: 267757
* [CMake] On Darwin bootstrap LTO builds set DYLD_LIBRARY_PATH instead of ↵Chris Bieneman2016-04-271-8/+13
| | | | | | | | | | using llvm-ar llvm-ar isn't really supported for Darwin, instead the host tools will load libLTO, so we can use the just-built libLTO. This actually makes Darwin bootstrap builds a little faster because you don't need to build llvm-ar before starting the next stage. llvm-svn: 267756
* Fix a bunch of sign-compare warningsDavid Blaikie2016-04-271-4/+4
| | | | llvm-svn: 267754
* Clean up to avoid compiler warnings for casting away const qualifiers.Sjoerd Meijer2016-04-272-4/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D19598 llvm-svn: 267753
* Revert "[AMDGPU][llvm-mc] Add support of TTMP quads. Rework M0 exclusion for ↵Chad Rosier2016-04-279-146/+13
| | | | | | | | SMRD." This reverts commit r267733 due to a -Werror,-Wunused-function error. llvm-svn: 267752
* [LV] Reallow positive-stride interleaved load groups with gapsMatthew Simpson2016-04-272-15/+146
| | | | | | | | | | | | | | We previously disallowed interleaved load groups that may cause us to speculatively access memory out-of-bounds (r261331). We did this by ensuring each load group had an access corresponding to the first and last member. Instead of bailing out for these interleaved groups, this patch enables us to peel off the last vector iteration, ensuring that we execute at least one iteration of the scalar remainder loop. This solution was proposed in the review of the previous patch. Differential Revision: http://reviews.llvm.org/D19487 llvm-svn: 267751
* [sanitizers] read/write page fault detection on mac.Mike Aizatsky2016-04-272-1/+32
| | | | | | | | | | Summary: Resubmit of http://reviews.llvm.org/D19495 enabled only on intel. Subscribers: kubabrecka Differential Revision: http://reviews.llvm.org/D19561 llvm-svn: 267750
* Renamed system plugin directory to address https://bugs.swift.org/browse/SR-1093Kate Stone2016-04-271-1/+1
| | | | llvm-svn: 267749
* [SLPVectorizer] Refactor where MinVecRegSize and MaxVecRegSize live.Arch D. Robison2016-04-271-20/+28
| | | | | | | | | This is the first of two commits for extending SLP Vectorizer to deal with aggregates. This commit merely refactors existing logic. http://reviews.llvm.org/D14185 llvm-svn: 267748
* [sanitizer] [SystemZ] Abort if the kernel might be vulnerable to CVE-2016-2143.Marcin Koscielnicki2016-04-277-0/+84
| | | | | | | | | | | | | | | | | | In short, CVE-2016-2143 will crash the machine if a process uses both >4TB virtual addresses and fork(). ASan, TSan, and MSan will, by necessity, map a sizable chunk of virtual address space, which is much larger than 4TB. Even worse, sanitizers will always use fork() for llvm-symbolizer when a bug is detected. Disable all three by aborting on process initialization if the running kernel version is not known to contain a fix. Unfortunately, there's no reliable way to detect the fix without crashing the kernel. So, we rely on whitelisting - I've included a list of upstream kernel versions that will work. In case someone uses a distribution kernel or applied the fix themselves, an override switch is also included. Differential Revision: http://reviews.llvm.org/D19576 llvm-svn: 267747
* PR21823: 'nodebug' attribute on global/static variables.Paul Robinson2016-04-274-1/+71
| | | | | | | | | | Make 'nodebug' on a global/static variable suppress all debug info for the variable. Previously it would only suppress info for the associated initializer function, if any. Differential Revision: http://reviews.llvm.org/D19567 llvm-svn: 267746
* [DAGCombiner] Follow coding convention for function name (NFC)Gerolf Hoflehner2016-04-274-5/+5
| | | | llvm-svn: 267745
* Revert r267691, it caused PR27535.Nico Weber2016-04-2711-128/+41
| | | | llvm-svn: 267744
* [Mips] Add support for llvm.thread.pointer intrinsic.Marcin Koscielnicki2016-04-272-0/+16
| | | | | | | | This will be used to implement __builtin_thread_pointer in clang. Differential Revision: http://reviews.llvm.org/D19569 llvm-svn: 267743
* [InstCombine] Sharpended test case in pr21210.llGerolf Hoflehner2016-04-271-3/+4
| | | | llvm-svn: 267742
* Use absolute module path when possible if sent in svr4 packetsFrancis Ricci2016-04-271-8/+1
| | | | | | | | | | | | | | | | | | | | | Summary: If the remote uses svr4 packets to communicate library info, the LoadUnload tests will fail, as lldb only used the basename for modules, causing problems when two modules have the same basename. Using absolute path as sent by the remote will ensure that lldb locates the module from the correct directory when there are overlapping basenames. When debugging a remote process, LoadModuleAtAddress will still fall back to using basename and module_search_paths, so we don't need to worry about using absolute paths in this case. Reviewers: ADodds, jasonmolenda, clayborg, ovyalov Subscribers: lldb-commits, sas Differential Revision: http://reviews.llvm.org/D19557 llvm-svn: 267741
* Module debugging: Fix the DWO filename for PCH in a relative path.Adrian Prantl2016-04-272-2/+79
| | | | | | | | | | | PCH in a relative location had a redundant relative path on the DWO filename and the DW_AT_compilation_dir. This patch fixes this and adds testcases for PCH in the same directory, in a relative, and an absolute location. rdar://problem/25537947 llvm-svn: 267740
* [find-all-symbols] Also update unittest dependencies.Benjamin Kramer2016-04-271-0/+2
| | | | llvm-svn: 267739
* [find-all-symbols] Clean up dependencies, fixing cmake shared build.Benjamin Kramer2016-04-271-2/+1
| | | | llvm-svn: 267738
* Silence a -Wdangling-elseReid Kleckner2016-04-271-1/+2
| | | | llvm-svn: 267737
* Fix explain-check failure test on Windows.Haojian Wu2016-04-271-1/+1
| | | | llvm-svn: 267736
* Un-XFAIL tests on Windows after fixing PR27492Reid Kleckner2016-04-272-5/+1
| | | | | | | Private symbols in PDBs do not have parameter types in their names so we have to drop the parens from the lambda call operator. llvm-svn: 267735
* Add parentheses to silence buildbot warningMatthew Simpson2016-04-271-2/+2
| | | | llvm-svn: 267734
* [AMDGPU][llvm-mc] Add support of TTMP quads. Rework M0 exclusion for SMRD.Artem Tamazov2016-04-279-13/+146
| | | | | | | | | | | Added support of TTMP quads. Reworked M0 exclusion machinery for SMRD and similar instructions to enable usage of TTMP registers in those instructions as destinations. Tests added. Differential Revision: http://reviews.llvm.org/D19342 llvm-svn: 267733
* [PDB] Fix function names for private symbols in PDBsReid Kleckner2016-04-275-28/+34
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: llvm-symbolizer wants to get linkage names of functions for historical reasons. Linkage names are only recorded in the PDB for public symbols, and the linkage name is apparently stored separately in some "public symbol" record. We had a workaround in PDBContext which would look for such symbols when the user requested linkage names. However, when given an address that was truly in a private function and public funciton, we would accidentally find nearby public symbols and return those function names. The fix is to look for both function symbols and public symbols and only prefer the public symbol name if the addresses of the symbols agree. Fixes PR27492 Reviewers: zturner Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D19571 llvm-svn: 267732
* Don't search compilation database in explain-check, fixing buildbot testHaojian Wu2016-04-271-1/+1
| | | | | | failure. llvm-svn: 267731
* tsan: fix windows supportDmitry Vyukov2016-04-271-11/+9
| | | | | | | | | | | | | | UnmapOrDie used to do MEM_DECOMMIT and so worked on partial regions. But r263160 changed it to use MEM_RELEASE and MEM_RELEASE can only work with whole regions mapped by VirtualAlloc. This broke windows as: FATAL: ThreadSanitizer CHECK failed: gotsan.cc:8296 "((mbi.AllocationBase == addr && "Windows cannot unmap part of a previous mapping")) != (0)" (0x0, 0x0) Restore the previous behavior. llvm-svn: 267730
* AMDGPU/SI: Add llvm.amdgcn.s.waitcnt.all intrinsicNicolai Haehnle2016-04-274-14/+118
| | | | | | | | | | | | | | | | | Summary: So it appears that to guarantee some of the ordering requirements of a GLSL memoryBarrier() executed in the shader, we need to emit an s_waitcnt. (We can't use an s_barrier, because memoryBarrier() may appear anywhere in the shader, in particular it may appear in non-uniform control flow.) Reviewers: arsenm, mareko, tstellarAMD Subscribers: arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D19203 llvm-svn: 267729
* [Clang][Builtin][AVX512] Adding intrisnics for the vpconflict{q|d} ↵Michael Zuckerman2016-04-273-0/+174
| | | | | | | | instruction set Differential Revision: http://reviews.llvm.org/D19525 llvm-svn: 267728
* Decorate TSan tests with "@skipUnlessThreadSanitizer" which skips the tests ↵Kuba Brecka2016-04-275-0/+22
| | | | | | if the selected compiler can't compile with "-fsanitize=thread". llvm-svn: 267726
* [TTI] Add hook for vector extract with extensionMatthew Simpson2016-04-278-22/+108
| | | | | | | | | | | | | | | This change adds a new hook for estimating the cost of vector extracts followed by zero- and sign-extensions. The motivating example for this change is the SMOV and UMOV instructions on AArch64. These instructions move data from vector to general purpose registers while performing the corresponding extension (sign-extend for SMOV and zero-extend for UMOV) at the same time. For these operations, TargetTransformInfo can assume the extensions are free and only report the cost of the vector extract. The SLP vectorizer has been updated to make use of the new hook. Differential Revision: http://reviews.llvm.org/D18523 llvm-svn: 267725
* [AMDGPU][llvm-mc] s_getreg/setreg* - Support symbolic names of hardware ↵Artem Tamazov2016-04-276-36/+102
| | | | | | | | | | | | registers. Possibility to specify code of hardware register kept. Disassemble to symbolic name, if name is known. Tests updated/added. Differential Revision: http://reviews.llvm.org/D19335 llvm-svn: 267724
* Revert r267649, it caused PR27539.Nico Weber2016-04-273-1120/+7
| | | | llvm-svn: 267723
* Remove size 1 from check as that isn't part of what the test is meant to be ↵Kristof Beyls2016-04-271-1/+1
| | | | | | | | | | | | | testing. This test also runs on e.g. ARM-native builds when the X86 backend is also built. This test produces code for the default instruction set, even though it is in a "X86" sub-directory. Given that this test doesn't seem to be testing anything architecture-specific, it seems it's best to adapt the check to not check for an architecture-dependent value (the size of the function), rather than hard-code the test to target x86. llvm-svn: 267722
* Add missing dependency.Benjamin Kramer2016-04-271-1/+2
| | | | llvm-svn: 267721
* tsan: fix darwin Go supportDmitry Vyukov2016-04-271-2/+2
| | | | | | | | os_trace turns out to be a macro that creates static object. Function-static objects use __cxa_atexit and __dso_handle which are not present in Go runtime. llvm-svn: 267720
* [include-fixer] Add a find-all-symbols tool for include-fixer.Haojian Wu2016-04-2712-0/+1135
| | | | | | | | | | | | | | | | Summary: The find-all-symbols tool generates a yaml symbol database for include-fixer. The symbol matcher is originally written by Xiaoyi Liu. Reviewers: bkramer, djasper Subscribers: cfe-commits, klimek, ioeric Differential Revision: http://reviews.llvm.org/D19482 llvm-svn: 267719
* Clean up the include fixer 'driver' a bit and make the database configurable.Benjamin Kramer2016-04-272-16/+60
| | | | | | | Also add a test for it. The library is covered by unit tests, the driver was not. llvm-svn: 267718
OpenPOWER on IntegriCloud