- Dec 11, 2018
-
-
Heejin Ahn authored
Summary: - Unify mixed argument names (`Symbol` and `Sym`) to `Sym` - Changed `MCSymbolWasm*` argument of `emit***` functions to `const MCSymbolWasm*`. It seems not very intuitive that emit function in the streamer modifies symbol contents. - Moved empty function bodies to the header - clang-format Reviewers: aardappel, dschuff, sbc100 Subscribers: jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D55347 llvm-svn: 348816
-
Aditya Nandakumar authored
https://reviews.llvm.org/D55294 Previously MachineIRBuilder::buildInstr used to accept variadic arguments for sources (which were either unsigned or MachineInstrBuilder). While this worked well in common cases, it doesn't allow us to build instructions that have multiple destinations. Additionally passing in other optional parameters in the end (such as flags) is not possible trivially. Also a trivial call such as B.buildInstr(Opc, Reg1, Reg2, Reg3) can be interpreted differently based on the opcode (2defs + 1 src for unmerge vs 1 def + 2srcs). This patch refactors the buildInstr to buildInstr(Opc, ArrayRef<DstOps>, ArrayRef<SrcOps>) where DstOps and SrcOps are typed unions that know how to add itself to MachineInstrBuilder. After this patch, most invocations would look like B.buildInstr(Opc, {s32, DstReg}, {SrcRegs..., SrcMIBs..}); Now all the other calls (such as buildAdd, buildSub etc) forward to buildInstr. It also makes it possible to build instructions with multiple defs. Additionally in a subsequent patch, we should make it possible to add flags directly while building instructions. Additionally, the main buildInstr method is now virtual and other builders now only have to override buildInstr (for say constant folding/cseing) is straightforward. Also attached here (https://reviews.llvm.org/F7675680) is a clang-tidy patch that should upgrade the API calls if necessary. llvm-svn: 348815
-
David Blaikie authored
Not sure how I missed that in my testing, but obvious enough - this causes segfaults when attempting to dereference the Error in end iterators. llvm-svn: 348814
-
Zachary Turner authored
m_loc_is_constant_data was uninitialized, so unless someone explicitly called SetLocIsConstantData(), this would be UB. I think every existing call-site would always call the proper function to initialize the value, so there were no existing bugs, but I encountered this when I tried to use it without calling this function and encountered this. llvm-svn: 348813
-
Eric Fiselier authored
Patch by Jordan Soyke (jsoyke@google.com) Reviewed as D55045 The result of running the benchmarks and comparing them can be found here: https://gist.github.com/EricWF/a77fd42ec87fc98da8039e26d0349498 llvm-svn: 348812
-
David Blaikie authored
Using an Error as an out parameter from an indirect operation like iteration as described in the documentation ( http://llvm.org/docs/ProgrammersManual.html#building-fallible-iterators-and-iterator-ranges ) seems to be a little fussy - so here's /one/ possible solution, though I'm not sure it's the right one. Alternatively such APIs may be better off being switched to a standard algorithm style, where they take a lambda to do the iteration work that is then called back into (eg: "Error e = obj.for_each_note([](const Note& N) { ... });"). This would be safer than having an unwritten assumption that the user of such an iteration cannot return early from the inside of the function - and must always exit through the gift shop... I mean error checking. (even though it's guaranteed that if you're mid-way through processing an iteration, it's not in an error state). Alternatively we'd need some other (the super untrustworthy/thing we've generally tried to avoid) error handling primitive that actually clears the error state entirely so it's safe to ignore. Fleshed this solution out a bit further during review - it now relies on op==/op!= comparison as the equivalent to "if (Err)" testing the Error. So just like an Error must be checked (even if it's in a success state), the Error hiding in the iterator must be checked after each increment (including by comparison with another iterator - perhaps this could be constrained to only checking if the iterator is compared to the end iterator? Not sure it's too important). So now even just creating the iterator and not incrementing it at all should still assert because the Error has not been checked. Reviewers: lhames, jakehehrlich Differential Revision: https://reviews.llvm.org/D55235 llvm-svn: 348811
-
Shafik Yaghmour authored
https://reviews.llvm.org/D55045 llvm-svn: 348810
-
Matt Arsenault authored
llvm-svn: 348809
-
- Dec 10, 2018
-
-
Adrian Prantl authored
pexecpt-based tests are flakey because they involve timeouts and this test is eprfectly serializable. llvm-svn: 348808
-
Yi Kong authored
Remove trailing whitespaces so that it is easier to diff the code between div{s,d,t}f3.c llvm-svn: 348807
-
David Blaikie authored
Mucking about simplifying a test case ( https://reviews.llvm.org/D55261 ) I stumbled across something I've hit before - that LLVM's (GCC's does too, FWIW) assembly output includes a hardcode length for a DWARF unit in its header. Instead we could emit a label difference - making the assembly easier to read/edit (though potentially at a slight (I haven't tried to observe it) performance cost of delaying/sinking the length computation into the MC layer). Reviewers: JDevlieghere, probinson, ABataev Differential Revision: https://reviews.llvm.org/D55281 llvm-svn: 348806
-
Frederic Riss authored
llvm-svn: 348805
-
Davide Italiano authored
llvm-svn: 348804
-
Sam Clegg authored
A dependency on TestingSupport was introduced in rL348735 but library was not incldued in the LLVM_LINK_LLVM_DYLIB build. Differential Revision: https://reviews.llvm.org/D55526 llvm-svn: 348803
-
Krzysztof Parzyszek authored
- Check if an operand is an immediate before calling getImm. Some operands that take constant values can actually have global symbols or other constant expressions. - When a load-constant instruction can be folded into users, make sure to only delete it when all users have been successfully converted. llvm-svn: 348802
-
Matt Arsenault authored
llvm-svn: 348801
-
Sanjay Patel authored
llvm-svn: 348800
-
Stephen Kelly authored
This reverts commit r348794. llvm-svn: 348799
-
Stephen Kelly authored
llvm-svn: 348798
-
Stephen Kelly authored
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55393 llvm-svn: 348797
-
David Green authored
llvm-svn: 348796
-
Stephen Kelly authored
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55395 llvm-svn: 348795
-
Stephen Kelly authored
Summary: Don't add a child just for the label. Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55495 llvm-svn: 348794
-
Jonas Toth authored
Summary: Almost all code review comments on new checkers {D55433} {D48866} {D54349} seem to ask for the release notes to be added alphabetically, plus I've seen commits by @Eugene.Zelenko reordering the lists Make add_new_check.py add those release notes alphabetically based on checker name If include-fixer section is seen add it at the end Minor change in the message format to prevent double newlines added before the checker. Do the tools themselves have unit tests? (sorry new to this game) - Tested adding new checker at the beginning - Tested on adding new checker in the middle - Tested on empty ReleasesNotes.rst (as we would see after RC) Patch by MyDeveloperDay. Reviewers: alexfh, JonasToth, curdeius, aaron.ballman, benhamilton, hokein Reviewed By: JonasToth Subscribers: cfe-commits, xazax.hun, Eugene.Zelenko Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D55508 llvm-svn: 348793
-
Krzysztof Parzyszek authored
This reverts r348787. The patch wasn't quite correct. llvm-svn: 348792
-
JF Bastien authored
Summary: The APFloat and Constant APIs taking an APInt allow arbitrary payloads, and that's great. There's a convenience API which takes an unsigned, and that's silly because it then directly creates a 64-bit APInt. Just change it to 64-bits directly. At the same time, add ConstantFP NaN getters which match the APFloat ones (with getQNaN / getSNaN and APInt parameters). Improve the APFloat testing to set more payload bits. Reviewers: scanon, rjmccall Subscribers: jkorous, dexonsmith, kristina, llvm-commits Differential Revision: https://reviews.llvm.org/D55460 llvm-svn: 348791
-
Aaron Ballman authored
llvm-svn: 348790
-
Bruno Cardoso Lopes authored
Implement support for try-catch blocks in constexpr functions, as proposed in http://wg21.link/P1002 and voted in San Diego for c++20. The idea is that we can still never throw inside constexpr, so the catch block is never entered. A try-catch block like this: try { f(); } catch (...) { } is then morally equivalent to just { f(); } Same idea should apply for function/constructor try blocks. rdar://problem/45530773 Differential Revision: https://reviews.llvm.org/D55097 llvm-svn: 348789
-
Amara Emerson authored
This patch restricts the capability of G_MERGE_VALUES, and uses the new G_BUILD_VECTOR and G_CONCAT_VECTORS opcodes instead in the appropriate places. This patch also includes AArch64 support for selecting G_BUILD_VECTOR of <4 x s32> and <2 x s64> vectors. Differential Revisions: https://reviews.llvm.org/D53629 llvm-svn: 348788
-
Krzysztof Parzyszek authored
llvm-svn: 348787
-
Aaron Ballman authored
This adds tests for expressions in C. llvm-svn: 348786
-
Krzysztof Parzyszek authored
llvm-svn: 348785
-
Simon Pilgrim authored
If all the demanded elements of the SimplifyDemandedVectorElts are known to be UNDEF, we can simplify to an ISD::UNDEF node. Zero constant folding will be handled in a future patch - its a little trickier as we often have bitcasted zero values. Differential Revision: https://reviews.llvm.org/D55511 llvm-svn: 348784
-
Jonathan Peyton authored
Fix two build issues: 1) Recent commit 348756 accidentally included Unix clang compilers to use immintrin.h when only clang-cl should be using it leading to the following error: openmp-llvm/runtime/src/kmp_lock.cpp:2035:25: error: always_ inline function '_xbegin' requires target feature 'rtm', but would be inlined into function '__kmp_test_adaptive_lock_only' that is compiled without support for 'rtm' kmp_uint32 status = _xbegin(); This patch changes the guard to use immintrin.h to only use clang-cl instead of all clang 2) gcc-8 gives a warning about multiline comment in kmp_runtime.cpp: This patch just changes it to a two line comment openmp-llvm/runtime/src/kmp_runtime.cpp:7697:8: warning: multi-line comment [-Wcomment] #endif // KMP_OS_LINUX || KMP_OS_DRAGONFLY || KMP_OS_FREEBSD || KMP_OS_NETBSD \ llvm-svn: 348783
-
Erik Pilkington authored
These were added in r348441. This mostly just points to the clang documentation to describe the intended semantics of each intrinsic. llvm-svn: 348782
-
Simon Pilgrim authored
As discussed on D55511, this caused an issue if the inner node deletes a node that the outer node depends upon. As it doesn't affect any lit-tests and I've only been able to expose this with the D55511 change I'm committing this now. llvm-svn: 348781
-
Pavel Labath authored
It's not sufficient to implement the CreateMemoryInstance function, one has to use it too. llvm-svn: 348780
-
Jonas Devlieghere authored
Fixes Host.mm to use the FileSystem class instead of making native calls to check if a file exists. llvm-svn: 348779
-
Eric Fiselier authored
Patch from Jordan Soyke (jsoyke@google.com) Reviewed as D55520 This change adds a new internal class, called __value_func, that adds a minimal subset of value-type semantics to the internal __func interface. The change is NFC, and is cleanup for the upcoming ABI v2 function implementation (D55045). llvm-svn: 348778
-
Fangrui Song authored
Summary: SSE2 vectorization was added in 2012, but it is 2018 now and I can't observe any performance boost (testing clang -E [all Sema/* CodeGen/* with proper -I options]) with the existing _mm_movemask_epi8+countTrailingZeros or the following SSE4.2 (compiling with -msse4.2): __m128i C = _mm_setr_epi8('\r','\n',0,0,0,0,0,0,0,0,0,0,0,0,0,0); _mm_cmpestri(C, 2, Chunk, 16, _SIDD_UBYTE_OPS | _SIDD_CMP_EQUAL_ANY | _SIDD_POSITIVE_POLARITY | _SIDD_LEAST_SIGNIFICANT) Delete the vectorization to simplify the code. Also simplify the code a bit and don't check the line ending sequence \n\r Reviewers: bkramer, #clang Reviewed By: bkramer Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55484 llvm-svn: 348777
-