summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix for clang interface updateMikael Nilsson2018-12-131-1/+1
| | | | | | | | | FunctionProtoType.TypeQuals is now a Qualifiers object instead of an integer. The related clang commit: r349019 llvm-svn: 349020
* [OpenCL] Add generic AS to 'this' pointerMikael Nilsson2018-12-1340-143/+390
| | | | | | | | | | | | | Address spaces are cast into generic before invoking the constructor. Added support for a trailing Qualifiers object in FunctionProtoType. Note: This recommits the previously reverted patch, but now it is commited together with a fix for lldb. Differential Revision: https://reviews.llvm.org/D54862 llvm-svn: 349019
* Add new interceptors for vis(3) API in NetBSDKamil Rytarowski2018-12-135-0/+518
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add interceptors for the NetBSD style of vis(3) present inside libc: - vis - nvis - strvis - stravis - strnvis - strvisx - strnvisx - strenvisx - svis - snvis - strsvis - strsnvis - strsvisx - strsnvisx - strsenvisx - unvis - strunvis - strnunvis - strunvisx - strnunvisx Add a dedicated test verifying the installed interceptors. Based on original work by Yang Zheng. Reviewers: vitalybuka, joerg Reviewed By: vitalybuka Subscribers: tomsun.0.7, kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54594 llvm-svn: 349018
* Fix for bugzilla https://bugs.llvm.org/show_bug.cgi?id=39970Andrey Churbanov2018-12-1310-4/+27
| | | | | | | | Broken tests fixed Differential Revision: https://reviews.llvm.org/D55598 llvm-svn: 349017
* [CodeGen] Allow mempcy/memset to generate small overlapping stores.Clement Courbet2018-12-1311-71/+103
| | | | | | | | | | | | | Summary: All targets either just return false here or properly model `Fast`, so I don't think there is any reason to prevent CodeGen from doing the right thing here. Subscribers: nemanjai, javed.absar, eraman, jsji, llvm-commits Differential Revision: https://reviews.llvm.org/D55365 llvm-svn: 349016
* [asan] Don't check ODR violations for particular types of globalsVitaly Buka2018-12-139-9/+89
| | | | | | | | | | | | | | | | | Summary: private and internal: should not trigger ODR at all. unnamed_addr: current ODR checking approach fail and rereport false violation if a linker merges such globals linkonce_odr, weak_odr: could cause similar problems and they are already not instrumented for ELF. Reviewers: eugenis, kcc Subscribers: kubamracek, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D55621 llvm-svn: 349015
* AMDGPU/GlobalISel: Legalize f64 fadd/fmulMatt Arsenault2018-12-133-5/+31
| | | | llvm-svn: 349014
* Fix missing C++ mode comment in headerMatt Arsenault2018-12-131-1/+1
| | | | llvm-svn: 349013
* AMDGPU/GlobalISel: RegBankSelect some simple operationsMatt Arsenault2018-12-1311-2/+308
| | | | llvm-svn: 349012
* AMDGPU/GlobalISel: Test cleanupsMatt Arsenault2018-12-1312-138/+41
| | | | | | Remove IR and registers sections llvm-svn: 349011
* Portable Python script across Python versionSerge Guelton2018-12-131-2/+5
| | | | | | | | SocketServer has been renamed socketserver in Python3. Differential Revision: https://reviews.llvm.org/D55258 llvm-svn: 349010
* Portable Python script across Python versionSerge Guelton2018-12-131-2/+5
| | | | | | | | Queue module as been renamed into queue in Python3 Differential Revision: https://reviews.llvm.org/D55202 llvm-svn: 349009
* Portable Python script across Python versionSerge Guelton2018-12-131-2/+2
| | | | | | | | Use higher-level and more compatible threading module to start a new thread. Differential Revision: https://reviews.llvm.org/D55259 llvm-svn: 349008
* [X86] Remove assert leftover from when i1 was a legal type. Add more ↵Craig Topper2018-12-131-3/+1
| | | | | | accurate assert. NFC llvm-svn: 349007
* [AMDGPU] Fix build failure, second attemptStanislav Mekhanoshin2018-12-131-1/+1
| | | | | | | Some compilers complain that variable is captured and some complain when it is not. Switch to [&]. llvm-svn: 349006
* [AMDGPU] Fix build failureStanislav Mekhanoshin2018-12-131-1/+1
| | | | | | | Fixed error 'lambda capture 'CondReg' is not required to be captured for this use'. llvm-svn: 349005
* [clang] Add AST matcher for block expressions 🔍Stephane Moore2018-12-135-0/+22
| | | | | | | | | | | | | | | | | | Summary: This change adds a new AST matcher for block expressions. Test Notes: Ran the clang unit tests. Reviewers: aaron.ballman Reviewed By: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55546 llvm-svn: 349004
* [AMDGPU] Simplify negated conditionStanislav Mekhanoshin2018-12-135-0/+727
| | | | | | | | | | | | | | | | | | | Optimize sequence: %sel = V_CNDMASK_B32_e64 0, 1, %cc %cmp = V_CMP_NE_U32 1, %1 $vcc = S_AND_B64 $exec, %cmp S_CBRANCH_VCC[N]Z => $vcc = S_ANDN2_B64 $exec, %cc S_CBRANCH_VCC[N]Z It is the negation pattern inserted by DAGCombiner::visitBRCOND() in the rebuildSetCC(). Differential Revision: https://reviews.llvm.org/D55402 llvm-svn: 349003
* Revert r348645 - "[MemCpyOpt] memset->memcpy forwarding with undef tail"David L. Jones2018-12-133-40/+20
| | | | | | | This revision caused trucated memsets for structs with padding. See: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20181210/610520.html llvm-svn: 349002
* Remove unused Args parameter from EmitFunctionBody, NFCReid Kleckner2018-12-132-4/+3
| | | | llvm-svn: 349001
* [analyzer] RunLoopAutoreleaseLeakChecker: Come up with a test for r348822.Artem Dergachev2018-12-131-6/+43
| | | | | | | | | | | | | Statement memoization was removed in r348822 because it was noticed to cause memory corruption. This was happening because a reference to an object in a DenseMap was used after being invalidated by inserting a new key into the map. This test case crashes reliably under ASan (i.e., when Clang is built with -DLLVM_USE_SANITIZER="Address") on at least some machines before r348822 and doesn't crash after it. llvm-svn: 349000
* [LoopUtils] Prefer a set over a map. NFCI.Davide Italiano2018-12-131-6/+4
| | | | llvm-svn: 348999
* [test] Add a set of test for constant folding deopt operands with CVPPhilip Reames2018-12-131-0/+142
| | | | | | For anyone curious, the first test example is illustrative of a real code idiom produced by branching on the result of a three way comparison. llvm-svn: 348997
* [NFC] Small code cleanups in utility.Jonas Devlieghere2018-12-136-11/+9
| | | | | | Fix a few small annoyances in Utility I ran into. llvm-svn: 348996
* [Support] Fix FileNameLength passed to SetFileInformationByHandleShoaib Meenai2018-12-131-1/+1
| | | | | | | | | | | | | | | | The rename_internal function used for Windows has a minor bug where the filename length is passed as a character count instead of a byte count. Windows internally ignores this field, but other tools that hook NT api's may use the documented behavior: MSDN documentation specifying the size should be in bytes: https://docs.microsoft.com/en-us/windows/desktop/api/winbase/ns-winbase-_file_rename_info Patch by Ben Hillis. Differential Revision: https://reviews.llvm.org/D55624 llvm-svn: 348995
* [libcxx] Add assertion in deque::pop_back when popping from an empty dequeLouis Dionne2018-12-123-4/+55
| | | | | | | | Also, add tests making sure that vector and deque both catch the problem when assertions are enabled. Otherwise, deque would segfault and vector would never terminate. llvm-svn: 348994
* [gn build] Fix defines define on WindowsShoaib Meenai2018-12-121-1/+3
| | | | | | | | | | | On Windows, we won't go into the `host_os != "win"` block, so `defines` won't have been defined, and we'll run into an undefined identifier error when we try to later append to it. Unconditionally define it at the start and append to it everywhere else. Differential Revision: https://reviews.llvm.org/D55617 llvm-svn: 348993
* [globalisel] Add GISelChangeObserver::changingInstr()Daniel Sanders2018-12-125-6/+40
| | | | | | | | | | | | | | | | | | | | | Summary: In addition to knowing that an instruction is changed. It's also useful to know when it's about to change. For example, it might print the instruction so you can track the changes in a debug log, it might remove it from some queue while it's being worked on, or it might want to change several instructions as a single transaction and act on all the changes at once. Added changingInstr() to all existing uses of changedInstr() Reviewers: aditya_nandakumar Reviewed By: aditya_nandakumar Subscribers: rovka, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D55623 llvm-svn: 348992
* Emit a proper diagnostic when attempting to forward inalloca argumentsReid Kleckner2018-12-122-2/+14
| | | | | | | | | | The previous assertion was relatively easy to trigger, and likely will be easy to trigger going forward. EmitDelegateCallArg is relatively popular. This cleanly diagnoses PR28299 while I work on a proper solution. llvm-svn: 348991
* [WebAssembly] Add "needed" list to dylink sectionSam Clegg2018-12-121-0/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D55613 llvm-svn: 348990
* [WebAssembly] Update dylink section parsingSam Clegg2018-12-128-0/+20
| | | | | | | | | | This updates the format of the dylink section in accordance with recent "spec" change: https://github.com/WebAssembly/tool-conventions/pull/77 Differential Revision: https://reviews.llvm.org/D55609 llvm-svn: 348989
* [LoopDeletion] Update debug values after loop deletion.Davide Italiano2018-12-122-0/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When loops are deleted, we don't keep track of variables modified inside the loops, so the DI will contain the wrong value for these. e.g. int b() { int i; for (i = 0; i < 2; i++) ; patatino(); return a; -> 6 patatino(); 7 return a; 8 } 9 int main() { b(); } (lldb) frame var i (int) i = 0 We mark instead these values as unavailable inserting a @llvm.dbg.value(undef to make sure we don't end up printing an incorrect value in the debugger. We could consider doing something fancier, for, e.g. constants, in the future. PR39868. rdar://problem/46418795) Differential Revision: https://reviews.llvm.org/D55299 llvm-svn: 348988
* [InstCombine] Fix negative GEP offset evaluation for 32-bit pointersNikita Popov2018-12-122-5/+52
| | | | | | | | | | | | | | | | | This fixes https://bugs.llvm.org/show_bug.cgi?id=39908. The evaluateGEPOffsetExpression() function simplifies GEP offsets for use in comparisons against zero, basically by converting X*Scale+Offset==0 to X+Offset/Scale==0 if Scale divides Offset. However, before this is done, Offset is masked down to the pointer size. This results in incorrect results for negative Offsets, because we basically end up dividing the 32-bit offset *zero* extended to 64-bit bits (rather than sign extended). Fix this by explicitly sign extending the truncated value. Differential Revision: https://reviews.llvm.org/D55449 llvm-svn: 348987
* [hwasan] Link ubsan_cxx to shared runtime library.Evgeniy Stepanov2018-12-122-0/+19
| | | | | | | | | | | | Summary: This is needed for C++-specific ubsan and cfi error reporting to work. Reviewers: kcc, vitalybuka Subscribers: srhines, kubamracek, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D55589 llvm-svn: 348986
* [llvm-objcopy] Change Segment::Type from uint64_t to uint32_tFangrui Song2018-12-121-6/+6
| | | | | | | | | | | | | | | | | | Summary: In both Elf{32,64}_Phdr, the field Elf{32,64}_World p_type is uint32_t. Also reorder the fields to be similar to Elf64_Phdr (which is different from Elf32_Phdr but quite similar). Reviewers: rupprecht, jhenderson, jakehehrlich, alexshap, espindola Reviewed By: rupprecht Subscribers: emaste, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D55618 llvm-svn: 348985
* Switch Android from TLS_SLOT_TSAN(8) to TLS_SLOT_SANITIZER(6)Ryan Prichard2018-12-121-5/+5
| | | | | | | | | | | | | | | | | | | | Summary: The TLS_SLOT_TSAN slot is available starting in N, but its location (8) is incompatible with the proposed solution for implementing ELF TLS on Android (i.e. bump ARM/AArch64 alignment to reserve an 8-word TCB). Instead, starting in Q, Bionic replaced TLS_SLOT_DLERROR(6) with TLS_SLOT_SANITIZER(6). Switch compiler-rt to the new slot. Reviewers: eugenis, srhines, enh Reviewed By: eugenis Subscribers: ruiu, srhines, kubamracek, javed.absar, kristof.beyls, delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D55581 llvm-svn: 348984
* [hwasan] Android: Switch from TLS_SLOT_TSAN(8) to TLS_SLOT_SANITIZER(6)Ryan Prichard2018-12-122-3/+5
| | | | | | | | | | | | | | | | Summary: The change is needed to support ELF TLS in Android. See D55581 for the same change in compiler-rt. Reviewers: srhines, eugenis Reviewed By: eugenis Subscribers: srhines, llvm-commits Differential Revision: https://reviews.llvm.org/D55592 llvm-svn: 348983
* Revert "Declares __cpu_model as dso local"Haibo Huang2018-12-123-12/+0
| | | | | | This reverts r348978 llvm-svn: 348982
* Avoid code duplication in the SEH version of UnwindCursor::getRegisterName. NFC.Martin Storsjo2018-12-122-116/+10
| | | | | | | | This requires making Registers_*::getRegisterName static. Differential Revision: https://reviews.llvm.org/D55610 llvm-svn: 348981
* [PhaseOrdering] add test for funnel shift (rotate); NFCSanjay Patel2018-12-121-0/+49
| | | | | | | | As mentioned in D55604, there are 2 bugs here: 1. The new pass manager is speculating wildly by default. 2. The old pass manager is not converting this to funnel shift. llvm-svn: 348980
* [hwasan] Verify Android TLS slot at startup.Evgeniy Stepanov2018-12-123-0/+21
| | | | | | | | | | | | | | | Summary: Add a check that TLS_SLOT_TSAN / TLS_SLOT_SANITIZER, whichever android_get_tls_slot is using, is not conflicting with TLS_SLOT_DLERROR. Reviewers: rprichard, vitalybuka Subscribers: srhines, kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D55587 llvm-svn: 348979
* Declares __cpu_model as dso localHaibo Huang2018-12-123-0/+12
| | | | | | | | __builtin_cpu_supports and __builtin_cpu_is use information in __cpu_model to decide cpu features. Before this change, __cpu_model was not declared as dso local. The generated code looks up the address in GOT when reading __cpu_model. This makes it impossible to use these functions in ifunc, because at that time GOT entries have not been relocated. This change makes it dso local. Differential Revision: https://reviews.llvm.org/D53850 llvm-svn: 348978
* [AST] Store "UsesADL" information in CallExpr.Eric Fiselier2018-12-1219-81/+264
| | | | | | | | | | | | | | | | | | | | | Summary: Currently the Clang AST doesn't store information about how the callee of a CallExpr was found. Specifically if it was found using ADL. However, this information is invaluable to tooling. Consider a tool which renames usages of a function. If the originally CallExpr was formed using ADL, then the tooling may need to additionally qualify the replacement. Without information about how the callee was found, the tooling is left scratching it's head. Additionally, we want to be able to match ADL calls as quickly as possible, which means avoiding computing the answer on the fly. This patch changes `CallExpr` to store whether it's callee was found using ADL. It does not change the size of any AST nodes. Reviewers: fowles, rsmith, klimek, shafik Reviewed By: rsmith Subscribers: aaron.ballman, riccibruno, calabrese, titus, cfe-commits Differential Revision: https://reviews.llvm.org/D55534 llvm-svn: 348977
* [globalisel] Rename GISelChangeObserver's erasedInstr() to erasingInstr() ↵Daniel Sanders2018-12-126-14/+11
| | | | | | | | | | | | | | | | | | | | | | and related nits. NFC Summary: There's little of interest that can be done to an already-erased instruction. You can't inspect it, write it to a debug log, etc. It ought to be notification that we're about to erase it. Rename the function to clarify the timing of the event and reflect current usage. Also fixed one case where we were trying to print an erased instruction. Reviewers: aditya_nandakumar Reviewed By: aditya_nandakumar Subscribers: rovka, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D55611 llvm-svn: 348976
* [X86] Don't emit MULX by default with BMI2Craig Topper2018-12-127-407/+217
| | | | | | | | | | MULX has somewhat improved register allocation constraints compared to the legacy MUL instruction. Both output registers are encoded instead of fixed to EAX/EDX, but EDX is used as input. It also doesn't touch flags. Unfortunately, the encoding is longer. Prefering it whenever BMI2 is enabled is probably not optimal. Choosing it should somehow be a function of register allocation constraints like converting adds to three address. gcc and icc definitely don't pick MULX by default. Not sure what if any rules they have for using it. Differential Revision: https://reviews.llvm.org/D55565 llvm-svn: 348975
* Fix for llvm-dwarfdump changes for subroutine typesDavid Blaikie2018-12-121-2/+2
| | | | llvm-svn: 348974
* [test] [depr.c.headers] XFAIL uchar.h on NetBSDMichal Gorny2018-12-121-0/+1
| | | | llvm-svn: 348973
* [X86] Move stack folding test for MULX to a MIR test. Add a MULX32 case as wellCraig Topper2018-12-122-14/+103
| | | | | | | | A future patch may stop using MULX by default so use MIR to ensure we're always testing MULX. Add the 32-bit case that we couldn't do in the 64-bit mode IR test due to it being promoted to a 64-bit mul. llvm-svn: 348972
* [AMDGPU] Support for "uniform-work-group-size" attributeAakanksha Patil2018-12-129-31/+263
| | | | | | | | Updated the annotate-kernel-features pass to support the propagation of uniform-work-group attribute from the kernel to the called functions. Once this pass is run, all kernels, even the ones which initially did not have the attribute, will be able to indicate weather or not they have uniform work group size depending on the value of the attribute. Differential Revision: https://reviews.llvm.org/D50200 llvm-svn: 348971
* Support: use internal `call_once` on PPC64leSaleem Abdulrasool2018-12-121-1/+2
| | | | | | | | | | | | | | Use the replacement execute once threading support in LLVM for PPC64le. It seems that GCC does not define `__ppc__` and so we would actually call out to the C++ runtime there which is not what the current code intended. Check both `__ppc__` and `__PPC__`. This avoids the need for checking the endianness. Thanks to nemanjai for the hint about GCC's behaviour and the fact that the reviewed condition could be simplified. Original patch by Sarvesh Tamba! llvm-svn: 348970
OpenPOWER on IntegriCloud