summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Only use LiveIntervals in TwoAddressInstructionPass, not a mix of LiveintervalsCameron Zwarich2013-02-201-6/+4
| | | | | | and SlotIndexes. llvm-svn: 175674
* Find anchoring end points for repairIntervalsInRange and repairIndexesInRangeCameron Zwarich2013-02-203-12/+21
| | | | | | automatically. llvm-svn: 175673
* Make repairIntervalsInRange() more robust. There are now no longer any liveness-Cameron Zwarich2013-02-201-15/+58
| | | | | | | | | related failures when running 'make check' without LiveVariables with the verifier enabled. Some of the remaining failures elsewhere may still be fallout from incorrect updating of LiveIntervals or the few missing cases left in the two-address pass. llvm-svn: 175672
* DAGCombiner: Fold pointless truncate, bitcast, buildvector seriesArnold Schwaighofer2013-02-201-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | (2xi32) (truncate ((2xi64) bitcast (buildvector i32 a, i32 x, i32 b, i32 y))) can be folded into a (2xi32) (buildvector i32 a, i32 b). Such a DAG would cause uneccessary vdup instructions followed by vmovn instructions. We generate this code on ARM NEON for a setcc olt, 2xf64, 2xf64. For example, in the vectorized version of the code below. double A[N]; double B[N]; void test_double_compare_to_double() { int i; for(i=0;i<N;i++) A[i] = (double)(A[i] < B[i]); } radar://13191881 Fixes bug 15283. llvm-svn: 175670
* Update TargetLowering ivars for name policy.Jim Grosbach2013-02-201-5/+5
| | | | | | | | | | | http://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly ivars should be camel-case and start with an upper-case letter. A few in TargetLowering were starting with a lower-case letter. No functional change intended. llvm-svn: 175667
* Use LiveRangeUpdater instead of mergeIntervalRanges.Jakob Stoklund Olesen2013-02-201-140/+11
| | | | | | | Performance is the same, but LiveRangeUpdater has a more flexible interface. llvm-svn: 175645
* Add a LiveRangeUpdater class.Jakob Stoklund Olesen2013-02-201-0/+200
| | | | | | | | | | | | | | | | | | Adding new segments to large LiveIntervals can be expensive because the LiveRange objects after the insertion point may need to be moved left or right. This can cause quadratic behavior when adding a large number of segments to a live range. The LiveRangeUpdater class allows the LIveInterval to be in a temporary invalid state while segments are being added. It maintains an internal gap in the LiveInterval when it is shrinking, and it has a spill area for new segments when the LiveInterval is growing. The behavior is similar to the existing mergeIntervalRanges() function, except it allocates less memory for the spill area, and the algorithm is turned inside out so the loop is driven by the clients. llvm-svn: 175644
* Fix PR15267Michael Liao2013-02-201-14/+119
| | | | | | | | | - When extloading from a vector with non-byte-addressable element, e.g. <4 x i1>, the current logic breaks. Extend the current logic to fix the case where the element type is not byte-addressable by loading all bytes, bit-extracting/packing each element. llvm-svn: 175642
* Move the SplatByte helper to APInt and generalize it a bit.Benjamin Kramer2013-02-202-29/+7
| | | | llvm-svn: 175621
* Fully qualify llvm::next to avoid ambiguity when building as C++11.David Blaikie2013-02-202-3/+4
| | | | llvm-svn: 175608
* Add support to the two-address pass for updating LiveIntervals in many of theCameron Zwarich2013-02-202-14/+102
| | | | | | | common transformations. This includes updating repairIntervalsInRange() to handle more cases. llvm-svn: 175604
* Move the computation of the IsEarlyClobber flag into its own loop, since theCameron Zwarich2013-02-201-1/+5
| | | | | | | correct value is needed in every iteration of the loop for updating LiveIntervals. llvm-svn: 175603
* Add SlotIndexes::repairIndexesInRange(), which repairs SlotIndexes after addingCameron Zwarich2013-02-202-0/+63
| | | | | | | | | | and removing instructions. The implementation seems more complicated than it needs to be, but I couldn't find something simpler that dealt with all of the corner cases. Also add a call to repairIndexesInRange() from repairIntervalsInRange(). llvm-svn: 175601
* Remove verification after PHIElimination when using LiveIntervals, and move itCameron Zwarich2013-02-202-3/+3
| | | | | | | after the two-address pass. The remaining problems in 'make check' are occurring later. llvm-svn: 175598
* Avoid recomputing an inserted instruction's SlotIndex.Cameron Zwarich2013-02-201-2/+1
| | | | llvm-svn: 175597
* Add preservation of SlotIndexes to PHIElimination.Cameron Zwarich2013-02-201-0/+1
| | | | llvm-svn: 175596
* Fix #includes, so we include only what we really need.Jakub Staszak2013-02-201-1/+1
| | | | llvm-svn: 175581
* Assert that the target provided hints are in the allocation order.Jakob Stoklund Olesen2013-02-191-0/+5
| | | | | | | | | | Target implementations of getRegAllocationHints() should use the provided allocation order, and they can never return hints outside the order. This is already documented in TargetRegisterInfo.h. <rdar://problem/13240556> llvm-svn: 175540
* Fix GCMetadaPrinter::finishAssembly not executed, patch by Yiannis Tsiouris.Benjamin Kramer2013-02-192-40/+3
| | | | | | | | | | | Due to the execution order of doFinalization functions, the GC information were deleted before AsmPrinter::doFinalization was executed. Thus, the GCMetadataPrinter::finishAssembly was never called. The patch fixes that by moving the code of the GCInfoDeleter::doFinalization to Printer::doFinalization. llvm-svn: 175528
* More const correcting of stack coloring.Craig Topper2013-02-191-8/+8
| | | | llvm-svn: 175490
* Const-correct the stack coloring code.Craig Topper2013-02-191-18/+15
| | | | llvm-svn: 175488
* Avoid extra DenseMap lookups in StackColoring::calculateLocalLiveness.Craig Topper2013-02-191-18/+32
| | | | llvm-svn: 175487
* Make the dump() function const and reduce the number of hash lookups it ↵Craig Topper2013-02-191-11/+17
| | | | | | performs. llvm-svn: 175485
* Use a reference into the BlockLiveness DenseMap to avoid repeated hash ↵Craig Topper2013-02-191-6/+9
| | | | | | lookups in collectMarkers. llvm-svn: 175484
* Support for HiPE-compatible code emission, patch by Yiannis Tsiouris.Benjamin Kramer2013-02-181-0/+8
| | | | llvm-svn: 175457
* [ms-inline asm] Remove a redundant call to the setHasMSInlineAsm function.Chad Rosier2013-02-181-2/+1
| | | | llvm-svn: 175456
* [ms-inline asm] Fix undefined behavior to reset hasMSInlineAsm in advance of ↵NAKAMURA Takumi2013-02-181-0/+1
| | | | | | SelectAllBasicBlocks(). llvm-svn: 175422
* Remove use of reverse iterators in repairIntervalsInRange(). While they wereCameron Zwarich2013-02-172-16/+13
| | | | | | | arguably better than forward iterators for this use case, they are confusing and there are some implementation problems with reverse iterators and MI bundles. llvm-svn: 175393
* Use ArrayRef instead of a reference to a SmallVectorImpl.Cameron Zwarich2013-02-171-1/+1
| | | | llvm-svn: 175385
* Fix a conversion from a forward iterator to a reverse iterator inCameron Zwarich2013-02-171-6/+7
| | | | | | | | | | | MachineBasicBlock::SplitCriticalEdge. Since this is an iterator rather than an instr_iterator, the isBundled() check only passes if getFirstTerminator() returned end() and the garbage memory happens to lean that way. Multiple successors can be present without any terminator instructions in the case of exception handling with a fallthrough. llvm-svn: 175383
* Add support for updating the LiveIntervals of registers used by 'exotic'Cameron Zwarich2013-02-172-0/+65
| | | | | | | | | | | | terminators that actually have register uses when splitting critical edges. This commit also introduces a method repairIntervalsInRange() on LiveIntervals, which allows for repairing LiveIntervals in a small range after an arbitrary target hook modifies, inserts, and removes instructions. It's pretty limited right now, but I hope to extend it to support all of the things that are done by the convertToThreeAddress() target hooks. llvm-svn: 175382
* Replace erase loop with std::remove_if.Benjamin Kramer2013-02-161-6/+5
| | | | | | This avoids unnecessary copies. No functionality change. llvm-svn: 175367
* Replace loop with std::find.Benjamin Kramer2013-02-161-10/+4
| | | | | | No functionality change. llvm-svn: 175366
* LegalizeDAG.cpp doesn't need DenseMap.Jakub Staszak2013-02-161-1/+0
| | | | llvm-svn: 175365
* Use const reference instead of vector object when passing an argument toJakub Staszak2013-02-161-1/+1
| | | | | | updateScheduledPressure method. llvm-svn: 175362
* [ms-inline asm] Do not omit the frame pointer if we have ms-inline assembly.Chad Rosier2013-02-161-14/+17
| | | | | | | | | | | If the frame pointer is omitted, and any stack changes occur in the inline assembly, e.g.: "pusha", then any C local variable or C argument references will be incorrect. I pass no judgement on anyone who would do such a thing. ;) rdar://13218191 llvm-svn: 175334
* Use the 'target-features' and 'target-cpu' attributes to reset the subtarget ↵Bill Wendling2013-02-151-0/+4
| | | | | | | | | | features. If two functions require different features (e.g., `-mno-sse' vs. `-msse') then we want to honor that, especially during LTO. We can do that by resetting the subtarget's features depending upon the 'target-feature' attribute. llvm-svn: 175314
* enable SDISel sincos optimization for GNU environmentsPaul Redmond2013-02-152-9/+33
| | | | | | | | | | | | - add sincos to runtime library if target triple environment is GNU - added canCombineSinCosLibcall() which checks that sincos is in the RTL and if the environment is GNU then unsafe fpmath is enabled (required to preserve errno) - extended sincos-opt lit test Reviewed by: Hal Finkel llvm-svn: 175283
* Make helpers static. Add missing include so LLVMInitializeObjCARCOpts gets C ↵Benjamin Kramer2013-02-151-1/+1
| | | | | | linkage. llvm-svn: 175264
* Dont merge consecutive loads/stores into vectors when noimplicitfloat is used.Nadav Rotem2013-02-141-6/+6
| | | | llvm-svn: 175190
* Add some legality checks for SETCC before introducing it in the DAG combiner ↵Owen Anderson2013-02-141-2/+6
| | | | | | post-operand legalization. llvm-svn: 175149
* RegisterCoalescer::reMaterializeTrivialDef() can constrain the destinationCameron Zwarich2013-02-141-1/+1
| | | | | | register class to match the defining instruction. llvm-svn: 175130
* Fix RegisterCoalescer::rematerializeTrivialDef() so that it works on flippedCameron Zwarich2013-02-141-10/+10
| | | | | | | CoalescerPairs. Also, make it take a CoalescerPair directly like other methods of RegisterCoalescer. llvm-svn: 175123
* Fix some issues with rematerialization in RegisterCoalescer when the destinationCameron Zwarich2013-02-141-0/+10
| | | | | | | | | | | | of the copy is a subregister def. The current code assumes that it can do a full def of the destination register, but it is not checking that the def operand is read-undef. It also doesn't clear the subregister index of the destination in the new instruction to reflect the full subregister def. These issues were found running 'make check' with my next commit that enables rematerialization in more cases. llvm-svn: 175122
* Clean up LDV, no functionality change.Manman Ren2013-02-132-64/+19
| | | | | | | | Remove dead functions: renameRegister Move private member variables from LDV to Impl Remove ssp/uwtable from testing case llvm-svn: 175072
* MIsched: HazardRecognizers are created for each DAG. Free them.Andrew Trick2013-02-131-1/+6
| | | | llvm-svn: 175067
* Fix comment.Eric Christopher2013-02-131-2/+2
| | | | llvm-svn: 175024
* Debug Info: LiveDebugVarible can remove DBG_VALUEs, make sure we emit them back.Manman Ren2013-02-133-14/+16
| | | | | | | | | | | | | | RegisterCoalescer used to depend on LiveDebugVariable. LDV removes DBG_VALUEs without emitting them at the end. We fix this by removing LDV from RegisterCoalescer. Also add an assertion to make sure we call emitDebugValues if DBG_VALUEs are removed at runOnMachineFunction. rdar://problem/13183203 Reviewed by Andy & Jakob llvm-svn: 175023
* Add static cast to unsigned char whenever a character classification ↵Guy Benyei2013-02-122-2/+2
| | | | | | function is called with a signed char argument, in order to avoid assertions in Windows Debug configuration. llvm-svn: 175006
* Allow optionally generating pubnames section in DWARF info. IntroduceKrzysztof Parzyszek2013-02-124-2/+83
| | | | | | option "generate-dwarf-pubnames" to control it, set to "false" by default. llvm-svn: 174981
OpenPOWER on IntegriCloud