summaryrefslogtreecommitdiffstats
path: root/llvm/include
Commit message (Collapse)AuthorAgeFilesLines
...
* Add a file open flag that disables O_CLOEXEC.Zachary Turner2018-06-081-1/+5
| | | | | | | | | | | O_CLOEXEC is the right default, but occasionally you don't want this. This is especially true for tools like debuggers where you might need to spawn the child process with specific files already open, but it's occasionally useful in other scenarios as well, like when you want to do some IPC between parent and child. llvm-svn: 334293
* Fix Wdocumentation warning for unknown param. NFCI.Simon Pilgrim2018-06-081-2/+0
| | | | llvm-svn: 334291
* [ADT] Add `StringRef::rsplit(StringRef Separator)`.Henry Wong2018-06-081-8/+20
| | | | | | | | | | | | | | Summary: Add `StringRef::rsplit(StringRef Separator)` to achieve the function of getting the tail substring according to the separator. A typical usage is to get `data` in `std::basic_string::data`. Reviewers: mehdi_amini, zturner, beanz, xbolva00, vsk Reviewed By: zturner, xbolva00, vsk Subscribers: vsk, xbolva00, llvm-commits, MTC Differential Revision: https://reviews.llvm.org/D47406 llvm-svn: 334283
* NFC Fix a comment in ValueTypes.tdGabor Buella2018-06-071-2/+2
| | | | llvm-svn: 334247
* Expose a single global file open function.Zachary Turner2018-06-071-14/+64
| | | | | | | | | This one allows much more flexibility than the standard openFileForRead / openFileForWrite functions. Since there is now just one "real" function that does the work, all other implementations simply delegate to this one. llvm-svn: 334246
* propagate fast math flags via IR on fma and sub expressionsMichael Berg2018-06-071-1/+2
| | | | | | | | | | | | | | Summary: This change uses fmf subflags to guard fma optimizations as well as unsafe. These changes originated from D46483 and have been simplified via getNode. Reviewers: spatel, arsenm, hfinkel, javed.absar Reviewed By: spatel Subscribers: nemanjai, wdng Differential Revision: https://reviews.llvm.org/D47388 llvm-svn: 334242
* [FileSystem] Split up the OpenFlags enumeration.Zachary Turner2018-06-072-22/+98
| | | | | | | | | | | | | | | | | This breaks the OpenFlags enumeration into two separate enumerations: OpenFlags and CreationDisposition. The first controls the behavior of the API depending on whether or not the target file already exists, and is not a flags-based enum. The second controls more flags-like values. This yields a more easy to understand API, while also allowing flags to be passed to the openForRead api, where most of the values didn't make sense before. This also makes the apis more testable as it becomes easy to enumerate all the configurations which make sense, so I've added many new tests to exercise all the different values. llvm-svn: 334221
* [llvm-objdump] Add -R optionPaul Semel2018-06-072-2/+42
| | | | | | | | This option prints dynamic relocation entries of the given file Differential Revision: https://reviews.llvm.org/D47493 llvm-svn: 334196
* [BranchFolding] Fix live-in's when hoisting codeKarl-Johan Karlsson2018-06-071-0/+7
| | | | | | | | | | | | | | | | | | | | | Summary: When the branch folder hoist code into a predecessor it adjust live-in's in the blocks it hoist code from. However it fail to handle hoisted code that contain a defed register that originally is live-in in the block through a super register. This is fixed by replacing the live-in handling code with calls to utility functions in LivePhysRegs. Reviewers: kparzysz, gberry, MatzeB, uweigand, aprantl Reviewed By: kparzysz Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D47529 llvm-svn: 334163
* Add definition for ELF dynamic tag DT_SYMTAB_SHNDX.Peter Collingbourne2018-06-071-0/+2
| | | | | | | | | | | | DT_SYMTAB_SHNDX is defined in generic-abi: http://www.sco.com/developers/gabi/latest/ch5.dynamic.html Patch by Rahul Chaudhry! Differential Revision: https://reviews.llvm.org/D47803 llvm-svn: 334149
* [ThinLTO] Rename index IsAnalysis flag to HaveGVs (NFC)Teresa Johnson2018-06-061-32/+34
| | | | | | | | | With the upcoming patch to add summary parsing support, IsAnalysis would be true in contexts where we are not performing module summary analysis. Rename to the more specific and approprate HaveGVs, which is essentially what this flag is indicating. llvm-svn: 334140
* [AArch64, ARM] Add support for Samsung Exynos M4Evandro Menezes2018-06-062-0/+3
| | | | | | Create a separate feature set for Exynos M4 and add test cases. llvm-svn: 334115
* [ThinLTO] Make ValueInfo operator!= consistent with operator== (NFC)Teresa Johnson2018-06-061-3/+3
| | | | | | | | | Compare Ref pointers instead of GUID, to handle comparison with special empty/tombstone ValueInfo. This was already done for operator==, to support inserting ValueInfo into DenseMap, but I need the operator!= side change for upcoming AsmParser summary parsing support. llvm-svn: 334111
* Change TII isCopyInstr way of returning arguments(NFC)Petar Jovanovic2018-06-061-2/+3
| | | | | | | | | | | Make TII isCopyInstr() return MachineOperands through pointer to pointer instead via reference. Patch by Nikola Prica. Differential Revision: https://reviews.llvm.org/D47364 llvm-svn: 334105
* [MC] Pass MCSubtargetInfo to fixupNeedsRelaxation and applyFixupPeter Smith2018-06-064-12/+31
| | | | | | | | | | | | | | | | | | On targets like Arm some relaxations may only be performed when certain architectural features are available. As functions can be compiled with differing levels of architectural support we must make a judgement on whether we can relax based on the MCSubtargetInfo for the function. This change passes through the MCSubtargetInfo for the function to fixupNeedsRelaxation so that the decision on whether to relax can be made per function. In this patch, only the ARM backend makes use of this information. We must also pass the MCSubtargetInfo to applyFixup because some fixups skip error checking on the assumption that relaxation has occurred, to prevent code-generation errors applyFixup must see the same MCSubtargetInfo as fixupNeedsRelaxation. Differential Revision: https://reviews.llvm.org/D44928 llvm-svn: 334078
* [CodeGen] assume max/default throughput for unspecified instructionsSanjay Patel2018-06-052-6/+6
| | | | | | | | | | | | | This is a fix for the problem arising in D47374 (PR37678): https://bugs.llvm.org/show_bug.cgi?id=37678 We may not have throughput info because it's not specified in the model or it's not available with variant scheduling, so assume that those instructions can execute/complete at max-issue-width. Differential Revision: https://reviews.llvm.org/D47723 llvm-svn: 334055
* [FileSystem] Remove OpenFlags param from several functions.Zachary Turner2018-06-051-4/+2
| | | | | | | | | | | | There was only one place in the entire codebase where a non default value was being passed, and that place was already hidden in an implementation file. So we can delete the extra parameter and all existing clients continue to work as they always have, while making the interface a bit simpler. Differential Revision: https://reviews.llvm.org/D47789 llvm-svn: 334046
* Remove a self-referencing #includeFangrui Song2018-06-051-1/+0
| | | | llvm-svn: 334027
* [MC][X86] Allow assembler variable assignment to register name.Nirav Dave2018-06-054-1/+11
| | | | | | | | | | | | | | | | | | | Summary: Allow extended parsing of variable assembler assignment syntax and modify X86 to permit VAR = register assignment. As we emit these as .set directives when possible, we inline such expressions in output assembly. Fixes PR37425. Reviewers: rnk, void, echristo Reviewed By: rnk Subscribers: nickdesaulniers, llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D47545 llvm-svn: 334022
* Move Compiler.h from Demangle back to SupportDavid Blaikie2018-06-042-513/+494
| | | | | | | | Code review feedback from r328123 prefers copying the few feature test macros used by Demangle into there, rather than sinking the header into an odd corner like Demangle. llvm-svn: 333965
* Add missing headerDavid Blaikie2018-06-041-0/+91
| | | | llvm-svn: 333957
* Move Analysis/Utils/Local.h back to TransformsDavid Blaikie2018-06-042-69/+5
| | | | | | | | | | Review feedback from r328165. Split out just the one function from the file that's used by Analysis. (As chandlerc pointed out, the original change only moved the header and not the implementation anyway - which was fine for the one function that was used (since it's a template/inlined in the header) but not in general) llvm-svn: 333954
* [MachineOutliner] NFC - Move intermediate data structures to MachineOutliner.hJessica Paquette2018-06-042-50/+202
| | | | | | | | | | | | | | | | | | | | | This is setting up to fix bug 37573 cleanly. This moves data structures that are technically both used in some way by the target and the general-purpose outlining algorithm into MachineOutliner.h. In particular, the `Candidate` class is of importance. Before, the outliner passed the locations of `Candidates` to the target, which would then make some decisions about the prospective outlined function. This change allows us to just pass `Candidates` along to the target. This will allow the target to discard `Candidates` that would be considered unsafe before cost calculation. Thus, we will be able to remove the unsafe candidates described in the bug without resorting to torching the entire prospective function. Also, as a side-effect, it makes the outliner a bit cleaner. https://bugs.llvm.org/show_bug.cgi?id=37573 llvm-svn: 333952
* [Support] Add functions that operate on native file handles on Windows.Zachary Turner2018-06-041-0/+48
| | | | | | | | | | | | | | | | | | | | Windows' CRT has a limit of 512 open file descriptors, and fds which are generated by converting a HANDLE via _get_osfhandle count towards this limit as well. Regardless, often you find yourself marshalling back and forth between native HANDLE objects and fds anyway. If we know from the getgo that we're going to need to work directly with the handle, we can cut out the marshalling layer while also not contributing to filling up the CRT's very limited handle table. On Unix these functions just delegate directly to the existing set of functions since an fd *is* the native file type. It would be nice, very long term, if we could convert most uses of fds to file_t. Differential Revision: https://reviews.llvm.org/D47688 llvm-svn: 333945
* Fix for llvm-dis/llvm-bcanalyzer overflowsTeresa Johnson2018-06-041-1/+1
| | | | | | | | | | | | | | | | | | Summary: These tools failed for a very large bitcode file produced by LTO due to 64-bit values being assigned to 32-bit types. For the BitstreamReader.h fix, the value initially fit into the 32-bit unsigned, but there was an overflow when multiplying by 32 furter below to compute the bit offset. No test case in the patch as this requires a huge bitcode file. Reviewers: pcc, george.karpenkov Subscribers: mehdi_amini, a.sidorin, llvm-commits Differential Revision: https://reviews.llvm.org/D47731 llvm-svn: 333942
* Get rid of SETCCEAmaury Sechet2018-06-041-9/+0
| | | | | | | | | | | | Summary: It has been deprecated in favor of SETCCCARRY for a year now and isn't used by any in tree backend. Reviewers: efriedma, craig.topper, dblaikie, bkramer Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D47685 llvm-svn: 333939
* In thin and full LTO + CFI, direct function calls may go through jump tableDmitry Mikulin2018-06-041-6/+0
| | | | | | | | | | entries to reach the target. Since these calls don't require type checks, we can short-circuit them to their real targets, except in cases when they can be pre-empted. Differential Revision: https://reviews.llvm.org/D46326 llvm-svn: 333937
* [llvm-readobj] Support GNU_PROPERTY_X86_FEATURE_1_AND notes in ↵Alexander Ivchenko2018-06-041-0/+7
| | | | | | | | | | | | | | | | | .note.gnu.property Resubmit of r333424. This version contains the fix for fails found by buildbots on some targets. This patch allows parsing GNU_PROPERTY_X86_FEATURE_1_AND notes in .note.gnu.property sections. These notes indicate that the object file is built to support Intel CET. patch by mike.dvoretsky Differential Revision: https://reviews.llvm.org/D47473 llvm-svn: 333908
* TableGen: Streamline the semantics of NAMENicolai Haehnle2018-06-041-19/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The new rules are straightforward. The main rules to keep in mind are: 1. NAME is an implicit template argument of class and multiclass, and will be substituted by the name of the instantiating def/defm. 2. The name of a def/defm in a multiclass must contain a reference to NAME. If such a reference is not present, it is automatically prepended. And for some additional subtleties, consider these: 3. defm with no name generates a unique name but has no special behavior otherwise. 4. def with no name generates an anonymous record, whose name is unique but undefined. In particular, the name won't contain a reference to NAME. Keeping rules 1&2 in mind should allow a predictable behavior of name resolution that is simple to follow. The old "rules" were rather surprising: sometimes (but not always), NAME would correspond to the name of the toplevel defm. They were also plain bonkers when you pushed them to their limits, as the old version of the TableGen test case shows. Having NAME correspond to the name of the toplevel defm introduces "spooky action at a distance" and breaks composability: refactoring the upper layers of a hierarchy of nested multiclass instantiations can cause unexpected breakage by changing the value of NAME at a lower level of the hierarchy. The new rules don't suffer from this problem. Some existing .td files have to be adjusted because they ended up depending on the details of the old implementation. Change-Id: I694095231565b30f563e6fd0417b41ee01a12589 Reviewers: tra, simon_tatham, craig.topper, MartinO, arsenm, javed.absar Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D47430 llvm-svn: 333900
* [Debugify] Don't apply DI before the bitcode writer passVedant Kumar2018-06-041-0/+4
| | | | | | | | | | | | Applying synthetic debug info before the bitcode writer pass has no testing-related purpose. This commit prevents that from happening. It also adds tests which check that IR produced with/without -debugify-each enabled is identical after stripping. This makes it possible to check that individual passes (or full pipelines) are invariant to debug info. llvm-svn: 333861
* [X86] Remove and autoupgrade masked avx512vnni intrinsics using the unmasked ↵Craig Topper2018-06-031-77/+0
| | | | | | intrinsics and select instructions. llvm-svn: 333857
* Re-land: [MachO] Fixing ub in MachO BinaryFormatChris Bieneman2018-06-031-1/+3
| | | | | | | | | | | | | | This re-lands r333797 with a fix for big endian systems. Original commit message: This isn't encountered anywhere inside LLVM, so I wrote a test case to expose the issue and verify that it is fixed. The basic problem is that the macho_load_command union contains all load comamnd structs. Load command structs in 32-bit macho files can be 32-bit aligned instead of 64-bit aligned. There are some strange circumstances in which this can be exposed in a 64-bit macho if the load commands are invalid or if a 32-bit aligned load command is used. In the past we've worked around this type of problem with changes like r264232. llvm-svn: 333854
* [ORC] Add a constructor to create an IRMaterializationUnit from a module andLang Hames2018-06-031-1/+13
| | | | | | | | | | pre-existing SymbolFlags and SymbolToDefinition maps. This constructor is useful when delegating work from an existing IRMaterialiaztionUnit to a new one, as it avoids the cost of re-computing these maps. llvm-svn: 333852
* [ORC] Use JITEvaluatedSymbol for IndirectStubsManager findStub and findPointer.Lang Hames2018-06-033-29/+13
| | | | | | | | Existing implementations of these methods do not require lazy materialization, and switching to JITEvaluatedSymbol allows us to remove error checking on the client side. llvm-svn: 333835
* [NEON] Support VLD1xN intrinsics in AArch32 mode (LLVM part)Ivan A. Kosarev2018-06-021-0/+12
| | | | | | | | | We currently support them only in AArch64. The NEON Reference, however, says they are 'ARMv7, ARMv8' intrinsics. Differential Revision: https://reviews.llvm.org/D47120 llvm-svn: 333825
* Revert r333819 "[NEON] Support VLD1xN intrinsics in AArch32 mode (Clang part)"Ivan A. Kosarev2018-06-021-12/+0
| | | | | | | | The LLVM part was committed instead of the Clang part. Differential Revision: https://reviews.llvm.org/D47121 llvm-svn: 333824
* [MC] Add assembler support for .cg_profile.Michael J. Spencer2018-06-025-0/+25
| | | | | | | | | | | | | | | Object FIle Representation At codegen time this is emitted into the ELF file a pair of symbol indices and a weight. In assembly it looks like: .cg_profile a, b, 32 .cg_profile freq, a, 11 .cg_profile freq, b, 20 When writing an ELF file these are put into a SHT_LLVM_CALL_GRAPH_PROFILE (0x6fff4c02) section as (uint32_t, uint32_t, uint64_t) tuples as (from symbol index, to symbol index, weight). Differential Revision: https://reviews.llvm.org/D44965 llvm-svn: 333823
* [NEON] Support VLD1xN intrinsics in AArch32 mode (Clang part)Ivan A. Kosarev2018-06-021-0/+12
| | | | | | | | | We currently support them only in AArch64. The NEON Reference, however, says they are 'ARMv7, ARMv8' intrinsics. Differential Revision: https://reviews.llvm.org/D47121 llvm-svn: 333819
* [Support] Remove unused raw_ostream::handle whose anchor role was superseded ↵Fangrui Song2018-06-021-3/+0
| | | | | | by anchor() llvm-svn: 333817
* [DebugInfo] Refactoring DIType::setFlags to DIType::cloneWithFlags, NFCRoman Tereshin2018-06-013-11/+22
| | | | | | | | | | | | | | | | | | and using the latter in DIBuilder::createArtificialType and DIBuilder::createObjectPointerType methods as well as introducing mirroring DISubprogram::cloneWithFlags and DIBuilder::createArtificialSubprogram methods. The primary goal here is to add createArtificialSubprogram to support a pass downstream while keeping the method consistent with the existing ones and making sure we don't encourage changing already created DI-nodes. Reviewed By: aprantl Differential Revision: https://reviews.llvm.org/D47615 llvm-svn: 333806
* Revert "Re-land: [MachO] Fixing ub in MachO BinaryFormat"Chris Bieneman2018-06-011-3/+1
| | | | | | | | This reverts commit r333803. Still breaking on big endian. Will sort this out later. llvm-svn: 333805
* Re-land: [MachO] Fixing ub in MachO BinaryFormatChris Bieneman2018-06-011-1/+3
| | | | | | | | | | | | | | This re-lands r333797 with a fix for big endian systems. Original commit message: This isn't encountered anywhere inside LLVM, so I wrote a test case to expose the issue and verify that it is fixed. The basic problem is that the macho_load_command union contains all load comamnd structs. Load command structs in 32-bit macho files can be 32-bit aligned instead of 64-bit aligned. There are some strange circumstances in which this can be exposed in a 64-bit macho if the load commands are invalid or if a 32-bit aligned load command is used. In the past we've worked around this type of problem with changes like r264232. llvm-svn: 333803
* Revert "[MachO] Fixing ub in MachO BinaryFormat"Chris Bieneman2018-06-011-3/+1
| | | | | | | | | | This reverts commit r333797. This patch is failing on BigEndian bots. I will fix and re-land: http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/19505/ llvm-svn: 333799
* Move some function declarations out of WindowsSupport.hZachary Turner2018-06-012-0/+19
| | | | | | | | | | | | | | | | | | The idea behind WindowsSupport.h is that it's in the source directory so that windows.h'isms don't leak out into the larger LLVM project. To that end, any symbol that references a symbol from windows.h must be in this private header, and not in a public header. However, we had some useful utility functions in WindowsSupport.h which have no dependency on the Windows API, but still only make sense on Windows. Those functions should be usable outside of Support since there is no risk of causing a windows.h leak. Although this introduces some preprocessor logic in some header files, It's not too egregious and it's better than the alternative of duplicating a ton of code. Differential Revision: https://reviews.llvm.org/D47662 llvm-svn: 333798
* [MachO] Fixing ub in MachO BinaryFormatChris Bieneman2018-06-011-1/+3
| | | | | | | | | | This isn't encountered anywhere inside LLVM, so I wrote a test case to expose the issue and verify that it is fixed. The basic problem is that the macho_load_command union contains all load comamnd structs. Load command structs in 32-bit macho files can be 32-bit aligned instead of 64-bit aligned. There are some strange circumstances in which this can be exposed in a 64-bit macho if the load commands are invalid or if a 32-bit aligned load command is used. In the past we've worked around this type of problem with changes like r264232. llvm-svn: 333797
* Revert r333740: IPSCCP] Use PredicateInfo to propagate facts from cmp.Florian Hahn2018-06-011-5/+1
| | | | | | This is breaking the clang-with-thin-lto-ubuntu bot. llvm-svn: 333745
* Recommit r333268: [IPSCCP] Use PredicateInfo to propagate facts from cmp ↵Florian Hahn2018-06-011-1/+5
| | | | | | | | | | | | | | | | | | | instructions. This patch updates IPSCCP to use PredicateInfo to propagate facts to true branches predicated by EQ and to false branches predicated by NE. As a follow up, we should be able to extend it to also propagate additional facts about nonnull. Reviewers: davide, mssimpso, dberlin, efriedma Reviewed By: davide, dberlin Differential Revision: https://reviews.llvm.org/D45330 llvm-svn: 333740
* DWARFAcceleratorTable: Add an iterator-based api for accessing names in the ↵Pavel Labath2018-06-012-5/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | index Summary: Back when we were introducing the DWARF v5 name index, there was a short discussion whether we shouldn't have a nicer api for iterating over the index. At that time, I did not find it necessary since the iteration over names was done only from within the index itself (and I figured the internal implementation can deal with a slightly rough interface). However, now I ran into a use for this kind of API in LLDB (for finding all names matching a regular expression), so it looked like a nice opportunity to introduce one. To make the API more useful, I've made the NameTableEntry class a bit smarter: it now stores the string section reference (so it can return its name) and its position in the name index (mainly useful for dumping/logging). I also convert the internal users to use the new API, which also gives test coverage for the added code. Reviewers: JDevlieghere, aprantl, dblaikie Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D47590 llvm-svn: 333738
* AMDGPU/R600: Move intrinsics to IntrinsicsAMDGPU.tdTom Stellard2018-06-011-0/+49
| | | | | | | | | | | | Reviewers: arsenm, nhaehnle, jvesely Reviewed By: arsenm Subscribers: kzhuravl, wdng, yaxunl, dstuttard, tpr, llvm-commits, t-tye Differential Revision: https://reviews.llvm.org/D47487 llvm-svn: 333720
* [WebAssembly] Update to the new names for the memory intrinsics.Dan Gohman2018-05-311-6/+11
| | | | | | | | | The WebAssembly committee has decided on the names `memory.size` and `memory.grow` for the memory intrinsics, so update the LLVM intrinsics to follow those names, keeping both sets of old names in place for compatibility. llvm-svn: 333708
OpenPOWER on IntegriCloud