summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* R600/SI: Use v_madmk_f32Matt Arsenault2015-02-211-4/+51
| | | | llvm-svn: 230149
* R600/SI: Try to use v_madak_f32Matt Arsenault2015-02-212-0/+81
| | | | | | | This is a code size optimization when the constant only has one use. llvm-svn: 230148
* R600/SI: Don't crash when getting immediate operand sizeMatt Arsenault2015-02-211-0/+7
| | | | llvm-svn: 230147
* R600/SI: Fix mad*k definitionsMatt Arsenault2015-02-214-2/+40
| | | | llvm-svn: 230146
* [Orc] Move Orc code into a namespace (llvm::orc), update Kaleidoscope code.Lang Hames2015-02-215-14/+29
| | | | | | NFC. llvm-svn: 230143
* MachineInstr: Use range-based for loops. NFC.Benjamin Kramer2015-02-211-34/+20
| | | | llvm-svn: 230142
* Calling memmove on a MachineOperand is totally safe.Benjamin Kramer2015-02-211-8/+2
| | | | | | | While it's not POD due to the user-defined constructor, it's still a trivially copyable type. No functional change. llvm-svn: 230141
* Remove dead prototype.Benjamin Kramer2015-02-211-1/+0
| | | | llvm-svn: 230137
* X86: Remove custom lowering of SIGN_EXTEND_INREGBenjamin Kramer2015-02-211-68/+0
| | | | | | | This was just replicating logic from the legalizer. Covered by existing tests. llvm-svn: 230136
* Unconditionally create a new MCInstrInfo in the asm printer forEric Christopher2015-02-211-5/+4
| | | | | | | | asm parsing since it's not subtarget dependent and we can't depend upon the one hanging off the MachineFunction's subtarget still being around. llvm-svn: 230135
* Remove obsolete comment.Eric Christopher2015-02-211-5/+0
| | | | llvm-svn: 230134
* Have the MipsAsmPrinter fp stub emission code take a customEric Christopher2015-02-212-43/+59
| | | | | | | MCSubtargetInfo as the MachineFunction has gone away and we need to emit code at the module level. llvm-svn: 230133
* Turn an if+llvm_unreachable into an assert and reword comment.Eric Christopher2015-02-211-7/+4
| | | | llvm-svn: 230132
* Endianness can be gotten from the DataLayout which we alreadyEric Christopher2015-02-211-1/+1
| | | | | | have. Also, the subtarget is invalid at this point. llvm-svn: 230131
* X86: Call __main using the SelectionDAGDavid Majnemer2015-02-212-10/+13
| | | | | | | | Synthesizing a call directly using the MI layer would confuse the frame lowering code. This is problematic as frame lowering is highly sensitive the particularities of calls, etc. llvm-svn: 230129
* [obj2yaml/yaml2obj] Add SHT_GROUP support.Shankar Easwaran2015-02-211-1/+16
| | | | | | This adds section group support to the tools obj2yaml and yaml2obj. llvm-svn: 230124
* Small cleanup. Don't use else when not needed.Davide Italiano2015-02-211-4/+2
| | | | | | Pointed out by David Majnemer. llvm-svn: 230122
* CodeGen: convert CCState interface to using ArrayRefsTim Northover2015-02-2112-58/+46
| | | | | | | | | | | Everyone except R600 was manually passing the length of a static array at each callsite, calculated in a variety of interesting ways. Far easier to let ArrayRef handle that. There should be no functional change, but out of tree targets may have to tweak their calls as with these examples. llvm-svn: 230118
* Win64: Stack alignment constraints aren't applied during SET_FPREGDavid Majnemer2015-02-211-36/+25
| | | | | | | | | | Stack realignment occurs after the prolog, not during, for Win64. Because of this, don't factor in the maximum stack alignment when establishing a frame pointer. This fixes PR22572. llvm-svn: 230113
* AsmParser/Writer: Handle symbolic constants in DI 'flags:'Duncan P. N. Exon Smith2015-02-214-17/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | Parse (and write) symbolic constants in debug info `flags:` fields. This prevents a readability (and CHECK-ability) regression with the new debug info hierarchy. Old (well, current) assembly, with pretty-printing: !{!"...\\0016387", ...} ; ... [public] [rvalue reference] Flags field without this change: !MDDerivedType(flags: 16387, ...) Flags field with this change: !MDDerivedType(flags: DIFlagPublic | DIFlagRValueReference, ...) As discussed in the review thread, this isn't a final state. Most of these flags correspond to `DW_AT_` symbolic constants, and we might eventually want to support arbitrary attributes in some form. However, as it stands now, some of the flags correspond to other concepts (like `FlagStaticMember`); until things are refactored this is the simplest way to move forward without regressing assembly. llvm-svn: 230111
* IR: Add helper to split debug info flags bitfieldDuncan P. N. Exon Smith2015-02-211-0/+24
| | | | | | | | Split debug info 'flags' bitfield over a vector so the current flags can be iterated over. This API (in combination with r230107) will be used for assembly support for symbolic constants. llvm-svn: 230108
* IR: Add debug info flag string conversionsDuncan P. N. Exon Smith2015-02-211-0/+19
| | | | | | | | | Add `DIDescriptor::getFlag(StringRef)` and `DIDescriptor::getFlagString(unsigned)`. The latter only converts exact matches; I'll add separate API for breaking the flags bitfield up into parts. llvm-svn: 230107
* AsmParser: Use StringRef for keyword comparisons, NFCDuncan P. N. Exon Smith2015-02-211-10/+9
| | | | | | | | Leverage `StringRef` inside keyword comparison macros. There's no reason to be so low-level here, and I'm about to add another `startswith()` use, so let's make it easy to read. llvm-svn: 230100
* [PlaceSafepoints] Adjust enablement logic to default to off and be GC ↵Philip Reames2015-02-211-11/+26
| | | | | | | | configurable per GC Previously, this pass ran over every function in the Module if added to the pass order. With this change, it runs only over those with a GC attribute where the GC explicitly opts in. A GC can also choose which of entry safepoint polls, backedge safepoint polls, and call safepoints it wants. I hope to get these exposed as checks on the GCStrategy at some point, but for now, the checks are manual string comparisons. llvm-svn: 230097
* AsmParser: Use do{}while(false) in macros, NFCDuncan P. N. Exon Smith2015-02-201-11/+21
| | | | | | | | | | | | | | `do { ... } while (false)` is standard macro etiquette for forcing instantiations into a single statement and requiring a `;` afterwards, making statement-like macros easier to reason about (and harder to use incorrectly). I'm about to modify the macros in `LexIdentifier()`. I noticed that the `KEYWORD` macro *does* follow the rule, so I thought I'd clean up the other macros to match (otherwise might not be worth changing, since the benefits of this pattern are fairly irrelevant here). llvm-svn: 230095
* Remove some unnecessary unreachables in favor of (sometimes implicit) assertionsDavid Blaikie2015-02-201-53/+34
| | | | | | | Also simplify some else-after-return cases including some standard algorithm convenience/use. llvm-svn: 230094
* LiveRangeCalc: Don't start liveranges of PHI instruction at the block begin.Matthias Braun2015-02-201-5/+2
| | | | | | | | | | | | | | | | | | Summary: Letting them begin at the PHI instruction slightly simplifies the code but more importantly avoids breaking the assumption that live ranges starting at the block begin are also live at the end of the predecessor blocks. The MachineVerifier checks that but was apparently never run in the few instances where liveranges are calculated for machine-SSA functions. Reviewers: qcolombet Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7779 llvm-svn: 230093
* Hide a bunch of advanced testing options in default opt --help outputPhilip Reames2015-02-201-7/+9
| | | | | | These are internal options. I need to go through, evaluate which are worth keeping and which not. Many of them should probably be renamed as well. Until I have time to do that, we can at least stop poluting the standard opt -help output. llvm-svn: 230088
* Use short names for jumptable sections.Rafael Espindola2015-02-201-29/+25
| | | | | | Also refactor code to remove some duplication. llvm-svn: 230087
* [RewriteStatepointsForGC] Use DenseSet in place of std::set [NFC]Philip Reames2015-02-201-8/+8
| | | | | | This should be the last cleanup on non-llvm preferred data structures. I left one use of std::set in an assertion; DenseSet didn't seem to have a tombstone for CallSite defined. That might be worth fixing, but wasn't worth it for a debug only use. llvm-svn: 230084
* [RewriteStatepointsForGC] Replace std::map with DenseMapPhilip Reames2015-02-201-2/+2
| | | | | | I'd done the work of extracting the typedef in a previous commit, but didn't actually change it. Hopefully this will make any subtle changes easier to isolate. llvm-svn: 230081
* [RewriteStatepointsForGC] Cleanup - replace std::vector usage [NFC]Philip Reames2015-02-201-40/+38
| | | | | | Migrate std::vector usage to a combination of SmallVector and ArrayRef. llvm-svn: 230079
* Used the cached subtarget off of the MachineFunction.Eric Christopher2015-02-202-5/+3
| | | | llvm-svn: 230078
* X86: Remove pre-2010 dead code in mergeSPUpdatesDownReid Kleckner2015-02-201-36/+0
| | | | llvm-svn: 230075
* LowerScalarImmediateShift - Merged v16i8 and v32i8 shift lowering. NFC.Simon Pilgrim2015-02-201-60/+13
| | | | llvm-svn: 230074
* R600/SI: Remove v_sub_f64 pseudoMatt Arsenault2015-02-203-24/+5
| | | | | | | | | | The expansion code does the same thing. Since the operands were not defined with the correct types, this has the side effect of fixing operand folding since the expanded pseudo would never use SGPRs or inline immediates. llvm-svn: 230072
* R600: Use new fmad node.Matt Arsenault2015-02-207-41/+28
| | | | | | | | | | | This enables a few useful combines that used to only use fma. Also since v_mad_f32 apparently does not support denormals, disable the existing cases that are custom handled if they are requested. llvm-svn: 230071
* Add generic fmad DAG node.Matt Arsenault2015-02-204-95/+164
| | | | | | | | | | | This allows sharing of FMA forming combines to work with instructions that have the same semantics as a separate multiply and add. This is expand by default, and only formed post legalization so it shouldn't have much impact on targets that do not want it. llvm-svn: 230070
* [RewriteStatepointsForGC] More style cleanup [NFC]Philip Reames2015-02-201-15/+14
| | | | | | Use llvm_unreachable where appropriate, use SmallVector where easy to do so, introduce typedefs for planned type migrations. llvm-svn: 230068
* [RewriteStatepointsForGC] Remove notion of SafepointBounds [NFC]Philip Reames2015-02-201-49/+11
| | | | | | The notion of a range of inserted safepoint related code is no longer really applicable. This survived over from an earlier implementation. Just saving the inserted gc.statepoint and working from that is far clearer given the current code structure. Particularly when invokable statepoints get involved. llvm-svn: 230063
* Raising minimum required CMake version to 2.8.12.2.Chris Bieneman2015-02-202-2/+2
| | | | llvm-svn: 230062
* Grab the DataLayout off of the TargetMachine since that's whereEric Christopher2015-02-201-2/+2
| | | | | | it's stored. llvm-svn: 230059
* LoopRotate: When reconstructing loop simplify form don't split edges from ↵Benjamin Kramer2015-02-201-0/+2
| | | | | | | | | | | | indirectbrs. Yet another chapter in the endless story. While this looks like we leave the loop in a non-canonical state this replicates the logic in LoopSimplify so it doesn't diverge from the canonical form in any way. PR21968 llvm-svn: 230058
* IR: Change MDFile to directly store the filename/directoryDuncan P. N. Exon Smith2015-02-201-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the old (well, current) schema, there are two types of file references: untagged and tagged (the latter references the former). !0 = !{!"filename", !"/directory"} !1 = !{!"0x29", !1} ; DW_TAG_file_type [filename] [/directory] The interface to `DIBuilder` universally takes the tagged version, described by `DIFile`. However, most `file:` references actually use the untagged version directly. In the new hierarchy, I'm merging this into a single node: `MDFile`. Originally I'd planned to keep the old schema unchanged until after I moved the new hierarchy into place. However, it turns out to be trivial to make `MDFile` match both nodes at the same time. - Anyone referencing !1 does so through `DIFile`, whose implementation I need to gut anyway (as I do the rest of the `DIDescriptor`s). - Anyone referencing !0 just references an `MDNode`, and expects a node with two `MDString` operands. This commit achieves that, and updates all the testcases for the parts of the new hierarchy that used the two-node schema (I've replaced the untagged nodes with `distinct !{}` to make the diff clear (otherwise the metadata all gets renumbered); it might be worthwhile to come back and delete those nodes and renumber the world, not sure). llvm-svn: 230057
* Introduce bitset metadata format and bitset lowering pass.Peter Collingbourne2015-02-204-0/+531
| | | | | | | | | | | | | | | | | | | | This patch introduces a new mechanism that allows IR modules to co-operatively build pointer sets corresponding to addresses within a given set of globals. One particular use case for this is to allow a C++ program to efficiently verify (at each call site) that a vtable pointer is in the set of valid vtable pointers for the class or its derived classes. One way of doing this is for a toolchain component to build, for each class, a bit set that maps to the memory region allocated for the vtables, such that each 1 bit in the bit set maps to a valid vtable for that class, and lay out the vtables next to each other, to minimize the total size of the bit sets. The patch introduces a metadata format for representing pointer sets, an '@llvm.bitset.test' intrinsic and an LTO lowering pass that lays out the globals and builds the bitsets, and documents the new feature. Differential Revision: http://reviews.llvm.org/D7288 llvm-svn: 230054
* Reversed revision 229706. The reason is regression, which is caused by theJozef Kolek2015-02-202-6/+3
| | | | | | | | usage of instruction ADDU16 by CodeGen. For this instruction an improper register is allocated, i.e. the register that is not from register set defined for the instruction. llvm-svn: 230053
* Verifier: Unused comdats might not have a corresponding GVDavid Majnemer2015-02-201-8/+1
| | | | | | This fixes PR22646. llvm-svn: 230051
* Fix an asan use-after-free bug introduced by the asm printerEric Christopher2015-02-201-1/+11
| | | | | | | | | changes to remove non-Function based subtargets out of the asm printer. For module level emission we'll need to construct up an MCSubtargetInfo so that we can encode instructions for emission. llvm-svn: 230050
* [GC, RewriteStatepointsForGC] Style cleanup and bug fixPhilip Reames2015-02-201-9/+29
| | | | | | | | When doing style cleanup, I noticed a minor bug in this code. If we have a pointer that we think is unused after a statepoint and thus doesn't need relocation, we store a null pointer into the alloca we're about to promote. This helps turn a mistake in liveness analysis into an easily debuggable crash. It turned out this code had never been updated to handle invoke statepoints. There's no test for this. Without a bug in liveness, it appears impossible to make this trigger in a way which is visible in the resulting IR. We might store the null, but when promoting the alloca, there will be no uses and thus nothing to test against. Suggestions on how to test are very welcome. llvm-svn: 230047
* Use unreachable instead of assert(false) to silence MSVC warningReid Kleckner2015-02-201-1/+1
| | | | llvm-svn: 230045
OpenPOWER on IntegriCloud