summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [clang][Index][NFC] Move IndexDataConsumer default implementationJan Korous2019-08-272-26/+11
| | | | llvm-svn: 370116
* [Clang][Bundler] Fix for a hang when unbundling fat binarySergey Dmitriev2019-08-272-4/+10
| | | | | | | | clang-offload-bundler tool may hang under certain conditions when it extracts a subset of all available device bundles from the fat binary that is handled by the BinaryFileHandler. This patch fixes this problem. Differential Revision: https://reviews.llvm.org/D66598 llvm-svn: 370115
* [InstCombine] Disable some portions of foldGEPICmp for GEPs that return a ↵Craig Topper2019-08-272-11/+41
| | | | | | vector of pointers. Fix other portions. llvm-svn: 370114
* [RISCV] Implement RISCVRegisterInfo::getPointerRegClassLuis Marques2019-08-271-0/+6
| | | | | | | | Fixes bug 43041 Differential Revision: https://reviews.llvm.org/D66752 llvm-svn: 370113
* [Analysis] Improve EmitGEPOffset handling of vector GEPs with scalar indices.Craig Topper2019-08-272-0/+24
| | | | | | | This patch splats the scalar index if necessary before using it in any integer casts or other arithmetic. llvm-svn: 370112
* Fix asan-symbolize-bad-path.cpp on DarwinAlexander Richardson2019-08-271-1/+2
| | | | | | | | I accidentally made the CHECK line stricter when committing D65322. While it happens to work for Linux and FreeBSD, it broke on Darwin. This commit restores the previous behaviour. llvm-svn: 370110
* [libc++] Add yet another test for inverted character classesLouis Dionne2019-08-271-0/+3
| | | | | | | | This was reported as part of a bug report that ended up being a duplicate for r340609, but I'm adding the test case since it's ever so slightly different from what we had before. llvm-svn: 370109
* Diagnose _Bool as a C99 extension.Aaron Ballman2019-08-272-0/+6
| | | | llvm-svn: 370108
* Debug Info: Support for DW_AT_export_symbols for anonymous structsShafik Yaghmour2019-08-272-1/+17
| | | | | | | | | | | | | | | | | | | | This implements the DWARF 5 feature described in: http://dwarfstd.org/ShowIssue.php?issue=141212.1 To support recognizing anonymous structs: struct A { struct { // Anonymous struct int y; }; } a; This patch adds support in CGDebugInfo::CreateLimitedType(...) for this new flag and an accompanying test to verify this feature. Differential Revision: https://reviews.llvm.org/D66667 llvm-svn: 370107
* [Platform/Android] Read the adb server from an env variable if setNathan Lanza2019-08-271-1/+6
| | | | | | | | | | | | | | | Summary: The environment variable ANDROID_ADB_SERVER_PORT can be defined to have adbd litsen on a different port. Teach lldb how to understand this via simply checking the env var. Reviewers: xiaobai, clayborg Subscribers: srhines Differential Revision: https://reviews.llvm.org/D66689 llvm-svn: 370106
* Update two x86 datalayouts for r370083, looks like racing commitsReid Kleckner2019-08-272-2/+2
| | | | llvm-svn: 370105
* [GlobalISel] Replace hard coded dynamic alloca handling with G_DYN_STACKALLOC.Amara Emerson2019-08-278-58/+283
| | | | | | | | | | | This change moves the actual stack pointer manipulation into the legalizer, available to targets via lower(). The codegen is slightly different because we're using explicit masks instead of G_PTRMASK, and using G_SUB rather than adding a negative amount via G_GEP. Differential Revision: https://reviews.llvm.org/D66678 llvm-svn: 370104
* [clangd] Add a distinct highlighting for local variablesNathan Ridge2019-08-274-68/+76
| | | | | | | | | | | | | | | | | | Summary: It's useful to be able to distinguish local variables from namespace scope variables. Reviewers: hokein, jvikstrom Reviewed By: hokein Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66723 llvm-svn: 370103
* [Loads/SROA] Remove blatantly incorrect code and fix a bug revealed in the ↵Philip Reames2019-08-273-47/+13
| | | | | | | | | | | | | | | | process The code we had isSafeToLoadUnconditionally was blatantly wrong. This function takes a "Size" argument which is supposed to describe the span loaded from. Instead, the code use the size of the pointer passed (which may be unrelated!) and only checks that span. For any Size > LoadSize, this can and does lead to miscompiles. Worse, the generic code just a few lines above correctly handles the cases which *are* valid. So, let's delete said code. Removing this code revealed two issues: 1) As noted by jdoerfert the removed code incorrectly handled external globals. The test update in SROA is to stop testing incorrect behavior. 2) SROA was confusing bytes and bits, but this wasn't obvious as the Size parameter was being essentially ignored anyway. Fixed. Differential Revision: https://reviews.llvm.org/D66778 llvm-svn: 370102
* AMDGPU: Always emit amdgpu-flat-work-group-sizeMatt Arsenault2019-08-272-16/+29
| | | | | | | The backend default maximum should be the hardware maximum, so the frontend should set the implementation defined default maximum. llvm-svn: 370101
* Diagnose both _Complex and _Imaginary as C99 extensions.Aaron Ballman2019-08-276-16/+28
| | | | llvm-svn: 370100
* DAG: computeNumSignBits for MULMatt Arsenault2019-08-272-14/+17
| | | | | | | | | | Copied directly from the IR version. Most of the testcases I've added for this are somewhat problematic because they really end up testing the yet to be implemented version for MUL_I24/MUL_U24. llvm-svn: 370099
* AMDGPU: Add baseline test for num sign bits of mulMatt Arsenault2019-08-271-0/+168
| | | | llvm-svn: 370098
* [XCOFF][AIX] Generate symbol table entries with llvm-readobjJason Liu2019-08-276-28/+937
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch implements main entry and auxiliary entries of symbol table generation for llvm-readobj on AIX. The source code of aix_xcoff_xlc_test8.o (compile with xlc) is: -bash-4.2$ cat test8.c extern int i; extern int TestforXcoff; extern int fun(int i); static int static_i; char* p="abcd"; int fun1(int j) { static_i++; j++; j=j+*p; return j; } int main() { i++; fun(i); return fun1(i); } Patch provided by DiggerLin Differential Revision: https://reviews.llvm.org/D65240 llvm-svn: 370097
* Remove clang-tidy-vs from clang-tools-extra (PR41791)Alex Lorenz2019-08-2739-3507/+8
| | | | | | | | | | | | | | | | | | | | | | The clang-tidy-vs visual studio plugin in clang-tools-extra contains a security vulnerability in the YamlDotNet package [1]. I posted to cfe-dev [2], asking if there was anyone who was interested in updating the the plugin to address the vulnerability. Reid mentioned that Zach (the original committer), said that there's another plugin (Clang Power Tools) that provides clang-tidy support, with additional extra features, so it would be ok to remove clang-tidy-vs. This commit removes the plugin to address the security vulnerability, and adds a section to the release notes that mentions that the plugin was removed, and suggests to use Clang Power Tools. Fixes PR 41791. [1]: https://nvd.nist.gov/vuln/detail/CVE-2018-1000210 [2]: http://lists.llvm.org/pipermail/cfe-dev/2019-August/063196.html Differential Revision: https://reviews.llvm.org/D66813 llvm-svn: 370096
* Revert Autogenerate the shebang lines for tools/opt-viewerReid Kleckner2019-08-276-24/+7
| | | | | | | | | | This reverts r369486 (git commit 8d18384809957cc923752e10a86adab129e3df48) The opt-viewer tests don't pass after this change, and fixing them isn't trivial. opt-viewer.py imports optmap, which requires adjusting pythonpath, which is more work than I'm willing to do to fix forward. llvm-svn: 370095
* Add GWP-ASan fuzz target to compiler-rt/tools.Mitch Phillips2019-08-275-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: @eugenis to approve addition of //compiler-rt/tools. @pree-jackie please confirm that this WFY. D66494 introduced the GWP-ASan stack_trace_compressor_fuzzer. Building fuzz targets in compiler-rt is a new affair, and has some challenges: - If the host compiler doesn't have compiler-rt, the -fsanitize=fuzzer may not be able to link against `libclang_rt.fuzzer*`. - Things in compiler-rt generally aren't built when you want to build with sanitizers using `-DLLVM_USE_SANITIZER`. This tricky to work around, so we create the new tools directory so that we can build fuzz targets with sanitizers. This has the added bonus of fixing the problem above as well, as we can now just guard the fuzz target build to only be done with `-DLLVM_USE_SANITIZE_COVERAGE=On`. Reviewers: eugenis, pree-jackie Reviewed By: eugenis, pree-jackie Subscribers: dberris, mgorny, #sanitizers, llvm-commits, eugenis, pree-jackie, lebedev.ri, vitalybuka, morehouse Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D66776 llvm-svn: 370094
* [driver][xray] fix the macOS support checker by supporting -macosAlex Lorenz2019-08-272-1/+5
| | | | | | | | | | | triple in addition to -darwin The previous check incorrectly checked for macOS support by allowing -darwin triples only, and -macos triple was not supported. Differential Revision: https://reviews.llvm.org/D61758 llvm-svn: 370093
* [ORCv2] - New Speculate Query ImplementationPraveen Velliengiri2019-08-275-91/+383
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch introduces, SequenceBBQuery - new heuristic to find likely next callable functions it tries to find the blocks with calls in order of execution sequence of Blocks. It still uses BlockFrequencyAnalysis to find high frequency blocks. For a handful of hottest blocks (plan to customize), the algorithm traverse and discovered the caller blocks along the way to Entry Basic Block and Exit Basic Block. It uses Block Hint, to stop traversing the already visited blocks in both direction. It implicitly assumes that once the block is visited during discovering entry or exit nodes, revisiting them again does not add much. It also branch probability info (cached result) to traverse only hot edges (planned to customize) from hot blocks. Without BPI, the algorithm mostly return's all the blocks in the CFG with calls. It also changes the heuristic queries, so they don't maintain states. Hence it is safe to call from multiple threads. It also implements, new instrumentation to avoid jumping into JIT on every call to the function with the help _orc_speculate.decision.block and _orc_speculate.block. "Speculator Registration Mechanism is also changed" - kudos to @lhames Open to review, mostly looking to change implementation of SequeceBBQuery heuristics with good data structure choices. Reviewers: lhames, dblaikie Reviewed By: lhames Subscribers: mgorny, hiraditya, mgrang, llvm-commits, lhames Tags: #speculative_compilation_in_orc, #llvm Differential Revision: https://reviews.llvm.org/D66399 llvm-svn: 370092
* [Tblgen][MCA] Add the ability to mark groups as LoadQueue and StoreQueue. NFCIAndrea Di Biagio2019-08-272-6/+6
| | | | | | | | | | | | | | | | Before this patch, users were not allowed to optionally mark processor resource groups as load/store queues. That is because tablegen class MemoryQueue was originally declared as expecting a ProcResource template argument (instead of a more generic ProcResourceKind). That was an oversight, since the original intention from D54957 was to let user mark any processor resource as either load/store queue. This patch adds the ability to use processor resource groups in MemoryQueue definitions. This is not a user visible change. Differential Revision: https://reviews.llvm.org/D66810 llvm-svn: 370091
* [dotest] Remove results portJonas Devlieghere2019-08-278-72/+9
| | | | | | | | | | The results port was used by dosep.py to deal with test results coming form different processes. With dosep.py gone, I don't think we need this any longer. Differential revision: https://reviews.llvm.org/D66811 llvm-svn: 370090
* AMDGPU: Add amdgpu-32bit-address-high-bits to MIR serializationMatt Arsenault2019-08-274-2/+22
| | | | llvm-svn: 370089
* [JITLink] Fix bogus TimerGroup constructor call.Lang Hames2019-08-271-3/+2
| | | | llvm-svn: 370088
* Move EH spec mismatches under -fms-compatibilityReid Kleckner2019-08-275-51/+52
| | | | | | | | | | | | | | | | | | | | | -fms-extensions is intended to enable conforming language extensions and -fms-compatibility is intended to language rule relaxations, so a user could plausibly compile with -fno-ms-compatibility on Windows while still using dllexport, for example. This exception specification validation behavior has been handled as a warning since before -fms-compatibility was added in 2011. I think it's just an oversight that it hasn't been moved yet. This will help users find conformance issues in their code such as those found in _com_ptr_t as described in https://llvm.org/PR42842. Reviewers: hans Subscribers: STL_MSFT, cfe-commits Differential Revision: https://reviews.llvm.org/D66770 llvm-svn: 370087
* AMDGPU: Fix crash from inconsistent register types for v3i16/v3f16Matt Arsenault2019-08-272-3/+92
| | | | | | | This is something of a workaround since computeRegisterProperties seems to be doing the wrong thing. llvm-svn: 370086
* [ORC] NFC remove unimplemented queryPraveen Velliengiri2019-08-271-7/+0
| | | | | | | | | | | | | | | | Summary: CFGWalk Query is unimplemented for valid reasons. But the declaration got included in commit file. Reviewers: lhames, dblaikie Reviewed By: dblaikie Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66289 llvm-svn: 370085
* Recommit "[GlobalISel] Import patterns containing INSERT_SUBREG"Jessica Paquette2019-08-2710-39/+407
| | | | | | | | | | I thought `llvm::sort` was stable for some reason but it's not. Use `llvm::stable_sort` in `CodeGenTarget::getSuperRegForSubReg`. Original patch: https://reviews.llvm.org/D66498 llvm-svn: 370084
* Change the X86 datalayout to add three address spaces for 32 bit signed,Amy Huang2019-08-27520-538/+550
| | | | | | 32 bit unsigned, and 64 bit pointers. llvm-svn: 370083
* Use FileEntryRef for PPCallbacks::HasIncludeAlex Lorenz2019-08-276-7/+41
| | | | | | | | This fixes the issue where a filename dependendency was missing if the file that was referenced with __has_include() was accessed through a symlink in an earlier run, if the file manager was reused between runs. llvm-svn: 370081
* Revert "[GlobalISel] Import patterns containing INSERT_SUBREG"Jessica Paquette2019-08-2710-407/+39
| | | | | | | | | | When EXPENSIVE_CHECKS are enabled, GlobalISelEmitterSubreg.td doesn't get stable output. Reverting while I debug it. See: https://reviews.llvm.org/D66498 llvm-svn: 370080
* [X86] Remove encoding information from the TAILJMP instructions that are ↵Craig Topper2019-08-272-45/+87
| | | | | | | | | | | | | | lowered by MCInstLowering. Fix LowerPATCHABLE_TAIL_CALL to also convert them to regular JMP/JCC instructions There are 5 instructions here that are converted from TAILJMP opcodes to regular JMP/JCC opcodes during MCInstLowering. So normally there encoding information isn't used. The exception being when XRay wraps them in PATCHABLE_TAIL_CALL. For the ones that weren't already handled in MCInstLowering, add handling for those and remove their encoding information. This patch fixes PATCHABLE_TAIL_CALL to do the same opcode conversion as the regular lowering patch. Then removes the encoding information. Differential Revision: https://reviews.llvm.org/D66561 llvm-svn: 370079
* [lldb] Fix x86 compilationTatyana Krasnukha2019-08-276-21/+19
| | | | | | | | Differential Revision: https://reviews.llvm.org/D66655 Patch by Leonid Mashinskiy llvm-svn: 370078
* [JITLink] Add timers and -show-times option to llvm-jitlink.Lang Hames2019-08-271-3/+35
| | | | | | | The timers track time spent loading objects, linking, and (if applicable) running JIT-link'd code. llvm-svn: 370075
* [JITLink][ORC] Track eh-frame section size for registration/deregistration.Lang Hames2019-08-274-55/+89
| | | | | | | | | | | | | | | On MachO, processing of the eh-frame section should stop if the end of the __eh_frame section is reached, regardless of whether or not there is a null CFI length field at the end of the section. This patch tracks the eh-frame section size and threads it through the appropriate APIs so that processing can be terminated correctly. No testcase yet: This patch is all API plumbing (rather than modification of linked memory) which the existing infrastructure does not provide a way of testing. Committing without a testcase until I have an idea of how to write one. llvm-svn: 370074
* [RISCV] Set MaxAtomicInlineWidth and MaxAtomicPromoteWidth for RV32/RV64 ↵Sam Elliott2019-08-274-0/+260
| | | | | | | | | | | | | | | | | | targets with atomics Summary: This ensures that libcalls aren't generated when the target supports atomics. Atomics aren't in the base RV32I/RV64I instruction sets, so MaxAtomicInlineWidth and MaxAtomicPromoteWidth are set only when the atomics extension is being targeted. This must be done in setMaxAtomicWidth, as this should be done after handleTargetFeatures has been called. Reviewers: jfb, jyknight, wmi, asb Reviewed By: asb Subscribers: pzheng, MaskRay, s.egerton, lenary, dexonsmith, psnobl, benna, Jim, JohnLLVM, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, lewis-revill, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57450 llvm-svn: 370073
* [JITLink] Don't under-align zero-fill sections.Lang Hames2019-08-272-26/+27
| | | | | | | If content sections have lower alignment than zero-fill sections then bump the overall segment alignment to avoid under-aligning the zero-fill sections. llvm-svn: 370072
* [DAGCombiner] cancel fnegs from multiplied operands of FMASanjay Patel2019-08-273-20/+33
| | | | | | | | | | | | | | | | | | (-X) * (-Y) + Z --> X * Y + Z This is a missing optimization that shows up as a potential regression in D66050, so we should solve it first. We appear to be partly missing this fold in IR as well. We do handle the simpler case already: (-X) * (-Y) --> X * Y And it might be beneficial to make the constraint less conservative (eg, if both operands are cheap, but not necessarily cheaper), but that causes infinite looping for the existing fmul transform. Differential Revision: https://reviews.llvm.org/D66755 llvm-svn: 370071
* Handle local commons for XCOFF object file writingJason Liu2019-08-273-4/+50
| | | | | | | | | | | | | | | Summary: Adds support for emitting common local global symbols to an XCOFF object file. Local commons are emitted into the .bss section with a storage class of C_HIDEXT. Patch by: daltenty Reviewers: sfertile, hubert.reinterpretcast Differential Revision: https://reviews.llvm.org/D66097 llvm-svn: 370070
* Revert "[CodeGen] Do the Simple Early Return in block-placement pass to ↵Jinsong Ji2019-08-272-44/+8
| | | | | | | | | | | optimize the blocks" This reverts commit b3d258fc44b588f06eb35f8e4b9a6d1fc859acec. @skatkov is reporting crash in D63972#1646303 Contacted @ZhangKang, and revert the commit on behalf of him. llvm-svn: 370069
* Update the SARIF exporter to SARIF 2.1Joe Ranieri2019-08-274-152/+141
| | | | | | | | | | This updates the SARIF exporter to produce SARIF 2.1 output. The bulk of the diffs come from two changes to SARIF: * https://github.com/oasis-tcs/sarif-spec/issues/309 * https://github.com/oasis-tcs/sarif-spec/issues/179 Differential Revision: https://reviews.llvm.org/D65211 llvm-svn: 370068
* [MIPS GlobalISel] ClampScalar G_SHL, G_ASHR and G_LSHR Petar Avramovic2019-08-273-1/+397
| | | | | | | | ClampScalar G_SHL, G_ASHR and G_LSHR to s32 for MIPS32. Differential Revision: https://reviews.llvm.org/D66533 llvm-svn: 370067
* Replace some custom C11 extension warnings with the generic warning.Aaron Ballman2019-08-277-40/+46
| | | | llvm-svn: 370066
* [GlobalISel] Factor narrowScalar for G_ASHR and G_LSHR. NFCPetar Avramovic2019-08-271-27/+11
| | | | | | | | | Main difference is in the way Hi for Long shift (HiL) is made. G_LSHR fills HiL with zeros, while G_ASHR fills HiL with sign bit value. Differential Revision: https://reviews.llvm.org/D66589 llvm-svn: 370064
* [GlobalISel] Fix narrowScalar for shifts to match algorithm from SDAGPetar Avramovic2019-08-277-276/+276
| | | | | | | | | Fix typos. Use Hi and Lo prefixes for Or instead of LHS and RHS to match names of surrounding variables. Differential Revision: https://reviews.llvm.org/D66587 llvm-svn: 370062
* Fix a SARIF exporter crash with macro expansionsJoe Ranieri2019-08-273-25/+153
| | | | | | Differential Revision: https://reviews.llvm.org/D65209 llvm-svn: 370061
OpenPOWER on IntegriCloud