summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Finish moving TargetRegisterInfo::isVirtualRegister() and friends to ↵Daniel Sanders2019-08-01195-1158/+1039
| | | | | | llvm::Register as started by r367614. NFC llvm-svn: 367633
* [DirectoryWatcher] Relax assumption to prevent test flakinessJan Korous2019-08-012-1/+19
| | | | llvm-svn: 367632
* Refactor deque to centralize handling of spare blocks.Eric Fiselier2019-08-012-48/+334
| | | | | | | | I have upcoming changes that modify how deque handles spare blocks. This cleanup is intended to make those changes easier to review and understand. This patch should have NFC. llvm-svn: 367631
* [PGO] Add PGO support at -O0 in the experimental new pass managerRong Xu2019-08-016-29/+139
| | | | | | | | | | | | | | Add PGO support at -O0 in the experimental new pass manager to sync the behavior of the legacy pass manager. Also change the test of gcc-flag-compatibility.c for more complete test: (1) change the match string to "profc" and "profd" to ensure the instrumentation is happening. (2) add IR format proftext so that PGO use compilation is tested. Differential Revision: https://reviews.llvm.org/D64029 llvm-svn: 367628
* Revert r366980: "[lit] Protect full test suite from FILECHECK_OPTS"Joel E. Denny2019-08-012-10/+3
| | | | | | Windows bots are broken. See recent D65335 and D65156 comments. llvm-svn: 367627
* Revert r367123: "[llvm] [lit/tests] Replace 'env -u' with more portable ↵Joel E. Denny2019-08-011-1/+1
| | | | | | | | | construct" Must be reverted in order to revert r366980, which breaks windows bots. See recent D65335 and D65156 comments. llvm-svn: 367626
* [NFC] Remove extra __has_featureJF Bastien2019-08-011-9/+0
| | | | | | It's already in Compiler.h llvm-svn: 367625
* Relax load store vectorizer pointer strip checksStanislav Mekhanoshin2019-08-012-9/+47
| | | | | | | | | | | The previous change to fix crash in the vectorizer introduced performance regressions. The condition to preserve pointer address space during the search is too tight, we only need to match the size. Differential Revision: https://reviews.llvm.org/D65600 llvm-svn: 367624
* Changes to improve CodeView debug info type record inline commentsNilanjana Basu2019-08-019-192/+635
| | | | | Signed-off-by: Nilanjana Basu <nilanjana.basu87@gmail.com> llvm-svn: 367623
* Fix Windows branch of FileManagerTest changesHarlan Haskins2019-08-011-1/+1
| | | | llvm-svn: 367622
* Fix use-after-move in ClangBasicTestsHarlan Haskins2019-08-011-1/+1
| | | | llvm-svn: 367620
* [WebAssembly] Fixed relocation errors having no location.Wouter van Oortmerssen2019-08-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Fixes: https://bugs.llvm.org/show_bug.cgi?id=42441 Used to print: <unknown>:0: error: Cannot represent a difference across sections (the location was null). Now prints: err.s:20:3: error: Cannot represent a difference across sections i32.const foo-bar ^ Note: I looked at adding a test for this, but I don't think it is worth it. We're not testing error formatting in the Wasm backend :) Reviewers: sbc100, jgravelle-google Subscribers: dschuff, aheejin, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65602 llvm-svn: 367619
* [clang] Change FileManager to use llvm::ErrorOr instead of null on failureHarlan Haskins2019-08-012-6/+9
| | | | | | | | | | | | | | | | | | Summary: Currently, clang's FileManager uses NULL as an indicator that a particular file did not exist, but would not propagate errors like permission issues. Instead, teach FileManager to use llvm::ErrorOr internally and return rich errors for failures. Reviewers: arphaman, bruno, martong, shafik Subscribers: nemanjai, kbarton, MaskRay, jkorous, dexonsmith, kadircet, jsji, cfe-commits, lldb-commits Tags: #clang, #lldb Differential Revision: https://reviews.llvm.org/D65534 llvm-svn: 367618
* [clang-tools-extra] Adopt FileManager's error-returning APIsHarlan Haskins2019-08-0111-32/+41
| | | | | | | | The FileManager has been updated to return llvm::ErrorOr from getFile and getDirectory, this commit updates all the callers of those APIs from clang. llvm-svn: 367617
* [clang] Adopt new FileManager error-returning APIsHarlan Haskins2019-08-0135-215/+298
| | | | | | | Update the callers of FileManager::getFile and FileManager::getDirectory to handle the new llvm::ErrorOr-returning methods. Signed-off-by: Harlan Haskins <harlan@apple.com> llvm-svn: 367616
* [clang] Adopt llvm::ErrorOr in FileManager methodsHarlan Haskins2019-08-013-103/+144
| | | | | | | Previously, the FileManager would use NULL returns to signify whether a file existed, but that doesn’t cover permissions issues or anything else that might occur while trying to stat or read a file. Instead, convert getFile and getDirectory into returning llvm::ErrorOr Signed-off-by: Harlan Haskins <harlan@apple.com> llvm-svn: 367615
* Move register namespacing definitions from TargetRegisterInfo to RegisterDaniel Sanders2019-08-013-23/+127
| | | | | | | | | | | | | | | | | | | | | | Summary: The namespacing in Register is currently slightly wrong as there is a (rarely used) stack slot namespace too. The namespacing doesn't use anything from the Target so we can move the definition from TargetRegisterInfo to Register to keep it in one place Note: To keep the patch reasonably sized for review I've left stub functions in the original TargetRegisterInfo. We should update all the uses instead Reviewers: arsenm, bogner, aditya_nandakumar, volkan Subscribers: wdng, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65553 llvm-svn: 367614
* [OpenMP] Fix declare target link implementationGheorghe-Teodor Bercea2019-08-014-64/+84
| | | | | | | | | | | | | | | | | | | | | | Summary: This patch fixes the case where variables in different compilation units or the same compilation unit are under the declare target link clause AND have the same name. This also fixes the name clash error that occurs when unified memory is activated. The changes in this patch include: - Pointers to internal variables are given unique names. - Externally visible variables are given the same name as before. - All pointer variables (external or internal) are weakly linked. Reviewers: ABataev, jdoerfert, caomhin Reviewed By: ABataev Subscribers: lebedev.ri, guansong, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64592 llvm-svn: 367613
* [AArch64][x86] adjust tests with shift-add-shift; NFCSanjay Patel2019-08-012-6/+14
| | | | | | Prevent folding away the math completely. llvm-svn: 367612
* [analyzer] StackFrameContext: Add NodeBuilderContext::blockCount() to its ↵Csaba Dabis2019-08-019-51/+95
| | | | | | | | | | | | | | | | | | profile Summary: It allows discriminating between stack frames of the same call that is called multiple times in a loop. Thanks to Artem Dergachev for the great idea! Reviewed By: NoQ Tags: #clang Differential Revision: https://reviews.llvm.org/D65587 llvm-svn: 367608
* [AArch64][x86] add tests for shift-add-shift; NFC (PR42644)Sanjay Patel2019-08-012-0/+230
| | | | llvm-svn: 367607
* Teach malloc_allocator how to count bytesEric Fiselier2019-08-011-3/+9
| | | | llvm-svn: 367606
* Change default bucket count in hash_set/hash_map.Eric Fiselier2019-08-016-42/+113
| | | | | | | | | | | Previously these types rehashed to a table of 193 elements upon construction. But this is non-ideal, first because default constructors should not allocate unless necessary, and second because 193 is big and can waste a bunch of memory. This number had previously been chosen to match GCC's implementation. llvm-svn: 367605
* GlobalISel: Lower scalarizing unmerge of a vector to shiftsMatt Arsenault2019-08-0138-426/+954
| | | | | | | | | | | | | | AMDGPU sometimes has legal s16 and <2 x s16> operations, but all registers are really 32-bit. An unmerge destination really should ben widened to a 32-bit register. If widening a scalarizing vector with a target size that matches the vector size, bitcast to integer and extract the relevant bits with shifts. I'm not sure if this is the right place for this. This could arguably be part of widenScalar for the result. I also have a growing feeling that we're missing a bitcast legalize action. llvm-svn: 367604
* Follow up of rL367592, fix the buildSjoerd Meijer2019-08-011-2/+0
| | | | | | | Some buildbots complained about: error: default label in switch which covers all enumeration values llvm-svn: 367603
* Test linux only for absolute paths in the -fuse-ld optionYuanfang Chen2019-08-011-0/+1
| | | | | | | Some target do not use this option and may emit a error message for using it. llvm-svn: 367602
* [X86] In decomposeMulByConstant, legalize the VT before querying whether the ↵Craig Topper2019-08-015-81/+41
| | | | | | | | | | | | multiply is legal If a type is larger than a legal type and needs to be split, we would previously allow the multiply to be decomposed even if the split multiply is legal. Since the shift + add/sub code would also need to be split, its not any better to decompose it. This patch figures out what type the mul will eventually be legalized to and then uses that type for the query. I tried just returning false illegal types and letting them get handled after type legalization, but then we can't recognize and i64 constant splat on 32-bit targets since will be destroyed by type legalization. We could special case vectors of i64 to avoid that... Differential Revision: https://reviews.llvm.org/D65533 llvm-svn: 367601
* [X86] Add some test cases for 512-bit truncate to 128-bits with ↵Craig Topper2019-08-011-0/+32
| | | | | | | | | | | min-legal-vector-width=0 and prefer-vector-width=256. We currently split the 512 type, truncate each half to 128 bits, concatenate them, and then truncate again. Probably better to truncate each half to 64-bits and then concat the results using vpunpcklqdq. llvm-svn: 367600
* [COFF] Fix wholearchive with thin archivesMartin Storsjo2019-08-012-1/+5
| | | | | | | | | | | | | | | | | | | | | The Archive object created when loading an archive specified with wholearchive got cleaned up immediately, when the owning std::unique_ptr went out of scope, even if persisted StringRefs pointed to memory that belonged to the archive, which no longer was mapped in memory. This hasn't been an issue with regular (as opposed to thin) archives, as references to the member objects has kept the mapping for the whole archive file alive - but with thin archives, all such references point to other files. Add the std::unique_ptr to the arena allocator, to retain it as long as necessary. This fixes (the last issue raised in) PR42388. Differential Revision: https://reviews.llvm.org/D65565 llvm-svn: 367599
* AMDGPU: Remove v0 workaround for DS_GWS_* instructionsMatt Arsenault2019-08-014-55/+25
| | | | | | | Any register should work for the src field since r366067, since the used value is not pulled from the expected encoding field. llvm-svn: 367598
* CodeGen: Allow virtual registers in bundlesMatt Arsenault2019-08-012-11/+14
| | | | | | | | | | | | | | | The note in the documentation suggests this restriction is a compile time optimization for architectures that make heavy use of bundling. Allowing virtual registers in a bundle is useful for some (non-R600) AMDGPU use cases and are infrequent enough to matter. A more common AMDGPU use case has already been using virtual registers in bundles since r333691, although never calling finalizeBundle on them and manually creating the use/def list on the BUNDLE instruction. This is also relatively infrequent, and only happens for consecutive sequences of some load/store types. llvm-svn: 367597
* [SimplifyCFG] Mark missed Changed to true.Alina Sbirlea2019-08-012-0/+91
| | | | | | | | | | | | | | | | Summary: DominatorTree is invalid after SimplifyCFG because of a missed `Changed = true` when simplifying a branch condition and removing an edge. Resolves PR42272. Reviewers: zhizhouy, manojgupta Subscribers: jlebar, sanjoy.google, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65490 llvm-svn: 367596
* Fix `skipIfSanitized` decorator on macOSJonas Devlieghere2019-08-014-20/+17
| | | | | | | | | | | For security reasons, DYLD_INSERT_LIBRARIES is not propagated to a child process. This breaks the skipIfSanitized decorator, which checks for the environment variable being set. Instead, always set the ASAN_OPTIONS and make the decorator check for that. Differential revision: https://reviews.llvm.org/D65594 llvm-svn: 367595
* [MemorySSA] Set LoopSimplify to preserve MemorySSA in the NPM, if analysis ↵Alina Sbirlea2019-08-012-4/+12
| | | | | | | | | | | | | | | | | | exists. Summary: LoopSimplify is preserved in the legacy pass manager, but not in the new pass manager. Update LoopSimplify to preserve MemorySSA conditionally when the analysis is available (same behavior as the legacy pass manager). Reviewers: chandlerc Subscribers: mehdi_amini, jlebar, Prazek, george.burgess.iv, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65418 llvm-svn: 367594
* AMDGPU: Use tablegen pattern for sendmsg intrinsicsMatt Arsenault2019-08-014-19/+27
| | | | | | | Since this now emits a direct copy to m0, SIFixSGPRCopies has to handle a physical register. llvm-svn: 367593
* [LV] Tail-Loop FoldingSjoerd Meijer2019-08-014-55/+183
| | | | | | | | | | | This allows folding of the scalar epilogue loop (the tail) into the main vectorised loop body when the loop is annotated with a "vector predicate" metadata hint. To fold the tail, instructions need to be predicated (masked), enabling/disabling lanes for the remainder iterations. Differential Revision: https://reviews.llvm.org/D65197 llvm-svn: 367592
* GlobalISel: Fix widenScalar for G_MERGE_VALUES to pointerMatt Arsenault2019-08-014-1/+62
| | | | | | | AMDGPU testcase isn't broken now, but will be in a future patch without this. llvm-svn: 367591
* [WebAssembly] Assembler/InstPrinter: support call_indirect type index.Wouter van Oortmerssen2019-08-019-42/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A TYPE_INDEX operand (as used by call_indirect) used to be represented by the InstPrinter as a symbol (e.g. .Ltype_index0@TYPE_INDEX) which was a bit of a mismatch with the WasmObjectWriter which expects an unnamed symbol, to receive the signature from and then turn into a reloc. There was really no good way to round-trip this information. An earlier version of this patch tried to attach the signature information using a .functype, but that ran into trouble when the symbol was re-emitted without a name. Removing the name was a giant hack also. The current version changes the assembly syntax to have an inline signature spec for TYPEINDEX operands that is always unnamed, which is much more elegant both in syntax and in implementation (as now the assembler is able to follow the same path as the regular backend) Reviewers: sbc100, dschuff, aheejin, jgravelle-google, sunfish, tlively Subscribers: arphaman, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64758 llvm-svn: 367590
* Remove a few straggler ".cc"s in compiler-rt/libNico Weber2019-08-0113-13/+13
| | | | llvm-svn: 367589
* [TargetLowering] SimplifyMultipleUseDemandedBits - Add ↵Simon Pilgrim2019-08-013-69/+79
| | | | | | | | ISD::INSERT_VECTOR_ELT handling Allow us to peek through vector insertions to avoid dependencies on entire insertion chains. llvm-svn: 367588
* try to fix bots more after r367562Nico Weber2019-08-011-6/+6
| | | | llvm-svn: 367587
* try to fix bots after r367562Nico Weber2019-08-011-3/+3
| | | | llvm-svn: 367586
* Fix spacing of LLVM_USE_PERF in CMake.rst that caused it to be tabbed in funnyErich Keane2019-08-011-1/+1
| | | | llvm-svn: 367585
* Document LLVM_ENABLE_LIBCXX in CMake.rstErich Keane2019-08-011-0/+5
| | | | llvm-svn: 367584
* Move macho-data-in-code.ll to X86/macho-data-in-code.ll (to only run when ↵Kuba Mracek2019-08-011-0/+0
| | | | | | x86 is a valid target). llvm-svn: 367583
* [X86][SSE] Add PEXTR*(PINSR*(v, s, c), c) -> s combine.Simon Pilgrim2019-08-012-9/+16
| | | | | | We should probably extend this to cover bitcasts as well to help other cases in promote-vec3.ll. llvm-svn: 367582
* [Attributor][FIX] Indicate a missing update changeJohannes Doerfert2019-08-011-3/+7
| | | | | | | | | | User of AAReturnedValues need to know if HasOverdefinedReturnedCalls changed from false to true as it will impact the result of the return value traversal (calls are not ignored anymore). This will be tested with the tests in D59978. llvm-svn: 367581
* [mips] Fix lowering load/store instruction in PIC caseSimon Atanasyan2019-08-013-1/+130
| | | | | | | | | | | | | | | | | | | | | If an operand of the `lw/sw` instructions is a symbol, these instructions incorrectly lowered using not-position-independent chain of commands. For PIC code we should use `lw/addiu` instructions with the `R_MIPS_GOT16` and `R_MIPS_LO16` relocations respectively. Instead of that LLVM generates position dependent code with the `R_MIPS_HI16` and `R_MIPS_LO16` relocations. This patch provides a fix for the bug by handling PIC case separately in the `MipsAsmParser::expandMemInst`. The main idea is to generate a chain of PIC instructions to load a symbol address into a register and then load the address content. The fix is not optimal and does not fix all PIC-related problems. This is a task for subsequent patches. Differential Revision: https://reviews.llvm.org/D65524 llvm-svn: 367580
* [InstCombine] add tests with 'ne' predicates; NFCSanjay Patel2019-08-011-0/+30
| | | | | | More coverage for the proposal in D65576. llvm-svn: 367579
* [llvm-objdump] Fix jumptable detection when disassembling Mach-O binariesKuba Mracek2019-08-012-18/+81
| | | | | | | | | | | - Add LC_SEGMENT_64 handling in getSectionsAndSymbols to be able to find the base segment address from 64-bit Mach-O binaries. - Add "data in code" detection into the !symbolTableWorked case, extract it into a separate function. - Fix uninitialized variable usage on BaseSegmentAddress (initialize to 0). - Add test. Differential Revision: https://reviews.llvm.org/D65491 llvm-svn: 367578
OpenPOWER on IntegriCloud