summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Add encode and decode methods to InlineInfo and document encoding format to ↵Greg Clayton2019-09-045-0/+305
| | | | | | | | | | the GSYM file format. This patch adds the ability to encode and decode InlineInfo objects and adds test coverage. Error handling is introduced in the encoding and decoding which will be used from here on out for remaining patches. Differential Revision: https://reviews.llvm.org/D66600 llvm-svn: 370936
* [InstCombine] Fold sub (and A, B) (or A, B)) to neg (xor A, B)David Bolvansky2019-09-042-20/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: ``` Name: sub(and(x, y), or(x, y)) -> neg(xor(x, y)) %or = or i32 %y, %x %and = and i32 %x, %y %sub = sub i32 %and, %or => %sub1 = xor i32 %x, %y %sub = sub i32 0, %sub1 Optimization: sub(and(x, y), or(x, y)) -> neg(xor(x, y)) Done: 1 Optimization is correct! ``` https://rise4fun.com/Alive/VI6 Found by @lebedev.ri. Also author of the proof. Reviewers: lebedev.ri, spatel Reviewed By: lebedev.ri Subscribers: llvm-commits, lebedev.ri Tags: #llvm Differential Revision: https://reviews.llvm.org/D67155 llvm-svn: 370934
* [Instruction] Add hasMetadata(Kind) helper [NFC]Philip Reames2019-09-047-10/+20
| | | | | | It's a common idiom, so let's add the obvious wrapper for metadata kinds which are basically booleans. llvm-svn: 370933
* Upstream macCatalyst support in debugserver and the macOS dynamic loaderAdrian Prantl2019-09-0421-48/+259
| | | | | | | | | | | plugin. Unfortunately the test is currently XFAILed because of missing changes to the clang driver. Differential Revision: https://reviews.llvm.org/D67124 llvm-svn: 370931
* [OpenMP][Docs] Provide implementation status detailsJohannes Doerfert2019-09-041-4/+132
| | | | | | | | | | | | | | | This adds a more fine-grained list of OpenMP features with their implementation status and associated reviews/commits. Reviewers: kkwli0, ABataev, RaviNarayanaswamy, gtbercea, Hahnfeld Subscribers: bollu, guansong, jfb, hfinkel, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64375 llvm-svn: 370930
* AMDGPU: Handle frame index expansion with no free SGPRs pre gfx9Matt Arsenault2019-09-043-26/+151
| | | | | | | | | | | | | | Since an add instruction must produce an unused carry out, this requires additional SGPRs. This can be avoided by keeping the entire offset computation in SGPRs. If one SGPR is still available, this only costs one extra mov. If none are available, the entire computation can be done in place and reversed. This does assume the use is a VGPR operand. This was already assumed, and we currently only select frame indexes to VALU instructions. This should probably be fixed at some point to handle more possible MIR. llvm-svn: 370929
* Avoid assemble step in verbose-output-quoting.cYuanfang Chen2019-09-041-8/+8
| | | | | | | | | | | | Reviewers: hans Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65527 llvm-svn: 370928
* GlobalISel: Add G_BITREVERSEMatt Arsenault2019-09-046-0/+25
| | | | | | This is the first failing pattern for AMDGPU and is trivial to handle. llvm-svn: 370927
* [libc++] Only build with -fvisibility=hidden on ClangLouis Dionne2019-09-041-1/+7
| | | | | | | | | | | | | The visibility annotations in libc++ are not quite right for GCC, which results in symbols not being exported when -fvisibility=hidden is used. To fix the GCC build bots, this commit reverts to the previous state of not building with hidden visibility on GCC. In the future, we can build with hidden visibility all the time and export symbols explicitly using a list. See https://llvm.org/D66970 for one take at this. llvm-svn: 370926
* [Attributor][NFC] Add assertion to guard against accidental misuseJohannes Doerfert2019-09-041-3/+5
| | | | llvm-svn: 370925
* [Attributor] Look at internal functions only on-demandJohannes Doerfert2019-09-045-60/+356
| | | | | | | | | | | | | | | | | | | Summary: Instead of building attributes for internal functions which we do not update as long as we assume they are dead, we now do not create attributes until we assume the internal function to be live. This improves the number of required iterations, as well as the number of required updates, in real code. On our tests, the results are mixed. Reviewers: sstefan1, uenoku Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66914 llvm-svn: 370924
* [ELF] Don't shrink RelrSectionFangrui Song2019-09-042-0/+44
| | | | | | | | | | | | | | | | | | | | Fixes PR43214. The size of SHT_RELR may oscillate between 2 numbers (see D53003 for a similar --pack-dyn-relocs=android issue). This can happen if the shrink of SHT_RELR causes it to take more words to encode relocation offsets (this can happen with thunks or segments with overlapping p_offset ranges), and the expansion of SHT_RELR causes it to take fewer words to encode relocation offsets. To avoid the issue, add padding 1s to the end of the relocation section if its size would decrease. Trailing 1s do not decode to more relocations. Reviewed By: peter.smith Differential Revision: https://reviews.llvm.org/D67164 llvm-svn: 370923
* [Attributor] Use the white list for attributes consistentlyJohannes Doerfert2019-09-0413-106/+111
| | | | | | | | | | | | | | | | | | | | Summary: We create attributes on-demand so we need to check the white list on-demand. This also unifies the location at which we create, initialize, and eventually invalidate new abstract attributes. The tests show mixed results, a few more call site attributes are determined which can cause more iterations. Reviewers: uenoku, sstefan1 Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66913 llvm-svn: 370922
* AMDGPU/GlobalISel: Make 16-bit constants legalMatt Arsenault2019-09-0421-674/+491
| | | | | | This is mostly for the benefit of patterns which use 16-bit constants. llvm-svn: 370921
* GlobalISel/TableGen: Don't skip REG_SEQUENCE based on patternsMatt Arsenault2019-09-041-25/+31
| | | | | | | | This partially adds support for patterns with REG_SEQUENCE. The source patterns are now accepted, but the pattern is still rejected due to missing support for the instruction renderer. llvm-svn: 370920
* [clang-tidy] Fix bugprone-argument-comment bug if there are marcos.Alexander Kornienko2019-09-042-2/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Fix bugprone-argument-comment bug if there are marcos. For example: ``` void j(int a, int b, int c); j(X(1), /*b=*/1, X(1)); ``` clang-tidy can't recognize comment "/*b=*/". It suggests fix like this: ``` j(X(1), /*b=*//*b=*/1, X(1)); ``` This change tries to fix this issue. Reviewers: alexfh, hokein, aaron.ballman Reviewed By: alexfh Subscribers: xazax.hun, cfe-commits Tags: #clang, #clang-tools-extra Patch by Yubo Xie. Differential Revision: https://reviews.llvm.org/D67080 llvm-svn: 370919
* GlobalISel: Define GINodeEquiv for undefMatt Arsenault2019-09-041-0/+1
| | | | | | | AMDGPU uses this for undef vector elements in some patterns which will be enabled in a future patch. llvm-svn: 370918
* [Attributor] Deal more explicit with non-exact definitionsJohannes Doerfert2019-09-046-76/+109
| | | | | | | | | | | | | | | | | | | Summary: Before we tried to rule out non-exact definitions early but that lead to on-demand attributes created for them anyway. As a consequence we needed to look at the definition in the initialize of each attribute again. This patch centralized this lookup and tightens the condition under which we give up on non-exact definitions. Reviewers: uenoku, sstefan1 Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67115 llvm-svn: 370917
* Workaround TestConcurrentMany* flakiness in a more pricipled wayFrederic Riss2019-09-042-2/+1
| | | | | | | | | | | | | | | | | | | | | | The flakiness on our local machines seems to come for a race in the kernel between task_suspend and the creation of the Mach exceptions for the threads that hit breakpoints. The debugserver code is written with the assumption that the kernel will be able to provide us with all the exceptions for a given task once task_suspend returns. On machines with higher core counts, this seems not to be the case. The first batch of exceptions we get after task_suspend does not contain exceptions for all the threads that have hit a breakpoint, thus they get misreprorted in the first stop packet. Adding a 1ms timeout to the call that retrieves the batch of exceptions seems to workaround the issue reliably on our machines, and it shoulnd't impact standard debugging scenarios too much (a stop will incur an additional 1ms delay). We'll be talking to the kernel team to figure out the right contract for those APIs. This patch also reverts part of Jonas' previous workaround for the issue (r370785). llvm-svn: 370916
* [X86] Add support for avx512bf16 for __builtin_cpu_supports and ↵Craig Topper2019-09-044-5/+17
| | | | | | compiler-rt's cpu indicator. llvm-svn: 370915
* [Attributor] Ensure AAIsDead correctly overrides getIRPositionSimon Pilgrim2019-09-041-2/+2
| | | | | | | | As commented on D65712, the getIRPosition methods weren't correctly being overridden. Differential Revision: https://reviews.llvm.org/D67170 llvm-svn: 370914
* [Hexagon] Improve generated code for test-if-bit-clear, one more timeKrzysztof Parzyszek2019-09-043-54/+40
| | | | | | Adjust isel patterns after recent commit. Fixes https://llvm.org/PR43194. llvm-svn: 370913
* [PowerPC][Altivec][Clang] Check compile-time constant for vec_dst*Jinsong Ji2019-09-043-4/+20
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is follow up of https://reviews.llvm.org/D66699. We might get ISEL ICE if we call vec_dss with non const 3rd arg. ``` Cannot select: intrinsic %llvm.ppc.altivec.dst ``` We should check the constraints in clang and generate better error messages. Reviewers: nemanjai, hfinkel, echristo, #powerpc, wuzish Reviewed By: #powerpc, wuzish Subscribers: wuzish, kbarton, MaskRay, shchenz, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66748 llvm-svn: 370912
* [InstSimplify] guard against unreachable code (PR43218)Sanjay Patel2019-09-042-1/+29
| | | | | | | This would crash: https://bugs.llvm.org/show_bug.cgi?id=43218 llvm-svn: 370911
* [Driver] Use shared singleton instance of DriverOptTableIlya Biryukov2019-09-0412-83/+87
| | | | | | | | | | | | | | | | | | | | | Summary: This significantly reduces the time required to run clangd tests, by ~10%. Should also have an effect on other tests that run command-line parsing multiple times inside a single invocation. Reviewers: gribozavr, sammccall Reviewed By: sammccall Subscribers: kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67163 llvm-svn: 370908
* [Debuginfo][SROA] Need to handle dbg.value in SROA pass.Alexey Lapshin2019-09-044-156/+232
| | | | | | | | | | | | SROA pass processes debug info incorrecly if applied twice. Specifically, after SROA works first time, instcombine converts dbg.declare intrinsics into dbg.value. Inlining creates new opportunities for SROA, so it is called again. This time it does not handle correctly previously inserted dbg.value intrinsics. Differential Revision: https://reviews.llvm.org/D64595 llvm-svn: 370906
* [ASTImporter] Added visibility context check for TypedefNameDecl.Balazs Keri2019-09-042-13/+68
| | | | | | | | | | | | | | | | | | | Summary: ASTImporter makes now difference between typedefs and type aliases with same name in different translation units if these are not visible outside. Reviewers: martong, a.sidorin, shafik, a_sidorin Reviewed By: martong, shafik Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64480 llvm-svn: 370903
* [PowerPC][Altivec] Fix constant argument for vec_dssJinsong Ji2019-09-045-4/+20
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is similar to vec_ct* in https://reviews.llvm.org/rL304205. The argument must be a constant, otherwise instruction selection will fail. always_inline is not enough for isel to always fold everything away at -O0. The fix is to turn the function into macros in altivec.h. Fixes https://bugs.llvm.org/show_bug.cgi?id=43072 Reviewers: nemanjai, hfinkel, #powerpc, wuzish Reviewed By: #powerpc, wuzish Subscribers: wuzish, kbarton, MaskRay, shchenz, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66699 llvm-svn: 370902
* [InstCombine] add tests for insert/extract with identity shuffles; NFCSanjay Patel2019-09-041-0/+92
| | | | llvm-svn: 370901
* [libc++] Move __clamp_to_integral to <cmath>, and harden against min()/max() ↵Louis Dionne2019-09-043-34/+55
| | | | | | macros llvm-svn: 370900
* disassemble command: fix error message when disassembly failsPavel Labath2019-09-043-1/+50
| | | | | | | | | | | | | We were printing the start_addr field, which is not correct, as in this branch we are processing the memory described by cur_range. Print that instead. Ideally, in particular this case, the error message would also say something about not being able to disassemble due to not having found the module from the core file, but that is not easy to do right now, so I'm leaving that for another time. llvm-svn: 370898
* [clangd] Add TUScheduler.h to CodeComplete.cpp to unbreak buildsKadir Cetinkaya2019-09-041-0/+1
| | | | llvm-svn: 370895
* [ModuloSchedule] Fix no-asserts buildJames Molloy2019-09-041-5/+8
| | | | | | Apologies, due to a git SNAFU this fix (dump doesn't exist and silence unused variables) stayed in my index rather than applying to rL370893. llvm-svn: 370894
* [ModuloSchedule] Introduce PeelingModuloScheduleExpanderJames Molloy2019-09-043-6/+516
| | | | | | | | | | | | | | | This is the beginnings of a reimplementation of ModuloScheduleExpander. It works by generating a single-block correct pipelined kernel and then peeling out the prolog and epilogs. This patch implements kernel generation as well as a validator that will confirm the number of phis added is the same as the ModuloScheduleExpander. Prolog and epilog peeling will come in a different patch. Differential Revision: https://reviews.llvm.org/D67081 llvm-svn: 370893
* Fix "enumeral and non-enumeral type in conditional expression" warnings. NFCI.Simon Pilgrim2019-09-042-2/+2
| | | | llvm-svn: 370892
* [libc++] Add `__truncating_cast` for safely casting float types to integersLouis Dionne2019-09-042-0/+124
| | | | | | | | | | | This is needed anytime we need to clamp an arbitrary floating point value to an integer type. Thanks to Eric Fiselier for the patch. Differential Revision: https://reviews.llvm.org/D66836 llvm-svn: 370891
* [NFC] Added a negative test for new foldDavid Bolvansky2019-09-041-0/+19
| | | | llvm-svn: 370890
* [libc++] Use __extension__ in a portable mannerLouis Dionne2019-09-042-1/+9
| | | | llvm-svn: 370889
* [NFC] Fixed testDavid Bolvansky2019-09-041-2/+2
| | | | llvm-svn: 370888
* [lldb] Fix log statement in Socket::WriteRaphael Isemann2019-09-041-1/+2
| | | | | | | | We change num_bytes in this method, so this doesn't actually log the parameter that we called the function with. No test as we don't test logging code. llvm-svn: 370887
* [NFC] Adjust tests for new foldDavid Bolvansky2019-09-041-4/+4
| | | | llvm-svn: 370886
* [NFC] Added tests for new foldDavid Bolvansky2019-09-041-0/+101
| | | | llvm-svn: 370885
* [clangd] Fix SelectionTree behavior on implicit 'this'Sam McCall2019-09-042-0/+15
| | | | llvm-svn: 370884
* [InstCombine] Fold sub (or A, B) (and A, B) to (xor A, B)David Bolvansky2019-09-042-20/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: ``` Name: sub or and to xor %or = or i32 %y, %x %and = and i32 %x, %y %sub = sub i32 %or, %and => %sub = xor i32 %x, %y Optimization: sub or and to xor Done: 1 Optimization is correct! ``` https://rise4fun.com/Alive/eJu Reviewers: spatel, lebedev.ri Reviewed By: lebedev.ri Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67153 llvm-svn: 370883
* Fix address sizes in the dwarfdump-debug-loc-error-cases testPavel Labath2019-09-041-10/+10
| | | | | | | | | the test is building a 64-bit executable, so the addresses should be 64-bit too. The test was still passing even with smaller address size, but it was hitting the "unexpected end of data" error sooner than it should. llvm-svn: 370882
* [NFC] Added a new test for D67153David Bolvansky2019-09-041-0/+13
| | | | llvm-svn: 370881
* [lldb] Limit the amount of zeroes we use for padding when printing small floatsRaphael Isemann2019-09-048-4/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: We got a radar that printing small floats is not very user-friendly in LLDB as we print them with up to 100 leading zeroes before starting to use scientific notation. This patch changes this by already using scientific notation when we hit 6 padding zeroes by default and moves this value into a target setting so that users can just set this number back to 100 if they for some reason preferred the old behaviour. This new setting is influencing how we format data, so that's why we have to reset the data visualisation cache when it is changed. Note that we have always been using scientific notation for large numbers because it seems that the LLVM implementation doesn't support printing out the padding zeroes for them. I would have fixed that if it was trivial, but looking at the LLVM implementation for this it seems that this is not as trivial as it sounds. I would say we look into this if we ever get a bug report about someone wanting to have a large amount of trailing zeroes in their numbers instead of using scientific notation. Fixes rdar://39744137 Reviewers: #lldb, clayborg Reviewed By: clayborg Subscribers: JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67001 llvm-svn: 370880
* [lldb] Early exit in RangeDataVector:FindEntryIndexesThatContainRaphael Isemann2019-09-041-6/+8
| | | | | | | | | | | | | | | | | | | Summary: We currently spend a lot of time in this function (around 27% of the br-by-regex benchmark in lldb-bench) by just iterating over all the ranges. We already sorted these ranges by their base address, we we can actually just stop checking ranges as soon as we find one that has a higher base address. Reviewers: labath Reviewed By: labath Subscribers: amccarth, arphaman, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67123 llvm-svn: 370879
* [NFC] Added tests for 'SUB of OR and AND to XOR' foldDavid Bolvansky2019-09-041-0/+103
| | | | llvm-svn: 370878
* [DebugInfo] LiveDebugValues: locations with different exprs should not be mergedJeremy Morse2019-09-042-7/+92
| | | | | | | | | | | | | | | | | When comparing variable locations, LiveDebugValues currently considers only the machine location, ignoring any DIExpression applied to it. This is a problem because that DIExpression can do pretty much anything to the machine location, for example dereferencing it. This patch adds DIExpressions to that comparison; now variables based on the same register/memory-location but with different expressions will compare differently, and be dropped if we attempt to merge them between blocks. This reduces variable coverage-range a little, but only because we were producing broken locations. Differential Revision: https://reviews.llvm.org/D66942 llvm-svn: 370877
OpenPOWER on IntegriCloud