summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Hide SymbolBody::IsLocal.Rui Ueyama2017-10-134-7/+6
| | | | | | | IsLocal member is initialized by the constructor and will never change. So we don't want to make it directly accessible. llvm-svn: 315667
* Make a condition more explicit. NFC.Rui Ueyama2017-10-131-3/+5
| | | | llvm-svn: 315666
* [clang] Enable clang build with LLVM_BUILD_INSTRUMENTED without setting ↵Alexander Shaposhnikov2017-10-131-6/+6
| | | | | | | | | | | | | | | | | | LLVM_PROFTDATA At the moment if LLVM_BUILD_INSTRUMENTED is set to True one has to set LLVM_PROFTDATA even if it's not really used (because of message(FATAL_ERROR ...)). Building the instrumented version of Clang can be useful even if one doesn't plan to build the target generate-profdata (currently that target would only compile utils/perf-training/cxx/hello_world.cpp). For example, one can run the instrumented version of Clang via a separate build system against a different codebase, collect/analyze the profiles and merge them by llvm-profdata later. Differential revision: https://reviews.llvm.org/D38859 llvm-svn: 315665
* Add comment.Rui Ueyama2017-10-131-3/+11
| | | | llvm-svn: 315664
* Support for destroying operator delete, per C++2a proposal P0722.Richard Smith2017-10-1319-72/+574
| | | | | | | | | | This feature is not (yet) approved by the C++ committee, so this is liable to be reverted or significantly modified based on committee feedback. No functionality change intended for existing code (a new type must be defined in namespace std to take advantage of this feature). llvm-svn: 315662
* Recommit r315087 "[refactor] add support for refactoring options"Alex Lorenz2017-10-1311-28/+423
| | | | | | | | | | | | | | | | The recommit fixes a UB bug that occurred only on a small number of bots. Original message: This commit adds initial support for refactoring options. One can now use optional and required std::string options. This commit also adds a NewNameOption for the local-rename refactoring action to allow rename to work with custom names. Differential Revision: https://reviews.llvm.org/D37856 llvm-svn: 315661
* Simplify. NFCI.Rui Ueyama2017-10-131-26/+23
| | | | llvm-svn: 315659
* Slightly simplify code and add comment.Rui Ueyama2017-10-131-4/+22
| | | | | | | | | | | | This is not a mechanical transformation. Even though I believe this patch is correct, I'm not 100% sure if lld with this patch behaves exactly the same way as before on all edge cases. At least all tests still pass. I'm submitting this patch because it took almost a day to understand this function, and I don't want to lose it. llvm-svn: 315658
* [libFuzzer] tweam use_feature_frequency to be less aggressive; run a dummy ↵Kostya Serebryany2017-10-134-11/+26
| | | | | | input before the seed corpus llvm-svn: 315657
* [MS] Don't bail on replacing dllimport vbase dtors with base dtorsReid Kleckner2017-10-134-20/+66
| | | | | | | | | | | | | | | | | | | | | Fix PR32990 by effectively reverting r283063 and solving it a different way. We want to limit the hack to not replace equivalent available_externally dtors specifically to libc++, which uses always_inline. It seems certain versions of libc++ do not provide all the symbols that an explicit template instantiation is expected to provide. If we get to the code that forms a real alias, only *then* check if this is available_externally, and do that by asking a better question, which is "is this a declaration for the linker?", because *that's* what means we can't form an alias to it. As a follow-on simplification, remove the InEveryTU parameter. Its last use guarded this code for forming aliases, but we should never form aliases to declarations, regardless of what we know about every TU. llvm-svn: 315656
* [Analyzer] Assume that CFBooleanRef const globals are non-nullGeorge Karpenkov2017-10-134-20/+38
| | | | | | Differential Revision: https://reviews.llvm.org/D38867 llvm-svn: 315655
* Use existing helper. NFC.Rafael Espindola2017-10-131-2/+1
| | | | llvm-svn: 315654
* Simplify a boolean expression by the De Morgan's laws.Rui Ueyama2017-10-131-1/+1
| | | | | | | I don't really understand what exactly this expression means, but at least I can mechanically transform it. llvm-svn: 315653
* Typos in tutorialJan Korous2017-10-131-2/+2
| | | | llvm-svn: 315652
* docs: Improve the docs about llvm-isel-fuzzer on OSS FuzzJustin Bogner2017-10-131-4/+9
| | | | llvm-svn: 315651
* Convert a few cases of isUndefined to isInCurrentDSO.Rafael Espindola2017-10-131-3/+3
| | | | | | | I don't think there is an observable difference. We now just avoid doing silly things like setting versions in lazy symbols. llvm-svn: 315650
* [X86] Add the test case for r315613 that I forgot to 'git add'.Craig Topper2017-10-131-0/+13
| | | | llvm-svn: 315649
* [SelectionDAG] Correct the early out in SelectionDAG::getZeroExtendInReg to ↵Craig Topper2017-10-131-1/+1
| | | | | | | | work properly for vector types. I don't know if we ever hit this case or not. Turning it into an assert only fired on expanding some atomic operation in a SystemZ lit test. llvm-svn: 315648
* [llvm-isel-fuzzer] Use "--" as separator rather than '='.Matt Morehouse2017-10-135-17/+17
| | | | | | | | | | | | | | Summary: OSS-Fuzz doesn't support '=' in filenames. Reviewers: bogner, kcc Reviewed By: kcc Subscribers: javed.absar, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D38866 llvm-svn: 315647
* llvm-isel-fuzzer: Use the right REQUIRES line for r315599Justin Bogner2017-10-133-5/+2
| | | | | | | I'd mixed up ENABLE_SHARED and BUILD_SHARED_LIBS before, so these tests were being disabled in too many places. llvm-svn: 315646
* Correctly handle shared and lazy symbols.Rafael Espindola2017-10-133-1/+8
| | | | | | | I will try to make this API a bit less error prone, but for now just get another test passing. llvm-svn: 315645
* Removing default case statement from covered switch.Keith Wyss2017-10-131-8/+0
| | | | | | | | | | | Previous patch did not count on the llvm command line parser to restrict the inputs, but it is safe to do so. Fix forward for patch with details: -- https://reviews.llvm.org/D38650 and -- https://llvm.org/svn/llvm-project/llvm/trunk@315635 91177308-0d34-0410-b5e6-96231b3b80d8 llvm-svn: 315644
* Handle/assert on DK_RemarkAdam Nemet2017-10-121-0/+4
| | | | | | | We don't generate remarks during inline assembly parsing so no need to handle these for now. llvm-svn: 315643
* Add DK_Remark to SMDiagnosticAdam Nemet2017-10-124-1/+20
| | | | | | | | | | | Swift uses SMDiagnostic for diagnostic messages. For https://github.com/apple/swift/pull/12294, we need remark support. I picked the color that clang uses to display them. Differential Revision: https://reviews.llvm.org/D38865 llvm-svn: 315642
* [SelectionDAG] Const-correct the DemandedMask argument to one of the ↵Craig Topper2017-10-122-2/+2
| | | | | | overloads of SimplifyDemandedBits. NFC llvm-svn: 315641
* [Transforms] Fix some Clang-tidy modernize and Include What You Use ↵Eugene Zelenko2017-10-122-177/+253
| | | | | | warnings; other minor fixes (NFC). llvm-svn: 315640
* [Sema][ObjC] Complete merging ObjC methods before checking theirAkira Hatanaka2017-10-122-2/+4
| | | | | | | | | | | | | | | | | | | overriding methods. This should fix test case Analysis/retain-release.m that was failing on the reverse iteration bot: http://lab.llvm.org:8011/builders/reverse-iteration The test used to fail because the loop in CheckObjCMethodOverrides would merge attribute ns_returns_retained on methods while checking whether the overriding methods were compatible. Since OverrideSearch::Overridden is a SmallPtrSet and the order in which the elements of the set are visited is non-deterministic, the test would fail when method 'clone' of the protocol 'F18P' was visited before F18(Cat)'s method 'clone' was visited. llvm-svn: 315639
* [Sema][Crash] Correctly handle an non-dependent noexcept expr in function ↵Erich Keane2017-10-122-4/+19
| | | | | | | | | | | | | | template It seems that all of the other templated cases are handled correctly, however the function template case was not correctly handled. This patch recovers from this condition by setting the function to noexcept after diagnosing. Previously it simply set NoexceptExpr to null, which caused an Assert when this was evaluated during substitution. Differential Revision:https://reviews.llvm.org/D38700 llvm-svn: 315638
* Revert "TargetMachine: Merge TargetMachine and LLVMTargetMachine"Matthias Braun2017-10-1252-296/+408
| | | | | | | | | | Reverting to investigate layering effects of MCJIT not linking libCodeGen but using TargetMachine::getNameWithPrefix() breaking the lldb bots. This reverts commit r315633. llvm-svn: 315637
* Deprecate DwarfUnit::addBlockByrefAddress().Adrian Prantl2017-10-121-0/+6
| | | | | | | | | | | | The clang frontend already creates a DIExpression that replicates the logic in addBlockByrefAddress() exactly, thus making this function effectively unreachable. To guard against human error I'm hereby marking the function with an assertion and let it hit the bots before eventually removing it. rdar://problem/31629055 llvm-svn: 315636
* [XRay][tools] Updated stacks tool with flamegraph output.Keith Wyss2017-10-121-19/+217
| | | | | | | | | | | | | | | | | | | | | Summary: As the first step to allow analysis and visualization of xray collected data, allow using the llvm-xray stacks tool to emit a complete listing of stacks in the format consumable by a flamegraph tool. Possible follow up formats include chrome trace viewer format and sql load files. As a POC, I'm able to generate flamegraphs of an xray instrumented llc compiling hello world. Reviewers: dberris, pelikan Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38650 llvm-svn: 315635
* [CVP] Process binary operations even when def is localAnna Thomas2017-10-125-16/+136
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds processing of binary operations when the def of operands are in the same block (i.e. local processing). Earlier we bailed out in such cases (the bail out was introduced in rL252032) because LVI at that time was more precise about context at the end of basic blocks, which implied local def and use analysis didn't benefit CVP. Since then we've added support for LVI in presence of assumes and guards. The test cases added show how local def processing in CVP helps adding more information to the ashr, sdiv, srem and add operators. Note: processCmp which suffers from the same problem will be handled in a later patch. Reviewers: philip, apilipenko, SjoerdMeijer, hfinkel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38766 llvm-svn: 315634
* TargetMachine: Merge TargetMachine and LLVMTargetMachineMatthias Braun2017-10-1252-408/+296
| | | | | | | | | | | | | | | Merge LLVMTargetMachine into TargetMachine. - There is no in-tree target anymore that just implements TargetMachine but not LLVMTargetMachine. - It should still be possible to stub out all the various functions in case a target does not want to use lib/CodeGen - This simplifies the code and avoids methods ending up in the wrong interface. Differential Revision: https://reviews.llvm.org/D38489 llvm-svn: 315633
* [sanitizer] Workaround a Linux kernel bug in hard_rss_limit_mb_test.Evgeniy Stepanov2017-10-121-7/+6
| | | | llvm-svn: 315632
* Revert "[Sema] Diagnose tautological comparison with type's min/max values"Roman Lebedev2017-10-129-1032/+297
| | | | | | | | | | | | | | | | | | | | | This reverts r315614,r315615,r315621,r315622 Breaks http://bb9.pgr.jp/#/builders/20/builds/59 /home/bb9/bootstrap-clang-libcxx-lld-i686-linux/llvm-project/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp:95:17: error: comparison 'long long' > 9223372036854775807 is always false [-Werror,-Wtautological-constant-compare] if (max_sec > Lim::max()) return false; ~~~~~~~ ^ ~~~~~~~~~~ /home/bb9/bootstrap-clang-libcxx-lld-i686-linux/llvm-project/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp:124:13: error: comparison 'long long' < -9223372036854775808 is always false [-Werror,-Wtautological-constant-compare] if (sec < Lim::min() || sec > Lim::max()) return false; ~~~ ^ ~~~~~~~~~~ /home/bb9/bootstrap-clang-libcxx-lld-i686-linux/llvm-project/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp:124:33: error: comparison 'long long' > 9223372036854775807 is always false [-Werror,-Wtautological-constant-compare] if (sec < Lim::min() || sec > Lim::max()) return false; ~~~ ^ ~~~~~~~~~~ 3 errors generated. -- I'm not yet sure what is the proper fix. llvm-svn: 315631
* [cmake] Rename LIB_FUZZING_ENGINE to LLVM_LIB_FUZZING_ENGINE.Matt Morehouse2017-10-123-5/+5
| | | | llvm-svn: 315630
* [cmake] Allow building fuzzers with OSS-Fuzz flags.Matt Morehouse2017-10-122-2/+9
| | | | | | | | | | | | Reviewers: kcc, bogner Reviewed By: bogner Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D38858 llvm-svn: 315629
* [SelectionDAG] Simplify the ISD::SIGN_EXTEND/ZERO_EXTEND handling to use ↵Craig Topper2017-10-121-25/+11
| | | | | | less temporary APInts by counting bits instead. NFCI llvm-svn: 315628
* [lit] Raise the logic for enabling clang & lld substitutions to llvm.Zachary Turner2017-10-123-159/+194
| | | | | | | | | | This paves the way for other projects which might /use/ clang or lld but not necessarily need to the full set of functionality available to clang and lld tests to be able to have a basic set of substitutions that allow a project to run the clang or lld executables. llvm-svn: 315627
* [lld] Fix typo. NFCShoaib Meenai2017-10-121-1/+1
| | | | llvm-svn: 315626
* Add comment.Rui Ueyama2017-10-121-2/+17
| | | | llvm-svn: 315625
* [CUDA] Added __hmma_m16n16k16_* builtins to support mma instructions on sm_70Artem Belevich2017-10-123-0/+377
| | | | | | Differential Revision: https://reviews.llvm.org/D38742 llvm-svn: 315624
* [LoopPredication] Check whether the loop is already guarded by the first ↵Artur Pilipenko2017-10-124-37/+77
| | | | | | iteration check condition llvm-svn: 315623
* [Analysis] Un-silence -Wtautological-unsigned-zero-compare in null-deref-ps.cRoman Lebedev2017-10-121-2/+2
| | | | | | | | Stage-2 builds failed: error: 'warning' diagnostics expected but not seen: File /home/buildbot/modules-slave-2/clang-x86_64-linux-selfhost-modules-2/llvm.src/tools/clang/test/Analysis/null-deref-ps.c Line 238: always true llvm-svn: 315622
* [SemaChecking] Suppress a GCC warning. NFCI.Davide Italiano2017-10-121-1/+2
| | | | llvm-svn: 315621
* [cmake] [asan] Remove unnecessary gtest dep from dynamic testsMichal Gorny2017-10-121-1/+1
| | | | | | | | | | | | | | | | Remove the redundant dependency on 'gtest' target from the dynamic tests in non-MSVC environment. The tests reuse compiled objects from ASAN_INST_TEST_OBJECTS, and therefore they have been built against gtest already. This both fixes the spurious dependency on 'gtest' target that breaks stand-alone builds, and brings the dynamic tests more in line with regular tests which do not pass this dependency to add_compiler_rt_test() through generate_compiler_rt_tests(). Differential Revision: https://reviews.llvm.org/D38840 llvm-svn: 315620
* [DWARF] Fix bad comparator in sortGlobalExprs.Eli Friedman2017-10-121-7/+12
| | | | | | | | | | | | | | | | | | The comparator passed to std::sort must provide a strict weak ordering; otherwise, the behavior is undefined. Fixes an assertion failure generating debug info for globals split by GlobalOpt. I have a testcase, but not sure how to reduce it, so not included here. (Someone else came up with a testcase, but I can't reproduce the crash with it, presumably because my version of LLVM ends up sorting the array differently.) This isn't really a complete fix (see the FIXME in the patch), but at least it doesn't have undefined behavior. Differential Revision: https://reviews.llvm.org/D38830 llvm-svn: 315619
* Revert "Reintroduce "[SCCP] Propagate integer range info for parameters in ↵Bruno Cardoso Lopes2017-10-122-209/+8
| | | | | | | | | | | IPSCCP."" This reverts commit r315593: still affect two bots: http://lab.llvm.org:8011/builders/clang-with-lto-ubuntu/builds/5308 http://green.lab.llvm.org/green/job/clang-stage2-configure-Rlto/21751/ llvm-svn: 315618
* Handle MIPS-specific addend rules in computeAddend().Rui Ueyama2017-10-121-36/+41
| | | | | | | | | | | | | | | | This patch merges computeAddend and computeMipsAddend. Getting an addend for a relocation is usually pretty easy: it is either in the r_addend field (if RELA) or in a target section (if REL). However, MIPS has many special rules that are different from other ELF ABIs. I don't think there were technical reasons to be different, but the reality is that they are different. It is unfortunate that we had to pass many parameters to computeAddend, but it seems unavoidable because of MIPS. llvm-svn: 315617
* [LoopPredication] Support ule, sle latch predicatesArtur Pilipenko2017-10-122-20/+143
| | | | | | | | | | This is a follow up for the loop predication change 313981 to support ule, sle latch predicates. Reviewed By: mkazantsev Differential Revision: https://reviews.llvm.org/D38177 llvm-svn: 315616
OpenPOWER on IntegriCloud