summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [AArch64][GlobalISel] Support the neg_addsub_shifted_imm32 patternJessica Paquette2019-08-023-12/+220
| | | | | | | | | | | Add an equivalent ComplexRendererFns function for SelectNegArithImmed. This allows us to select immediate adds of -1 by turning them into subtracts. Update select-binop.mir to show that the pattern works. Differential Revision: https://reviews.llvm.org/D65460 llvm-svn: 367700
* [SimplifyCFG] Cleanup redundant conditions [NFC].Alina Sbirlea2019-08-021-10/+8
| | | | | | | | | | | | | | | | | | Summary: Since the for loop iterates over BB's predecessors, the branch conditions found must have BB as one of the successors. For an unconditional branch the successor must be BB, added `assert`. For a conditional branch, one of the two successors must be BB, simplify `else if` to `else` and `assert`. Sink common instructions outside the if/else block. Reviewers: sanjoy.google Subscribers: jlebar, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65596 llvm-svn: 367699
* [AMDGPU] Regenerated saddo.ll test file for D47927Simon Pilgrim2019-08-021-20/+557
| | | | llvm-svn: 367698
* Fix ARC after r367633Daniel Sanders2019-08-021-4/+2
| | | | llvm-svn: 367697
* CodeGen: Don't follow aliases when extracting type info.Peter Collingbourne2019-08-022-1/+19
| | | | | | | | | | | This fixes a crash in the case where the type info object is an alias pointing to a non-zero offset within a global or is otherwise unanalyzable by the stripPointerCasts() function. Looking through the alias is not the right thing to do anyway for similar reasons as D65118. Differential Revision: https://reviews.llvm.org/D65314 llvm-svn: 367696
* [InstCombine] fold cmp+select using select operand equivalenceSanjay Patel2019-08-025-336/+253
| | | | | | | | | | | | | | | | | | | | | | | | | | | As discussed in PR42696: https://bugs.llvm.org/show_bug.cgi?id=42696 ...but won't help that case yet. We have an odd situation where a select operand equivalence fold was implemented in InstSimplify when it could have been done more generally in InstCombine if we allow dropping of {nsw,nuw,exact} from a binop operand. Here's an example: https://rise4fun.com/Alive/Xplr %cmp = icmp eq i32 %x, 2147483647 %add = add nsw i32 %x, 1 %sel = select i1 %cmp, i32 -2147483648, i32 %add => %sel = add i32 %x, 1 I've left the InstSimplify code in place for now, but my guess is that we'd prefer to remove that as a follow-up to save on code duplication and compile-time. Differential Revision: https://reviews.llvm.org/D65576 llvm-svn: 367695
* [clang-tidy] Adding static analyzer check to list of clang-tidy checksNathan Huckleberry2019-08-0286-0/+993
| | | | | | | | | | | | | | | | | | | Summary: Since clang-tidy supports use of the static analyzer there should be documentation of how to invoke the static analyzer checks. Reviewers: JonasToth, aaron.ballman, NoQ, Szelethus Reviewed By: aaron.ballman Subscribers: nickdesaulniers, lebedev.ri, jfb, NoQ, Eugene.Zelenko, xazax.hun, baloghadamsoftware, a.sidorin, Szelethus, donat.nagy, dkrupp, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64454 llvm-svn: 367694
* Fix git-llvm to not delete non-empty directories.James Y Knight2019-08-021-15/+42
| | | | | | | | | | | | | | | | | | | | | | | | Previously, if a directory contained only other sub-directories, one of which was being removed, git llvm would delete the parent and all its subdirs, even though only one should've been deleted. This error occurred in r366590, where the commit attempted to remove lldb/packages/Python/lldbsuite/test/tools/lldb-mi, but git-llvm erroneously removed the entire contents of lldb/packages/Python/lldbsuite/test/tools. This happened because "git apply" automatically removes empty directories locally, and the absence of a local directory was previously taken as an indication to call 'svn rm' on that directory. However, an empty local directory does not necessarily indicate that the directory is truly empty. Fix that by removing directories only when they're empty on the git side. Differential Revision: https://reviews.llvm.org/D65416 llvm-svn: 367693
* gn build: Merge r367667.Peter Collingbourne2019-08-021-0/+1
| | | | llvm-svn: 367692
* Fix PC adjustment in StackFrame::GetSymbolContextJoseph Tremoulet2019-08-0216-87/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Update StackFrame::GetSymbolContext to mirror the logic in RegisterContextLLDB::InitializeNonZerothFrame that knows not to do the pc decrement when the given frame is a signal trap handler frame or the parent of one, because the pc may not follow a call in these frames. Accomplish this by adding a behaves_like_zeroth_frame field to lldb_private::StackFrame, set to true for the zeroth frame, for signal handler frames, and for parents of signal handler frames. Also add logic to propagate the signal handler flag from UnwindPlan to the FrameType on the RegisterContextLLDB it generates, and factor out a helper to resolve symbol and address range for an Address now that we need to invoke it in four places. Reviewers: jasonmolenda, clayborg, jfb Reviewed By: jasonmolenda Subscribers: labath, dexonsmith, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D64993 llvm-svn: 367691
* [Sema] Disable -Wbitwise-op-parentheses and -Wlogical-op-parentheses by defaultFangrui Song2019-08-025-55/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The -Wparentheses warnings are enabled by default in clang but they are under -Wall in gcc (gcc/c-family/c.opt). Some of the operator precedence warnings are oftentimes criticized as noise (clang: default; gcc: -Wall). If a warning is very controversial, it is probably not a good idea to enable it by default. This patch disables the rather annoying ones: -Wbitwise-op-parentheses, e.g. i & i | i -Wlogical-op-parentheses, e.g. i && i || i After this change: ``` * = enabled by default -Wall -Wparentheses -Wlogical-op-parentheses -Wlogical-not-parentheses* -Wbitwise-op-parentheses -Wshift-op-parentheses* -Woverloaded-shift-op-parentheses* -Wparentheses-equality* -Wdangling-else* ``` -Woverloaded-shift-op-parentheses is typically followed by overload resolution failure. We can instead improve the error message, and probably delete -Woverloaded-shift-op-parentheses in the future. Keep it for now because it gives some diagnostics. Reviewers: akyrtzi, jyknight, rtrieu, rsmith, aaron.ballman Reviewed By: aaron.ballman Subscribers: dexonsmith, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65192 llvm-svn: 367690
* [doc] Give a workaround for a FileCheck regex that ends in a brace.Paul Robinson2019-08-021-1/+4
| | | | | | Addresses PR42864. llvm-svn: 367689
* Use llvm-nm instead of nm in new test to unbreak Windows botTeresa Johnson2019-08-021-8/+8
| | | | | | New test added in r367679 used nm and should use llvm-nm. llvm-svn: 367688
* [clangd] Fix a crash when presenting values for HoverIlya Biryukov2019-08-022-1/+11
| | | | | | | | | | | | | | | | | | | Summary: We should pass the expression type, not a variable type when printing the resulting value. Variable type may be different from what the pretty-printing function expects, e.g. have references. Reviewers: sammccall Reviewed By: sammccall Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65655 llvm-svn: 367687
* [ORC] Change the locking scheme for ThreadSafeModule.Lang Hames2019-08-0212-183/+230
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ThreadSafeModule/ThreadSafeContext are used to manage lifetimes and locking for LLVMContexts in ORCv2. Prior to this patch contexts were locked as soon as an associated Module was emitted (to be compiled and linked), and were not unlocked until the emit call returned. This could lead to deadlocks if interdependent modules that shared contexts were compiled on different threads: when, during emission of the first module, the dependence was discovered the second module (which would provide the required symbol) could not be emitted as the thread emitting the first module still held the lock. This patch eliminates this possibility by moving to a finer-grained locking scheme. Each client holds the module lock only while they are actively operating on it. To make this finer grained locking simpler/safer to implement this patch removes the explicit lock method, 'getContextLock', from ThreadSafeModule and replaces it with a new method, 'withModuleDo', that implicitly locks the context, calls a user-supplied function object to operate on the Module, then implicitly unlocks the context before returning the result. ThreadSafeModule TSM = getModule(...); size_t NumFunctions = TSM.withModuleDo( [](Module &M) { // <- context locked before entry to lambda. return M.size(); }); Existing ORCv2 layers that operate on ThreadSafeModules are updated to use the new method. This method is used to introduce Module locking into each of the existing layers. llvm-svn: 367686
* [NFC] Test commit, corrected some spelling in commentDavid Candler2019-08-021-1/+1
| | | | | | | | Test commit, corrected some spelling in comment. Differential Revision: https://reviews.llvm.org/D65516 llvm-svn: 367685
* [clangd][vscode] clang-format the the extension code.Haojian Wu2019-08-025-99/+105
| | | | | | | | | | | | | | | | | | | | | Summary: As we are going to grow the extension in the near future, it is time to formalize the TS code format/style of our extension (although we'd lose the history). We use default options of clang-format: - 80 max line length - 2 space indent Reviewers: ilya-biryukov, sammccall, jvikstrom Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65657 llvm-svn: 367684
* GlobalISel: support swiftself attributeTim Northover2019-08-028-23/+66
| | | | llvm-svn: 367683
* Fix new test try 2Teresa Johnson2019-08-021-1/+1
| | | | | | | Fix second (and last) instance of wrong Input file name in new test added in r367679. llvm-svn: 367682
* Fix new testTeresa Johnson2019-08-021-1/+1
| | | | | | | Thew new test added in r367679 was using the wrong copy of the Input file. llvm-svn: 367680
* [ThinLTO] Implement index-based WPDTeresa Johnson2019-08-029-15/+805
| | | | | | | | | | | | | | | | | | | This patch adds support to the WholeProgramDevirt pass to perform index-based WPD, which is invoked from ThinLTO during the thin link. The ThinLTO backend (WPD import phase) behaves the same regardless of whether the WPD decisions were made with the index-based or (the existing) IR-based analysis. Depends on D54815. Reviewers: pcc Subscribers: mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, arphaman, dang, llvm-commits Differential Revision: https://reviews.llvm.org/D55153 llvm-svn: 367679
* Fix "not all control paths return a value" warning. NFCI.Simon Pilgrim2019-08-021-0/+1
| | | | llvm-svn: 367678
* [x86] add/adjust tests for shift-add-shift; NFCSanjay Patel2019-08-021-3/+85
| | | | | | Goes with D65607. llvm-svn: 367677
* [llvm-dlltool] Clarify an error message. NFC.Martin Storsjo2019-08-021-1/+1
| | | | | | | | | | The parameter to the -D (--dllname) option is the name of the dll that llvm-dlltool produces an import library for. Even though this is named "OutputFile" in the COFFModuleDefinition class, it's not an output file name in the context of llvm-dlltool, but the name of the DLL to create an import library for. llvm-svn: 367676
* [OpenCL] Allow OpenCL C style vector initialization in C++Anastasia Stulova2019-08-025-69/+78
| | | | | | | | | | | Allow creating vector literals from other vectors. float4 a = (float4)(1.0f, 2.0f, 3.0f, 4.0f); float4 v = (float4)(a.s23, a.s01); Differential revision: https://reviews.llvm.org/D65286 llvm-svn: 367675
* [COFF] Clarify a comment. NFC.Martin Storsjo2019-08-021-1/+1
| | | | | | | It's the __delayLoadHelper2 function that overwrites the jump table slot, not this thunk. llvm-svn: 367674
* [COFF] Avoid loading objects for mingw autoimport, when a defined alias existsMartin Storsjo2019-08-023-0/+25
| | | | | | | | | This avoids a spurious and confusing log message in cases where both e.g. "alias" and "__imp_alias" exist. Differential Revision: https://reviews.llvm.org/D65598 llvm-svn: 367673
* [clangd] Remove bad assert: nothing relies on it, and the reasons it was ↵Sam McCall2019-08-021-3/+2
| | | | | | true no longer hold. llvm-svn: 367672
* [MCA] Add support for printing immedate values as hex. Also enable lexing of ↵Andrea Di Biagio2019-08-025-0/+83
| | | | | | | | | | | | | | | | | | masm binary and hex literals. This patch adds a new llvm-mca flag named -print-imm-hex. By default, the instruction printer prints immediate operands as decimals. Flag -print-imm-hex enables the instruction printer to print those operands in hex. This patch also adds support for MASM binary and hex literal numbers (example 0FFh, 101b). Added tests to verify the behavior of the new flag. Tests also verify that masm numeric literal operands are now recognized. Differential Revision: https://reviews.llvm.org/D65588 llvm-svn: 367671
* [IPRA][ARM] Disable no-CSR optimisation for ARMOliver Stannard2019-08-025-2/+37
| | | | | | | | | | | This optimisation isn't generally profitable for ARM, because we can save/restore many registers in the prologue and epilogue using the PUSH and POP instructions, but mostly use individual LDR/STR instructions for other spills. Differential revision: https://reviews.llvm.org/D64910 llvm-svn: 367670
* Fix and test inter-procedural register allocation for ARMOliver Stannard2019-08-026-2/+227
| | | | | | | | | | | | | | - Avoid a crash when IPRA calls ARMFrameLowering::determineCalleeSaves with a null RegScavenger. Simply not updating the register scavenger is fine because IPRA only cares about the SavedRegs vector, the acutal code of the function has already been generated at this point. - Add a new hook to TargetRegisterInfo to get the set of registers which can be clobbered inside a call, even if the compiler can see both sides, by linker-generated code. Differential revision: https://reviews.llvm.org/D64908 llvm-svn: 367669
* [Loop Peeling] Introduce an option for profile based peeling disabling.Serguei Katkov2019-08-026-26/+45
| | | | | | | | | | | | | | | | | This patch adds an ability to disable profile based peeling causing the peeling of all iterations and as a result prohibits further unroll/peeling attempts on that loop. The motivation to get an ability to separate peeling usage in pipeline where in the first part we peel only separate iterations if needed and later in pipeline we apply the full peeling which will prohibit further peeling. Reviewers: reames, fhahn Reviewed By: reames Subscribers: hiraditya, zzheng, dmgreen, llvm-commits Differential Revision: https://reviews.llvm.org/D64983 llvm-svn: 367668
* [clangd] Add new helpers to make tweak tests scale better. Convert most ↵Sam McCall2019-08-024-365/+366
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tests. NFC Summary: TweakTests.cpp has some pretty good helpers added for the first few tweaks, but they have some limitations: - many assertion failures point at the wrong line - need lots of input/output tests, setup code is duplicated across both - local helpers make it hard to split the file as it grows The new helpers in TweakTests.h are based on old ones (same operations) but try to address these issues and generally make tests more terse while improving error messages. This patch converts everything except ExtractVariable (which is complex and has changes in flight, so will be converted later). It's LOC-neutral, despite not being able to get rid of the old helpers until ExtractVariable is done. Reviewers: ilya-biryukov Subscribers: mgorny, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65525 llvm-svn: 367667
* [LV] Fix test failure in a Release build.Jay Foad2019-08-021-0/+1
| | | | llvm-svn: 367666
* [NFC][ARM[ParallelDSP] Rename/remove/change typesSam Parker2019-08-021-13/+8
| | | | | | | Remove forward declaration, fold a couple of typedefs and change one to be more useful. llvm-svn: 367665
* SymbolVendor: Introduce Module::GetSymbolFilePavel Labath2019-08-029-223/+188
| | | | | | | | | | | | | | | | | | | | | Summary: This is the next step in avoiding funneling all SymbolFile calls through the SymbolVendor. Right now, it is just a convenience function, but it allows us to update all calls to SymbolVendor functions to access the SymbolFile directly. Once all call sites have been updated, we can remove the GetSymbolVendor member function. This patch just updates the calls to GetSymbolVendor, which were calling it just so they could fetch the underlying symbol file. Other calls will be done in follow-ups. Reviewers: JDevlieghere, clayborg, jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D65435 llvm-svn: 367664
* [lldb][NFC] Remove unused imports in python testsRaphael Isemann2019-08-02513-1022/+0
| | | | llvm-svn: 367663
* [AliasAnalysis] Initialize a member variable that may be used by unit test.Peter Smith2019-08-022-6/+3
| | | | | | | | | | | | | | | | | | The unit tests in BasicAliasAnalysisTest use the alias analysis API directly and do not call setAAResults to initalize AAR. This gives a valgrind error "Conditional Jump depends on unitialized variable". On most buildbots the variable is nullptr, but in some cases it can be non nullptr leading to seemingly random failures. These tests were disabled in r366986. With the initialization they can be enabled again. Fixes PR42719 Differential Revision: https://reviews.llvm.org/D65568 llvm-svn: 367662
* Don't try emitting dllexported explicitly defaulted non-trivial ctors twice ↵Hans Wennborg2019-08-022-1/+14
| | | | | | | | | | during explicit template instantiation definition (PR42857) Trying to emit the definition twice triggers an assert. Differential revision: https://reviews.llvm.org/D65579 llvm-svn: 367661
* [NFC][ARM][ParallelDSP] Remove ValueListSam Parker2019-08-021-10/+8
| | | | | | We only care about the first element in the list. llvm-svn: 367660
* Moves the newly added test interleaved-accesses-waw-dependency.ll to X86 ↵Hideki Saito2019-08-021-0/+0
| | | | | | | | subdirectory. ps4-buildslave1 reported a failure. The test has x86 triple. llvm-svn: 367659
* Revert r367649: Improve raw_ostream so that you can "write" colors using ↵Rui Ueyama2019-08-0227-183/+175
| | | | | | | | operator<< This reverts commit r367649 in an attempt to unbreak Windows bots. llvm-svn: 367658
* [PGO] Fix bolt failures from r367628Rong Xu2019-08-021-2/+2
| | | | | | | Relaxed the check in a test because the windows bolt generates different profile variables. llvm-svn: 367657
* compiler-rt: Rename .cc file in test/tsan to .cppFangrui Song2019-08-02236-48/+48
| | | | | | Like r367463, but for test/tsan. llvm-svn: 367656
* [LLVM][Alignment] Update documentationGuillaume Chatelet2019-08-021-62/+43
| | | | | | | | | | | | Reviewers: aprantl Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65558 llvm-svn: 367655
* [LV] Avoid building interleaved group in presence of WAW dependencyHideki Saito2019-08-023-3/+124
| | | | | | | | | | | | Reviewers: hsaito, Ayal, fhahn, anna, mkazantsev Reviewed By: hsaito Patch by evrevnov, thanks! Differential Revision: https://reviews.llvm.org/D63981 llvm-svn: 367654
* compiler-rt: Rename .cc file in test/msan to .cppFangrui Song2019-08-02136-78/+78
| | | | | | Like r367463, but for test/msan. llvm-svn: 367653
* compiler-rt: Rename .cc file in test/xray to .cppFangrui Song2019-08-0229-1/+1
| | | | | | | | | Like r367463, but for test/xray. Update test/xray/lit.cfg.py config.suffixes to remove .cc (we actually don't have .c tests now) llvm-svn: 367652
* Add an assert() to catch possible regexp errors.Rui Ueyama2019-08-021-5/+6
| | | | llvm-svn: 367651
* Add a comment for --vs-diagnostics.Rui Ueyama2019-08-021-0/+21
| | | | llvm-svn: 367650
OpenPOWER on IntegriCloud