summaryrefslogtreecommitdiff
path: root/lib/CodeGen
Commit message (Collapse)AuthorAge
* Convert several loops over MachineFunction basic blocks to range-based loopsAlexey Samsonov2014-04-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207683 91177308-0d34-0410-b5e6-96231b3b80d8
* Use makeArrayRef insted of calling ArrayRef<T> constructor directly. I ↵Craig Topper2014-04-30
| | | | | | introduced most of these recently. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207616 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some 80 cols violations committed in r207539David Blaikie2014-04-29
| | | | | | Caught by Eric Christopher in post-commit review. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207595 91177308-0d34-0410-b5e6-96231b3b80d8
* raw_ostream: Forward declare OpenFlags and include FileSystem.h only where ↵Benjamin Kramer2014-04-29
| | | | | | necessary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207593 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy up whitespace.Jim Grosbach2014-04-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207583 91177308-0d34-0410-b5e6-96231b3b80d8
* DwarfDebug: Split the initialization of abstract and non-abstract subprogram ↵David Blaikie2014-04-29
| | | | | | | | | | | 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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207539 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Add 'override' keywords and remove 'virtual'. Additionally add ↵Craig Topper2014-04-29
| | | | | | 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207511 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove DwarfUnit::LabelRange since it's unused.David Blaikie2014-04-28
| | | | | | | | | | | 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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207464 91177308-0d34-0410-b5e6-96231b3b80d8
* AddressPool::HasBeenUsed: Add comment explaining the use-case for this flag.David Blaikie2014-04-28
| | | | | | Based on code review by Eric Christopher on r207323 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207460 91177308-0d34-0410-b5e6-96231b3b80d8
* DIE: Document some learnings about why the world isn't perfect.David Blaikie2014-04-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207458 91177308-0d34-0410-b5e6-96231b3b80d8
* Satisfy sub-optimal GCC warning.David Blaikie2014-04-28
| | | | | | | | (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) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207456 91177308-0d34-0410-b5e6-96231b3b80d8
* We already calculate WideVT above, just reuse it.Eric Christopher2014-04-28
| | | | | | Patch by Jan Vesely <jan.vesely@rutgers.edu>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207455 91177308-0d34-0410-b5e6-96231b3b80d8
* Add (...) around && clause to appeace gcc 4.8's warningEli Bendersky2014-04-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207452 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Just store the DIE by value in the DwarfUnitDavid Blaikie2014-04-28
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207448 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass DIEs to DwarfUnit constructors by unique_ptr.David Blaikie2014-04-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207447 91177308-0d34-0410-b5e6-96231b3b80d8
* Reformat, 80-col, tab characters, etc.Eric Christopher2014-04-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207444 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve explicit memory ownership of DIEsDavid Blaikie2014-04-28
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207442 91177308-0d34-0410-b5e6-96231b3b80d8
* DwarfDebug: Omit DW_AT_object_pointer on inlined_subroutinesDavid Blaikie2014-04-28
| | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207441 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert more SelectionDAG functions to use ArrayRef.Craig Topper2014-04-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207397 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++] Use 'nullptr'.Craig Topper2014-04-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207394 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert AddNodeIDNode and SelectionDAG::getNodeIfExiists to use ↵Craig Topper2014-04-27
| | | | | | ArrayRef<SDValue> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207383 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert SelectionDAGISel::MorphNode to use ArrayRef.Craig Topper2014-04-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207379 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert SelectionDAG::MorphNodeTo to use ArrayRef.Craig Topper2014-04-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207378 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert SelectionDAG::SelectNodeTo to use ArrayRef.Craig Topper2014-04-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207377 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert one last signature of getNode to take an ArrayRef of SDUse.Craig Topper2014-04-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207376 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert SDNode constructor to use ArrayRef.Craig Topper2014-04-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207375 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert SelectionDAG::getMergeValues to use ArrayRef.Craig Topper2014-04-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207374 91177308-0d34-0410-b5e6-96231b3b80d8
* Const-correct SelectionDAG::getAtomic.Craig Topper2014-04-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207373 91177308-0d34-0410-b5e6-96231b3b80d8
* Clarify the doxygen comment for AsmPrinter::EmitDwarfRegOpPiece and addAdrian Prantl2014-04-27
| | | | | | | | default arguments to the function. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207372 91177308-0d34-0410-b5e6-96231b3b80d8
* X86TTI: Adjust sdiv cost now that we can lower it on plain SSE2.Benjamin Kramer2014-04-27
| | | | | | | Includes a fix for a horrible typo that caused all SDIV costs to be slightly off :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207371 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug info: Refactor EmitDwarfRegOpPiece to be a member function ofAdrian Prantl2014-04-27
| | | | | | | | | | AsmPrinter. No functional change. http://reviews.llvm.org/D3373 rdar://problem/15928306 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207369 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: Prepare DebugLocEntry to handle more than a single value perAdrian Prantl2014-04-27
| | | | | | | | | | entry. This is in preparation for generic DW_OP_piece support. No functional change so far. http://reviews.llvm.org/D3373 rdar://problem/15928306 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207368 91177308-0d34-0410-b5e6-96231b3b80d8
* Make helper functions static.Benjamin Kramer2014-04-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207359 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove redundant explicit default initialization of non-trivially ↵David Blaikie2014-04-27
| | | | | | constructed member. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207357 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the default constructor DwarfAccelTable::DataArray() to initialize ↵NAKAMURA Takumi2014-04-27
| | | | | | | | (MCSymbol*)StrSym explicitly. It will fix crash in codegen on msvc x64. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207356 91177308-0d34-0410-b5e6-96231b3b80d8
* SelectionDAG: Aggressively fold shuffles of constant splats.Benjamin Kramer2014-04-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207352 91177308-0d34-0410-b5e6-96231b3b80d8
* DAGCombiner: Simplify code a bit, make more transforms work with vectors.Benjamin Kramer2014-04-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207338 91177308-0d34-0410-b5e6-96231b3b80d8
* DwarfDebug: Roll argument into call.David Blaikie2014-04-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207334 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Fix and test a regression caused by r207263 causing the ↵David Blaikie2014-04-26
| | | | | | | | DW_AT_object_pointer to go missing on blocks Noticed by inspection. Test coverage added. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207333 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert getMemIntrinsicNode to take ArrayRef of SDValue instead of pointer ↵Craig Topper2014-04-26
| | | | | | and size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207329 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert SelectionDAG::getNode methods to use ArrayRef<SDValue>.Craig Topper2014-04-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207327 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove an unused version of getMemIntrinsicNode and getNode. Additionally, ↵Craig Topper2014-04-26
| | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207326 91177308-0d34-0410-b5e6-96231b3b80d8
* DWARF Type Units: Avoid emitting type units under fission if the type ↵David Blaikie2014-04-26
| | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207323 91177308-0d34-0410-b5e6-96231b3b80d8
* DwarfDebug: Minor refactoring around type unit constructionDavid Blaikie2014-04-26
| | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207321 91177308-0d34-0410-b5e6-96231b3b80d8
* Rip out X86-specific vector SDIV lowering, make the corresponding ↵Benjamin Kramer2014-04-26
| | | | | | DAGCombiner transform work on vectors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207316 91177308-0d34-0410-b5e6-96231b3b80d8
* DAGCombiner: Turn divs of vector splats into vectorized multiplications.Benjamin Kramer2014-04-26
| | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207315 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r206749 till a final decision about the intrinsics is made.Michael Zolotukhin2014-04-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207313 91177308-0d34-0410-b5e6-96231b3b80d8
* [DAG] During DAG legalization keep opaque constants even after expanding.Juergen Ributzka2014-04-26
| | | | | | | | | | | | | | | | | | | | | The included test case would return the incorrect results, because the expansion of an shift with a constant shift amount of 0 would generate undefined behavior. This is because ExpandShiftByConstant assumes that all shifts by constants with a value of 0 have already been optimized away. This doesn't happen for opaque constants and usually this isn't a problem, because opaque constants won't take this code path - they are not supposed to. In the case that the opaque constant has to be expanded by the legalizer, the legalizer would drop the opaque flag. In this case we hit the limitations of ExpandShiftByConstant and create incorrect code. This commit fixes the legalizer by not dropping the opaque flag when expanding opaque constants and adding an assertion to ExpandShiftByConstant to catch this not supported case in the future. This fixes <rdar://problem/16718472> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207304 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure that rangelists are also relative to the compile unitEric Christopher2014-04-25
| | | | | | | | low_pc similar to location lists. Fixes PR19563 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207283 91177308-0d34-0410-b5e6-96231b3b80d8
* DwarfAccelTable: Store the string symbol in the accelerator table to avoid ↵David Blaikie2014-04-25
| | | | | | | | | | duplicate lookup. This also avoids the need for subtly side-effecting calls to manifest strings in the string table at the point where items are added to the accelerator tables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207281 91177308-0d34-0410-b5e6-96231b3b80d8