summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Change from a to a . Fixes PR#39871.Marshall Clow2019-01-117-23/+23
| | | | llvm-svn: 350972
* [ConstantFolding] Fold undef for integer intrinsicsNikita Popov2019-01-116-594/+174
| | | | | | | | | | | | | | | | | | | This fixes https://bugs.llvm.org/show_bug.cgi?id=40110. This implements handling of undef operands for integer intrinsics in ConstantFolding, in particular for the bitcounting intrinsics (ctpop, cttz, ctlz), the with.overflow intrinsics, the saturating math intrinsics and the funnel shift intrinsics. The undef behavior follows what InstSimplify does for the general cas e of non-constant operands. For the bitcount intrinsics (where InstSimplify doesn't do undef handling -- there cannot be a combination of an undef + non-constant operand) I'm using a 0 result if the intrinsic is defined for zero and undef otherwise. Differential Revision: https://reviews.llvm.org/D55950 llvm-svn: 350971
* [Darwin][Driver] Don't pass a file as object_path_lto during ThinLTOSteven Wu2019-01-114-7/+40
| | | | | | | | | | | | | | | | | | | | | | Summary: After r327851, Driver::GetTemporaryPath will create the file rather than just create a potientially unqine filename. If clang driver pass the file as parameter as -object_path_lto, ld64 will pass it back to libLTO as GeneratedObjectsDirectory, which is going to cause a LLVM ERROR if it is not a directory. Now during thinLTO, pass a temp directory path to linker instread. rdar://problem/47194182 Reviewers: arphaman, dexonsmith Reviewed By: arphaman Subscribers: mehdi_amini, inglorion, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D56608 llvm-svn: 350970
* [SLP]Moved NVPTX test under NVPTX directory, NFC.Alexey Bataev2019-01-111-0/+0
| | | | llvm-svn: 350969
* Fix unchecked Error introduced in r350956Alexandre Ganea2019-01-111-1/+3
| | | | llvm-svn: 350968
* [SLP]Update test checks for the SPL vectorizer, NFC.Alexey Bataev2019-01-1181-692/+3578
| | | | llvm-svn: 350967
* [X86] Fix incomplete handling of register-assigned variables in parsing.Nirav Dave2019-01-114-188/+647
| | | | | | | | | | | | | | Teach x86 assembly operand parsing to distinguish between assembler variable assigned to named registers and those assigned to immediate values. Reviewers: rnk, nickdesaulniers, void Subscribers: hiraditya, jyknight, llvm-commits Differential Revision: https://reviews.llvm.org/D56287 llvm-svn: 350966
* [Sanitizer] Disable getusershell interception for AndroidDavid Carlier2019-01-112-2/+2
| | | | | | | | | | Reviewers: vitalybuka, pcc, eugenis Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D56583 llvm-svn: 350965
* gn build: Create a variable for the host toolchain and start using it in the ↵Peter Collingbourne2019-01-113-4/+5
| | | | | | | | tblgen template. Differential Revision: https://reviews.llvm.org/D56575 llvm-svn: 350964
* gn build: s/root_out_dir/root_build_dir/g in ↵Peter Collingbourne2019-01-111-2/+2
| | | | | | | | | | llvm/utils/gn/build/write_cmake_config.gni. This makes the generated files go to the right place when using a non-default toolchain. Differential Revision: https://reviews.llvm.org/D56427 llvm-svn: 350963
* [RISCV][NFC] Add CHECK lines for atomic operations on RV64IAlex Bradbury2019-01-114-0/+5770
| | | | | | | As or RV32I, we include these for completeness. Committing now to make it easier to review the RV64A patch. llvm-svn: 350962
* [llvm-mca] Update tests for Exynos (NFC)Evandro Menezes2019-01-114-0/+46
| | | | | | Update test cases for Exynos M4. llvm-svn: 350961
* [AArch64] Add pipeline model for Exynos M4Evandro Menezes2019-01-112-1/+1006
| | | | | | Add the scheduling and cost model for Exynos M4. llvm-svn: 350960
* [CMake] Export utility targets to the build/install tree depending on ↵Stefan Granitz2019-01-111-0/+3
| | | | | | | | | | | | | | | | | | LLVM_BUILD/INSTALL_UTILS Summary: Allow external projects to import test-related targets like FileCheck, count, not etc. and query binary paths, properties, etc. This would be useful for LLDB, because it reduces the difference between in-tree vs. standalone builds and simplifies CMake logic. Reviewers: chapuni, gottesmm, beanz Reviewed By: beanz Subscribers: mgorny, lldb-commits, llvm-commits, #lldb Differential Revision: https://reviews.llvm.org/D56606 llvm-svn: 350959
* Implement Attr dumping in terms of visitorsStephen Kelly2019-01-118-57/+195
| | | | | | | | | | | | | | Remove now-vestigial dumpType and dumpBareDeclRef methods. The old tablegen generated code used to expect them to be present, but the new generated code has no such requirement. Reviewers: aaron.ballman Subscribers: mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D55492 llvm-svn: 350958
* [ASTDump] Add utility for dumping a label with child nodesStephen Kelly2019-01-113-10/+21
| | | | | | | | | | | | | | | | | | | Summary: Use it to add optional label nodes to Stmt dumps. This preserves behavior of InitExprList dump: // CHECK-NEXT: `-InitListExpr {{.+}} <col:13, col:15> 'U [3]' // CHECK-NEXT: |-array_filler: InitListExpr {{.+}} <col:15> 'U' field Field {{.+}} 'i' 'int' // CHECK-NEXT: `-InitListExpr {{.+}} <col:14> 'U' field Field {{.+}} 'i' 'int' // CHECK-NEXT: `-IntegerLiteral {{.+}} <col:14> 'int' 1 Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55488 llvm-svn: 350957
* [LLD][COFF] Support /ignore:4099. Support /ignore with comma-separated ↵Alexandre Ganea2019-01-116-15/+49
| | | | | | | | arguments. Differential Revision: https://reviews.llvm.org/D56392 llvm-svn: 350956
* [Bug 39548][Clang] PGO bootstrap fails with python3: errors in perf-helper.pySerge Guelton2019-01-111-2/+2
| | | | | | | | | | | Current clang fail to bootstrap in PGO mode when only python3 is available, because perf-helper.py is not compatible with python3. Commited on behalf of Romain Geissler. Differential Revision: https://reviews.llvm.org/D54071 llvm-svn: 350955
* [test] Update support for Exynos M4 (NFC)Evandro Menezes2019-01-114-18/+28
| | | | | | Update test cases for Exynos M4. llvm-svn: 350954
* [AArch64] Create feature set for Exynos M4Evandro Menezes2019-01-116-12/+46
| | | | | | Complete the feature set for Exynos M4 and update test cases. llvm-svn: 350953
* [MergeFunc] Update clang test for r350939Vedant Kumar2019-01-111-4/+2
| | | | | | | In r350939, the MergeFunc pass learned to erase duplicate functions which are discardable if unused. llvm-svn: 350952
* [Legalizer] Use correct ValueType of SELECT_CC node during Float promotionPirama Arumuga Nainar2019-01-112-3/+66
| | | | | | | | | | | | | | | | | Summary: When legalizing the result of a SELECT_CC node by promoting the floating-point type, use the promoted-to type rather than the original type. Fix PR40273. Reviewers: efriedma, majnemer Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D56566 llvm-svn: 350951
* Fix build breaks after the ParseCompileUnit changes.Zachary Turner2019-01-112-12/+9
| | | | | | | The addition of SymbolFileBreakpad crossed paths with my change, so this interface needs to be fixed up as well. llvm-svn: 350950
* [LTO] Add option to enable LTOUnit splitting, and disable unless neededTeresa Johnson2019-01-1112-13/+61
| | | | | | | | | | | | | | | | | | | | Summary: Adds a new -f[no]split-lto-unit flag that is disabled by default to control module splitting during ThinLTO. It is automatically enabled for -fsanitize=cfi and -fwhole-program-vtables. The new EnableSplitLTOUnit codegen flag is passed down to llvm via a new module flag of the same name. Depends on D53890. Reviewers: pcc Subscribers: ormris, mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D53891 llvm-svn: 350949
* [LTO] Record whether LTOUnit splitting is enabled in indexTeresa Johnson2019-01-1144-38/+267
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Records in the module summary index whether the bitcode was compiled with the option necessary to enable splitting the LTO unit (e.g. -fsanitize=cfi, -fwhole-program-vtables, or -fsplit-lto-unit). The information is passed down to the ModuleSummaryIndex builder via a new module flag "EnableSplitLTOUnit", which is propagated onto a flag on the summary index. This is then used during the LTO link to check whether all linked summaries were built with the same value of this flag. If not, an error is issued when we detect a situation requiring whole program visibility of the class hierarchy. This is the case when both of the following conditions are met: 1) We are performing LowerTypeTests or Whole Program Devirtualization. 2) There are type tests or type checked loads in the code. Note I have also changed the ThinLTOBitcodeWriter to also gate the module splitting on the value of this flag. Reviewers: pcc Subscribers: ormris, mehdi_amini, Prazek, inglorion, eraman, steven_wu, dexonsmith, arphaman, dang, llvm-commits Differential Revision: https://reviews.llvm.org/D53890 llvm-svn: 350948
* Attempt to fix PDB tests broken by r350924Pavel Labath2019-01-116-6/+6
| | | | | | | The patch added the symbol plugin name to the lldb-test output. Update the tests to account for that. llvm-svn: 350947
* [analyzer] [NFC] Fix the FIXME in testsGeorge Karpenkov2019-01-113-24032/+52298
| | | | llvm-svn: 350946
* [CMake] Include tests by default also in standalone buildsStefan Granitz2019-01-112-2/+2
| | | | | | In-tree builds include tests by default. Standalone builds should behave the same. llvm-svn: 350945
* [llvm-objcopy][NFC] Consistenly use two dashes for flags in tests.Jordan Rupprecht2019-01-11101-199/+203
| | | | | | | | | | | | | | | | | | | | | | | Summary: As pointed out in D53667, our use of hyphens in flags can be inconsistent, mixing `-` with `--`. This change makes all long style flags use `--`. Automatically changed via: ``` find test/tools/llvm-objcopy/ELF -type f | xargs sed -i 's/ -\([a-zA-Z]\{3\}\)/ --\1/g' ``` Two false positives were manually fixed/reverted. Reviewers: jhenderson, espindola, alexshap Reviewed By: jhenderson Subscribers: emaste, javed.absar, arichardson, fedor.sergeev, jakehehrlich, llvm-commits Differential Revision: https://reviews.llvm.org/D56513 llvm-svn: 350944
* [SymbolFile] Make ParseCompileUnitXXX accept a CompileUnit&.Zachary Turner2019-01-1119-319/+255
| | | | | | | | | | | | | | | | Previously all of these functions accepted a SymbolContext&. While a CompileUnit is one member of a SymbolContext, there are also many others, and by passing such a monolithic parameter in this way it makes the requirements and assumptions of the API unclear for both callers as well as implementors. All these methods need is a CompileUnit. By limiting the parameter type in this way, we simplify the code as well as make it self-documenting for both implementers and users. Differential Revision: https://reviews.llvm.org/D56564 llvm-svn: 350943
* [attributes] Extend os_returns_(not_?)_retained attributes to parametersGeorge Karpenkov2019-01-117-29/+136
| | | | | | | | | | | When applied to out-parameters, the attributes specify the expected lifetime of the written-into object. Additionally, introduce OSReturnsRetainedOn(Non)Zero attributes, which specify that an ownership transfer happens depending on a return code. Differential Revision: https://reviews.llvm.org/D56292 llvm-svn: 350942
* Fix a pair of Wfallthrough warnings in ScanfFormatString.Erich Keane2019-01-111-0/+2
| | | | | Change-Id: Ia73a34fdd93fc974224583505f9e6432493cb0da llvm-svn: 350941
* Provide storage for `true_type::value` and `false_type::value`.Dan Liew2019-01-112-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This fixes linker errors that occurs when the `sanitizer_type_traits_test.cc` is built without optimizations. The error occurs because the test tries to take a reference. A possible workaround is to give the GTest macros take boolean rvalues by doing something like: ``` ASSERT_TRUE(bool(is_same<uptr, uptr>::value)); ``` However this only hides the problem. Unfortunately Using `constexpr` won't fix the problem unless we are using C++17. Reviewers: vitalybuka, kubamracek, george.karpenkov, yln Subscribers: mgorny, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D56035 llvm-svn: 350940
* [MergeFunc] Erase unused duplicate functions if they are discardableVedant Kumar2019-01-112-2/+14
| | | | | | | | | | MergeFunc only deletes unused duplicate functions if they have local linkage, but it should be safe to relax this to any "discardable if unused" linkage type. Differential Revision: https://reviews.llvm.org/D56574 llvm-svn: 350939
* [MergeFunc] Use Instruction::getFunction as a cleanup, NFCVedant Kumar2019-01-111-2/+2
| | | | llvm-svn: 350938
* [CMake] Remove dead code and outdated commentsStefan Granitz2019-01-113-23/+2
| | | | | | | | | | | | | | Summary: All of these changes are NOPs. Reviewers: stella.stamenova, labath, JDevlieghere Reviewed By: stella.stamenova Subscribers: mgorny, lldb-commits, #lldb Differential Revision: https://reviews.llvm.org/D56609 llvm-svn: 350937
* [libcxx] Call __count_bool_true for bitset countAdhemerval Zanella2019-01-111-1/+1
| | | | | | | | | | | | | | | | | This patch aims to help clang with better information so it can inline __bit_reference count function usage for both std::biset. Current clang inliner can not infer that the passed typed will be used only to select the optimized variant, it evaluates the type argument and type check as a load plus compare (although later optimization phases correctly optimized this out). It is mainly to help llvm inliner to generate better code for std::bitset count for aarch64. It helps on both runtime and code size, since if inline decides that _VSTD::count should not be inlined the vectorization will create both aligned and unaligned variants (which add both code size and runtime costs) llvm-svn: 350936
* XFAIL getusershell.cc on Android.Matt Morehouse2019-01-111-0/+2
| | | | | | Android does not implement [set|get|end]usershell(). llvm-svn: 350935
* Implementation Feature Test Macros for P0722R3Chris Kennelly2019-01-113-3/+13
| | | | | | | | | | | | | | | | | Summary: P1353R0, adopted in San Diego, specified an implementation feature test macro for destroying delete (P0722R3). The implementation of the feature (https://reviews.llvm.org/rL315662) is not guarded behind a flag, so the macro is not conditional on language version. Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55741 llvm-svn: 350934
* Silence -Wsign-compare in unittestsBjorn Pettersson2019-01-111-7/+7
| | | | llvm-svn: 350933
* Add an .arcconfig for the top of the git monorepo.James Y Knight2019-01-111-0/+3
| | | | llvm-svn: 350932
* [Jump Threading] Unfold a select insn that feeds a switch via a phi nodeEhsan Amiri2019-01-113-28/+152
| | | | | | | | | | | Currently when a select has a constant value in one branch and the select feeds a conditional branch (via a compare/ phi and compare) we unfold the select statement. This results in threading the conditional branch later on. Similar opportunity exists when a select (with a constant in one branch) feeds a switch (via a phi node). The patch unfolds select under this condition. A testcase is provided. llvm-svn: 350931
* Don't use the form '2017y' in tests, since some gcc versions don't allow itMarshall Clow2019-01-112-6/+6
| | | | llvm-svn: 350930
* Implement the 'sys_time' portions of the C++20 calendaring stuff. Reviewed ↵Marshall Clow2019-01-1121-142/+1209
| | | | | | as D56494 llvm-svn: 350929
* [x86] allow insert/extract when matching horizontal opsSanjay Patel2019-01-113-110/+39
| | | | | | | | | | | | | | Previously, we limited this transform to cases where the extraction into the build vector happens from vectors of the same type as the build vector, but that's not required. There's a slight potential regression seen in the AVX512 result for phadd -- we're using the 256-bit flavor of the instruction now even though the 128-bit subset is sufficient. The same problem could already be seen in the AVX2 result. Follow-up patches will attempt to narrow that back down. llvm-svn: 350928
* [llvm-objcopy] [COFF] Implmement --strip-unneeded and -x/--discard-all for ↵Martin Storsjo2019-01-114-1/+96
| | | | | | | | symbols Differential Revision: https://reviews.llvm.org/D56480 llvm-svn: 350927
* [llvm-objcopy] [COFF] Fix writing object files without symbols/string tableMartin Storsjo2019-01-113-5/+21
| | | | | | | | | | Previously, this was broken - by setting PointerToSymbolTable to zero but still actually writing the string table length, the object file header was corrupted. Differential Revision: https://reviews.llvm.org/D56584 llvm-svn: 350926
* [llvm-symbolizer] Add -exe, -e as aliases to -objDmitry Venikov2019-01-113-1/+13
| | | | | | | | | | | | | | Summary: Provides -exe, -e as aliases to -obj. Motivation: https://bugs.llvm.org/show_bug.cgi?id=40071 Reviewers: ruiu, rnk, fjricci, jhenderson Reviewed By: jhenderson Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D56580 llvm-svn: 350925
* Introduce SymbolFileBreakpad and use it to fill symtabPavel Labath2019-01-1111-23/+482
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This commit adds the glue code necessary to integrate the SymbolFileBreakpad into the plugin system. Most of the methods are stubbed out. The only method implemented method is AddSymbols, which parses the PUBLIC "section" of the breakpad "object file", and fills out the Module's symtab. To enable testing this, I've made two additional changes: - dump Symtab from the SymbolVendor class. The symtab was already being dumped as a part of the object file dump, but that happened before symbol vendor kicked in, so it did not reflect any symbols added there. - add ability to explicitly specify the external symbol file in lldb-test (so that the object file could be linked with the breakpad symbol file). To make things simpler, I've changed lldb-test from consuming multiple inputs (and dumping their symbols) to having it just process a single file per invocation. This was not a problem since everyone was using it that way already. Reviewers: clayborg, zturner, lemo, markmentovai, amccarth Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D56173 llvm-svn: 350924
* ELF: Fix base address computation code for files generated by yaml2objPavel Labath2019-01-112-1/+35
| | | | | | | | | | | | | | | | | | | | | The code was assuming that the elf file will have a PT_LOAD segment starting from the first byte of the file. While this is true for files generated by most linkers (it's a way of saving space), it is not a requirement. And files not satisfying this constraint can still be perfectly executable. yaml2obj is one of the tools which produces files like this. This patch relaxes the check in ObjectFileELF to take the address of the first PT_LOAD segment as the base address of the object (instead of the one with the offset 0). Since the PT_LOAD segments are supposed to be sorted according to the VM address, this entry will also be the one with the lowest VM address. If we ever run into files which don't have the PT_LOAD segments sorted, we can easily change this code to return the lowest VM address as the base address (if that is the correct thing to do for these files). llvm-svn: 350923
OpenPOWER on IntegriCloud