summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [X86] Mark all byval parameters as aliasedJeremy Morse2018-05-082-6/+6
| | | | | | | | | | | | | | | This is a fix for PR30290: by marking all byval stack slots as being aliased, the instruction scheduler is more conservative about rescheduling memory accesses to such stack slots as an LLVM Value* might alias it. This fixes errors such as in the patched test case, where reads and writes to a data structure are illegally mixed. This could be fixed better in the future with better analysis for the instruction scheduler to know what Values alias what stack slots. Differential Revision: https://reviews.llvm.org/D45022 llvm-svn: 331749
* [X86][CET] Shadow stack fix for setjmp/longjmpAlexander Ivchenko2018-05-083-5/+384
| | | | | | | | | | | | This patch adds a shadow stack fix when compiling setjmp/longjmp with the shadow stack enabled. This allows setjmp/longjmp to work correctly with CET. Patch by mike.dvoretsky Differential Revision: https://reviews.llvm.org/D46181 llvm-svn: 331748
* [llvm-rc] Don't strictly require quotes around external file namesMartin Storsjo2018-05-088-14/+30
| | | | | | | | | | | | Regardless of what docs may say, existing resource files in the wild can use this syntax. Rename a file used in an existing test, to make it usable for unquoted paths. Differential Revision: https://reviews.llvm.org/D46511 llvm-svn: 331747
* Object: Find terminator correctly when reading long filenames in GNU ↵Hans Wennborg2018-05-081-4/+8
| | | | | | | | | | | | archives (PR37244) The code was previously relying on there being a null terminator somewhere in (or after) the string table, something made less likely by r330786. Differential Revision: https://reviews.llvm.org/D46527 llvm-svn: 331746
* [C++2a] Implement operator<=>: Fix another bug in the code gen tests.Eric Fiselier2018-05-081-1/+2
| | | | | | | Sorry for the failures. I'm quite new at writing code gen tests, and I'm not sure the best way to make them portable. llvm-svn: 331745
* [test] Replace undef with true/false to make test case less fragileTobias Grosser2018-05-081-5/+5
| | | | | | | | This test case does not require undef to be present in branch conditions. Replace these undef values with true/false values to clarify the control-flow required to reach the loop under testing. llvm-svn: 331744
* [x86] Introduce the encl[u|s|v] intrinsicsGabor Buella2018-05-085-0/+103
| | | | | | | | | | Reviewers: craig.topper, zvi Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D46435 llvm-svn: 331743
* [x86] Introduce the enclv instructionGabor Buella2018-05-0810-30/+49
| | | | | | | | | | | | | | Summary: and use the -msgx flag as a requirement for the SGX instructions. Reviewers: craig.topper, zvi Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D46436 llvm-svn: 331742
* [LCSSA] Do not remove used PHI nodes in formLCSSAForInstructionsBjorn Pettersson2018-05-082-5/+66
| | | | | | | | | | | | | | | | | | | | | | | Summary: In formLCSSAForInstructions we speculatively add new PHI nodes, that sometimes ends up without having any uses. It has been discovered that sometimes an added PHI node can appear as being unused in one iteration of the Worklist, although it can end up being used by a PHI node added in a later iteration. We now check, a second time, that the PHI node still is unused before we remove it. This avoids an assert about "Trying to remove a phi with uses." for the added test case. Reviewers: davide, mzolotukhin, mattd, dberlin Reviewed By: mzolotukhin, dberlin Subscribers: dberlin, mzolotukhin, davide, bjope, uabelho, llvm-commits Differential Revision: https://reviews.llvm.org/D46422 llvm-svn: 331741
* [x86] Introduce the pconfig intrinsicGabor Buella2018-05-0811-0/+86
| | | | | | | | | | Reviewers: craig.topper, zvi Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D46431 llvm-svn: 331740
* [x86] Introduce the pconfig instructionGabor Buella2018-05-0810-0/+52
| | | | | | | | | | Reviewers: craig.topper, zvi Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D46430 llvm-svn: 331739
* [DebugInfo] Accept `S` in augmentation strings in CIE.Fangrui Song2018-05-082-1/+4
| | | | | | glibc libc.a(sigaction.o) compiled from sysdeps/unix/sysv/linux/x86_64/sigaction.c uses "zRS". llvm-svn: 331738
* [asan] Fix bug introduced by r331647Walter Lee2018-05-081-1/+1
| | | | | | unmap_shadow_on_exit was inadvertently flipped for non-RTEMS. llvm-svn: 331737
* [sanitizer] Add InternalMmapVector::swapVitaly Buka2018-05-082-0/+24
| | | | llvm-svn: 331736
* [sanitizer] Fix error checking in ThreadListerVitaly Buka2018-05-081-2/+3
| | | | llvm-svn: 331735
* Revert "[sanitizer] Be more accurate when calculating the previous ↵Igor Kudrin2018-05-081-5/+4
| | | | | | | | | | | instruction address on ARM." This reverts commit r331626 because it causes build bot failures: http://lab.llvm.org:8011/builders/clang-cmake-aarch64-full/builds/5069 Differential Revision: https://reviews.llvm.org/D46004 llvm-svn: 331734
* Really test type lookup in TestCppTypeLookup.pyFrederic Riss2018-05-082-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: ... and fix one bug found this way. Currently, the test works not because types are looked up correctly, but because by injecting local variables we also materialize the types for Clang. If we disable the local variable injection, then one check fails. The reason of the failure is that FindTypes is run with max_matches==1 and this value is passed down to the symbol lookup functions. When the search is performed only on the basename (like it's the case for an entity defined in the root namespace), then the search will stop after having found one match on the basename. But that match might be in a namespace, we were really just looking up the basename in the accelerator tables. The solution is to not pass max_matches down, but to search without a limit and let RemoveMismatchedTypes do its job afterwards. Note the patch includes 2 hunks with the same change, but only the latter is tested. I couldn't find a way to create a testcase for the other branch of the if ('image lookup -t' allows me to get there, but it only ever returns one type anyway). Reviewers: clayborg, jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D46548 llvm-svn: 331719
* [MachineVerifier][GlobalISel] Verifying generic extends and truncatesRoman Tereshin2018-05-083-6/+145
| | | | | | | | | | | | | | | | | Making sure we don't truncate / extend pointers, don't try to change vector topology or bitcast vectors to scalars or back, and most importantly, don't extend to a smaller type or truncate to a large one. Reviewers: qcolombet t.p.northover aditya_nandakumar Reviewed By: qcolombet Subscribers: rovka, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D46490 llvm-svn: 331718
* [CMake] Pass additional CMake flags in Fuchsia cache filesPetr Hosek2018-05-082-6/+26
| | | | | | | | | This allows passing additional CMake flags to builtins and runtimes build through Fuchsia cache files. Differential Revision: https://reviews.llvm.org/D45997 llvm-svn: 331717
* [C++2a] operator<=>: Fix incorrect use of Twine.Eric Fiselier2018-05-081-3/+3
| | | | llvm-svn: 331713
* [MIRParser][GlobalISel] Parsing vector pointer types (<M x pA>)Roman Tereshin2018-05-088-15/+73
| | | | | | | | | | | | | | MIParser wasn't able to parse LLTs like `<4 x p0>`, fixing that. Reviewers: qcolombet t.p.northover aditya_nandakumar Reviewed By: qcolombet Subscribers: rovka, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D46490 llvm-svn: 331712
* [XRay][compiler-rt] Add llvm-mca assembler annotations for XRay (NFC)Dean Michael Berris2018-05-082-0/+14
| | | | | | | | | | This change adds some assembler comments to facilitate analysis with llvm-mca. In particular, we're interested in identifying and later optimising (reducing) the cost of the key functions in the XRay implementation using both static analysis (with llvm-mca, etc.) and dynamic analysis (perf profiling, etc.) of microbenchmarks. llvm-svn: 331711
* [dfsan] update the abilist for the sanitizer coverage; also remove the fuzz ↵Kostya Serebryany2018-05-081-5/+10
| | | | | | target from this list llvm-svn: 331710
* [NewPM] Emit inliner NoDefinition missed optimization remarkTeresa Johnson2018-05-085-12/+24
| | | | | | | | | | | | Summary: Makes this consistent with the old PM. Reviewers: eraman Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D46526 llvm-svn: 331709
* Add a CIE with length 0 unconditionally.Fangrui Song2018-05-0811-15/+17
| | | | | | | | | | | | Summary: This is not technically required, but glibc unwind-dw2-fde.c classify_object_over_fdes expects there is a CIE record length 0 as a terminator. Reviewers: ruiu, espindola Subscribers: emaste, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D46566 llvm-svn: 331708
* [C++2a] Implement operator<=>: Address bugs and post-commit review comments ↵Eric Fiselier2018-05-089-92/+72
| | | | | | | | | | | | after r331677. This patch addresses some mostly trivial post-commit review comments received on r331677. Additionally, this patch fixes an assertion in `getNarrowingKind` caused by the use of an uninitialized value from `checkThreeWayNarrowingConversion`. llvm-svn: 331707
* Move test input file into same directory as test. NFCRichard Trieu2018-05-082-1/+1
| | | | llvm-svn: 331706
* [WebAssembly] MC: Use existing MCSymbol.Index field rather than inventing ↵Sam Clegg2018-05-081-15/+11
| | | | | | | | | | | | | extra mapping MCSymbol has getIndex/setIndex which are implementation defined and on other platforms are used to store the symbol table index. It makes sense to use this rather than invent a new mapping. Differential Revision: https://reviews.llvm.org/D46555 llvm-svn: 331705
* [MC] ELFObjectWriter: Removing unneeded variable and castSam Clegg2018-05-071-5/+4
| | | | | | Differential Revision: https://reviews.llvm.org/D46289 llvm-svn: 331704
* Rename a local variable whose scope is very narrow. NFC.Rui Ueyama2018-05-071-3/+3
| | | | llvm-svn: 331703
* Revert r330742: Let TableGen write output only if it changed, instead of ↵Chandler Carruth2018-05-072-20/+21
| | | | | | | | | | | | | | | | | | | | doing so in cmake. This change causes us to re-run tablegen for every single target on every single build. This is much, much worse than the problem being fixed AFAICT. On my system, it makes a clean rebuild of `llc` with nothing changed go from .5s to over 8s. On systems with less parallelism, slower file systems, or high process startup overhead this will be even more extreme. The only way I see this could be a win is in clean builds where we churn the filesystem. But I think incremental rebuild is more important, and so if we want to re-instate this, it needs to be done in a way that doesn't trigger constant re-runs of tablegen. llvm-svn: 331702
* [sanitizer] Simplify ThreadLister interfaceVitaly Buka2018-05-074-82/+43
| | | | | | | | | | Reviewers: eugenis Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D46516 llvm-svn: 331701
* Improve error message for --plugin-opt=thinlto-prefix-replace.Rui Ueyama2018-05-072-3/+4
| | | | llvm-svn: 331700
* Rename Config::ThinLTOIndexOnlyObjectFiles -> Config::ThinLTOIndexOnlyArg.Rui Ueyama2018-05-073-6/+6
| | | | llvm-svn: 331699
* Split BitcodeCompiler::init() into two functions. NFC.Rui Ueyama2018-05-072-34/+33
| | | | | | | | | Previously, code to initialize Backend and code to initialize Conf are intermingled in init(), though they don't depend on each other. Differential Revision: https://reviews.llvm.org/D46554 llvm-svn: 331698
* Fix failing codegen test on non-x86_64 platformsEric Fiselier2018-05-071-38/+39
| | | | llvm-svn: 331697
* Add support for thinlto option ( thinlto-emit-imports-files) to emit import ↵Rumeet Dhindsa2018-05-074-7/+72
| | | | | | | | files for thinlink. Differential Revision: https://reviews.llvm.org/D46400 llvm-svn: 331696
* Follow Up on [MachineVerifier][GlobalISel] NFC, Improving MO printing and ↵Roman Tereshin2018-05-071-10/+2
| | | | | | | | refactoring visitMachineInstrBefore Fixing accidentally broken CodeGen/X86/verifier-generic-types-1.mir test llvm-svn: 331695
* [MachineVerifier][GlobalISel] Checking that generic instrs have LLTs on all ↵Roman Tereshin2018-05-074-10/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | vregs Every generic machine instruction must have generic virtual registers only, that is, have a low-level type attached to each operand. Previously MachineVerifier would catch a type missing on an operand only if the previous operand for the the same type index exists and have a type attached to it and it will report it as a type mismatch. This is incosistent behaviour and a misleading error message. This commit makes sure MachineVerifier explicitly checks that the types are there for every operand and if not provides a straightforward error message. Reviewers: qcolombet t.p.northover bogner ab Reviewed By: qcolombet Subscribers: rovka, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D46455 llvm-svn: 331694
* [MachineVerifier][GlobalISel] NFC, Improving MO printing and refactoring ↵Roman Tereshin2018-05-075-21/+68
| | | | | | | | | | | | | | | | | | | | visitMachineInstrBefore This is an NFC pre-commit for the following "Checking that generic instrs have LLTs on all vregs" commit. This overloads MachineOperand::print to make it possible to print LLTs with standalone machine operands. This also overloads MachineVerifier::print(...MachineOperand...) with an optional LLT using the newly introduced MachineOperand::print variant; no actual calls added. This also refactors MachineVerifier::visitMachineInstrBefore in the parts dealing with all generic instructions (checking Selected property, LLTs, and phys regs). llvm-svn: 331693
* PR37352: mangle numbering for decomposition declarations.Richard Smith2018-05-072-1/+64
| | | | | | | | | | In order to match our mangling scheme, use a different set of numbers for decomposition declarations, and consider all binding names when forming the numbering. This does not yet affect any mangled names we produce, because local decomposition declarations can't yet have linkage, but a C++ standard proposal to change that is currently being processed. llvm-svn: 331692
* AMDGPU/GlobalISel: Don't try to lower hull shadersTom Stellard2018-05-071-2/+3
| | | | | | | | | | | | Summary: The AMDGPU_HS calling convention is not supported yet. Reviewers: arsenm, nhaehnle Subscribers: kzhuravl, wdng, yaxunl, rovka, kristof.beyls, dstuttard, tpr, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D46149 llvm-svn: 331691
* Do not call exit() directly from lld.Rui Ueyama2018-05-073-2/+12
| | | | | | | | | | Our promise is that as long as there's no fatal error (i.e. broken file is given to the linker), our main function returns to the caller. So we can't use exit() in the regular code path. Differential Revision: https://reviews.llvm.org/D46442 llvm-svn: 331690
* Refactor ThinLTO-related code in BitcodeCompiler.cpp. NFC.Rui Ueyama2018-05-073-54/+35
| | | | | | | | | | | | Summary: Refactor ThinLTO-related code in BitcodeCompiler.cpp. NFC. Reviewers: rdhindsa, espindola Subscribers: emaste, inglorion, arichardson, llvm-commits, eraman Differential Revision: https://reviews.llvm.org/D46549 llvm-svn: 331689
* [NFC] Move 2 variable initialization from Ctor to member initializers.Erich Keane2018-05-071-5/+3
| | | | | | | In response to dblaikie's suggestion on r331536, replace the two enum typed variable initializers in the constructor with member initializers. llvm-svn: 331688
* [tools] Add missing test dependencyAlexander Shaposhnikov2018-05-071-0/+1
| | | | | | Caught by the build bots. llvm-svn: 331687
* [lit, lldbsuite] Fixes for several tests LLDB tests for Python 3 or WindowsStella Stamenova2018-05-073-2/+11
| | | | | | | | | | | | | | | | | Summary: In decorators.py, when opening streams, open them in text mode. In Py3, if they are not opened in text mode, the data is also expected to be binary, but we always use text data. In TestLinuxCore, skip the tests that are not applicable on Windows In the python api main.c, update the code to be compilable on Windows Reviewers: asmith, zturner Reviewed By: zturner Subscribers: zturner Differential Revision: https://reviews.llvm.org/D46440 llvm-svn: 331686
* [DAGCombiner] Masked merge: enhance handling of 'andn' with immediatesRoman Lebedev2018-05-072-11/+21
| | | | | | | | | | | | | | | | | | | | | Summary: Split off from D46031. The previous patch, D46493, completely disabled unfolding in case of immediates. But we can do better: {F6120274} {F6120277} https://rise4fun.com/Alive/xJS Reviewers: spatel, craig.topper Reviewed By: spatel Subscribers: andreadb, llvm-commits Differential Revision: https://reviews.llvm.org/D46494 llvm-svn: 331685
* [DagCombiner] Not all 'andn''s work with immediates.Roman Lebedev2018-05-076-17/+33
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Split off from D46031. In masked merge case, this degrades IPC by decreasing instruction count. {F6108777} The next patch should be able to recover and improve this. This also affects the transform @spatel have added in D27489 / rL289738, and the test coverage for X86 was missing. But after i have added it, and looked at the changes in MCA, i'm somewhat confused. {F6093591} {F6093592} {F6093593} I'd say this regression is an improvement, since `IPC` increased in that case? Reviewers: spatel, craig.topper Reviewed By: spatel Subscribers: andreadb, llvm-commits, spatel Differential Revision: https://reviews.llvm.org/D46493 llvm-svn: 331684
* [X86] Use target feature defines in tests instead of defining our own flag ↵Craig Topper2018-05-073-10/+10
| | | | | | on the command line. NFCI llvm-svn: 331683
OpenPOWER on IntegriCloud