summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [GlobalsAA] Reenable test.Alina Sbirlea2019-11-121-3/+1
|
* [LLDB] Add core definition for armv8l and armv7lMuhammad Omair Javaid2019-11-134-2/+10
| | | | | | | | | | | | | This patch adds core definitions in lldb ArchSpecs for armv8l and armv7l cores. This was needed because on Linux running on 32-bit Arm v8 we are returned armv8l in case we are running 32-bit sysroot on 64bit kernel. In case of 32-bit kernel and 32-bit sysroot running on arm v8 hardware we are returned armv7l. This is quite common when we run 32 bit arm using docker container. Signed-off-by: Muhammad Omair Javaid <omair.javaid@linaro.org> Differential Revision: https://reviews.llvm.org/D69904
* Don't assume that the clang binary's resolved name includes the stringRichard Smith2019-11-121-1/+1
| | | | | | 'clang'. This is not true in practice in some content-addressed file systems.
* [Sema] Add MacroQualified case for FunctionTypeUnwrapperLeonard Chan2019-11-122-1/+12
| | | | | | | | | | | | | | | | | | This is a fix for PR43315. An assertion error is hit for this minimal example: ``` //clang -cc1 -triple x86_64-- -S tstVMStructRC-min.cpp int (a b)(); // Assertion `Chunk.Kind == DeclaratorChunk::Function' failed. ``` This is because we do not cover the case in the FunctionTypeUnwrapper where it receives a MacroQualifiedType. We have not run into this earlier because this is a unique case where the __attribute__ contains both __cdecl__ and __regparm__ (in that order), and we are compiling for x86_64. Changing the architecture or the order of __cdecl__ and __regparm__ does not raise the assertion. Differential Revision: https://reviews.llvm.org/D67992
* Temporarily disable test.Alina Sbirlea2019-11-121-0/+2
|
* Temporarily Revert "Reapply [LVI] Normalize pointer behavior" as it's broken ↵Eric Christopher2019-11-122-99/+90
| | | | | | | | python 3.6. Reverting to figure out if it's a problem in python or the compiler for now. This reverts commit 885a05f48a5d320946c89590b73a764e5884fe4f.
* [LLDB] Only set FRAMEWORK when we're actually building a framework.Jonas Devlieghere2019-11-121-1/+2
|
* [LLDB] Remove debug message in AddLLDB.cmakeJonas Devlieghere2019-11-121-1/+0
|
* Add a shim for setenv on PS4 since it does not exist.Douglas Yung2019-11-121-1/+3
| | | | | | | | A few years back a similar change was made for getenv since neither function is supported on the PS4 platform. Recently, commit d889d1e added a call to setenv in compiler-rt which was causing linking errors because the symbol was not found. This fixes that issue by putting in a shim similar to how we previously dealt with the lack of getenv. Differential Revision: https://reviews.llvm.org/D70033
* [X86] Don't consider v64i1 as a legal type unless v64i8 is also a legal type.Craig Topper2019-11-122-25/+82
| | | | | This avoids some nasty issues with argument passing and lowering of arbitrary v64i8 shuffles.
* [X86] Only pass v64i8/v32i16 as v16i32 on non-avx512bw targets if the v16i32 ↵Craig Topper2019-11-121-4/+4
| | | | | | | | | | | type won't be split by prefer-vector-width=256 Otherwise just let the v64i8/v32i16 types be split to v32i8/v16i16. In reality this shouldn't happen because it means we have a 512-bit vector argument, but min-legal-vector-width says a value less than 512. But a 512-bit argument should have been factored into the preferred vector width.
* Fix include guard and properly order __deregister_frame_info.Sterling Augustine2019-11-124-5/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch fixes two problems with the crtbegin.c as written: 1. In do_init, register_frame_info is not guarded by a #define, but in do_fini, deregister_frame_info is guarded by #ifndef CRT_HAS_INITFINI_ARRAY. Thus when CRT_HAS_INITFINI_ARRAY is not defined, frames are registered but then never deregistered. The frame registry mechanism builds a linked-list from the .so's static variable do_init.object, and when the .so is unloaded, this memory becomes invalid and should be deregistered. Further, libgcc's crtbegin treats the frame registry as independent from the initfini array mechanism. This patch fixes this by adding a new #define, "EH_USE_FRAME_INFO_REGISTRY", which is set by the cmake option COMPILER_RT_CRT_USE_EH_FRAME_REGISTRY Currently, do_init calls register_frame_info, and then calls the binary's constructors. This allows constructors to safely use libunwind. However, do_fini calls deregister_frame_info and then calls the binary's destructors. This prevents destructors from safely using libunwind. This patch also switches that ordering, so that destructors can safely use libunwind. As it happens, this is a fairly common scenario for thread sanitizer.
* Add -Wtautological-compare to -WallWeverything2019-11-125-0/+99
| | | | | | | | Some warnings in -Wtautological-compare subgroups are DefaultIgnore. Adding this group to -Wmost, which is part of -Wall, will aid in their discoverability. Differential Revision: https://reviews.llvm.org/D69292
* [BPF] generate BTF_KIND_VARs for all non-static globalsYonghong Song2019-11-123-7/+24
| | | | | | | | | | | Enable to generate BTF_KIND_VARs for non-static default-section globals which is not allowed previously. Modified the existing test case to accommodate the new change. Also removed unused linkage enum members VAR_GLOBAL_TENTATIVE and VAR_GLOBAL_EXTERNAL. Differential Revision: https://reviews.llvm.org/D70145
* [GlobalsAA] Restrict ModRef result if any internal method has its address taken.Alina Sbirlea2019-11-125-6/+163
| | | | | | | | | | | | | Summary: If there are any internal methods whose address was taken, conclude there is nothing known in relation of any other internal method and a global. Reviewers: nlopes, sanjoy.google Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69690
* [LLDB] Fix/silence CMake developer warning for LLDB framework.Jonas Devlieghere2019-11-122-2/+10
| | | | | | | | | | | | This fixes the following warning for developers: Target 'liblldb' was changed to a FRAMEWORK sometime after install(). This may result in the wrong install DESTINATION. Set the FRAMEWORK property earlier. The solution is to pass the FRAMEWORK flag to add_lldb_library and set the target property before install(). For now liblldb is the only customer.
* [GVNHoist] Preserve AAResults.Alina Sbirlea2019-11-121-0/+1
| | | | Resolves PR38906, PR40898.
* Allow additional file suffixes/extensions considered as source in main ↵mydeveloperday2019-11-1210-7/+127
| | | | | | | | | | | | | | | | | | | | | include grouping Summary: By additional regex match, grouping of main include can be enabled in files that are not normally considered as a C/C++ source code. For example, this might be useful in templated code, where template implementations are being held in *Impl.hpp files. On the occassion, 'assume-filename' option description was reworded as it was misleading. It has nothing to do with `style=file` option and it does not influence sourced style filename. Reviewers: rsmith, ioeric, krasimir, sylvestre.ledru, MyDeveloperDay Reviewed By: MyDeveloperDay Subscribers: MyDeveloperDay, cfe-commits Patch by: furdyna Tags: #clang Differential Revision: https://reviews.llvm.org/D67750
* [LLDB] Always remove debugserver from LLVM_DISTRIBUTION_COMPONENTSJonas Devlieghere2019-11-122-6/+9
| | | | | | Centralize the logic to remove debugserver from LLVM_DISTRIBUTION_COMPONENTS when LLDB_USE_SYSTEM_DEBUGSERVER is enabled. Now this happens regardless of whether the tests are enabled.
* [AArch64] Update for ExynosEvandro Menezes2019-11-122-10/+26
| | | | Fix the modeling for loads and stores using the register offset addresing mode.
* [AArch64] Fix addressing mode predicatesEvandro Menezes2019-11-121-3/+5
| | | | Fix predicates related to the register offset addressing mode.
* [CodeGen] Fix getArrayAccessFor crashes as in bug 32534 with ↵Michael Kruse2019-11-121-2/+2
| | | | | | | | | | | | | | | | | | -polly-vectorizer=polly. Root cause is VectorBlockGenerator::copyStmt iterates all instructions in basic block, however some load instructions may be not unnecessary thus removed by simplification. As a result, these load instructions don't have a corresponding array. Looking at BlockGenerator::copyBB, it only iterates instructions list of ScopStmt. Given it must be a block type scop in case of vectorization, I think we should do the same in VectorBlockGenerator::copyStmt. Patch by bin.narwal <bin.narwal@gmail.com> Differential Revision: https://reviews.llvm.org/D70076
* [Analyzer] Use a reference in a range-based forMark de Wever2019-11-122-12/+12
| | | | | | | | | Let the checkers use a reference instead of a copy in a range-based for loop. This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. Differential Revision: https://reviews.llvm.org/D70047
* [OpenMP] Use an explicit copy in a range-based forMark de Wever2019-11-121-7/+7
| | | | | | | | | | The std::pair<const clang::ValueDecl *, llvm::ArrayRef<clang::OMPClauseMappableExprCommon::MappableComponent>> type will be copied in a range-based for loop. Make the copy explicit to avoid the -Wrange-loop-analysis warning. This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. Differential Revision: https://reviews.llvm.org/D70046
* [AST] Use an explicit copy in a range-based forMark de Wever2019-11-128-8/+8
| | | | | | | | | The AssociationIteratorTy type will be copied in a range-based for loop. Make the copy explicit to avoid the -Wrange-loop-analysis warning. This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. Differential Revision: https://reviews.llvm.org/D70045
* [LLDB][Formatters] Re-enable std::function formatter with fixes to improve ↵shafik2019-11-128-93/+185
| | | | | | | | | non-cached lookup performance Performance issues lead to the libc++ std::function formatter to be disabled. We addressed some of those performance issues by adding caching see D67111 This PR fixes the first lookup performance by not using FindSymbolsMatchingRegExAndType(...) and instead finding the compilation unit the std::function wrapped callable should be in and then searching for the callable directly in the CU. Differential Revision: https://reviews.llvm.org/D69913
* [llvm-objcopy][COFF] Implement --redefine-sym and --redefine-symsFangrui Song2019-11-125-32/+128
| | | | | | | | | | | | | The parsing error tests in ELF/redefine-symbols.test are not specific to ELF. Move them to redefine-symbols.test. Add COFF/redefine-symbols.test for COFF specific tests. Also fix the documentation regarding --redefine-syms: the old and new names are separated by whitespace, not an equals sign. Reviewed By: mstorsjo Differential Revision: https://reviews.llvm.org/D70036
* [ObjectFileMachO] Fix the build for __arm64__.Davide Italiano2019-11-121-2/+1
| | | | Catch up with an API change.
* ARM: Don't emit R_ARM_NONE relocations to compact unwinding decoders in ↵Peter Collingbourne2019-11-124-34/+44
| | | | | | | | | | | | | | | | | | | | | | | | .ARM.exidx on Android. These relocations are specified by the ARM EHABI (section 6.3). As I understand it, their purpose is to accommodate unwinder implementations that wish to reduce code size by placing the implementations of the compact unwinding decoders in a separate translation unit, and using extern weak symbols to refer to them from the main unwinder implementation, so that they are only linked when something in the binary needs them in order to unwind. However, neither of the unwinders used on Android (libgcc, LLVM libunwind) use this technique, and in fact emitting these relocations ends up being counterproductive to code size because they cause a copy of the unwinder to be statically linked into most binaries, regardless of whether it is actually needed. Furthermore, these relocations create circular dependencies (between libc and the unwinder) in cases where the unwinder is dynamically linked and libc contains compact unwind info. Therefore, deviate from the EHABI here and stop emitting these relocations on Android. Differential Revision: https://reviews.llvm.org/D70027
* Fix build with shared libraries. NFC.Michael Liao2019-11-121-0/+6
| | | | - Dependent components need linking directly.
* [OPENMP]Use copy constructors instead of assignment operators in declareAlexey Bataev2019-11-125-22/+48
| | | | | | | reduction initializers. Better to use copy constructor at the initialization of the declare reduction construct rather than assignment operator.
* [libcxxabi] Prevent cmake from removing our explicit system C++ include pathsSam Clegg2019-11-121-0/+7
| | | | | | | | | | | | We build with `-nostdinc++` and add our own header path via `LIBCXXABI_LIBCXX_INCLUDES`. However cmake tried to be clever and if `LIBCXXABI_LIBCXX_INCLUDES` happens to match the compilers system path it will remove the `-I` flag meaning we can't access any C++ headers. Ideally cmake would be able see that we are using `-nostdinc++` and disable this behaviour. Differential Revision: https://reviews.llvm.org/D69973
* [Hexagon] Update PS_aligna with max stack alignment once isel completesKrzysztof Parzyszek2019-11-122-3/+18
|
* Performance: Add a set of visited SymbolFiles to the other FindFiles variant.Adrian Prantl2019-11-1214-24/+49
| | | | | | | | | | | | | | This is basically the same bug as in r260434. SymbolFileDWARF::FindTypes has exponential worst-case when digging through dependency DAG of .pcm files because each object file and .pcm file may depend on an already-visited .pcm file, which may again have dependencies. Fixed here by carrying a set of already visited SymbolFiles around. rdar://problem/56993424 Differential Revision: https://reviews.llvm.org/D70106
* [lit] Better/earlier errors for empty runsJulian Lettner2019-11-124-9/+41
| | | | | | | | | | | | | | | | | | | | | | | | | Fail early, when we discover no tests at all, or filter out all of them. There is also `--allow-empty-runs` to disable test to allow workflows like `LIT_FILTER=abc ninja check-all`. Apparently `check-all` invokes lit multiple times if certain projects are enabled, which would produce unwanted "empty runs". Specify via `LIT_OPTS=--allow-empty-runs`. There are 3 causes for empty runs: 1) No tests discovered. This is always an error. Fix test suite config or command line. 2) All tests filtered out. This is an error by default, but can be suppressed via `--alow-empty-runs`. Should prevent accidentally passing empty runs, but allow the workflow above. 3) The number of shards is greater than the number of tests. Currently, this is never an error. Personally, I think we should consider making this an error by default; if this happens, you are doing something wrong. I added a warning but did not change the behavior, since this warrants more discussion. Reviewed By: atrick, jdenny Differential Revision: https://reviews.llvm.org/D70105
* clang/Modules: Error if ReadASTBlock does not find the main moduleDuncan P. N. Exon Smith2019-11-123-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | If ReadASTBlock does not find its top-level submodule, there's something wrong the with the PCM. Error in that case, to avoid hitting problems further from the source. Note that the Swift compiler sometimes hits a case in CompilerInstance::loadModule where the top-level submodule mysteriously does not have Module::IsFromModuleFile set. That will emit a confusing warn_missing_submodule, which was never intended for the main module. The recent audit of error-handling in ReadAST may have rooted out the real problem. If not, this commit will help to clarify the real problem, and replace a confusing warning with an error pointing at the malformed PCM file. We're specifically sniffing out whether the top-level submodule was found/processed, in case there is a malformed module file that is missing it. If there is an error encountered during ReadSubmoduleBlock the return status should already propagate through. It would be nice to detect other missing submodules around here to catch other instances of warn_missing_submodule closer to the source, but that's left as a future exercise. https://reviews.llvm.org/D70063
* [SLP] add test for miscompile with reduction (PR43948); NFCSanjay Patel2019-11-121-0/+55
|
* [Hexagon] Fix vector spill expansion to use proper alignmentKrzysztof Parzyszek2019-11-126-106/+190
| | | | | | | | | | 1. Add pseudos PS_vloadrv_ai and PS_vstorerv_ai: those are now used for single vector registers in loadRegFromStackSlot (and store...). 2. Remove pseudos PS_vloadrwu_ai and PS_vstorerwu_ai. The alignment is now checked when expanding spill pseudos (both in frame lowering and in expand-post-ra-pseudos), and a proper instruction is generated. 3. Update MachineMemOperands when dealigning vector spill slots. 4. Return vector predicate registers in getCallerSavedRegs.
* [Hexagon] Convert stack object offsets to int64, NFCKrzysztof Parzyszek2019-11-121-1/+1
| | | | This will print [SP-56] instead of [SP+4294967240].
* [Hexagon] Handle stack realignment in hexagon-vextractKrzysztof Parzyszek2019-11-121-7/+37
|
* [Hexagon] Require PS_aligna whenever variable-sized objects are presentKrzysztof Parzyszek2019-11-121-3/+3
|
* [PowerPC] Remove allow-deprecated-dag-overlap and fix broken testsJinsong Ji2019-11-125-31/+31
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This is found during review of https://reviews.llvm.org/D67088. CHECK-DAG is non-overlapping after https://reviews.llvm.org/D47106. -allow-deprecated-dag-overlap was introduced to temporary accept old behavior. But it actually hide some broken tests, eg: `test/CodeGen/PowerPC/swaps-le-1.ll` The codegen has changed, but the CHECK-DAG still PASS due to allowing `overlap`. This patch remove the deprecated options, and fix the broken tests. Reviewers: #powerpc, hfinkel, nemanjai, steven.zhang, shchenz Reviewed By: shchenz Subscribers: shchenz, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69733
* [DBG][OPT] Attempt to salvage or undef debug info when removing trivially ↵Tom Weaver2019-11-123-0/+147
| | | | | | | | deletable instructions in the Reassociate Expression pass. Reviewed By: aprantl, vsk Differential revision: https://reviews.llvm.org/D69943
* [PowerPC][NFC]Fix typo in desc for enable-ppc-prefetchingJinsong Ji2019-11-121-1/+1
|
* [Examples] Add IRTransformations directory to examples.Florian Hahn2019-11-1216-0/+985
| | | | | | | | | | | | | | | | | | | This patch adds a new IRTransformations directory to llvm/examples/. This is intended to serve as a new home for example transformations/analysis code used by various tutorials. If LLVM_BUILD_EXAMPLES is enabled, the ExamplesIRTransforms library is linked into the opt binary and the example passes become available. To start off with, it contains the CFG simplifications used in the IR part of the 'Getting Started With LLVM: Basics' tutorial at the US LLVM Developers Meeting 2019. Reviewers: paquette, jfb, meikeb, lhames, kbarton Reviewed By: paquette Differential Revision: https://reviews.llvm.org/D69416
* Revert "Fix lookup of symbols at the same address with no size vs. size"Muhammad Omair Javaid2019-11-123-30/+2
| | | | | | | | This reverts commit 3f594ed1686b44138bee245c708773e526643aaf. This change has cause LLDB expression evaluation to fail on Arm Linux. Differential Revision: https://reviews.llvm.org/D63540
* [lldb] Fix more -Wdeprecated-copy warningsPavel Labath2019-11-126-44/+4
| | | | | | | This warning triggers when a class defines a copy constructor but not a copy-assignment operator (which then gets auto-generated by the compiler). Fix the warning by deleting the other operator too, as the default implementation works just fine.
* [lldb] Fix some warnings in the python pluginPavel Labath2019-11-122-2/+3
|
* Mark llvm::ConstantExpr::getAsInstruction as constAlex Denisov2019-11-122-2/+2
| | | | | | | | | | | | | | | | Summary: getAsInstruction is the only non-const member method. It is impossible to enforce const-correctness because of it. Reviewers: jmolloy, majnemer Reviewed By: jmolloy Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70113
* AArch64: add arm64_32 support to Clang.Tim Northover2019-11-1224-30/+372
|
OpenPOWER on IntegriCloud