summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer][NFC] Add different interestingness kindsKristof Umann2019-08-213-28/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We defined (on the mailing list and here on phabricator) 2 different cases where retrieving information about a control dependency condition is very important: * When the condition's last write happened in a different stack frame * When the collapse point of the condition (when we can constrain it to be true/false) didn't happen in the actual condition. It seems like we solved this problem with the help of expression value tracking, and have started working on better diagnostics notes about this process. Expression value tracking is nothing more than registering a variety of visitors to construct reports about it. Each of the registered visitors (ReturnVisitor, FindLastStoreVisitor, NoStoreFuncVisitor, etc) have something to go by: a MemRegion, an SVal, an ExplodedNode, etc. For this reason, better explaining a last write is super simple, we can always just pass on some more information to the visitor in question (as seen in D65575). ConditionBRVisitor is a different beast, as it was built for a different purpose. It is responsible for constructing events at, well, conditions, and is registered only once, and isn't a part of the "expression value tracking family". Unfortunately, it is also the visitor to tinker with for constructing better diagnostics about the collapse point problem. This creates a need for alternative way to communicate with ConditionBRVisitor that a specific condition is being tracked for for the reason of being a control dependency. Since at almost all PathDiagnosticEventPiece construction the visitor checks interestingness, it makes sense to pair interestingness with a reason as to why we marked an entity as such. Differential Revision: https://reviews.llvm.org/D65723 llvm-svn: 369583
* Add char8_t support (C++20)Jonas Devlieghere2019-08-219-4/+129
| | | | | | | | | | | | This patch adds support for the char8_t type introduced in C++20 char8_t. The original patch was submitted by James Blachly on the LLDB mailing list [1]. I modified the patch a bit and added a test. [1] http://lists.llvm.org/pipermail/lldb-dev/2019-August/015393.html Differential revision: https://reviews.llvm.org/D66447 llvm-svn: 369582
* Use C++14 heteregenous lookup for a couple of std::map<std::string, ...>Benjamin Kramer2019-08-214-5/+6
| | | | | | | These call find with a StringRef, heterogenous lookup saves a temporary std::string there. llvm-svn: 369581
* [RISCV] Fix use of side-effects in asserts in decoder functionsLuis Marques2019-08-211-6/+9
| | | | llvm-svn: 369580
* [BinaryFormat] Teach identify_magic about Tapi files.Cyndy Ishida2019-08-216-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Tapi files are YAML files that start with the !tapi tag. The only execption are TBD v1 files, which don't have a tag. In that case we have to scan a little further and check if the first key "archs" exists. This is the first patch in a series of patches to add libObject support for text-based dynamic library (.tbd) files. This patch is practically exactly the same as D37820, that was never pushed to master, and is needed for future commits related to reading tbd files for llvm-nm Reviewers: ributzka, steven_wu, bollu, espindola, jfb, shafik, jdoerfert Reviewed By: steven_wu Subscribers: dexonsmith, llvm-commits Tags: #llvm, #clang, #sanitizers, #lldb, #libc, #openmp Differential Revision: https://reviews.llvm.org/D66149 llvm-svn: 369579
* Fix documentation build after rL369568Yuanfang Chen2019-08-211-5/+5
| | | | llvm-svn: 369578
* [Attributor][NFC] Fix copy & paste errorJohannes Doerfert2019-08-211-1/+1
| | | | llvm-svn: 369577
* [Attributor][NFC] Remove leftover semicolonJohannes Doerfert2019-08-211-1/+1
| | | | llvm-svn: 369576
* [Attributor] Use existing unreachable instead of introducing new onesJohannes Doerfert2019-08-212-0/+13
| | | | | | | So far we split the unreachable off and placed a new one, this is not necessary. llvm-svn: 369575
* [analyzer] Mention whether an event is about a condition in a bug report part 1Kristof Umann2019-08-212-186/+198
| | | | | | | | | | Can't add much more to the title! This is part 1, the case where the collapse point isn't in the condition point is the responsibility of ConditionBRVisitor, which I'm addressing in part 2. Differential Revision: https://reviews.llvm.org/D65575 llvm-svn: 369574
* Fix -Werror=unused-variable error after r369528.Richard Smith2019-08-211-0/+3
| | | | llvm-svn: 369573
* gn build: Merge r369568Nico Weber2019-08-211-0/+1
| | | | llvm-svn: 369572
* gn build: Make sync script not exit 1 if it writes changesNico Weber2019-08-211-1/+1
| | | | llvm-svn: 369571
* [GVN] Do PHI translations across all edges between the load and the ↵Florian Hahn2019-08-212-6/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | unavailable pred. Currently we do not properly translate addresses with PHIs if LoadBB != LI->getParent(), because PHITranslateAddr expects a direct predecessor as argument, because it considers all instructions outside of the current block to not requiring translation. The amount of cases that trigger this should be very low, as most single predecessor blocks should be folded into their predecessor by GVN before we actually start with value numbering. It is still not guaranteed to happen, so we should do PHI translation along all edges between the loads' block and the predecessor where we have to place a load. There are a few test cases showing current limits of the PHI translation, which could be improved later. Reviewers: spatel, reames, efriedma, john.brawn Reviewed By: efriedma Tags: #llvm Differential Revision: https://reviews.llvm.org/D65020 llvm-svn: 369570
* Revert r369549 as it broke the bots.Aaron Ballman2019-08-212-10/+7
| | | | | | http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap/builds/13605/ llvm-svn: 369569
* [clang-tidy] Check for dynamically initialized statics in headers.Yuanfang Chen2019-08-218-1/+193
| | | | | | | | | | | | Finds instances where variables with static storage are initialized dynamically in header files. Reviewed By: aaron.ballman, alexfh Patch by Charles Zhang! Differential Revision: https://reviews.llvm.org/D62829 llvm-svn: 369568
* Revert r367389 (and follow-up r368404); it caused PR43073.Nico Weber2019-08-216-621/+79
| | | | llvm-svn: 369567
* [WebAssembly] Handle aliases in WebAssemblyFixFunctionBitcastsSam Clegg2019-08-212-1/+20
| | | | | | | | Fixes: https://github.com/emscripten-core/emscripten/issues/8770 Differential Revision: https://reviews.llvm.org/D66508 llvm-svn: 369566
* [MVT] Add v16f16 and v32f16 vectors.Craig Topper2019-08-214-81/+100
| | | | | | | | | I might look at improving PR43065 which will require being able to mark a 256 and 512 bit vector of f16 as Legal. Differential Revision: https://reviews.llvm.org/D66515 llvm-svn: 369565
* [TableGen] Include ValueTypes.td directly into the intrinsic-varargs.td test.Craig Topper2019-08-211-9/+3
| | | | | | | | This prevents needing to keep the test in sync with ValueTypes.td This is not the only test that includes ValueTypes.td. llvm-svn: 369564
* [mips] Replace call `expandLoadAddress` by `loadAndAddSymbolAddress`. NFCSimon Atanasyan2019-08-211-2/+2
| | | | | | | | In case of expanding `lw/sw $reg, symbol($reg)` instruction for PIC it's enough to call the `loadAndAddSymbolAddress` method. Additional work performed by the `expandLoadAddress` is not required here. llvm-svn: 369563
* [mips] Remove duplicated case from the `StringSwitch`. NFCSimon Atanasyan2019-08-211-1/+0
| | | | llvm-svn: 369562
* [DAGCombiner] Remove mostly redundant calls to AddToWorklistAmaury Sechet2019-08-213-5/+4
| | | | | | | | | | | | | | | | | Summary: These calls change the order in which some nodes are processed and so have an effect on codegen. The change in fixup-bw-copy.ll is due to (and (load anyext)) gets transformed into (load zext) while previously the and was removed by SimplifyDemandedBits, so the (load anyext) remained. Reviewers: craig.topper, efriedma, RKSimon, lebedev.ri Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66543 llvm-svn: 369561
* [docs] Add GwpAsan to toctree.Mitch Phillips2019-08-212-2/+4
| | | | | | Reverts rL369556 in the process, as it's no longer needed. llvm-svn: 369560
* [lld-link] implement -lto-obj-pathBob Haarman2019-08-215-0/+34
| | | | | | | | | | | | | | | | | | | Summary: This adds the -lto-obj-path option to lld-link. This can be used to specify a path at which to write a native object file for the full LTO part when using LTO unit splitting. Reviewers: ruiu, tejohnson, pcc, rnk Reviewed By: ruiu, rnk Subscribers: mehdi_amini, steven_wu, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65964 llvm-svn: 369559
* [BitcodeReader] Check if we can create a null constant for type.Florian Hahn2019-08-213-0/+8
| | | | | | | | | | | | | | | | | | | We cannot create null constants for certain types, e.g. VoidTy, FunctionTy or LabelTy. getNullValue asserts if we pass in an unsupported type. We should also check for opaque types, but I'm not sure how. This fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14795. Reviewers: t.p.northover, jfb, vsk Reviewed By: vsk Tags: #llvm Differential Revision: https://reviews.llvm.org/D65897 llvm-svn: 369557
* [docs] Fix GwpAsan.rstJordan Rupprecht2019-08-211-0/+2
| | | | llvm-svn: 369556
* Generalize FindTypes with CompilerContext to support fuzzy lookupAdrian Prantl2019-08-2119-71/+169
| | | | | | | | | | | | | | | This patch generalizes the FindTypes with CompilerContext interface to support looking up a type of unknown kind by name, as well as looking up a type inside an unspecified submodule. These features are motivated by the Swift branch, but are fully tested via unit tests and lldb-test on llvm.org. Specifically, this patch adds an AnyModule and an AnyType CompilerContext kind. Differential Revision: https://reviews.llvm.org/D66507 rdar://problem/54471165 llvm-svn: 369555
* Add newline to GWP-ASan sphinx document.Mitch Phillips2019-08-211-0/+1
| | | | | | Should fix the document builder. llvm-svn: 369554
* [docs] Convert remaining command guide entries from md to rst.Jordan Rupprecht2019-08-218-65/+91
| | | | | | | | | | | | | | | | | | | Summary: Linking between markdown and rst files is currently not supported very well, e.g. the current llvm-addr2line docs [1] link to "llvm-symbolizer" instead of "llvm-symbolizer.html". This is weirdly broken in different ways depending on which versions of sphinx and recommonmark are being used, so workaround the bug by using rst everywhere. [1] http://llvm.org/docs/CommandGuide/llvm-addr2line.html Reviewers: jhenderson Reviewed By: jhenderson Subscribers: lebedev.ri, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66305 llvm-svn: 369553
* [GWP-ASan] Add public-facing documentation [6].Mitch Phillips2019-08-213-3/+337
| | | | | | | | | | | | | | | | | | | | | Summary: Note: Do not submit this documentation until Scudo support is reviewed and submitted (should be #[5]). See D60593 for further information. This patch introduces the public-facing documentation for GWP-ASan, as well as updating the definition of one of the options, which wasn't properly merged. The document describes the design and features of GWP-ASan, as well as how to use GWP-ASan from both a user's standpoint, and development documentation for supporting allocators. Reviewers: jfb, morehouse, vlad.tsyrklevich Reviewed By: morehouse, vlad.tsyrklevich Subscribers: kcc, dexonsmith, kubamracek, cryptoad, jfb, #sanitizers, llvm-commits, vlad.tsyrklevich, morehouse Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D62875 llvm-svn: 369552
* [GWP-ASan] Build stack_trace_compressor_fuzzer.Mitch Phillips2019-08-211-17/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Flips the switch to build stack_trace_compressor_fuzzer. This was recently temporarily disabled in rL369079 as it was breaking the sanitizer buildbots. My diagnosis of the problem is that on clang-only bootstrap builds, we build gwp_asan before libfuzzer. This causes a discrepancy when the clang driver attempts to link libclang_rt.fuzzer* as CMake doesn't see a dependency there. I've (hopefully) fixed the issue by adding a direct dependency for the fuzz target so CMake can resolve the build order properly. As part of this, the libFuzzer 'fuzzer' target has to be discovered before the declaration of the fuzz target. pcc@ for mild review + notification as buildcop. Reviewers: pcc Reviewed By: pcc Subscribers: mgorny, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D66494 llvm-svn: 369551
* [LTO] Always mark regular LTO units with EnableSplitLTOUnit=1 under the new ↵Leonard Chan2019-08-212-2/+3
| | | | | | | | | | | | pass manager Match the behavior of D65009 under the new pass manager. This addresses the test clang/test/CodeGen/split-lto-unit.c when running under the new PM. Differential Revision: https://reviews.llvm.org/D66488 llvm-svn: 369550
* Fix -Wimplicit-fallthrough warnings in regcomp.cNathan Huckleberry2019-08-212-7/+10
| | | | | | | | | | | | | | | | | | Summary: Since clang does not support comment style fallthrough annotations these should be switched. Reviewers: aaron.ballman, nickdesaulniers, xbolva00 Reviewed By: aaron.ballman, nickdesaulniers, xbolva00 Subscribers: xbolva00, nickdesaulniers, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66487 llvm-svn: 369549
* [LoopPassManager + MemorySSA] Only enable use of MemorySSA for LPMs known to ↵Alina Sbirlea2019-08-2124-52/+120
| | | | | | | | | | | | | | | | | | | | | | | | preserve it. Summary: Add a flag to the FunctionToLoopAdaptor that allows enabling MemorySSA only for the loop pass managers that are known to preserve it. If an LPM is known to have only loop transforms that *all* preserve MemorySSA, then use MemorySSA if `EnableMSSALoopDependency` is set. If an LPM has loop passes that do not preserve MemorySSA, then the flag passed is `false`, regardless of the value of `EnableMSSALoopDependency`. When using a custom loop pass pipeline via `passes=...`, use keyword `loop` vs `loop-mssa` to use MemorySSA in that LPM. If a loop that does not preserve MemorySSA is added while using the `loop-mssa` keyword, that's an error. Add the new `loop-mssa` keyword to a few tests where a difference occurs when enabling MemorySSA. Reviewers: chandlerc Subscribers: mehdi_amini, Prazek, george.burgess.iv, sanjoy.google, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66376 llvm-svn: 369548
* GlobalISel: Implement moreElementsVector for G_UNMERGE_VALUES sourcesMatt Arsenault2019-08-2126-350/+735
| | | | | | | | This is necessary for handling <3 x s16> on AMDGPU, assuming this should be handled as 2 separate legalization actions. The alternative would be for fewerElementsVector to handle 3->2. llvm-svn: 369547
* Add a couple of extra test noticed in post-commit discussion of rL369541Philip Reames2019-08-211-0/+19
| | | | llvm-svn: 369546
* [ARM] Formatting for ARMInstrMVE.td. NFCDavid Green2019-08-211-89/+98
| | | | | | | This is just some formatting cleanup, prior to the masked load and store patch in D66534. llvm-svn: 369545
* git-llvm: Make push --force suppress error on nothing to commit as wellNico Weber2019-08-211-5/+6
| | | | llvm-svn: 369544
* [Sanitizer] Disable -Wframe-larger-than on SystemZUlrich Weigand2019-08-211-2/+2
| | | | | | | | | | | | | | | | | SystemZ builds show -Wframe-larger-than warnings in two functions: 'sanitizer::SuspendedThreadsListLinux::GetRegistersAndSP' 'sanitizer::SizeClassAllocator32<__sanitizer::AP32>::PopulateFreeList' In both cases, the frame size looks correct; each of the functions has a large local variable that brings the frame size close to the limit even on x86, and the extra 160 bytes of the default register save areas on SystemZ pushes it over the limit. PowerPC and MIPS already disable this warning; do the same on SystemZ. Differential Revision: https://reviews.llvm.org/D66021 llvm-svn: 369543
* clang: Fix typo in commentNico Weber2019-08-211-1/+1
| | | | llvm-svn: 369542
* [instcombine] icmp eq/ne (sub C, Y), C -> icmp eq/ne Y, 0Philip Reames2019-08-212-0/+45
| | | | | | Noticed while looking at pr43028. llvm-svn: 369541
* clang: Fix typo in commentNico Weber2019-08-211-1/+1
| | | | | | | (Sorry for all these commits; trying to sort out why svn doesn't want to store my password.) llvm-svn: 369540
* clang: Fix typo in commentNico Weber2019-08-211-1/+1
| | | | llvm-svn: 369539
* git-llvm: Give "push" a --force flag to disable confirm prompt on multiple ↵Nico Weber2019-08-211-1/+6
| | | | | | commits llvm-svn: 369538
* [libcxx] Only declare contents of threading API whenDavid Spickett2019-08-211-2/+5
| | | | | | | | | | | _LIBCPP_HAS_THREAD_API_EXTERNAL is not defined. When it is defined they will be declared by the __external_threading header instead. Differential revision: https://reviews.llvm.org/D66518 llvm-svn: 369537
* clang: Fix typo in commentNico Weber2019-08-211-1/+1
| | | | llvm-svn: 369536
* [ELF][ARM] Simplify some llvm-objdump tests with both ARM/Thumb statesFangrui Song2019-08-216-167/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | llvm-objdump can switch between ARM/Thumb states after D60927. In a few lld tests, we run both * llvm-objdump -d -triple=thumbv7a-none-linux-gnueabi %t * llvm-objdump -d -triple=armv7a-none-linux-gnueabi %t to test ARM/Thumb parts of the same file. In many cases we can just run one command. There is a problem that prevents us from cleaning more tests (e.g. test/ELF/arm-thumb-interwork-thunk.s): In llvm-objdump, while we have ARM/Thumb (primary and secondary) MCDisassembler and MCSubtargetInfo, we have just one MCInstrAnalysis which is used to resolve the targets of calls in both ARM/Thumb parts. // ThumbMCInstrAnalysis evaluating ARM parts or ARMMCInstrAnalysis evaluating Thumb parts // will have incorrect offsets. // An example of llvm-objdump -d -triple=thumbv7a on ARM part: 1304: 3d ff ff fa blx #-780 # no <...> 1308: 06 00 00 ea b #24 <arm_caller+0x24> # wrong target due to wrong offset Reviewed By: peter.smith Differential Revision: https://reviews.llvm.org/D66539 llvm-svn: 369535
* compiler-rt: Fix warning if COMPILER_RT_HAS_FCNTL_LCK is 0Nico Weber2019-08-211-0/+1
| | | | | | | Fixes "warning: implicit declaration of function 'flock' is invalid in C99" for flock(). llvm-svn: 369534
* Improving CodeView debug info type record's inline commentsNilanjana Basu2019-08-219-192/+636
| | | | llvm-svn: 369533
OpenPOWER on IntegriCloud