summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [ThinLTO] Ensure sanitizer passes are runTeresa Johnson2017-11-081-0/+3
| | | | | | | | | | | | | | | | | | Summary: In ThinLTO compilation, we exit populateModulePassManager early and were not adding PM extension passes meant to run at the end of the pipeline. This includes sanitizer passes. Add these passes before the early exit. A test will be added to projects/compiler-rt. Reviewers: pcc Subscribers: mehdi_amini, inglorion, llvm-commits Differential Revision: https://reviews.llvm.org/D39565 llvm-svn: 317714
* [X86] Don't call validateInstruction from MatchAndEmitInstruction when ↵Craig Topper2017-11-081-2/+2
| | | | | | | | MatchingInlineAsm is set. The MCInst won't be populated. Without this we can't parse gather instructions in ms inline asm blocks. The validateInstruction function was introduced in r316700 to check gather constraints. llvm-svn: 317713
* [ValueTracking] Use APInt::isNullValue/isOneValue which are more efficient ↵Craig Topper2017-11-081-3/+6
| | | | | | for large APInts. llvm-svn: 317712
* [WebAssembly] Add a test for inline-asm "m" constraints.Dan Gohman2017-11-081-0/+13
| | | | llvm-svn: 317711
* [WebAssembly] Call signExtend to get sign extended registerDan Gohman2017-11-082-1/+23
| | | | | | | | Patch by Jatin Bhateja! Differential Revision: https://reviews.llvm.org/D39529 llvm-svn: 317710
* Add CoreOption flag to "-coverage" option to make it available for clang-clMarco Castelluccio2017-11-082-1/+8
| | | | | | | | | | | | | | | | Summary: The -coverage option is not a CoreOption, so it is not available to clang-cl. This patch adds the CoreOption flag to "-coverage" to allow it to be used with clang-cl. Reviewers: rnk Reviewed By: rnk Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D38221 llvm-svn: 317709
* Un-XFAIL a test after the bugfix in r317702.Adrian Prantl2017-11-081-5/+0
| | | | llvm-svn: 317708
* [WebAssembly] Revise the strategy for inline asm.Dan Gohman2017-11-083-29/+58
| | | | | | | | | | | | | | | | | | | | | | Previously, an "r" constraint would mean the compiler provides a value on WebAssembly's operand stack. This was tricky to use properly, particularly since it isn't possible to declare a new local from within an inline asm string. With this patch, "r" provides the value in a WebAssembly local, and the local index is provided to the inline asm string. This requires inline asm to use get_local and set_local to read the register. This does potentially result in larger code size, however inline asm should hopefully be quite rare in WebAssembly. This also means that the "m" constraint can no longer be supported, as WebAssembly has nothing like a "memory operand" that includes an implicit get_local. This fixes PR34599 for the wasm32-unknown-unknown-wasm target (though not for the ELF target). llvm-svn: 317707
* [bindings] fix TLS test failureMasud Rahman2017-11-081-4/+14
| | | | | | | | | | | | | | | Since cfe commit r237337, '__declspec(thread)' and 'thread_local' have been the same since MSVC 2015. i.e. they are both considered to supply a dynamic TLS kind, not a static TLS kind. This test originally did not specify which version of MS compatibility to assume. As a result, the test was brittle, since changing the default compatibility version could break the test. This commit adds a specific version when building up the flags used to parse the translation unit, and tests both versions. llvm-svn: 317706
* Implement flock for Windows in compiler-rtMarco Castelluccio2017-11-081-3/+55
| | | | | | | | | | | | | | | | | Summary: This patch implements flock for Windows, needed to make gcda writing work in a multiprocessing scenario. Fixes https://bugs.llvm.org/show_bug.cgi?id=34923. Reviewers: zturner Reviewed By: zturner Subscribers: rnk, zturner, llvm-commits Differential Revision: https://reviews.llvm.org/D38891 llvm-svn: 317705
* NFC: Rename MCSafeSEHFragment to MCSymbolIdFragmentAdrian McCarthy2017-11-084-14/+15
| | | | | | | | | | | | | | | Summary: This fragment emits a symbol ID and will be useful for more than just Safe SEH tables (e.g., I plan to re-use it for Control Flow Guard tables). This is simply a rename refactor. Reviewers: rnk Subscribers: llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D39770 llvm-svn: 317703
* Handle inlined variables in SelectionDAGBuilder::EmitFuncArgumentDbgValue().Adrian Prantl2017-11-083-8/+143
| | | | | | | | | | | | | | | | | In 2010 a commit with no testcase and no further explanation explicitly disabled the handling of inlined variables in EmitFuncArgumentDbgValue(). I don't think there is a good reason for this any more and re-enabling this adds debug locations for variables associated with an LLVM function argument in functions that are inlined into the first basic block. The only downside of doing this is that we may insert a DBG_VALUE before the inlined scope, but (1) this could be filtered out later, and (2) LiveDebugValues will not propagate it into subsequent basic blocks if they don't dominate the variable's lexical scope, so this seems like a small price to pay. rdar://problem/26228128 llvm-svn: 317702
* [analyzer] Fix a crash on logical operators with vectors.Artem Dergachev2017-11-082-0/+38
| | | | | | | | | | | | | | | | | Do not crash when trying to compute x && y or x || y where x and y are of a vector type. For now we do not seem to properly model operations with vectors. In particular, operations && and || on a pair of vectors are not short-circuit, unlike regular logical operators, so even our CFG is incorrect. Avoid the crash, add respective FIXME tests for later. Differential Revision: https://reviews.llvm.org/D39682 rdar://problem/34317663 llvm-svn: 317700
* [sanitizer] Add Scudo to the sanitizer lint checks.Kostya Kortchinsky2017-11-084-6/+9
| | | | | | | | | | | | | | | | | | | | Summary: Scudo abides by the coding style enforced by the sanitizer_common linter, but as of right now, it's not linter-enforced. Add Scudo to the list of directories checked by check_lint.sh. Also: fixes some linter errors found after getting this running. Reviewers: cryptoad Reviewed By: cryptoad Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D39757 llvm-svn: 317699
* [X86] Add some initial scheduling tests for generic x86 instructionsSimon Pilgrim2017-11-082-0/+1085
| | | | | | | | These will be using inline asm to ensure we have coverage that we're unlikely to get from lowering of basic ir. Currently waiting for D39728 to land to add support for scheduler comments for inline asm. llvm-svn: 317698
* [clang-refactor] Get rid of OccurrencesFinder in RenamingAction, NFCHaojian Wu2017-11-081-18/+9
| | | | | | | | | | | | | | | | | | Summary: The OccurrencesFinder is only used in RenameOccurrences to find symbol occurrences, there is no need to inherit RefactoringRule. Replace it with a single utility function to avoid code misleading. Reviewers: sammccall Reviewed By: sammccall Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D39796 llvm-svn: 317696
* [CMake] Remove target to build native tablegenJonas Hahnfeld2017-11-081-14/+1
| | | | | | | | | | | | | This was once needed so that multiple tablegen binaries don't compile the library concurrently. However, this isn't needed anymore since adding USES_TERMINAL to the custom_command. This is supported by the fact that the target was only building LLVMSupport since some cleanups a year ago. If this dependency had really been needed, we would have seen complaints. Differential Revision: https://reviews.llvm.org/D39299 llvm-svn: 317695
* [CMake] Add custom target to create build directoryJonas Hahnfeld2017-11-081-1/+4
| | | | | | | | | | CMake does a poor job in tracking dependencies on files and directories directly. Create custom target similar to the configuration step. On my system, this avoids the reconfiguration on each build. Differential Revision: https://reviews.llvm.org/D39298 llvm-svn: 317694
* [utils] Add RISC-V support to update_llc_test_checks.pyAlex Bradbury2017-11-081-0/+18
| | | | | | | | | | | | This should be a trivial change, and I've started using it for generating all tests at https://github.com/lowrisc/riscv-llvm (i.e. it's been tested in action quite a lot). Note that the regex does not attempt to match .cfi_startproc, as I want to ensure compatibility with functions that have the nounwind attribute. Differential Revision: https://reviews.llvm.org/D39789 llvm-svn: 317693
* Relax definitions.test to accept windows file paths.Sam McCall2017-11-081-16/+16
| | | | | | | | | | Reviewers: ilya-biryukov Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D39797 llvm-svn: 317692
* [RISCV] Initial support for function callsAlex Bradbury2017-11-089-4/+269
| | | | | | | | | Note that this is just enough for simple function call examples to generate working code. Support for varargs etc follows in future patches. Differential Revision: https://reviews.llvm.org/D29936 llvm-svn: 317691
* [RISCV] Codegen for conditional branchesAlex Bradbury2017-11-089-4/+239
| | | | | | | | | | | | | | | | | | | | A good portion of this patch is the extra functions that needed to be implemented to support the test case. e.g. storeRegToStackSlot, loadRegFromStackSlot, eliminateFrameIndex. Setting ISD::BR_CC to Expand may appear non-obvious on an architecture with branch+cmp instructions. However, I found it much easier to deal with matching the expanded form. I had to change simm13_lsb0 and simm21_lsb0 to inherit from the Operand<OtherVT> class rather than Operand<i32> in order to keep tablegen happy. This isn't a big deal, but it does seem a shame to lose the uniformity across immediate types when there's not an obvious benefit (I'm hoping a tablegen expert will educate me on what I'm missing here!). Differential Revision: https://reviews.llvm.org/D29935 llvm-svn: 317690
* [clang-tidy] Add a note about modernize-replace-random-shuffleKrasimir Georgiev2017-11-081-0/+13
| | | | | | | | | | | | | | | | Summary: This adds a note warning the users that the way the suggested fix seeds the random number generator is poor. Reviewers: hokein Reviewed By: hokein Subscribers: cfe-commits, xazax.hun Differential Revision: https://reviews.llvm.org/D39787 llvm-svn: 317689
* [RISCV] Codegen support for memory operations on global addressesAlex Bradbury2017-11-087-22/+142
| | | | | | Differential Revision: https://reviews.llvm.org/D39103 llvm-svn: 317688
* Workaround reverse-iteration buildbot breakages. Filed PR35244.Ilya Biryukov2017-11-081-2/+3
| | | | | | | | | Clang's completion output is non-deterministic, causing test failures with turned on LLVM_REVERSE_ITERATION. The workaround is to use CHECK-DAGs for now, will remove them when PR35244 gets fixed. llvm-svn: 317687
* [clangd] tolerate windows filepaths in testsSam McCall2017-11-081-1/+1
| | | | llvm-svn: 317686
* [RISCV] Codegen support for memory operationsAlex Bradbury2017-11-086-0/+240
| | | | | | | | | This required the implementation of RISCVTargetInstrInfo::copyPhysReg. Support for lowering global addresses follow in the next patch. Differential Revision: https://reviews.llvm.org/D29934 llvm-svn: 317685
* [RISCV] Codegen support for materializing constantsAlex Bradbury2017-11-083-1/+71
| | | | | | Differential Revision: https://reviews.llvm.org/D39101 llvm-svn: 317684
* Xfail TestConcurrentTwoWatchpointsOneSignal on armPavel Labath2017-11-081-0/+1
| | | | | | | r317561 exposed an interesting bug (pr35228) in handling of simultaneous watchpoint hits. Disabling the test until we can get that fixed. llvm-svn: 317683
* [Analysis] Fix merging TBAA tags with different final access typesIvan A. Kosarev2017-11-082-24/+59
| | | | | | | | | | | | | | | | | | | | | There are cases when we have to merge TBAA access tags with the same base access type, but different final access types. For example, accesses to different members of the same structure may be vectorized into a single load or store instruction. Since we currently assume that the tags to merge always share the same final access type, we incorrectly return a tag that describes an access to one of the original final access types as the generic tag. This patch fixes that by producing generic tags for the common type and not the final access types of the original tags. Resolves: PR35225: Wrong tbaa metadata after load store vectorizer due to recent change https://bugs.llvm.org/show_bug.cgi?id=35225 Differential Revision: https://reviews.llvm.org/D39732 llvm-svn: 317682
* [mips] Guard indirect and tailcall pseudo instructions correctly.Simon Dardis2017-11-085-12/+97
| | | | | | | | | | | Previously these pseudo instructions were not guarded by ISA, so their select was dependant on the ordering of the entries in the DAG matcher. Reviewers: atanasyan Differential Revision: https://reviews.llvm.org/D39723 llvm-svn: 317681
* BasicAA: fix bug where we would return partialalias instead of noaliasNuno Lopes2017-11-081-3/+3
| | | | | | | | | | | | | | | My fix is conservative and will make us return may-alias instead. The test case is: check(gep(x, 0), n, gep(x, n), -1) with n == sizeof(x) Here, the first value accesses the whole object, but the second access doesn't access anything. The semantics of -1 is read until the end of the object, which in this case means read nothing. No test case, since isn't trivial to exploit this one, but I've proved it correct. llvm-svn: 317680
* Log: delimit thread name in log messagePavel Labath2017-11-081-2/+1
| | | | | | | | | | The thread name was not followed by a space, which meant it was glued to the log message. I also align the name as we do that with other log fields. I align it to 16 chars instead of llvm::max_thread_name(), as that can be 64 on darwin, which is rather long. If anybody feels differently about that, we can change it. llvm-svn: 317679
* Make TestTopLevelExprs more robust in face of linker GCPavel Labath2017-11-082-21/+12
| | | | | | | | | | | | | | | | | | Summary: This test was failing in various configurations on linux in a fairly unpredictible way. The success depended on whether the c++ abi library was linked in statically or not and how well was the linker able to strip parts of it. This introduces additional code to the "dummmy" test executable, which ensures that all parts of the library needed to evaluate the expressions are always present. Reviewers: clayborg Subscribers: srhines, tatyana-krasnukha, davide, lldb-commits Differential Revision: https://reviews.llvm.org/D39727 llvm-svn: 317678
* Avoid printing some redundant name qualifiers in completionIlya Biryukov2017-11-085-6/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Adjusted PrintingPolicy inside code completion to avoid printing some redundant name qualifiers. Before this change, typedefs that were written unqualified in source code were printed with qualifiers in completion. For example, in the following code struct foo { typedef int type; type method(); }; completion item for `method` had return type of `foo::type`, even though the original code used `type` without qualifiers. After this change, the completion item has return type `type`, as originally written in the source code. Note that this change does not suppress qualifiers written by the user. For example, in the following code typedef int type; struct foo { typedef int type; ::type method(foo::type); }; completion item for `method` has return type of `::type` and parameter type of `foo::type`, as originally written in the source code. Reviewers: arphaman, bkramer, klimek Reviewed By: arphaman Subscribers: mgorny, eraman, cfe-commits Differential Revision: https://reviews.llvm.org/D38538 llvm-svn: 317677
* Moved QualTypeNames.h from Tooling to AST.Ilya Biryukov2017-11-085-21/+21
| | | | | | | | | | | | | | | | | Summary: For code reuse in SemaCodeComplete. Note that the tests for QualTypeNames are still in Tooling as they use Tooling's common testing code. Reviewers: rsmith, saugustine, rnk, klimek, bkramer Reviewed By: rnk Subscribers: cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D39224 llvm-svn: 317676
* Fixed link to bugzilla in the sidebarRaphael Isemann2017-11-081-1/+1
| | | | llvm-svn: 317675
* [NFCI] Ensure TargetOpcode::* are compatible with guessInstructionProperties=0Alex Bradbury2017-11-082-5/+15
| | | | | | | | | | | | | | | | | | | rL162640 introduced CodeGenTarget::guessInstructionProperties. If a target sets guessInstructionProperties=0 in its FooInstrInfo, tablegen will error if it has to guess properties from patterns. Unfortunately, guessInstructionProperties=0 can't be used with current upstream LLVM as instructions in the TargetOpcode namespace are always included and sometimes have inferred properties for mayLoad, mayStore, and hasSideEffects. This patch provides the simplest possible fix to this problem, setting default values for these fields in the TargetOpcode scope. There is no intended functional change, as the explicitly set properties should match what was previously inferred. A number of the instructions had hasSideEffects=1 inferred unintentionally. This patch makes it explicit, while future patches (such as D37097) correct the property. Differential Revision: https://reviews.llvm.org/D37065 llvm-svn: 317674
* [clangd] loosen tests for flag-dependence revealed by r317670Sam McCall2017-11-082-8/+10
| | | | llvm-svn: 317673
* [clang-refactor] Introduce a new rename rule for qualified symbolsHaojian Wu2017-11-085-40/+157
| | | | | | | | | | | | | | Summary: Prototype of a new rename rule for renaming qualified symbol. Reviewers: arphaman, ioeric, sammccall Reviewed By: arphaman, sammccall Subscribers: jklaehn, cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D39332 llvm-svn: 317672
* DAG: Add computeKnownBitsForFrameIndexMatt Arsenault2017-11-083-5/+23
| | | | | | | | | | | | | Some of the AMDGPU stack addressing modes require knowing the sign bit is zero. We used to accomplish this by custom lowering frame indexes, and then putting an AssertZext around a TargetFrameIndex. This required specifically looking for the AssextZext + frame index pattern which was moderately disgusting. The same could probably be accomplished with a target specific node, but would still require special handling of frame indexes. llvm-svn: 317671
* [clangd] Sort completion results.Sam McCall2017-11-087-77/+356
| | | | | | | | | | | | | | Summary: This is (probably) not required by LSP, but at least one buggy client wants it. It also simplifies some tests - changed a few completion tests to use -pretty. Reviewers: hokein, malaperle Subscribers: ilya-biryukov, cfe-commits Differential Revision: https://reviews.llvm.org/D39738 llvm-svn: 317670
* [COFF] Add support for IMAGE_REL_ARM64_SECRELMartin Storsjo2017-11-082-5/+11
| | | | | | | | | | | I never ran into this until lld-link started enabling debug output by default for the mingw mode. I haven't been able to verify that this actually behaves correctly, but this relocation is handled identically on all other architectures so far. Differential Revision: https://reviews.llvm.org/D39754 llvm-svn: 317669
* Always use prctl(PR_SET_PTRACER)Sylvestre Ledru2017-11-081-2/+8
| | | | | | | | | | | | | | | | | Summary: Sufficiently old Linux kernel headers don't provide the PR_SET_PTRACER, but we can still call prctl with it if the runtime kernel is newer. Even if it's not, prctl will only return EINVAL. Patch by Mike Hommey <mh-llvm@glandium.org> Reviewers: eugenis Reviewed By: eugenis Subscribers: sylvestre.ledru, cfe-commits, kubamracek Differential Revision: https://reviews.llvm.org/D39717 llvm-svn: 317668
* Revert "[CGP] Enable extending scope of optimizeMemoryInst"Serguei Katkov2017-11-081-1/+1
| | | | | | Revert the patch r317665 causing buildbot failures. llvm-svn: 317667
* [CGP] Enable extending scope of optimizeMemoryInstSerguei Katkov2017-11-081-1/+1
| | | | | | | | | | | This patch enables the folding of address computation in memory instruction in case adress is represented by Phi node. The inputs of Phi node might be different in base register. Differential Revision: https://reviews.llvm.org/D36073 llvm-svn: 317665
* [X86] Add masked vcvtps2ph builtins to CheckX86BuiltinFunctionCall.Craig Topper2017-11-081-0/+3
| | | | | | This ensures that only immediates that fit in 8-bits are used. This matches what we do for the unmasked versions. llvm-svn: 317664
* Remove a given file even if openFileForRead fails.Rui Ueyama2017-11-081-4/+3
| | | | | | | | | | I think the constract of this function is to remove a file in some way, whether in background or in foreground. This patch makes sure that it removes a given file. Differential Revision: https://reviews.llvm.org/D39778 llvm-svn: 317663
* [X86] Add patterns to fold EVEX store with EVEX encoded vcvtps2ph ↵Craig Topper2017-11-082-19/+27
| | | | | | instructions. Remove bad pattern that had vf432 vcvtps2ph storing 128-bits. llvm-svn: 317662
* [X86] Allow legacy vcvtps2ph intrinsics to select EVEX encoded instructions. ↵Craig Topper2017-11-083-30/+32
| | | | | | | | Rely on EVEX->VEX to convert back. Missed store folding opportunities will be fixed in a subsequent commit. llvm-svn: 317661
OpenPOWER on IntegriCloud