- Nov 09, 2020
-
-
LemonBoy authored
Feeding vector values to `InstCombiner::OptimizeOverflowCheck` produces a scalar boolean flag if it proves the overflow check can be eliminated. This causes `InstCombiner::CreateOverflowTuple` to crash as it correctly expects a vector of i1 values instead. Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D89628
-
Sanne Wouda authored
Target Pass Configuration does not always run, so we can't check for it.
-
Simon Pilgrim authored
-
Michał Górny authored
Same fix as in NetBSD (a6712889). Differential Revision: https://reviews.llvm.org/D91026
-
Michał Górny authored
Accidentally referenced the wrong diff. This reverts commit fce8e758.
-
Georgii Rymar authored
The format of program header descriptions was changed by D90458.
-
Simon Pilgrim authored
-
Simon Pilgrim authored
-
Michał Górny authored
When LLDB Python bindings are used and stack backtraces are enabled for logging, getMainExecutable() is called with argv0 being null. This caused the fallback function getprogpath() (used on FreeBSD, NetBSD and Linux) to segfault. Make it handle null executable name gracefully. Differential Revision: https://reviews.llvm.org/D91012
-
Michał Górny authored
Same fix as in NetBSD (a6712889). Differential Revision: https://reviews.llvm.org/D91012
-
Michał Górny authored
TestWatchpointMultipleThreads currently accounts for two scenarios: setting the watchpoint before a new thread starts (presumably, verifying that it will be propagated to the new thread) and setting it after the thread starts (presumably, verifying that a new watchpoint is set on all threads). However, the latter test currently assumes that the thread will be reported to the debugger before the breakpoint is hit. This is not the case on FreeBSD and NetBSD. On NetBSD, new threads do not inherit debug registers from their parent threads. Instead, LLDB copies them manually after the new thread is reported. Since the thread is actually reported after the second breakpoint location, both tests effectively check the same behavior (i.e. watchpoint being set before the new thread is reported). On FreeBSD, new threads inherit debug registers and we seem to hit an interesting race condition. While the thread is reported after the breakpoint is hit, the kernel seems to construct it and copy the debug register before that happens. As a result, setting the watchpoint at the second breakpoint location modifies the debug registers of the first thread after they have been copied to the second thread but before the debugger is aware of it. Therefore, the watchpoint is not propagated to the second thread and the test fails. Extend the test to cover all three possible scenarios: setting watchpoint before the thread is lanched, after it is launched but before it is guaranteed to have started and after it has actually started. Add a second barrier to account for the last case. This should ensure that the second assumption (i.e. that the watchpoint is set on all currently known threads) is actually tested on FreeBSD and NetBSD. Differential Revision: https://reviews.llvm.org/D91030
-
Michał Górny authored
Differential Revision: https://reviews.llvm.org/D90938
-
Georgii Rymar authored
Imagine we have a YAML declaration of few sections: `foo1`, `<unnamed 2>`, `foo3`, `foo4`. To put them into segment we can do (1*): ``` Sections: - Section: foo1 - Section: foo4 ``` or we can use (2*): ``` Sections: - Section: foo1 - Section: foo3 - Section: foo4 ``` or (3*) : ``` Sections: - Section: foo1 ## "(index 2)" here is a name that we automatically created for a unnamed section. - Section: (index 2) - Section: foo3 - Section: foo4 ``` It looks really confusing that we don't have to list all of sections. At first I've tried to make this rule stricter and report an error when there is a gap (i.e. when a section is included into segment, but not listed explicitly). This did not work perfect, because such approach conflicts with unnamed sections/fills (see (3*)). This patch drops "Sections" key and introduces 2 keys instead: `FirstSec` and `LastSec`. Both are optional. Differential revision: https://r...
-
Georgii Rymar authored
This is recommit for D90903 with fixes for BB: 1) Used std::move<> when returning Expected<> (http://lab.llvm.org:8011/#/builders/112/builds/913) 2) Fixed the name of temporarily file in the file-headers.test (http://lab.llvm.org:8011/#/builders/36/builds/1269) (a local old temporarily file was used before) For creating `ELFObjectFile` instances we have the factory method `ELFObjectFile<ELFT>::create(MemoryBufferRef Object)`. The problem of this method is that it scans the section header to locate some sections. When a file is truncated or has broken fields in the ELF header, this approach does not allow us to create the `ELFObjectFile` and dump the ELF header. This is https://bugs.llvm.org/show_bug.cgi?id=40804 This patch suggests a solution - it allows to delay scaning sections in the `ELFObjectFile<ELFT>::create`. It now allows user code to call an object initialization (`initContent()`) later. With that it is possible, for example, for dumpers just to dump the file header and exit. By default initialization is still performed as before, what helps to keep the logic of existent callers untouched. I've experimented with different approaches when worked on this patch. I think this approach is better than doing initialization of sections (i.e. scan of them) on demand, because normally users of `ELFObjectFile` API expect to work with a valid object. In most cases when a section header table can't be read (because of an error), we don't have to continue to work with object. So we probably don't need to implement a more complex API. Differential revision: https://reviews.llvm.org/D90903
-
Jan Kratochvil authored
This would be reproducible in future DWZ category of the testsuite as: Failed Tests (1): lldb-api :: python_api/symbol-context/two-files/TestSymbolContextTwoFiles.py Differential Revision: https://reviews.llvm.org/D91014 -
Tim Northover authored
The comparison of AttributeSets stopped after seeing a matching type attribute. Subsequent mismatching attributes were not detected causing a crash.
-
QingShan Zhang authored
-
Georgii Rymar authored
This reverts commit ea8a0b8b. It broke BBots. http://lab.llvm.org:8011/#/builders/14/builds/1439 http://lab.llvm.org:8011/#/builders/112/builds/913
-
Georgii Rymar authored
For creating `ELFObjectFile` instances we have the factory method `ELFObjectFile<ELFT>::create(MemoryBufferRef Object)`. The problem of this method is that it scans the section header to locate some sections. When a file is truncated or has broken fields in the ELF header, this approach does not allow us to create the `ELFObjectFile` and dump the ELF header. This is https://bugs.llvm.org/show_bug.cgi?id=40804 This patch suggests a solution - it allows to delay scaning sections in the `ELFObjectFile<ELFT>::create`. It now allows user code to call an object initialization (`initContent()`) later. With that it is possible, for example, for dumpers just to dump the file header and exit. By default initialization is still performed as before, what helps to keep the logic of existent callers untouched. I've experimented with different approaches when worked on this patch. I think this approach is better than doing initialization of sections (i.e. scan of them) on demand, because normally users of `ELFObjectFile` API expect to work with a valid object. In most cases when a section header table can't be read (because of an error), we don't have to continue to work with object. So we probably don't need to implement a more complex API. Differential revision: https://reviews.llvm.org/D90903
-
Georgii Rymar authored
This allows to use the generic fields validation mechanism that we have. The behavior (i.e. an error reported) remains the same.
-
Sam McCall authored
While here, clean up ParsedAST::build a bit: - remove FIXMEs that were fixed long ago by ReplayPreamble - remove redundant if, ClangTidyContext is not actually optional Differential Revision: https://reviews.llvm.org/D90975
-
Michael Liao authored
-
António Afonso authored
While generating yamls for my tests I noticed that the new debug_abbrev format (with multiple table support) was incorrectly assigning id's to the table because it was generating one per abbrev entry in the table. For instance, the first table would get id 4 when 5 abbrev entries existed in the table. By itself this is not a problem but the corresponding debug_info sections were still referencing id 0. This was introduced here: https://reviews.llvm.org/D83116. Maybe a better fix is to actually correctly calculate the table id when emitting debug info? From a quick glance it seems to me the ID is just being calculated as the distance between the first DWARFAbbreviationDeclarationSet and the one the debug info entry points to, which means it's just its index and not the actual table id that was generated when emitting the debug_abbrev tables. With my fix I guess this is fine but on the diff that introduced this Pavel mentioned that he would like to have some sort of unique id between them but not necessarily +1 increasing, but for that to work we need to actually find the table ID, I guess by going directly to Y.DebugAbbrev but to honest I have no idea how to link the DWARFAbbreviationDeclarationSet and the Y.DebugAbbrev, so I just did this simple fix. I also realized there's barely any tests for MachO so it might useful to invest on that if the tool is being reworked on. Reviewed By: Higuoxing, jhenderson Differential Revision: https://reviews.llvm.org/D87179
-
Stella Laurenzo authored
Re-applies the reverted https://reviews.llvm.org/D90824 now that the link issue on BFD has been resolved. This reverts commit bb9b5d39. Differential Revision: https://reviews.llvm.org/D91044
-
Paul C. Anagnostopoulos authored
This patch includes intrinsics for AMDGPU. Differential Revision: https://reviews.llvm.org/D90946
-
Roman Lebedev authored
-
Nathan James authored
-
Hubert Tong authored
... the POSIX options suffice. This maintains compatibility with the system `diff` on platforms like AIX.
-
- Nov 08, 2020
-
-
Sanjay Patel authored
Existing pre-conditions seem to be correct: https://rise4fun.com/Alive/lCLB Name: non-zero C1 Pre: !isPowerOf2(C1) && isPowerOf2(C2) && C1 != 0 %sub = shl i8 C2, %X %cmp = icmp eq i8 %sub, C1 => %cmp = false Name: one == C2 Pre: !isPowerOf2(C1) && isPowerOf2(C2) && C2 == 1 %sub = shl i8 C2, %X %cmp = icmp eq i8 %sub, C1 => %cmp = false Name: nuw Pre: !isPowerOf2(C1) && isPowerOf2(C2) %sub = shl nuw i8 C2, %X %cmp = icmp eq i8 %sub, C1 => %cmp = false Name: nsw Pre: !isPowerOf2(C1) && isPowerOf2(C2) %sub = shl nsw i8 C2, %X %cmp = icmp eq i8 %sub, C1 => %cmp = false
-
Sanjay Patel authored
-
Simon Pilgrim authored
-
Simon Pilgrim authored
-
Simon Pilgrim authored
-
Simon Pilgrim authored
Just use default CHECK
-
Simon Pilgrim authored
Just use default CHECK in most cases.
-
Simon Pilgrim authored
Just use default CHECK
-
Simon Pilgrim authored
We were relying on the dyn_cast<> succeeding - better use cast<> and have it assert that its the correct type than dereference a null result.
-
Simon Pilgrim authored
We were relying on the dyn_cast<> succeeding - better use cast<> and have it assert that its the correct type than dereference a null result.
-
Simon Pilgrim authored
As raised by @nlopes on D90382 - if this is not a rotate then the select was blocking poison from the 'shift-by-zero' non-TVal, but a funnel shift won't - so freeze it.
-
Simon Pilgrim authored
We can just check for a null value.
-