- Apr 08, 2019
-
-
Fangrui Song authored
llvm-svn: 357920
-
Andrea Di Biagio authored
It makes more sense to print out the number of micro opcodes that are issued every cycle rather than the number of instructions issued per cycle. This behavior is also consistent with the dispatch-stats: numbers from the two views can now be easily compared. llvm-svn: 357919
-
Simon Pilgrim authored
The assertion prevents it from applying fixes when used along with compilation databases with relative paths. Added a test that demonstrates the assertion failure. An example of the assertion: input.cpp:11:14: error: expected ';' after top level declarator typedef int T ^ ; input.cpp:11:14: note: FIX-IT applied suggested code changes clang-check: clang/tools/clang-check/ClangCheck.cpp:94: virtual std::string (anonymous namespace)::FixItOptions::RewriteFilename(const std::string &, int &): Assertion `llvm::sys::path::is_absolute(filename) && "clang-fixit expects absolute paths only."' failed. #0 llvm::sys::PrintStackTrace(llvm::raw_ostream&) llvm/lib/Support/Unix/Signals.inc:494:13 #1 llvm::sys::RunSignalHandlers() llvm/lib/Support/Signals.cpp:69:18 #2 SignalHandler(int) llvm/lib/Support/Unix/Signals.inc:357:1 #3 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x110c0) #4 raise (/lib/x86_64-linux-gnu/libc.so.6+0x32fcf) #5 abort (/lib/x86_64-linux-gnu/libc.so.6+0x343fa) #6 (/lib/x86_64-linux-gnu/libc.so.6+0x2be37) #7 (/lib/x86_64-linux-gnu/libc.so.6+0x2bee2) #8 void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag) #9 void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct_aux<char*>(char*, char*, std::__false_type) #10 void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*) #11 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) #12 (anonymous namespace)::FixItOptions::RewriteFilename(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int&) clang/tools/clang-check/ClangCheck.cpp:101:0 #13 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_data() const #14 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_is_local() const #15 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_dispose() #16 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string() #17 clang::FixItRewriter::WriteFixedFiles(std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >*) clang/lib/Frontend/Rewrite/FixItRewriter.cpp:98:0 #18 std::__shared_ptr<clang::CompilerInvocation, (__gnu_cxx::_Lock_policy)2>::get() const #19 std::__shared_ptr_access<clang::CompilerInvocation, (__gnu_cxx::_Lock_policy)2, false, false>::_M_get() const #20 std::__shared_ptr_access<clang::CompilerInvocation, (__gnu_cxx::_Lock_policy)2, false, false>::operator->() const #21 clang::CompilerInstance::getFrontendOpts() clang/include/clang/Frontend/CompilerInstance.h:290:0 #22 clang::FrontendAction::EndSourceFile() clang/lib/Frontend/FrontendAction.cpp:966:0 #23 __gnu_cxx::__normal_iterator<clang::FrontendInputFile*, std::vector<clang::FrontendInputFile, std::allocator<clang::FrontendInputFile> > >::operator++() #24 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) clang/lib/Frontend/CompilerInstance.cpp:943:0 #25 clang::tooling::FrontendActionFactory::runInvocation(std::shared_ptr<clang::CompilerInvocation>, clang::FileManager*, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticConsumer*) clang/lib/Tooling/Tooling.cpp:369:33 #26 clang::tooling::ToolInvocation::runInvocation(char const*, clang::driver::Compilation*, std::shared_ptr<clang::CompilerInvocation>, std::shared_ptr<clang::PCHContainerOperations>) clang/lib/Tooling/Tooling.cpp:344:18 #27 clang::tooling::ToolInvocation::run() clang/lib/Tooling/Tooling.cpp:329:10 #28 clang::tooling::ClangTool::run(clang::tooling::ToolAction*) clang/lib/Tooling/Tooling.cpp:518:11 #29 main clang/tools/clang-check/ClangCheck.cpp:187:15 ........ Breaks windows buildbots llvm-svn: 357918
-
Rainer Orth authored
Running `make check-all` fails on Solaris 11/SPARC since the clang python tests FAIL: ............................ ====================================================================== FAIL: test_extent (tests.cindex.test_location.TestLocation) ---------------------------------------------------------------------- Traceback (most recent call last): File "tests/cindex/test_location.py", line 87, in test_extent self.assert_location(one.extent.start,line=1,column=1,offset=0) File "tests/cindex/test_location.py", line 22, in assert_location self.assertEqual(loc.column, column) AssertionError: 5 != 1 ====================================================================== FAIL: test_get_children (tests.cindex.test_cursor.TestCursor) ---------------------------------------------------------------------- Traceback (most recent call last): File "tests/cindex/test_cursor.py", line 70, in test_get_children self.assertEqual(tu_nodes[0].is_definition(), True) AssertionError: False != True ---------------------------------------------------------------------- Ran 126 tests in 2.123s FAILED (failures=2, skipped=6) Unfortunately, this aborts the rest of `make check-all`, even with `-k`, so this patch disables the test as is already done on a couple of other targets. This allowed the `sparc-sun-solaris2.11` test to finish. Differential Revision: https://reviews.llvm.org/D60046 llvm-svn: 357917
-
Eric Liu authored
Summary: When calling TUScehduler::runWithPreamble (e.g. in code compleiton), allow entering a fallback mode when compile command or preamble is not ready, instead of waiting. This allows clangd to perform naive code completion e.g. using identifiers in the current file or symbols in the index. This patch simply returns empty result for code completion in fallback mode. Identifier-based plus more advanced index-based completion will be added in followup patches. Reviewers: ilya-biryukov, sammccall Reviewed By: sammccall Subscribers: sammccall, javed.absar, MaskRay, jkorous, arphaman, kadircet, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59811 llvm-svn: 357916
-
Alexander Kornienko authored
The assertion prevents it from applying fixes when used along with compilation databases with relative paths. Added a test that demonstrates the assertion failure. An example of the assertion: input.cpp:11:14: error: expected ';' after top level declarator typedef int T ^ ; input.cpp:11:14: note: FIX-IT applied suggested code changes clang-check: clang/tools/clang-check/ClangCheck.cpp:94: virtual std::string (anonymous namespace)::FixItOptions::RewriteFilename(const std::string &, int &): Assertion `llvm::sys::path::is_absolute(filename) && "clang-fixit expects absolute paths only."' failed. #0 llvm::sys::PrintStackTrace(llvm::raw_ostream&) llvm/lib/Support/Unix/Signals.inc:494:13 #1 llvm::sys::RunSignalHandlers() llvm/lib/Support/Signals.cpp:69:18 #2 SignalHandler(int) llvm/lib/Support/Unix/Signals.inc:357:1 #3 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x110c0) #4 raise (/lib/x86_64-linux-gnu/libc.so.6+0x32fcf) #5 abort (/lib/x86_64-linux-gnu/libc.so.6+0x343fa) #6 (/lib/x86_64-linux-gnu/libc.so.6+0x2be37) #7 (/lib/x86_64-linux-gnu/libc.so.6+0x2bee2) #8 void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag) #9 void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct_aux<char*>(char*, char*, std::__false_type) #10 void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*) #11 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) #12 (anonymous namespace)::FixItOptions::RewriteFilename(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int&) clang/tools/clang-check/ClangCheck.cpp:101:0 #13 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_data() const #14 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_is_local() const #15 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_dispose() #16 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string() #17 clang::FixItRewriter::WriteFixedFiles(std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >*) clang/lib/Frontend/Rewrite/FixItRewriter.cpp:98:0 #18 std::__shared_ptr<clang::CompilerInvocation, (__gnu_cxx::_Lock_policy)2>::get() const #19 std::__shared_ptr_access<clang::CompilerInvocation, (__gnu_cxx::_Lock_policy)2, false, false>::_M_get() const #20 std::__shared_ptr_access<clang::CompilerInvocation, (__gnu_cxx::_Lock_policy)2, false, false>::operator->() const #21 clang::CompilerInstance::getFrontendOpts() clang/include/clang/Frontend/CompilerInstance.h:290:0 #22 clang::FrontendAction::EndSourceFile() clang/lib/Frontend/FrontendAction.cpp:966:0 #23 __gnu_cxx::__normal_iterator<clang::FrontendInputFile*, std::vector<clang::FrontendInputFile, std::allocator<clang::FrontendInputFile> > >::operator++() #24 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) clang/lib/Frontend/CompilerInstance.cpp:943:0 #25 clang::tooling::FrontendActionFactory::runInvocation(std::shared_ptr<clang::CompilerInvocation>, clang::FileManager*, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticConsumer*) clang/lib/Tooling/Tooling.cpp:369:33 #26 clang::tooling::ToolInvocation::runInvocation(char const*, clang::driver::Compilation*, std::shared_ptr<clang::CompilerInvocation>, std::shared_ptr<clang::PCHContainerOperations>) clang/lib/Tooling/Tooling.cpp:344:18 #27 clang::tooling::ToolInvocation::run() clang/lib/Tooling/Tooling.cpp:329:10 #28 clang::tooling::ClangTool::run(clang::tooling::ToolAction*) clang/lib/Tooling/Tooling.cpp:518:11 #29 main clang/tools/clang-check/ClangCheck.cpp:187:15 llvm-svn: 357915
-
Simon Pilgrim authored
llvm-svn: 357914
-
Balazs Keri authored
Reviewers: a.sidorin, shafik, martong, a_sidorin Reviewed By: a_sidorin Subscribers: rnkovacs, dkrupp, martong, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D55049 llvm-svn: 357913
-
Sanjay Patel authored
I was looking at a potential DAGCombiner fix for 1 of the regressions in D60278, and it caused severe regression test pain because x86 TLI lies about the desirability of 8-bit shift ops. We've hinted at making all 8-bit ops undesirable for the reason in the code comment: // TODO: Almost no 8-bit ops are desirable because they have no actual // size/speed advantages vs. 32-bit ops, but they do have a major // potential disadvantage by causing partial register stalls. ...but that leads to massive diffs and exposes all kinds of optimization holes itself. Differential Revision: https://reviews.llvm.org/D60286 llvm-svn: 357912
-
Eugene Leviant authored
llvm-svn: 357911
-
Sanjay Patel authored
As the TODO indicates, instsimplify could be improved. Should fix: https://bugs.llvm.org/show_bug.cgi?id=41419 llvm-svn: 357910
-
Simon Pilgrim authored
First step towards removing the MOVMSK intrinsics completely - this patch expands MOVMSK to the pattern: e.g. PMOVMSKB(v16i8 x): %cmp = icmp slt <16 x i8> %x, zeroinitializer %int = bitcast <16 x i8> %cmp to i16 %res = zext i16 %int to i32 Which is correctly handled by ISel and FastIsel (give or take an annoying movzx move....): https://godbolt.org/z/rkrSFW Differential Revision: https://reviews.llvm.org/D60256 llvm-svn: 357909
-
Reuben Thomas authored
llvm-svn: 357908
-
Nico Weber authored
llvm-svn: 357907
-
Nico Weber authored
llvm-svn: 357906
-
Eugene Leviant authored
llvm-svn: 357905
-
Chen Zheng authored
Differential Revision: https://reviews.llvm.org/D60396 llvm-svn: 357904
-
Xing GUO authored
llvm-svn: 357903
-
Eugene Leviant authored
llvm-svn: 357902
-
Eugene Leviant authored
Differential revision: https://reviews.llvm.org/D59816 llvm-svn: 357901
-
Roman Lebedev authored
Wanted to check if inablility to measure latency of CMOV32rm is a regression from D60041 / D60138, but unable to do that because the llvm-exegesis-{8,9} from debian sid fails with that cryptic, unhelpful error. I suspect this will be a better error. llvm-svn: 357900
-
Justin Bogner authored
Simplify building with particular C++ standards by replacing the specific "enable standard X" flags with a flag that allows specifying the standard you want directly. We preserve compatibility with the existing flags so that anyone with those flags in existing caches won't break mysteriously. Differential Revision: https://reviews.llvm.org/D60399 llvm-svn: 357899
-
Roman Lebedev authored
Reviewers: courbet, gchatelet Reviewed By: gchatelet Subscribers: tschuett, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60066 llvm-svn: 357898
-
Pavel Labath authored
Summary: The ModuleList stream consists of an integer giving the number of entries in the list, followed by the list itself. Each entry in the list describes a module (dynamically loaded objects which were loaded in the process when it crashed (or when the minidump was generated). The code for reading the list is relatively straight-forward, with a single gotcha. Some minidump writers are emitting padding after the "count" field in order to align the subsequent list on 8 byte boundary (this depends on how their ModuleList type was defined and the native alignment of various types on their platform). Fortunately, the minidump format contains enough redundancy (in the form of the stream length field in the stream directory), which allows us to detect this situation and correct it. This patch just adds the ability to parse the stream. Code for conversion to/from yaml will come in a follow-up patch. Reviewers: zturner, amccarth, jhenderson, clayborg Subscribers: jdoerfert, markmentovai, lldb-commits, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60121 llvm-svn: 357897
-
Pavel Labath authored
I also update the tests for SystemInfo parsing to use the yaml2minidump capabilities in llvm instead of relying on checked-in binaries. llvm-svn: 357896
-
Pavel Labath authored
This adds the necessary glue so we can use llvm::dyn_cast, instead of doing a manual type-check followed by a cast. NFC. llvm-svn: 357895
-
Chen Zheng authored
llvm-svn: 357894
-
Pavel Labath authored
llvm-svn: 357893
-
Pavel Labath authored
wcrtomb is not intercepted on windows, so this test fails there. It's not clear to me why we do not intercept this function there (I'll look into that separately), but for now this should at least make the windows sanitizer bot green again (broken by r357889, when I added this test). I also add "UNSUPPORTED: android" as this function is also not intercepted there. llvm-svn: 357892
-
Pavel Labath authored
There are no patterns like that in the generated swig files (there probably were some back in the days when we were running swig over the header files directly), so this is dead code and has no effect on the generated file. llvm-svn: 357890
-
Pavel Labath authored
Summary: r357240 added an interceptor for wctomb, which uses a temporary local buffer to make sure we don't write to unallocated memory. This patch applies the same technique to wcrtomb, and adds some additional tests for this function. Reviewers: vitalybuka, eugenis Subscribers: kubamracek, delcypher, llvm-commits, #sanitizers Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D59984 llvm-svn: 357889
-
Craig Topper authored
[X86] Make LowerOperationWrapper more robust. Remove now unnecessary ReplaceAllUsesWith from LowerMSCATTER. Previously LowerOperationWrapper took the number of results from the original node and counted that many results from the new node. This was intended to drop chain operands from FP_TO_SINT lowering that uses X87 with memory operations to stack temporaries. The final load had an extra chain output that needs to be ignored. Unfortunately, it didn't work with scatter which has 2 result operands, the mask output which is discarded and a chain output. The chain output is the one that is needed but it comes second and it would be dropped by the previous logic here. To workaround this we were doing a ReplaceAllUses in the lowering code so that the generic legalization code wouldn't see any uses to replace since it had been given the wrong result/type. After this change we take the LowerOperation result directly if the original node has one result. This allows us to directly return the chain from scatter or the load data from the FP_TO_SINT case. When the original node has multiple results we'll ensure the returned node has the same number and copy them over. For cases where the original node has multiple results and the new code for some reason has even more results, MERGE_VALUES can be used to pass only the needed results. llvm-svn: 357887
-
Fangrui Song authored
These calls are redundant because the quotients have the same BitWidth as MinValue/MaxValue. llvm-svn: 357886
-
Rui Ueyama authored
Previously, we drop symbols starting with .L from the symbol table, so if there is a relocation that refers a .L symbol, it ended up referencing a null -- which happened to be interpreted as an absolute symbol. This patch copies all symbols including local ones if -emit-reloc is given. Fixes https://bugs.llvm.org/show_bug.cgi?id=41385 Differential Revision: https://reviews.llvm.org/D60306 llvm-svn: 357885
-
Chen Zheng authored
llvm-svn: 357884
-
Chen Zheng authored
llvm-svn: 357883
-
Craig Topper authored
[X86] Split floating point tests out of atomic-mi.ll into atomic-fp.ll. Add avx and avx512f command lines. NFC llvm-svn: 357882
-
Craig Topper authored
llvm-svn: 357881
-
Fangrui Song authored
llvm-svn: 357880
-
Brad Smith authored
llvm-svn: 357879
-