summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [X86] Fix isel pattern that was looking for a bitcasted load. Remove what ↵Craig Topper2019-06-231-13/+1
| | | | | | | | | | appears to be a copy/paste mistake. DAG combine should ensure bitcasts of loads don't exist. Also remove 3 patterns that are identical to the block above them. llvm-svn: 364158
* Fix test for 32-bit targets.Richard Smith2019-06-231-4/+4
| | | | llvm-svn: 364157
* [Tests] Autogen and improve test readabilityPhilip Reames2019-06-231-46/+95
| | | | llvm-svn: 364156
* [IndVars] Remove dead instructions after folding trivial loop exitPhilip Reames2019-06-234-19/+7
| | | | | | In rL364135, I taught IndVars to fold exiting branches in loops with a zero backedge taken count (i.e. loops that only run one iteration). This extends that to eliminate the dead comparison left around. llvm-svn: 364155
* SlotIndexes: delete unused functionsFangrui Song2019-06-232-71/+0
| | | | llvm-svn: 364154
* [InstCombine] squash is-power-of-2 that uses ctpopSanjay Patel2019-06-232-10/+39
| | | | | | | | | | | | | | | This is another intermediate IR step towards solving PR42314: https://bugs.llvm.org/show_bug.cgi?id=42314 We can test if a value is power-of-2-or-0 using ctpop(X) < 2, so combining that with a non-zero check of the input is the same as testing if exactly 1 bit is set: (X != 0) && (ctpop(X) u< 2) --> ctpop(X) == 1 Differential Revision: https://reviews.llvm.org/D63660 llvm-svn: 364153
* SlotIndexes: simplify IdxMBBPair operatorsFangrui Song2019-06-232-17/+4
| | | | llvm-svn: 364152
* [SelectionDAG] Remove the code that attempts to calculate the alignment for ↵Craig Topper2019-06-232-27/+4
| | | | | | | | | | | | | | the second half of a split masked load/store. The code divides the alignment by 2 if the original alignment is equal to the original VT size. But this wouldn't be correct if the alignment was larger than the VT size. The memory operand object already takes care of calling MinAlign on the base alignment and the memory pointer offset. So we don't need any special code at all. llvm-svn: 364151
* [X86][SelectionDAG] Cleanup and simplify masked_load/masked_store in ↵Craig Topper2019-06-234-61/+37
| | | | | | | | | | | | | | | | | | | | tablegen. Use more precise PatFrags for scalar masked load/store. Rename masked_load/masked_store to masked_ld/masked_st to discourage their direct use. We need to check truncating/extending and compressing/expanding before using them. This revealed that our scalar masked load/store patterns were misusing these. With those out of the way, renamed masked_load_unaligned and masked_store_unaligned to remove the "_unaligned". We didn't check the alignment anyway so the name was somewhat misleading. Make the aligned versions inherit from masked_load/store instead from a separate identical version. Merge the 3 different alignments PatFrags into a single version that uses the VT from the SDNode to determine the size that the alignment needs to match. llvm-svn: 364150
* Disable test by defaultEric Fiselier2019-06-231-1/+1
| | | | llvm-svn: 364149
* Add super fast _IsSame trait for internal use.Eric Fiselier2019-06-232-11/+77
| | | | | | | | | Clang provides __is_same that doesn't produce any instantiations and just returns a bool. It's a lot faster than using std::is_same I'll follow up with a patch to actually start using it. llvm-svn: 364148
* Revert "builtins: relax __iso_volatile_{load,store}32"Saleem Abdulrasool2019-06-232-19/+2
| | | | | | | This reverts commit SVN r364137. This seems to be cause problems with casting in C. llvm-svn: 364147
* Add noexcept throughout <atomic>Eric Fiselier2019-06-231-28/+28
| | | | | | | | | | | The CMake CheckLibcxxAtomic module was always failing to compile the example, even when libatomic wasn't needed. This was caused because the check doesn't link a C++ runtime library to provide std::terminate, which is required for exception support. The check is still really broken, but <atomic> is better! llvm-svn: 364146
* MSVC visualizers for type aliasesMike Spertus2019-06-231-0/+51
| | | | | | | For example, the following TypeAliasTemplateDecl now displays in the autos window as template<class T> using type_identity_t = type_identity<T>::type; llvm-svn: 364145
* Fix placement of -Wno-ignored-attributesEric Fiselier2019-06-231-2/+3
| | | | llvm-svn: 364144
* [Support] Fix build under EmscriptenKeno Fischer2019-06-231-0/+3
| | | | | | | | | | | | | | | Summary: Emscripten's libc doesn't define MNT_LOCAL, thus causing a build failure in the fallback path. However, to the best of my knowledge, it also doesn't support remote file system mounts, so we may simply return `true` here (as we do for e.g. Fuchsia). With this fix, the core LLVM libraries build correctly under emscripten (though some of the tools and utils do not). Reviewers: kripken Differential Revision: https://reviews.llvm.org/D63688 llvm-svn: 364143
* Disable -Wignored-attributes for nowEric Fiselier2019-06-231-0/+1
| | | | llvm-svn: 364142
* Revert [CommandLine] Remove OptionCategory and SubCommand caches from the ↵Don Hinton2019-06-223-118/+95
| | | | | | | | | | | | | Option class. This reverts r364134 (git commit a5b83bc9e3b8e8945b55068c762bd6c73621a4b0) Caused errors in the asan bot, so the GeneralCategory global needs to be changed to ManagedStatic. Differential Revision: https://reviews.llvm.org/D62105 llvm-svn: 364141
* Fix TBAA representation for zero-sized fields and unnamed bit-fields.Richard Smith2019-06-224-8/+28
| | | | | | | | | | | | | | | Unnamed bit-fields should not be represented in the TBAA metadata because they do not represent storage fields (they only affect layout). Zero-sized fields should not be represented in the TBAA metadata because by definition they have no associated storage (so we will never emit a load or store through them), and they might not appear in declaration order within the struct layout. Fixes a verifier failure when emitting a TBAA-enabled load through a class type containing a zero-sized field. llvm-svn: 364140
* Remove reliance on toCharUnitsFromBits rounding down.Richard Smith2019-06-221-1/+2
| | | | llvm-svn: 364139
* Natural MSVC visualization of constructorsMike Spertus2019-06-221-1/+6
| | | | | | | E.g., Allow MSVC to visualize a CXXConstructorDecl like Constructor { Y(type_identity_t<T>)} llvm-svn: 364138
* builtins: relax __iso_volatile_{load,store}32Saleem Abdulrasool2019-06-222-2/+19
| | | | | | | | | | | This is reduced from MSVC's MSVCPRT 14.21.27702 atomic header. Because Windows is a LLP64 environment, `long`, `long int`, and `int` are all synonymous. Change the signature for `__iso_volatile_load32` and `__iso_volatile_store32` to accept a `long int` instead. This allows an implicit cast of `int` to `long int` while also permitting `long` to be accepted. llvm-svn: 364137
* [X86][SSE] Fold extract_subvector(vselect(x,y,z),0) -> ↵Simon Pilgrim2019-06-2215-38/+45
| | | | | | vselect(extract_subvector(x,0),extract_subvector(y,0),extract_subvector(z,0)) llvm-svn: 364136
* Exploit a zero LoopExit count to eliminate loop exitsPhilip Reames2019-06-223-6/+17
| | | | | | | | | | This turned out to be surprisingly effective. I was originally doing this just for completeness sake, but it seems like there are a lot of cases where SCEV's exit count reasoning is stronger than it's isKnownPredicate reasoning. Once this is in, I'm thinking about trying to build on the same infrastructure to eliminate provably untaken checks. There may be something generally interesting here. Differential Revision: https://reviews.llvm.org/D63618 llvm-svn: 364135
* [CommandLine] Remove OptionCategory and SubCommand caches from the Option class.Don Hinton2019-06-223-95/+118
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change processes `OptionCategory`s and `SubCommand`s as they are seen instead of caching them in the Option class and processing them later. Doing so simplifies the work needed to be done by the Global parser and significantly reduces the size of the Option class to a mere 64 bytes. Removing the `OptionCategory` cache saved 24 bytes, and removing the `SubCommand` cache saved an additional 48 bytes, for a total of a 72 byte reduction. Reviewers: beanz, zturner, MaskRay, serge-sans-paille Reviewed By: serge-sans-paille Subscribers: serge-sans-paille, tstellar, zturner, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62105 llvm-svn: 364134
* [NFC] Fix indentation in PPCAsmPrinter.cppHubert Tong2019-06-221-54/+54
| | | | | | | | After r248261, the indentation switches, inside a namespace definition, between indenting and not indenting one level in for that namespace; the abomination occurs in the middle of a class definition. Fix that. llvm-svn: 364133
* [PowerPC][NFC] Move comment to the relevant functionHubert Tong2019-06-221-1/+1
| | | | | | | A comment that applies to a virtual destructor was placed on a class constructor. Move the comment to where it belongs. llvm-svn: 364132
* PDB docs: Delete trailing whitespace, wrap to 80 colsNico Weber2019-06-225-76/+82
| | | | llvm-svn: 364131
* [NewGVN] Fix copy/paste mistake in castNikita Popov2019-06-221-1/+1
| | | | llvm-svn: 364130
* [NewGVN] Remove dead SwitchEdges variable; NFCNikita Popov2019-06-221-4/+0
| | | | llvm-svn: 364129
* [LFTR] Add tests for PR41998; NFCNikita Popov2019-06-221-0/+73
| | | | | | The limit for the pointer case is incorrect. llvm-svn: 364128
* [X86] Don't use _MM_FROUND_CUR_DIRECTION in the intrinsics tests.Craig Topper2019-06-224-390/+390
| | | | | | | | | | _MM_FROUND_CUR_DIRECTION is the behavior of the intrinsics that don't take a rounding mode argument. So a better test is using _MM_FROUND_NO_EXC with the SAE only intrinsics and an explicit rounding mode with the intrinsics that support embedded rounding mode. llvm-svn: 364127
* AArch64: Add support for reading pc using llvm.read_register.Peter Collingbourne2019-06-222-0/+19
| | | | | | | | | | | | | | | This is useful for allowing code to efficiently take an address that can be later mapped onto debug info. Currently the hwasan pass achieves this by taking the address of the current function: http://llvm-cs.pcc.me.uk/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp#921 but this costs two instructions (plus a GOT entry in PIC code) per function with stack variables. This will allow the cost to be reduced to a single instruction. Differential Revision: https://reviews.llvm.org/D63471 llvm-svn: 364126
* [CMake] Delete redundant DEPENDS/LINK_LIBS from LineEditor/XRayFangrui Song2019-06-222-9/+0
| | | | | | The link dependencies are already specified in LLVMBuild.txt llvm-svn: 364125
* Make GlobalISel depend on SelectionDAG after D63169Fangrui Song2019-06-221-1/+1
| | | | | | | | | | | GlobalISel/IRTranslator.cpp now references SelectionDAG/FunctionLoweringInfo.cpp. This fixes a link error in -DBUILD_SHARED_LIBS=on builds: ld.lld: error: undefined symbol: llvm::FunctionLoweringInfo::clear() >>> referenced by IRTranslator.cpp:2198 (../lib/CodeGen/GlobalISel/IRTranslator.cpp:2198) >>> lib/CodeGen/GlobalISel/CMakeFiles/LLVMGlobalISel.dir/IRTranslator.cpp.o:(llvm::IRTranslator::finalizeFunction()) llvm-svn: 364124
* AMDGPU: Fix target builtins for gfx10Matt Arsenault2019-06-228-3/+14
| | | | | | This wasn't setting some of the features from older generations. llvm-svn: 364123
* Fix UNSUPPORTED attribute from windows to system-windows.Douglas Yung2019-06-221-1/+1
| | | | llvm-svn: 364122
* [llvm-objdump] Allow --disassemble-functions to take demangled namesYuanfang Chen2019-06-223-36/+71
| | | | | | | | | | | | | The --disassemble-functions switch takes demangled names when --demangle is specified, otherwise the switch takes mangled names. https://bugs.llvm.org/show_bug.cgi?id=41908 Reviewers: jhenderson, grimar, MaskRay, rupprecht Differential Revision: https://reviews.llvm.org/D63524 llvm-svn: 364121
* [NFC] Marking test added in r363975 as unsupported on Windows.Douglas Yung2019-06-221-0/+2
| | | | | | | | This test references a path that does not exist on Windows causing it to emit different output from what was expected leading to a failure when run on Windows. llvm-svn: 364120
* [ODRHash] Skip some typedef types.Richard Trieu2019-06-222-1/+107
| | | | | | | | | | | | | | | In some cases, a typedef only strips aways a keyword for a type, keeping the same name as the root record type. This causes some confusion when the type is defined in one modules but only forward declared in another. Skipping the typedef and going straight to the record will avoid this issue. typedef struct S {} S; S* s; // S is TypedefType here struct S; S* s; // S is RecordType here llvm-svn: 364119
* [llvm-objdump] Move --start-address >= --stop-address check out of theYuanfang Chen2019-06-222-5/+5
| | | | | | | | | | | | | | | | | | | | -d code. Summary: Move it into `main` function so the checking is effective for all actions user may do with llvm-objdump; notably, -r and -s in addition to existing -d. Match GNU behavior. Reviewers: jhenderson, grimar, MaskRay, rupprecht Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63631 llvm-svn: 364118
* AArch64: Prefer FP-relative debug locations in HWASANified functions.Peter Collingbourne2019-06-224-11/+59
| | | | | | | | | | | | | | | | | | | | To help produce better diagnostics for stack use-after-return, we'd like to be able to determine the addresses of each HWASANified function's local variables given a small amount of information recorded on entry to the function. Currently we require all HWASANified functions to use frame pointers and record (PC, FP) on function entry. This works better than recording SP because FP cannot change during the function, unlike SP which can change e.g. due to dynamic alloca. However, most variables currently end up using SP-relative locations in their debug info. This prevents us from recomputing the address of most variables because the distance between SP and FP isn't recorded in the debug info. To address this, make the AArch64 backend prefer FP-relative debug locations when producing debug info for HWASANified functions. Differential Revision: https://reviews.llvm.org/D63300 llvm-svn: 364117
* gn build: Merge r364046.Peter Collingbourne2019-06-221-0/+1
| | | | llvm-svn: 364116
* [COFF, ARM64] Fix encoding of debugtrap for WindowsTom Tan2019-06-215-0/+30
| | | | | | | | | | | | On Windows ARM64, intrinsic __debugbreak is compiled into brk #0xF000 which is mapped to llvm.debugtrap in Clang. Instruction brk #F000 is the defined break point instruction on ARM64 which is recognized by Windows debugger and exception handling code, so llvm.debugtrap should map to it instead of redirecting to llvm.trap (brk #1) as the default implementation. Differential Revision: https://reviews.llvm.org/D63635 llvm-svn: 364115
* Add new style meta-programming primatives.Eric Fiselier2019-06-213-28/+245
| | | | | | | | | | | | | Using class templates instead of alias templates causes a lot of instantiations. As part of the move away from C++03, we want to improve the efficiency of our meta-programming. This patch lays the groundwork by introducing new _If, _EnableIf, _And, _Or, and _IsValidExpansion (detect member). Future patches will replace the existing implementations after verifying there compile time differences. llvm-svn: 364114
* [lit] Deduplicate logic in toolchain.pyJonas Devlieghere2019-06-211-6/+4
| | | | | | No need to compute the path of lit-lldb-init twice. llvm-svn: 364113
* [lit] Make lit-lldb-init configurable by CMakeJonas Devlieghere2019-06-213-2/+6
| | | | | | | | | | This makes the `lit-lldb-init` file configurable by CMake. This matters to us downstream in Swift, where we want to set environment variables with the `env` command for every test. Differential revision: https://reviews.llvm.org/D63679 llvm-svn: 364112
* Revert [SLP] Look-ahead operand reordering heuristic.Reid Kleckner2019-06-212-276/+93
| | | | | | | | | This reverts r364084 (git commit 5698921be2d567f6abf925479ac9f5a376d6d74f) It caused crashes while compiling a file in Chrome. Reduction forthcoming. llvm-svn: 364111
* Remove binary finally accidentially committed in r364109Erich Keane2019-06-211-0/+0
| | | | llvm-svn: 364110
* Ensure Target Features always_inline error happens in C++ cases.Erich Keane2019-06-216-13/+37
| | | | | | | | A handful of C++ cases as reported in PR42352 didn't actually give an error when always_inlining with a different target feature list. This resulted in broken IR. llvm-svn: 364109
OpenPOWER on IntegriCloud