summaryrefslogtreecommitdiffstats
path: root/llvm/include
Commit message (Collapse)AuthorAgeFilesLines
* Reverting r237234, "Use std::bitset for SubtargetFeatures"Michael Kuperstein2015-05-133-35/+12
| | | | | | | The buildbots are still not satisfied. MIPS and ARM are failing (even though at least MIPS was expected to pass). llvm-svn: 237245
* [DebugInfo] Debug locations for constant SD nodesSergey Dmitrouk2015-05-132-5/+16
| | | | | | | | | | | | | | | | | | | | | Several updates for [DebugInfo] Add debug locations to constant SD nodes (r235989). Includes: * re-enabling the change (disabled recently); * missing change for FP constants; * resetting debug location of constant node if it's used more than at one place to prevent emission of wrong locations in case of coalesced constants; * a couple of additional tests. Now all look ups in CSEMap are wrapped by additional method. Comment in D9084 suggests that debug locations aren't useful for "target constants", so there might be one more change related to this API (namely, dropping debug locations for getTarget*Constant methods). Differential Revision: http://reviews.llvm.org/D9604 llvm-svn: 237237
* Use std::bitset for SubtargetFeaturesMichael Kuperstein2015-05-133-12/+35
| | | | | | | | | | | Previously, subtarget features were a bitfield with the underlying type being uint64_t. Since several targets (X86 and ARM, in particular) have hit or were very close to hitting this bound, switching the features to use a bitset. No functional change. The first two times this was committed (r229831, r233055), it caused several buildbot failures. At least some of the ARM and MIPS ones were due to gcc/binutils issues, and should now be fixed. llvm-svn: 237234
* Change LoadAndStorePromoter to take ArrayRef instead of SmallVectorImpl&.Pete Cooper2015-05-131-1/+2
| | | | | | | | | | The array passed to LoadAndStorePromoter's constructor was a constant reference to a SmallVectorImpl, which is just the same as passing an ArrayRef. Also, the data in the array can be 'const Instruction*' instead of 'Instruction*'. Its not possible to convert a SmallVectorImpl<T*> to SmallVectorImpl<const T*>, but ArrayRef does provide such a method. Currently this added calls to makeArrayRef which should be a nop, but i'm going to kick off a discussion about improving ArrayRef to not need these. llvm-svn: 237226
* Constify arguments in AliasSetTracker methods. NFCPete Cooper2015-05-131-4/+5
| | | | llvm-svn: 237225
* Constify arguments to methods in LoopInfo. NFCPete Cooper2015-05-131-2/+2
| | | | llvm-svn: 237223
* [Statepoints] Support for "patchable" statepoints.Sanjoy Das2015-05-124-26/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change adds two new parameters to the statepoint intrinsic, `i64 id` and `i32 num_patch_bytes`. `id` gets propagated to the ID field in the generated StackMap section. If the `num_patch_bytes` is non-zero then the statepoint is lowered to `num_patch_bytes` bytes of nops instead of a call (the spill and reload code remains unchanged). A non-zero `num_patch_bytes` is useful in situations where a language runtime requires complete control over how a call is lowered. This change brings statepoints one step closer to patchpoints. With some additional work (that is not part of this patch) it should be possible to get rid of `TargetOpcode::STATEPOINT` altogether. PlaceSafepoints generates `statepoint` wrappers with `id` set to `0xABCDEF00` (the old default value for the ID reported in the stackmap) and `num_patch_bytes` set to `0`. This can be made more sophisticated later. Reviewers: reames, pgavlin, swaroop.sridhar, AndyAyers Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9546 llvm-svn: 237214
* Tidy comments in SampleProfile header. NFC.Diego Novillo2015-05-121-16/+18
| | | | llvm-svn: 237197
* Add missing #include and forward decl, found by modules build.Richard Smith2015-05-122-1/+2
| | | | llvm-svn: 237195
* [Statepoints] Clean up statepoint argument accessors.Pat Gavlin2015-05-121-17/+17
| | | | | | Differential Revision: http://reviews.llvm.org/D9622 llvm-svn: 237191
* [PlaceSafepoints] Switch to being a FunctionPassPhilip Reames2015-05-121-1/+1
| | | | | | | | The pass doesn't actually modify the module outside of the function being processed. The only confusing piece is that it both inserts calls and then inlines the resulting calls. Given that, it definitely invalidates module level analysis results, but many FunctionPasses do that. Differential Revision: http://reviews.llvm.org/D9590 llvm-svn: 237185
* fix formatting; NFCSanjay Patel2015-05-121-6/+4
| | | | llvm-svn: 237181
* Add a const method to iterator over PHI incoming values.Pete Cooper2015-05-121-0/+2
| | | | | | This will be used in the next commit which converts code to use incoming_values(). llvm-svn: 237168
* [Statepoints] Split the calling convention and statepoint flags operand to ↵Pat Gavlin2015-05-121-3/+14
| | | | | | | | STATEPOINT into two separate operands. Differential Revision: http://reviews.llvm.org/D9623 llvm-svn: 237166
* Delete dead code. NFCJonathan Roelofs2015-05-121-1/+0
| | | | llvm-svn: 237148
* Comment disambiguation.Douglas Katzman2015-05-121-2/+2
| | | | llvm-svn: 237146
* fix typos, grammar; NFCSanjay Patel2015-05-121-2/+2
| | | | llvm-svn: 237139
* Change TargetParser enum names to avoid macro conflicts (llvm)Renato Golin2015-05-121-50/+50
| | | | | | | | | sys/time.h on Solaris (and possibly other systems) defines "SEC" as "1" using a cpp macro. The result is that this fails to compile. Fixes https://llvm.org/PR23482 llvm-svn: 237112
* Remove unnecessary forward declaration.Craig Topper2015-05-121-1/+0
| | | | llvm-svn: 237093
* Migrate existing backends that care about software floating pointEric Christopher2015-05-123-14/+2
| | | | | | | | | | | | | | | | | | | | to use the information in the module rather than TargetOptions. We've had and clang has used the use-soft-float attribute for some time now so have the backends set a subtarget feature based on a particular function now that subtargets are created based on functions and function attributes. For the one middle end soft float check go ahead and create an overloadable TargetLowering::useSoftFloat function that just checks the TargetSubtargetInfo in all cases. Also remove the command line option that hard codes whether or not soft-float is set by using the attribute for all of the target specific test cases - for the generic just go ahead and add the attribute in the one case that showed up. llvm-svn: 237079
* Add more missing #includes, found by modules build.Richard Smith2015-05-114-0/+5
| | | | llvm-svn: 237062
* Add missing #include, found by modules build.Richard Smith2015-05-111-0/+1
| | | | llvm-svn: 237061
* Add missing #includes, found by modules build.Richard Smith2015-05-111-1/+4
| | | | llvm-svn: 237060
* Readdress r236990, use of static members on a non-static variable.David Blaikie2015-05-111-4/+9
| | | | | | | | | | | | The TargetRegistry is just a namespace-like class, instantiated in one place to use a range-based for loop. Instead, expose access to the registry via a range-based 'targets()' function instead. This makes most uses a bit awkward/more verbose - but eventually we should just add a range-based find_if function which will streamline these functions. I'm happy to mkae them a bit awkward in the interim as encouragement to improve the algorithms in time. llvm-svn: 237059
* propagate IR-level fast-math-flags to DAG nodes; 2nd try; NFCSanjay Patel2015-05-112-7/+11
| | | | | | | | | | | | | | | | | | | | | | | This is a less ambitious version of: http://reviews.llvm.org/rL236546 because that was reverted in: http://reviews.llvm.org/rL236600 because it caused memory corruption that wasn't related to FMF but was actually due to making nodes with 2 operands derive from a plain SDNode rather than a BinarySDNode. This patch adds the minimum plumbing necessary to use IR-level fast-math-flags (FMF) in the backend without actually using them for anything yet. This is a follow-on to: http://reviews.llvm.org/rL235997 ...which split the existing nsw / nuw / exact flags and FMF into their own struct. llvm-svn: 237046
* [WinEH] Update exception numbering to give handlers their own base state.Andrew Kaylor2015-05-111-0/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D9512 llvm-svn: 237014
* group getNode() variants by purpose and add comments; NFCSanjay Patel2015-05-111-17/+21
| | | | llvm-svn: 237013
* CodeGen: Make MachineInstr::untieRegOperand() a public functionTom Stellard2015-05-111-6/+7
| | | | | | | | This makes it easier to update in place instructions with tied operands. Differential Revision: http://reviews.llvm.org/D9231 llvm-svn: 237005
* Rip min/max pattern matching out of InstCombine and intoJames Molloy2015-05-111-0/+15
| | | | | | | | | | | ValueTracking. This matching functionality is useful in more than just InstCombine, so make it available in ValueTracking. NFC. llvm-svn: 236998
* AVX-512: Changed CC parameter in "cmp" intrinsicElena Demikhovsky2015-05-111-24/+24
| | | | | | | | from i8 to i32 according to the Intel Spec by Igor Breger (igor.breger@intel.com) llvm-svn: 236979
* AVX-512: Added SKX instructions and intrinsics:Elena Demikhovsky2015-05-111-0/+72
| | | | | | | | {add/sub/mul/div/} x {ps/pd} x {128/256} 2. max/min with sae By Asaf Badouh (asaf.badouh@intel.com) llvm-svn: 236971
* MachineCSE: Add a target query for the LookAheadLimit heurisiticTom Stellard2015-05-091-0/+8
| | | | | | | | | This is used to determine whether or not to CSE physical register defs. Differential Revision: http://reviews.llvm.org/D9472 llvm-svn: 236923
* ScheduleDAGInstrs: In functions with tail calls PseudoSourceValues are not ↵Arnold Schwaighofer2015-05-081-0/+13
| | | | | | | | | | | | | | | | | | | | non-aliasing distinct objects The code that builds the dependence graph assumes that two PseudoSourceValues don't alias. In a tail calling function two FixedStackObjects might refer to the same location. Worse 'immutable' fixed stack objects like function arguments are not immutable and will be clobbered. Change this so that a load from a FixedStackObject is not invariant in a tail calling function and don't return a PseudoSourceValue for an instruction in tail calling functions when building the dependence graph so that we handle function arguments conservatively. Fix for PR23459. rdar://20740035 llvm-svn: 236916
* Add a comment about DepthFirstIterator's skipchildren behaviorDaniel Berlin2015-05-081-2/+4
| | | | llvm-svn: 236904
* TargetParser: FPU/ARCH/EXT parsing refactory - NFCRenato Golin2015-05-081-0/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This new class in a global context contain arch-specific knowledge in order to provide LLVM libraries, tools and projects with the ability to understand the architectures. For now, only FPU, ARCH and ARCH extensions on ARM are supported. Current behaviour it to parse from free-text to enum values and back, so that all users can share the same parser and codes. This simplifies a lot both the ASM/Obj streamers in the back-end (where this came from), and the front-end parsers for command line arguments (where this is going to be used next). The previous implementation, using .def/.h includes is deprecated due to its inflexibility to be built without the backend support and for being too cumbersome. As more architectures join this scheme, and as more features of such architectures are added (such as hardware features, type sizes, etc) into a full blown TargetDescription class, having a set of classes is the most sane implementation. The ultimate goal of this refactor both LLVM's and Clang's target description classes into one unique interface, so that we can de-duplicate and standardise the descriptions, as well as make it available for other front-ends, tools, etc. The FPU parsing for command line options in Clang has been converted to use this new library and a number of aliases were added for compatibility: * A bogus neon-vfpv3 alias (neon defaults to vfp3) * armv5/v6 * {fp4/fp5}-{sp/dp}-d16 Next steps: * Port Clang's ARCH/EXT parsing to use this library. * Create a TableGen back-end to generate this information. * Run this TableGen process regardless of which back-ends are built. * Expose more information and rename it to TargetDescription. * Continue re-factoring Clang to use as much of it as possible. llvm-svn: 236900
* Update Function::getContext documentation. NFC.Diego Novillo2015-05-081-2/+2
| | | | llvm-svn: 236899
* Extend the statepoint intrinsic to allow statepoints to be marked as ↵Pat Gavlin2015-05-082-3/+53
| | | | | | | | | | | | | | | | | | | | | | transitions from GC-aware code to code that is not GC-aware. This changes the shape of the statepoint intrinsic from: @llvm.experimental.gc.statepoint(anyptr target, i32 # call args, i32 unused, ...call args, i32 # deopt args, ...deopt args, ...gc args) to: @llvm.experimental.gc.statepoint(anyptr target, i32 # call args, i32 flags, ...call args, i32 # transition args, ...transition args, i32 # deopt args, ...deopt args, ...gc args) This extension offers the backend the opportunity to insert (somewhat) arbitrary code to manage the transition from GC-aware code to code that is not GC-aware and back. In order to support the injection of transition code, this extension wraps the STATEPOINT ISD node generated by the usual lowering lowering with two additional nodes: GC_TRANSITION_START and GC_TRANSITION_END. The transition arguments that were passed passed to the intrinsic (if any) are lowered and provided as operands to these nodes and may be used by the backend during code generation. Eventually, the lowering of the GC_TRANSITION_{START,END} nodes should be informed by the GC strategy in use for the function containing the intrinsic call; for now, these nodes are instead replaced with no-ops. Differential Revision: http://reviews.llvm.org/D9501 llvm-svn: 236888
* [NoTTI] reject negative scale in addressing modeJingyue Wu2015-05-081-3/+3
| | | | | | | | | | | | | | | | Summary: I noticed this bug when deubging a WIP on LSR. I wonder whether and how we should add a regression test for this. Test Plan: no tests failed. Reviewers: atrick Subscribers: hfinkel, llvm-commits Differential Revision: http://reviews.llvm.org/D9536 llvm-svn: 236887
* [llvm-readobj/obj2yaml/yaml2obj] Support MIPS machine ELF header flagsSimon Atanasyan2015-05-081-0/+21
| | | | llvm-svn: 236807
* [opaque pointer type] Explicit pointee type for GEPOperator/GEPConstantExpr.David Blaikie2015-05-081-4/+1
| | | | | | | Also a couple of other changes to avoid use of PointerType::getElementType here & there too. llvm-svn: 236799
* Delete unused createSanitizerCoverageModulePass overload.Alexey Samsonov2015-05-071-1/+0
| | | | llvm-svn: 236791
* Disable r235989 "Reapply r235977 "[DebugInfo] Add debug locations to ↵Sergey Dmitrouk2015-05-071-2/+3
| | | | | | | | | constant SD nodes"" Will be re-enabled with missing changes for ConstantFPSDNode and fixes for wrong locations due to constant coalescing. llvm-svn: 236758
* YAML: Enable the YAMLParser tests. Alex Lorenz2015-05-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | This commit enables the tests located in test/YAMLParser directory. Those tests were never actually enabled, as llvm-lit didn't pick up the files with the 'data' extension. The commit renames those test files to files with the 'test' extension so that llvm-lit would find them. This commit also modifies yaml-bench so that it returns an error status if an error occurred during parsing. It also adds the '-use-color' command line option to yaml-bench (to make sure that file check matches the error messages in the output stream). This commit modifies some of the renamed tests so that they wouldn't fail. It gets rid of XFAILs and uses the 'not' command instead for some of the tests that have to fail during parsing. This commit also adds some 'FIXME' comments to a couple of tests that are supposed to fail but currently pass because of various bugs in the implementation of the yaml parser. Reviewers: Justin Bogner Differential Revision: http://reviews.llvm.org/D9448 llvm-svn: 236754
* [obj2yaml/yaml2obj] Add SHT_MIPS_ABIFLAGS section supportSimon Atanasyan2015-05-071-1/+58
| | | | | | | This change adds support for the SHT_MIPS_ABIFLAGS section reading/writing to the obj2yaml and yaml2obj tools. llvm-svn: 236738
* [llvm-readobj] Print .MIPS.abiflags section contentSimon Atanasyan2015-05-071-0/+16
| | | | | | | | | This change adds new flag -mips-abi-flags to the llvm-readobj. This flag forces printing of .MIPS.abiflags section content. https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking#10.2.1._.MIPS.abiflags llvm-svn: 236737
* [MIPS] Move MIPS ABI flags structure constants to the separate headerSimon Atanasyan2015-05-071-0/+102
| | | | | | | | | | | http://reviews.llvm.org/D9517 The separate header file allows to reuse the MIPS ABI flags structure constants in other LLVM tools like the llvm-readobj. No functional changes. llvm-svn: 236732
* [llvm-readobj/obj2yaml/yaml2obj] Support more MIPS ELF header flagsSimon Atanasyan2015-05-071-5/+12
| | | | llvm-svn: 236728
* AVX-512: Added all forms of FP compare instructions for KNL and SKX.Elena Demikhovsky2015-05-071-7/+27
| | | | | | | | Added intrinsics for the instructions. CC parameter of the intrinsics was changed from i8 to i32 according to the spec. By Igor Breger (igor.breger@intel.com) llvm-svn: 236714
* Attributes.h: Fix incorrect \brief introduced in r236666. [-Wdocumentation]NAKAMURA Takumi2015-05-071-1/+1
| | | | llvm-svn: 236712
* [SanitizerCoverage] Introduce SanitizerCoverageOptions struct.Alexey Samsonov2015-05-071-0/+20
| | | | | | | | | | | | | | | | | | | Summary: This gives frontend more precise control over collected coverage information. User can still override these options by passing -mllvm flags. No functionality change. Test Plan: regression test suite. Reviewers: kcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9539 llvm-svn: 236687
OpenPOWER on IntegriCloud