summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [clang][HeaderSearch] Shorten paths for includes in mainfile's directoryKadir Cetinkaya2019-07-0311-54/+109
| | | | | | | | | | | | | | | | | | Summary: Currently HeaderSearch only looks at SearchDir's passed into it, but in addition to those paths headers can be relative to including file's directory. This patch makes sure that is taken into account. Reviewers: gribozavr Subscribers: jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63295 llvm-svn: 365005
* Avoid identifiers that are different only in case. NFC.Rui Ueyama2019-07-031-8/+8
| | | | llvm-svn: 365004
* Avoid identifiers that are different only in case. NFC.Rui Ueyama2019-07-035-35/+33
| | | | | | | | Some variables in lld have the same name as functions ignoring case. This patch gives them different names, so that my next patch is easier to read. llvm-svn: 365003
* [LoopPeel] Re-factor llvm::peelLoop method. NFC.Serguei Katkov2019-07-031-25/+49
| | | | | | | | | | | Extract code dealing with branch weights in separate functions. Reviewers: reames, mkuper, iajbar, fhahn Reviewed By: reames, fhahn Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D63917 llvm-svn: 365002
* Revert r364999: [lld] Use -o /dev/null in test when output is not needed.Rui Ueyama2019-07-031-1/+1
| | | | | | | This reverts commit r364999 as it broke a build. Looks like `%t.archive.o` is used two lines below where it was created. llvm-svn: 365001
* Revert [InlineCost] cleanup calculations of Cost and ThresholdJordan Rupprecht2019-07-036-30/+28
| | | | | | | | This reverts r364422 (git commit 1a3dc761860d620ac8ed7e32a4285952142f780b) The inlining cost calculation is incorrect, leading to stack overflow due to large stack frames from heavy inlining. llvm-svn: 365000
* [lld] Use -o /dev/null in test when output is not needed.Sam Clegg2019-07-031-1/+1
| | | | | | Feedback nit from rL364998 llvm-svn: 364999
* [ELF] Error on archive with missing indexSam Clegg2019-07-033-2/+17
| | | | | | | | | | | | This matches the wasm lld and GNU ld behavior. The ELF linker has special handling for bitcode archives but if that doesn't kick in we probably want to error out rather than silently ignore the library. Differential Revision: https://reviews.llvm.org/D63781 llvm-svn: 364998
* [ThinLTO] Reenable test with workaround for known failureTeresa Johnson2019-07-031-39/+40
| | | | | | | | Reenable the testing disabled in r364978 with the same workaround used for this failure in the cfi-devirt.ll test. The known issue is PR39436, and the workaround is to add -verify-machineinstrs=0. llvm-svn: 364997
* [ELF][RISCV] Support RISC-V in getBitcodeMachineKindKito Cheng2019-07-033-0/+23
| | | | | | | | | | | Add Triple::riscv64 and Triple::riscv32 to getBitcodeMachineKind for get right e_machine during LTO. Reviewed By: ruiu, MaskRay Differential Revision: https://reviews.llvm.org/D52165 llvm-svn: 364996
* [AMDGPU] Enable serializing of argument info.Michael Liao2019-07-036-1/+334
| | | | | | | | | | | | | | | | Summary: - Support serialization of all arguments in machine function info. This enables fabricating MIR tests depending on argument info. Reviewers: arsenm, rampitec Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64096 llvm-svn: 364995
* [AArch64][GlobalISel] Overhaul legalization & isel or shifts to select ↵Amara Emerson2019-07-0317-84/+678
| | | | | | | | | | | | | | | | | | | | | | | | | immediate forms. There are two main issues preventing us from generating immediate form shifts: 1) We have partial SelectionDAG imported support for G_ASHR and G_LSHR shift immediate forms, but they currently don't work because the amount type is expected to be an s64 constant, but we only legalize them to have homogenous types. To deal with this, first we introduce a custom legalizer to *only* custom legalize s32 shifts which have a constant operand into a s64. There is also an additional artifact combiner to fold zexts(g_constant) to a larger G_CONSTANT if it's legal, a counterpart to the anyext version committed in an earlier patch. 2) For G_SHL the importer can't cope with the pattern. For this I introduced an early selection phase in the arm64 selector to select these forms manually before the tablegen selector pessimizes it to a register-register variant. Differential Revision: https://reviews.llvm.org/D63910 llvm-svn: 364994
* [PowerPC] exclude ICmpZero in LSR if icmp can be replaced in later hardware ↵Chen Zheng2019-07-0313-77/+142
| | | | | | | | | loop. Differential Revision: https://reviews.llvm.org/D63477 llvm-svn: 364993
* [analyzer] exploded-graph-rewriter: Implement bug nodes and sink nodes.Artem Dergachev2019-07-0314-24/+72
| | | | | | | | | | | Add a label to nodes that have a bug report attached or on which the analysis was generally interrupted. Fix printing has_report and implement printing is_sink in the graph dumper. Differential Revision: https://reviews.llvm.org/D64110 llvm-svn: 364992
* [analyzer] exploded-graph-rewriter: NFC: Add more comments.Artem Dergachev2019-07-031-3/+25
| | | | llvm-svn: 364991
* [analyzer] exploded-graph-rewriter: Collapse very long statement pretty-prints.Artem Dergachev2019-07-032-3/+44
| | | | | | | | | | When printing various statements that include braces (compound statements, lambda expressions, statement-expressions, etc.), replace the code between braces with '...'. Differential Revision: https://reviews.llvm.org/D64104 llvm-svn: 364990
* [analyzer] exploded-graph-rewriter: Implement checker messages.Artem Dergachev2019-07-039-10/+239
| | | | | | | | They are displayed as raw lines and diffed via difflib on a per-checker basis. Differential Revision: https://reviews.llvm.org/D64100 llvm-svn: 364989
* [triple] Use 'macabi' environment name for the Mac Catalyst triplesAlex Lorenz2019-07-035-9/+9
| | | | | | The 'macabi' environment name is preferred instead of 'maccatalyst'. llvm-svn: 364988
* Revert Changing CodeView debug info type record representation in assembly ↵Nilanjana Basu2019-07-0346-674/+53
| | | | | | | | files to make it more human-readable & editable This reverts r364982 (git commit 2082bf28ebea76cc187b508f801122866420d9ff) llvm-svn: 364987
* [VFS] Add reverse iterator to OverlayFileSystemJonas Devlieghere2019-07-032-2/+62
| | | | | | | | | | Add a reverse iterator to the overlay file system. This makes it possible to take overlays from one OverlayFileSystem, and add them to another. Differential revision: https://reviews.llvm.org/D64113 llvm-svn: 364986
* [WebAssembly] Prevent inline assembly from being mangled by SjLjGuanzhong Chen2019-07-032-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Before, inline assembly gets mangled by the SjLj transformation. For example, in a function with setjmp/longjmp, this LLVM IR code call void asm sideeffect "", ""() would be transformed into call void @__invoke_void(void ()* asm sideeffect "", "") This is invalid, and results in the error: Cannot take the address of an inline asm! In this diff, we skip the transformation for inline assembly. Reviewers: aheejin, tlively Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64115 llvm-svn: 364985
* CodeGen: Set hasSideEffects = 0 on BUNDLEMatt Arsenault2019-07-037-59/+60
| | | | | | | | | | | | | The BUNDLE itself should not have side effects, and this is a property of instructions inside the bundle. The hasProperty check already searches for any member instructions, which was pointless since it was overridden by this bit. Allows me to distinguish bundles that have side effects vs. do not in a future patch. Also fixes an unnecessary scheduling barrier in the bundle AMDGPU uses to get PC relative addresses. llvm-svn: 364984
* AMDGPU: Look through bundles for existing waitcntsMatt Arsenault2019-07-032-1/+168
| | | | | | These aren't produced now, but will be in a future patch. llvm-svn: 364983
* Changing CodeView debug info type record representation in assembly files to ↵Nilanjana Basu2019-07-0346-53/+674
| | | | | | make it more human-readable & editable llvm-svn: 364982
* Add support for the 'macCatalyst' MachO platformAlex Lorenz2019-07-029-0/+83
| | | | | | | | | Mac Catalyst is a new MachO platform in macOS Catalina. It always uses the build_version MachO load command. Differential Revision: https://reviews.llvm.org/D64107 llvm-svn: 364981
* Fix for r364686 - actually set symbol_is_missing_weak...Jim Ingham2019-07-021-2/+3
| | | | | | | | | | This was set in a std::function, but I was shadowing a variable that I thought I was capturing. Even with this bug we were correctly not raising an error and returning an address of 0x0. We were not marking the symbol as weak, but apparently the JIT didn't need that, so the test still passed. llvm-svn: 364980
* Update cmake build setup so lldb doesn't link against the DebugSymbolsJason Molenda2019-07-021-1/+0
| | | | | | | | framework on macOS, in line with the source/xcode project changes in r364243. <rdar://problem/49458356> llvm-svn: 364979
* [ThinLTO] Work around existing failure exposed by new testTeresa Johnson2019-07-021-36/+39
| | | | | | | | | | | | | | | | | | | | | When adding summary entries for index-based WPD (r364960), an added test also included some additional testing of the existing hybrid Thin/Regular LTO WPD (test/ThinLTO/X86/devirt.ll). That part of the test is producing a failure on the llvm-clang-x86_64-expensive-checks-win bot: *** Bad machine code: Explicit definition marked as use *** - function: __typeid__ZTS1A_0_branch_funnel - basic block: %bb.0 (0x81d4c58) - instruction: ICALL_BRANCH_FUNNEL %0:gr64, @0, 16, @_ZN1B1fEi, 48, @_ZN1C1fEi - operand 0: %0:gr64 LLVM ERROR: Found 1 machine code errors. This is functionality unrelated to the summary entries added with my patch, so I am disabling this part of the new test until it is addressed. I'll continue to investigate the failure. llvm-svn: 364978
* [X86] Add a DAG combine for turning *_extend_vector_inreg+load into an ↵Craig Topper2019-07-023-31/+27
| | | | | | | | | | appropriate extload if the load isn't volatile. Remove the corresponding isel patterns that did the same thing without checking for volatile. This fixes another variation of PR42079 llvm-svn: 364977
* add symbols/declvendor.cpp.Jason Molenda2019-07-021-0/+4
| | | | llvm-svn: 364976
* Attempt #2 to fix gcc builds. This time checkMitch Phillips2019-07-021-1/+1
| | | | | | against CXX compiler ID instead of CRT test ID. llvm-svn: 364975
* [swig] Don't mess with swig internals.Jonas Devlieghere2019-07-0231-842/+287
| | | | | | | | | | | | | | | As of SWIG 4.0, __swig_getmethods__ and __swig_setmethods__ are no longer defined. It appears that there's no need to mess with these internals, we can simplify define the corresponding properties inline. Originally I wanted to use the swig extension %attribute and %attributeref to define properties. However, I couldn't find a way to add documentation to these attributes. Since we already had the properties defined inline, we might as well keep them. Differential revision: https://reviews.llvm.org/D63530 llvm-svn: 364974
* [ThinLTO] Dump input on failure in devirt testTeresa Johnson2019-07-021-2/+2
| | | | | | | To help track down bug exposed by llvm-clang-x86_64-expensive-checks-win bot. llvm-svn: 364973
* Only use -mno-omit-leaf-frame-pointer with clang builds.Mitch Phillips2019-07-021-2/+4
| | | | | | Fix build breakage caused by D64085 llvm-svn: 364972
* [triple] add 'macCatalyst' environment typeAlex Lorenz2019-07-023-2/+20
| | | | | | | | Mac Catalyst is a new deployment platform in macOS Catalina. Differential Revision: https://reviews.llvm.org/D64097 llvm-svn: 364971
* [ARM] Fix unwind info for Thumb1 functions that save high registers.Eli Friedman2019-07-024-120/+218
| | | | | | | | | | | | | | | | | | | | | There were two issues here: one, some of the relevant instructions were missing the expected "FrameSetup" flag, and two, ARMAsmPrinter::EmitUnwindingInstruction wasn't expecting "mov" instructions in the prologue. I'm sticking the additional state into ARMFunctionInfo so it's obvious it only applies to the current function. I considered a few alternative approaches where we would compute the correct unwind information as part of the prologue/epilogue lowering, but it seems like a lot of work to introduce pseudo-instructions, and the current code seems to be reliable enough. Fixes https://bugs.llvm.org/show_bug.cgi?id=42408. Differential Revision: https://reviews.llvm.org/D63964 llvm-svn: 364970
* [NFC] Strenghten isInteger condition for rL364940David Bolvansky2019-07-021-2/+3
| | | | llvm-svn: 364969
* [ThinLTO] Address post-review suggestions for index-based WPD summaryTeresa Johnson2019-07-021-14/+11
| | | | | | | Removes a couple of unnecessary and/or redundant checks introduced by r364960. llvm-svn: 364968
* [lldb] Mention automatic codesign setup script [NFC]Raphael Isemann2019-07-021-1/+4
| | | | | | | | | The script is the modern way of getting the certificate, so we should mention it in the documentation. Patch idea by Davidino Italiano! llvm-svn: 364967
* [GWP-ASan] [Scudo] Add GWP-ASan backtrace for alloc/free to Scudo.Mitch Phillips2019-07-022-2/+11
| | | | | | | | | | | | | | | | | | | | | Summary: Adds allocation and deallocation stack trace support to Scudo. The default provided backtrace library for GWP-ASan is supplied by the libc unwinder, and is suitable for production variants of Scudo. If Scudo in future has its own unwinder, it may choose to use its own over the generic unwinder instead. Reviewers: cryptoad Reviewed By: cryptoad Subscribers: kubamracek, mgorny, #sanitizers, llvm-commits, morehouse, vlad.tsyrklevich, eugenis Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D64085 llvm-svn: 364966
* [gold] Fix test after BitStream reader error changesTeresa Johnson2019-07-021-1/+1
| | | | | | | | | | The recent change to the BitStream reader error handling in r364464 changed the error message format (from "LLVM ERROR:" to just "error"), leading to a failure in this test which is only executed for very recent versions of gold. Fix this by removing that part of the error message check, leaving only the interesting part of the message to be checked. llvm-svn: 364965
* [SLP] Recommit: Look-ahead operand reordering heuristic.Vasileios Porpodas2019-07-022-79/+423
| | | | | | | | | | | | | | | | Summary: This patch introduces a new heuristic for guiding operand reordering. The new "look-ahead" heuristic can look beyond the immediate predecessors. This helps break ties when the immediate predecessors have identical opcodes (see lit test for an example). Reviewers: RKSimon, ABataev, dtemirbulatov, Ayal, hfinkel, rnk Reviewed By: RKSimon, dtemirbulatov Subscribers: hiraditya, phosek, rnk, rcorcs, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60897 llvm-svn: 364964
* [clang-doc] Serialize child namespaces and recordsJulie Hockett2019-07-025-93/+176
| | | | | | | | | | | | Serialization of child namespaces and records is now handled. Namespaces can have child records and child namespaces. Records can only have child records. Committed on behalf of Diego Astiazarán (diegoaat97@gmail.com). Differential Revision: https://reviews.llvm.org/D63911 llvm-svn: 364963
* [Symbol] Add DeclVendor::FindTypesAlex Langford2019-07-027-64/+73
| | | | | | | | | | | | | Summary: Following up on the plan I outlined in D63622, we can remove the dependence on clang in all the places where we only want to find the types from the DeclVendor. This means that currently DeclVendor depends on clang, but centralizing the dependency makes it easier to refactor cleanly. Differential Revision: https://reviews.llvm.org/D63853 llvm-svn: 364962
* [AArch64][GlobalISel] Teach tryOptSelect to handle G_ICMPJessica Paquette2019-07-024-132/+212
| | | | | | | | | | | | | | | | | | | | This teaches `tryOptSelect` to handle folding G_ICMP, and removes the requirement that the G_SELECT we're dealing with is floating point. Some refactoring to make this work nicely as well: - Factor out the scalar case from the selection code for G_ICMP into `emitIntegerCompare`. - Make `tryOptCMN` return a MachineInstr* instead of a bool. - Make `tryOptCMN` not modify the instruction being selected. - Factor out the CMN emission into `emitCMN` for readability. By doing this this way, we can get all of the compare selection optimizations in select emission. Differential Revision: https://reviews.llvm.org/D64084 llvm-svn: 364961
* [ThinLTO] Add summary entries for index-based WPDTeresa Johnson2019-07-0214-25/+765
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: If LTOUnit splitting is disabled, the module summary analysis computes the summary information necessary to perform single implementation devirtualization during the thin link with the index and no IR. The information collected from the regular LTO IR in the current hybrid WPD algorithm is summarized, including: 1) For vtable definitions, record the function pointers and their offset within the vtable initializer (subsumes the information collected from IR by tryFindVirtualCallTargets). 2) A record for each type metadata summarizing the vtable definitions decorated with that metadata (subsumes the TypeIdentiferMap collected from IR). Also added are the necessary bitcode records, and the corresponding assembly support. The follow-on index-based WPD patch is D55153. Depends on D53890. Reviewers: pcc Subscribers: mehdi_amini, Prazek, inglorion, eraman, steven_wu, dexonsmith, arphaman, llvm-commits Differential Revision: https://reviews.llvm.org/D54815 llvm-svn: 364960
* AMDGPU: Custom lower vector_shuffle for v4i16/v4f16Matt Arsenault2019-07-023-189/+146
| | | | | | | | | Ordinarily it is lowered as a build_vector of each extract_vector_elt, which in turn get lowered to bitcasts and bit shifts. Very little understand the lowered extract pattern, resulting in much worse code. We treat concat_vectors of v2i16 as legal, so prefer that. llvm-svn: 364959
* [RA] Fix spelling of Greedy register allocator internal optionTeresa Johnson2019-07-021-1/+1
| | | | | | | | The internal option added with r323870 has a typo. It isn't being used by any tests, but I decided to fix the spelling and leave it in for use in debugging the changes added in that patch. llvm-svn: 364958
* [X86] Copy test cases from vector-zext.ll to vector-zext-widen.ll. Same for ↵Craig Topper2019-07-022-0/+360
| | | | | | vector-sext.ll. NFC llvm-svn: 364957
* [lli] Fix a typo in a header.Lang Hames2019-07-021-1/+1
| | | | llvm-svn: 364956
OpenPOWER on IntegriCloud