summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Revert r206749 till a final decision about the intrinsics is made.Michael Zolotukhin2014-04-262-237/+0
| | | | llvm-svn: 207313
* [DAG] During DAG legalization keep opaque constants even after expanding.Juergen Ributzka2014-04-261-3/+8
| | | | | | | | | | | | | | | | | | | | | 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> llvm-svn: 207304
* Make sure that rangelists are also relative to the compile unitEric Christopher2014-04-251-2/+9
| | | | | | | | low_pc similar to location lists. Fixes PR19563 llvm-svn: 207283
* DwarfAccelTable: Store the string symbol in the accelerator table to avoid ↵David Blaikie2014-04-253-35/+39
| | | | | | | | | | 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. llvm-svn: 207281
* Encapsulate the DWARF string pool in a separate type.David Blaikie2014-04-258-92/+146
| | | | | | | | | Pulls out some more code from some of the rather monolithic DWARF classes. Unlike the address table, the string table won't move up into DwarfDebug - each DWARF file has its own string table (but there can be only one address table). llvm-svn: 207277
* This reapplies r207235 with an additional bugfixes caught by the msanAdrian Prantl2014-04-257-37/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | buildbot - do not insert debug intrinsics before phi nodes. Debug info for optimized code: Support variables that are on the stack and described by DBG_VALUEs during their lifetime. Previously, when a variable was at a FrameIndex for any part of its lifetime, this would shadow all other DBG_VALUEs and only a single fbreg location would be emitted, which in fact is only valid for a small range and not the entire lexical scope of the variable. The included dbg-value-const-byref testcase demonstrates this. This patch fixes this by Local - emitting dbg.value intrinsics for allocas that are passed by reference - dropping all dbg.declares (they are now fully lowered to dbg.values) SelectionDAG - renamed constructors for SDDbgValue for better readability. - fix UserValue::match() to handle indirect values correctly - not inserting an MMI table entries for dbg.values that describe allocas. - lowering dbg.values that describe allocas into *indirect* DBG_VALUEs. CodeGenPrepare - leaving dbg.values for an alloca were they are (see comment) Other - regenerated/updated instcombine.ll testcase and included source rdar://problem/16679879 http://reviews.llvm.org/D3374 llvm-svn: 207269
* DwarfUnit: Remove unused functionDavid Blaikie2014-04-251-4/+0
| | | | llvm-svn: 207264
* DIE: Pass ownership of children via std::unique_ptr rather than raw pointer.David Blaikie2014-04-255-36/+40
| | | | | | | | | | | This should reduce the chance of memory leaks like those fixed in r207240. There's still some unclear ownership of DIEs happening in DwarfDebug. Pushing unique_ptr and references through more APIs should help expose the cases where ownership is a bit fuzzy. llvm-svn: 207263
* DIEEntry: Refer to the specified DIE via reference rather than pointer.David Blaikie2014-04-256-30/+29
| | | | | | | Makes some more cases (the unit tests, specifically), lexically compatible with a change to unique_ptr. llvm-svn: 207261
* DwarfUnit: return by reference from createAndAddDIEDavid Blaikie2014-04-254-53/+53
| | | | | | | Since this doesn't return ownership (the DIE has been added to the specified parent already) nor return null, just return by reference. llvm-svn: 207259
* Return DIE by reference instead of pointer from DwarfUnit::getUnitDieDavid Blaikie2014-04-254-20/+20
| | | | llvm-svn: 207255
* DwarfUnit: Suddently, DIE references, everywhere.David Blaikie2014-04-254-309/+300
| | | | | | | | This'll make changing to unique_ptr ownership of DIEs easier since the usages will now have '*' on them making them textually compatible between unique_ptr and raw pointer. llvm-svn: 207253
* Revert "This reapplies r207130 with an additional testcase+and a missing ↵Adrian Prantl2014-04-257-59/+37
| | | | | | | | check for" This reverts commit 207235 to investigate msan buildbot breakage. llvm-svn: 207250
* Refactor some common logic in DwarfUnit::constructVariableDIE and pass ↵David Blaikie2014-04-253-17/+23
| | | | | | non-null DIE by reference to DbgVariable::setDIE llvm-svn: 207244
* This reapplies r207130 with an additional testcase+and a missing check forAdrian Prantl2014-04-257-37/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AllocaInst that was missing in one location. Debug info for optimized code: Support variables that are on the stack and described by DBG_VALUEs during their lifetime. Previously, when a variable was at a FrameIndex for any part of its lifetime, this would shadow all other DBG_VALUEs and only a single fbreg location would be emitted, which in fact is only valid for a small range and not the entire lexical scope of the variable. The included dbg-value-const-byref testcase demonstrates this. This patch fixes this by Local - emitting dbg.value intrinsics for allocas that are passed by reference - dropping all dbg.declares (they are now fully lowered to dbg.values) SelectionDAG - renamed constructors for SDDbgValue for better readability. - fix UserValue::match() to handle indirect values correctly - not inserting an MMI table entries for dbg.values that describe allocas. - lowering dbg.values that describe allocas into *indirect* DBG_VALUEs. CodeGenPrepare - leaving dbg.values for an alloca were they are (see comment) Other - regenerated/updated instcombine.ll testcase and included source rdar://problem/16679879 http://reviews.llvm.org/D3374 llvm-svn: 207235
* Add missing cpp file headerDavid Blaikie2014-04-251-0/+8
| | | | | | Code review feedback from Paul Robinson on r207022 llvm-svn: 207198
* Revert "This reapplies r207130 with an additional testcase+and a missing ↵Adrian Prantl2014-04-257-59/+37
| | | | | | | | check for" Typo in testcase. llvm-svn: 207166
* This reapplies r207130 with an additional testcase+and a missing check forAdrian Prantl2014-04-257-37/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AllocaInst that was missing in one location. Debug info for optimized code: Support variables that are on the stack and described by DBG_VALUEs during their lifetime. Previously, when a variable was at a FrameIndex for any part of its lifetime, this would shadow all other DBG_VALUEs and only a single fbreg location would be emitted, which in fact is only valid for a small range and not the entire lexical scope of the variable. The included dbg-value-const-byref testcase demonstrates this. This patch fixes this by Local - emitting dbg.value intrinsics for allocas that are passed by reference - dropping all dbg.declares (they are now fully lowered to dbg.values) SelectionDAG - renamed constructors for SDDbgValue for better readability. - fix UserValue::match() to handle indirect values correctly - not inserting an MMI table entries for dbg.values that describe allocas. - lowering dbg.values that describe allocas into *indirect* DBG_VALUEs. CodeGenPrepare - leaving dbg.values for an alloca were they are (see comment) Other - regenerated/updated instcombine.ll testcase and included source rdar://problem/16679879 http://reviews.llvm.org/D3374 llvm-svn: 207165
* Revert "Debug info for optimized code: Support variables that are on the ↵Adrian Prantl2014-04-256-52/+29
| | | | | | | | stack and" This reverts commit 207130 for buildbot breakage. llvm-svn: 207162
* Remove C++11ism (specializing a template in a surrounding namespace) to ↵Richard Smith2014-04-241-3/+5
| | | | | | appease the buildbots. llvm-svn: 207136
* [modules] "Specialize" a function by actually specializing a function templateRichard Smith2014-04-241-8/+9
| | | | | | | rather than by adding an overload and hoping that it's declared before the code that calls it. (In a modules build, it isn't.) llvm-svn: 207133
* Debug info for optimized code: Support variables that are on the stack andAdrian Prantl2014-04-246-29/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | described by DBG_VALUEs during their lifetime. Previously, when a variable was at a FrameIndex for any part of its lifetime, this would shadow all other DBG_VALUEs and only a single fbreg location would be emitted, which in fact is only valid for a small range and not the entire lexical scope of the variable. The included dbg-value-const-byref testcase demonstrates this. This patch fixes this by Local - emitting dbg.value intrinsics for allocas that are passed by reference - dropping all dbg.declares (they are now fully lowered to dbg.values) SelectionDAG - renamed constructors for SDDbgValue for better readability. - fix UserValue::match() to handle indirect values correctly - not inserting an MMI table entries for dbg.values that describe allocas. - lowering dbg.values that describe allocas into *indirect* DBG_VALUEs. CodeGenPrepare - leaving dbg.values for an alloca were they are (see comment) Other - regenerated/updated instcombine-intrinsics testcase and included source rdar://problem/16679879 http://reviews.llvm.org/D3374 llvm-svn: 207130
* [C++] Use 'nullptr'.Craig Topper2014-04-2411-106/+108
| | | | llvm-svn: 207083
* Remove unused parameterDavid Blaikie2014-04-242-5/+4
| | | | llvm-svn: 207061
* Remove the intermediate AccelTypes maps in DWARF units.David Blaikie2014-04-245-37/+23
| | | | llvm-svn: 207060
* Remove the intermediate AccelNamespace maps in DWARF units.David Blaikie2014-04-244-29/+17
| | | | llvm-svn: 207059
* Remove the intermediate AccelObjC maps in DWARF unitsDavid Blaikie2014-04-244-32/+17
| | | | llvm-svn: 207057
* And actually use the DwarfDebug::AccelNames to emit the names.David Blaikie2014-04-232-18/+2
| | | | | | Fix for r207049 which would've emitted no accelerated names at all... llvm-svn: 207051
* More formatting...David Blaikie2014-04-231-1/+2
| | | | llvm-svn: 207050
* Remove intermediate accelerator table for names.David Blaikie2014-04-234-23/+27
| | | | | | (similar changes coming for the other accelerator tables) llvm-svn: 207049
* DwarfAccelTable: Remove trivial dtor and simplify construction with an array.David Blaikie2014-04-233-10/+4
| | | | llvm-svn: 207044
* Move the AddressPool from DwarfFile to DwarfDebug.David Blaikie2014-04-234-11/+10
| | | | | | | | | There's only ever one address pool, not one per DWARF output file, so let's just have one. (similar refactoring of the string pool to come soon) llvm-svn: 207026
* clang-format for my previous commit (I keep forgetting... )David Blaikie2014-04-232-0/+2
| | | | llvm-svn: 207025
* Separate out the DWARF address pool into its own type/files.David Blaikie2014-04-237-54/+87
| | | | llvm-svn: 207022
* clang-format r207010David Blaikie2014-04-231-3/+2
| | | | llvm-svn: 207016
* Split out DwarfFile from DwarfDebug into its own .h/.cpp files.David Blaikie2014-04-235-320/+367
| | | | | | | | Some of these types (DwarfDebug in particular) are quite large to begin with (and I keep forgetting whether DwarfFile is in DwarfDebug or DwarfUnit... ) so having a few smaller files seems like goodness. llvm-svn: 207010
* Create MCTargetOptions.Evgeniy Stepanov2014-04-231-1/+5
| | | | | | | | | For now it contains a single flag, SanitizeAddress, which enables AddressSanitizer instrumentation of inline assembly. Patch by Yuri Gorshenin. llvm-svn: 206971
* Requisite reformatting for previous commit.David Blaikie2014-04-221-19/+16
| | | | llvm-svn: 206927
* Push memory ownership of DwarfUnits into clients of DwarfFile.David Blaikie2014-04-223-143/+150
| | | | | | | | | | | | This prompted me to push references through most of DwarfDebug. Sorry for the churn. Honestly it's a bit silly that we're passing around units all over the place like that anyway and I think it's mostly due to the DIE attribute adding utility functions being utilities in DwarfUnit. I should have another go at moving them out of DwarfUnit... llvm-svn: 206925
* Use std::unique_ptr to handle ownership of DwarfUnits in DwarfFile.David Blaikie2014-04-222-26/+30
| | | | | | | So Chandler - how about those range algorithms? (would really love a dereferencing range adapter for this sort of stuff) llvm-svn: 206921
* Simplify address pool index assignment.David Blaikie2014-04-222-6/+2
| | | | llvm-svn: 206905
OpenPOWER on IntegriCloud