summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Const-correct SelectionDAG::getAtomic.Craig Topper2014-04-271-2/+2
| | | | llvm-svn: 207373
* Clarify the doxygen comment for AsmPrinter::EmitDwarfRegOpPiece and addAdrian Prantl2014-04-271-6/+6
| | | | | | | | default arguments to the function. No functional change. llvm-svn: 207372
* X86TTI: Adjust sdiv cost now that we can lower it on plain SSE2.Benjamin Kramer2014-04-271-1/+1
| | | | | | | Includes a fix for a horrible typo that caused all SDIV costs to be slightly off :) llvm-svn: 207371
* Debug info: Refactor EmitDwarfRegOpPiece to be a member function ofAdrian Prantl2014-04-271-18/+45
| | | | | | | | | | AsmPrinter. No functional change. http://reviews.llvm.org/D3373 rdar://problem/15928306 llvm-svn: 207369
* Debug Info: Prepare DebugLocEntry to handle more than a single value perAdrian Prantl2014-04-272-90/+86
| | | | | | | | | | entry. This is in preparation for generic DW_OP_piece support. No functional change so far. http://reviews.llvm.org/D3373 rdar://problem/15928306 llvm-svn: 207368
* Make helper functions static.Benjamin Kramer2014-04-272-3/+3
| | | | llvm-svn: 207359
* Remove redundant explicit default initialization of non-trivially ↵David Blaikie2014-04-271-1/+1
| | | | | | constructed member. llvm-svn: 207357
* Add the default constructor DwarfAccelTable::DataArray() to initialize ↵NAKAMURA Takumi2014-04-271-0/+1
| | | | | | | | (MCSymbol*)StrSym explicitly. It will fix crash in codegen on msvc x64. llvm-svn: 207356
* SelectionDAG: Aggressively fold shuffles of constant splats.Benjamin Kramer2014-04-271-0/+5
| | | | llvm-svn: 207352
* DAGCombiner: Simplify code a bit, make more transforms work with vectors.Benjamin Kramer2014-04-261-58/+37
| | | | llvm-svn: 207338
* DwarfDebug: Roll argument into call.David Blaikie2014-04-261-10/+6
| | | | llvm-svn: 207334
* DebugInfo: Fix and test a regression caused by r207263 causing the ↵David Blaikie2014-04-261-1/+1
| | | | | | | | DW_AT_object_pointer to go missing on blocks Noticed by inspection. Test coverage added. llvm-svn: 207333
* Convert getMemIntrinsicNode to take ArrayRef of SDValue instead of pointer ↵Craig Topper2014-04-262-11/+9
| | | | | | and size. llvm-svn: 207329
* Convert SelectionDAG::getNode methods to use ArrayRef<SDValue>.Craig Topper2014-04-269-249/+183
| | | | llvm-svn: 207327
* Remove an unused version of getMemIntrinsicNode and getNode. Additionally, ↵Craig Topper2014-04-261-20/+0
| | | | | | these were calling makeVTList with the pointers passed in which would were unlikely to belong to SelectionDAG and likely would have just been stack pointers. llvm-svn: 207326
* DWARF Type Units: Avoid emitting type units under fission if the type ↵David Blaikie2014-04-265-7/+54
| | | | | | | | | | | | requires an address. Since there's no way to ensure the type unit in the .dwo and the type unit skeleton in the .o are correlated, this cannot work. This implementation is a bit inefficient for a few reasons, called out in comments. llvm-svn: 207323
* DwarfDebug: Minor refactoring around type unit constructionDavid Blaikie2014-04-262-16/+21
| | | | | | | | | | | | | Sinking addition of the declaration attribute down to where the signature is added. So that if the signature is not added neither is the declaration attribute (this will come in handy when aborting type unit construction to instead emit the type into the CU directly in some cases) Pull out type unit identifier hashing just to simplify the function a little, it'll be getting longer. llvm-svn: 207321
* Rip out X86-specific vector SDIV lowering, make the corresponding ↵Benjamin Kramer2014-04-261-13/+24
| | | | | | DAGCombiner transform work on vectors. llvm-svn: 207316
* DAGCombiner: Turn divs of vector splats into vectorized multiplications.Benjamin Kramer2014-04-262-24/+54
| | | | | | | | | | | | Otherwise the legalizer would just scalarize everything. Support for mulhi in the targets isn't that great yet so on most targets we get exactly the same scalarized output. Add a test for x86 vector udiv. I had to disable the mulhi nodes on ARM because there aren't any patterns for it. As far as I know ARM has instructions for getting the high part of a multiply so this should be fixed. llvm-svn: 207315
OpenPOWER on IntegriCloud