summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Implememting named register intrinsicsRenato Golin2014-05-064-0/+55
| | | | | | | | | | | This patch implements the infrastructure to use named register constructs in programs that need access to specific registers (bare metal, kernels, etc). So far, only the stack pointer is supported as a technology preview, but as it is, the intrinsic can already support all non-allocatable registers from any architecture. llvm-svn: 208104
* Try simplifying LexicalScopes ownership again.David Blaikie2014-05-021-28/+32
| | | | | | | | | | | | | | Committed initially in r207724-r207726 and reverted due to compiler-rt crashes in r207732. Instead, fix this harder with unordered_map and store the LexicalScopes by value in the map. This did necessitate moving the definition of LexicalScope above the definition of LexicalScopes. Let's see how the buildbots/compilers tolerate unordered_map::emplace + std::piecewise_construct + std::forward_as_tuple... llvm-svn: 207876
* Satisfy GCC's urgent need for parentheses around ‘&&’ within ‘||’.Benjamin Kramer2014-05-021-2/+2
| | | | llvm-svn: 207871
* DAGCombine: prevent formation of illegal ConstantFP nodes.Tim Northover2014-05-021-5/+10
| | | | llvm-svn: 207850
* Allow SelectionDAG::FoldConstantArithmetic to work when it's called with a ↵Benjamin Kramer2014-05-021-2/+8
| | | | | | vector VT but scalar values. llvm-svn: 207835
* [Stackmaps] Pacify windows buildbot.Juergen Ributzka2014-05-011-0/+3
| | | | llvm-svn: 207807
* [Stackmaps] Add command line option to specify the stackmap version.Juergen Ributzka2014-05-011-1/+10
| | | | llvm-svn: 207805
* [Stackmaps] Refactor serialization code. No functional change intended.Juergen Ributzka2014-05-011-125/+144
| | | | llvm-svn: 207804
* [Stackmaps] Replace the custom ConstantPool class with a MapVector.Juergen Ributzka2014-05-011-5/+7
| | | | llvm-svn: 207803
* Speculatively roll back r207724-r207726, which are code cleanup changes andRichard Smith2014-05-011-30/+25
| | | | | | appear to be breaking a bootstrapped build of compiler-rt. llvm-svn: 207732
* LexicalScopes: Use unique_ptr to manage ownership of abstract LexicalScopes.David Blaikie2014-04-301-8/+9
| | | | llvm-svn: 207726
* Forgotten reformatting.David Blaikie2014-04-301-5/+9
| | | | llvm-svn: 207725
* LexicalScopes: use unique_ptr to own LexicalScope objects.David Blaikie2014-04-301-16/+16
| | | | | | Ownership of abstract scopes coming soon. llvm-svn: 207724
* Use a single data structure to store all user variables in DwarfDebugAlexey Samsonov2014-04-303-19/+15
| | | | | | | | | | | | | | | | | | Summary: Get rid of UserVariables set, and turn DbgValues into MapVector to get a fixed ordering, as suggested in review for http://reviews.llvm.org/D3573. Test Plan: llvm regression tests Reviewers: dblaikie Reviewed By: dblaikie Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D3579 llvm-svn: 207720
* Revert "Emit DW_AT_object_pointer once, on the declaration, for each function."David Blaikie2014-04-304-18/+8
| | | | | | | | | | | | | | Breaks GDB buildbot (http://lab.llvm.org:8011/builders/clang-x86_64-ubuntu-gdb-75/builds/14517) GCC emits DW_AT_object_pointer /everywhere/ (declaration, abstract definition, inlined subroutine), but it looks like GCC relies on it being somewhere other than the declaration, at least. I'll experiment further & can hopefully still remove it from the inlined_subroutine. This reverts commit r207705. llvm-svn: 207719
* Prepare support of Itanium ABI on ARM as opposed to EHABI byJoerg Sonnenberger2014-04-301-2/+4
| | | | | | conditionally emitting .fnstart and friends only for EHABI. llvm-svn: 207718
* DebugInfo: Omit DW_AT_artificial on DW_TAG_formal_parameters in ↵David Blaikie2014-04-303-20/+32
| | | | | | | | | | | | DW_TAG_inlined_subroutines. They just don't need to be there - they're inherited from the abstract definition. In theory I would like them to be inherited from the declaration, but the DWARF standard doesn't quite say that... we can probably do it anyway but I'm less confident about that so I'll leave it for a separate commit. llvm-svn: 207717
* Convert more loops to range-based equivalentsAlexey Samsonov2014-04-3013-130/+103
| | | | llvm-svn: 207714
* Slightly simplify code in DwarfDebug::beginFunctionAlexey Samsonov2014-04-301-7/+5
| | | | llvm-svn: 207710
* Move logic for calculating DBG_VALUE history map into separate file/class.Alexey Samsonov2014-04-305-124/+207
| | | | | | | | | | | | | | | | Summary: No functionality change. Test Plan: llvm regression test suite. Reviewers: dblaikie Reviewed By: dblaikie Subscribers: echristo, llvm-commits Differential Revision: http://reviews.llvm.org/D3573 llvm-svn: 207708
* Emit DW_AT_object_pointer once, on the declaration, for each function.David Blaikie2014-04-304-8/+18
| | | | | | | | | | | | | | | | This effectively reverts r164326, but adds some comments and justification and ensures we /don't/ emit the DW_AT_object_pointer on the (abstract and concrete) definitions. (while still preserving it on standalone definitions involving ObjC Blocks) This does increase the size of member function declarations from 7 to 11 bytes, unfortunately, but still seems like the Right Thing to do so that callers that see only the declaration still have the information about the object pointer. That said, I don't know what, if any, DWARF consumers don't have a heuristic to guess this in the case of normal C++ member functions - perhaps we can remove it entirely. llvm-svn: 207705
* [ARM64] Prevent bit extraction to be adjusted by following shiftWeiming Zhao2014-04-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | For pattern like ((x >> C1) & Mask) << C2, DAG combiner may convert it into (x >> (C1-C2)) & (Mask << C2), which makes pattern matching of ubfx more difficult. For example: Given %shr = lshr i64 %x, 4 %and = and i64 %shr, 15 %arrayidx = getelementptr inbounds [8 x [64 x i64]]* @arr, i64 0, %i64 2, i64 %and %0 = load i64* %arrayidx With current shift folding, it takes 3 instrs to compute base address: lsr x8, x0, #1 and x8, x8, #0x78 add x8, x9, x8 If using ubfx, it only needs 2 instrs: ubfx x8, x0, #4, #4 add x8, x9, x8, lsl #3 This fixes bug 19589 llvm-svn: 207702
* Fix the clang-cl self-host build by defining ~DwarfDebug out of lineReid Kleckner2014-04-302-0/+5
| | | | | | | | | | | | DwarfDebug.h has a SmallVector member containing a unique_ptr of an incomplete type. MSVC doesn't have key functions, so the vtable and dtor are emitted in AsmPrinter.cpp, where DwarfDebug's ctor is called. AsmPrinter.cpp include DwarfUnit.h and doesn't get a complete definition of DwarfTypeUnit. We could fix the problem by including DwarfUnit.h in DwarfDebug.h, but that would increase header bloat. Instead, define ~DwarfDebug out of line. llvm-svn: 207701
* Convert several loops over MachineFunction basic blocks to range-based loopsAlexey Samsonov2014-04-307-58/+42
| | | | llvm-svn: 207683
* Use makeArrayRef insted of calling ArrayRef<T> constructor directly. I ↵Craig Topper2014-04-305-14/+12
| | | | | | introduced most of these recently. llvm-svn: 207616
* Fix some 80 cols violations committed in r207539David Blaikie2014-04-292-4/+8
| | | | | | Caught by Eric Christopher in post-commit review. llvm-svn: 207595
* raw_ostream: Forward declare OpenFlags and include FileSystem.h only where ↵Benjamin Kramer2014-04-292-0/+2
| | | | | | necessary. llvm-svn: 207593
* Tidy up whitespace.Jim Grosbach2014-04-291-7/+7
| | | | llvm-svn: 207583
* DwarfDebug: Split the initialization of abstract and non-abstract subprogram ↵David Blaikie2014-04-292-33/+43
| | | | | | | | | | | DIEs. These were called from distinct places and had significant distinct behavior. No need to make that a dynamic check inside the function rather than just having two functions (refactoring some common code into a helper function to be called from the two separate functions). llvm-svn: 207539
* [C++11] Add 'override' keywords and remove 'virtual'. Additionally add ↵Craig Topper2014-04-292-6/+6
| | | | | | 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. llvm-svn: 207511
* Remove DwarfUnit::LabelRange since it's unused.David Blaikie2014-04-283-13/+0
| | | | | | | | | | | Seems at some point the intent was to emit fission ranges_base as unique per CU but the code today emits ranges_base as the start of the ranges section for all CUs being compiled and all the ranges_base relative addresses are relative to that. So removing this dead code and leaving the status quo until there's a reason to change it (perhaps something's faster if it has distinct ranges for each CU). llvm-svn: 207464
* AddressPool::HasBeenUsed: Add comment explaining the use-case for this flag.David Blaikie2014-04-281-0/+5
| | | | | | Based on code review by Eric Christopher on r207323 llvm-svn: 207460
* DIE: Document some learnings about why the world isn't perfect.David Blaikie2014-04-281-0/+6
| | | | llvm-svn: 207458
* Satisfy sub-optimal GCC warning.David Blaikie2014-04-281-4/+4
| | | | | | | | (Clang doesn't warn here because it knows the string is benign - the assert still checks what it's intended to - though putting the correct parens does make clang-format format the code a little better) llvm-svn: 207456
* We already calculate WideVT above, just reuse it.Eric Christopher2014-04-281-2/+1
| | | | | | Patch by Jan Vesely <jan.vesely@rutgers.edu>. llvm-svn: 207455
* Add (...) around && clause to appeace gcc 4.8's warningEli Bendersky2014-04-281-3/+3
| | | | llvm-svn: 207452
* DebugInfo: Just store the DIE by value in the DwarfUnitDavid Blaikie2014-04-283-40/+37
| | | | | | | | | Since all 4 ctor calls in DwarfDebug just pass in a trivially constructed DIE with the right tag type, sink the tag selection down into the Dwarf*Unit ctors (removing the argument entirely from callers in DwarfDebug) and initialize the DIE member in DwarfUnit. llvm-svn: 207448
* Pass DIEs to DwarfUnit constructors by unique_ptr.David Blaikie2014-04-283-42/+45
| | | | llvm-svn: 207447
* Reformat, 80-col, tab characters, etc.Eric Christopher2014-04-281-14/+13
| | | | llvm-svn: 207444
* Improve explicit memory ownership of DIEsDavid Blaikie2014-04-282-23/+26
| | | | | | | | | | Now that the subtle constructScopeDIE has been refactored into two functions - one returning memory to take ownership of, one returning a pointer to already owning memory - push unique_ptr through more APIs. I think this completes most of the unique_ptr ownership of DIEs. llvm-svn: 207442
* DwarfDebug: Omit DW_AT_object_pointer on inlined_subroutinesDavid Blaikie2014-04-282-27/+52
| | | | | | | | | | | | | | | | While refactoring out constructScopeDIE into two functions I realized we were emitting DW_AT_object_pointer in the inlined subroutine when we didn't need to (GCC doesn't, and the abstract subprogram definition has the information already). So here's the refactoring and the bug fix. This is one step of refactoring to remove some subtle memory ownership semantics. It turns out the original constructScopeDIE returned ownership in its return value in some cases and not in others. The split into two functions now separates those two semantics - further cleanup (unique_ptr, etc) will follow. llvm-svn: 207441
* Convert more SelectionDAG functions to use ArrayRef.Craig Topper2014-04-284-32/+32
| | | | llvm-svn: 207397
* [C++] Use 'nullptr'.Craig Topper2014-04-286-14/+14
| | | | llvm-svn: 207394
* Convert AddNodeIDNode and SelectionDAG::getNodeIfExiists to use ↵Craig Topper2014-04-272-42/+42
| | | | | | ArrayRef<SDValue> llvm-svn: 207383
* Convert SelectionDAGISel::MorphNode to use ArrayRef.Craig Topper2014-04-271-5/+3
| | | | llvm-svn: 207379
* Convert SelectionDAG::MorphNodeTo to use ArrayRef.Craig Topper2014-04-273-11/+12
| | | | llvm-svn: 207378
* Convert SelectionDAG::SelectNodeTo to use ArrayRef.Craig Topper2014-04-271-22/+19
| | | | llvm-svn: 207377
* Convert one last signature of getNode to take an ArrayRef of SDUse.Craig Topper2014-04-272-8/+8
| | | | llvm-svn: 207376
* Convert SDNode constructor to use ArrayRef.Craig Topper2014-04-271-9/+8
| | | | llvm-svn: 207375
* Convert SelectionDAG::getMergeValues to use ArrayRef.Craig Topper2014-04-272-13/+10
| | | | llvm-svn: 207374
OpenPOWER on IntegriCloud