summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* PTX: Add basic register spilling codeJustin Holewinski2011-06-204-0/+135
| | | | | | | | | | | | The current implementation generates stack loads/stores, which are really just mov instructions from/to "special" registers. This may not be the most efficient implementation, compared to an approach where the stack registers are directly folded into instructions, but this is easier to implement and I have yet to see a case where ptxas is unable to see through this kind of register usage and know what is really going on. llvm-svn: 133443
* Don't apply on PPC64 the 32bit ADDIC optimizations as there's no overflowRoman Divacky2011-06-201-14/+23
| | | | | | with 32bit values. llvm-svn: 133439
* Change how PHINodes store their operands.Jay Foad2011-06-2014-121/+149
| | | | | | | | | | | | | | | | | | | Change PHINodes to store simple pointers to their incoming basic blocks, instead of full-blown Uses. Note that this loses an optimization in SplitCriticalEdge(), because we can no longer walk the use list of a BasicBlock to find phi nodes. See the comment I removed starting "However, the foreach loop is slow for blocks with lots of predecessors". Extend replaceAllUsesWith() on a BasicBlock to also update any phi nodes in the block's successors. This mimics what would have happened when PHINodes were proper Users of their incoming blocks. (Note that this only works if OldBB->replaceAllUsesWith(NewBB) is called when OldBB still has a terminator instruction, so it still has some successors.) llvm-svn: 133435
* Make better use of the PHINode API.Jay Foad2011-06-207-21/+34
| | | | | | | | Change various bits of code to make better use of the existing PHINode API, to insulate them from forthcoming changes in how PHINodes store their operands. llvm-svn: 133434
* Remove the AugmentedUse struct.Jay Foad2011-06-202-11/+5
| | | | | | | | I don't think the AugmentedUse struct buys us much, either in correctness or in ease of use. Ditch it, and simplify Use::getUser() and User::allocHungoffUses(). llvm-svn: 133433
* Re enable 133415 with two fixesRafael Espindola2011-06-201-3/+8
| | | | | | | | * Don't introduce a duplicated bb in the CFG * When making a branch unconditional, clear the PredCond array so that it is really unconditional. llvm-svn: 133432
* Disable the logic added by rafael in commit 133415 to see if it brings theDuncan Sands2011-06-201-1/+1
| | | | | | | | dragonegg buildbots back to life. Original commit message: Teach early dup how to duplicate basic blocks with one successor and only phi instructions into more complex blocks. llvm-svn: 133430
* Fix PromoteIntRes_TRUNCATE: Add support for cases where theNadav Rotem2011-06-201-4/+28
| | | | | | | source vector type is to be split while the target vector is to be promoted. (eg: <4 x i64> -> <4 x i8> ) llvm-svn: 133424
* Fix MSVC build. next() function already exists in the MSVC headers. This ↵Francois Pichet2011-06-201-1/+1
| | | | | | create a overload conflict. Make sure we pick up the llvm one. llvm-svn: 133416
* Teach early dup how to duplicate basic blocks with one successor and only ↵Rafael Espindola2011-06-201-2/+142
| | | | | | | | phi instructions into more complex blocks. llvm-svn: 133415
* Revamp the "ConstantStruct::get" methods. Previously, these were scatteredChris Lattner2011-06-2010-98/+111
| | | | | | | | | | | | | | | all over the place in different styles and variants. Standardize on two preferred entrypoints: one that takes a StructType and ArrayRef, and one that takes StructType and varargs. In cases where there isn't a struct type convenient, we now add a ConstantStruct::getAnon method (whose name will make more sense after a few more patches land). It would be "really really nice" if the ConstantStruct::get and ConstantVector::get methods didn't make temporary std::vectors. llvm-svn: 133412
* Fix a FIXME by making GlobalVariable::getInitializer() return aJay Foad2011-06-197-14/+14
| | | | | | const Constant *. llvm-svn: 133400
* Code cleanups: Remove duplicated logic in PromotInteRes_BITCAST, reserve ↵Nadav Rotem2011-06-191-7/+5
| | | | | | vector space, reuse types. llvm-svn: 133389
* Calls to AssertZext and getZeroExtendInReg must be made using scalar types.Nadav Rotem2011-06-191-3/+4
| | | | llvm-svn: 133388
* When promoting the vector elements in CopyToParts, use vector truncNadav Rotem2011-06-191-11/+3
| | | | | | instead of scalarizing, and doing an element-by-element truncat. llvm-svn: 133382
* Remove support for parsing the "type i32" syntax for defining a numberedChris Lattner2011-06-191-15/+8
| | | | | | | top level type without a specified number. This syntax isn't documented and blocks forward progress. llvm-svn: 133371
* revert r133368, apparently I missed the tests to be updated.Chris Lattner2011-06-181-8/+15
| | | | llvm-svn: 133369
* Remove support for parsing the "type i32" syntax for defining a numberedChris Lattner2011-06-181-15/+8
| | | | | | | | top level type without a specified number. This asmprinter has never generated this, as you can tell by no tests being updated. It also isn't documented. llvm-svn: 133368
* fix the varargs version of StructType::get to not require an LLVMContext, ↵Chris Lattner2011-06-184-8/+9
| | | | | | | | making usage much cleaner. llvm-svn: 133364
* eliminate some pointless virtual methods.Chris Lattner2011-06-181-26/+32
| | | | llvm-svn: 133363
* simplify some code.Chris Lattner2011-06-181-8/+3
| | | | llvm-svn: 133362
* now that Type::getDescription() is dead, the TypePrinting class can move ↵Chris Lattner2011-06-181-28/+42
| | | | | | | | from Assembly/Writer.h to being a private class in AsmWriter.cpp. llvm-svn: 133361
* eliminate the Type::getDescription() method, using "<<" instead. This Chris Lattner2011-06-186-59/+37
| | | | | | removes some gunk from LLVMContext. llvm-svn: 133360
* rework the remaining autoupgrade logic to use a StringRef instead of creating aChris Lattner2011-06-181-49/+34
| | | | | | temporary std::string for every function being checked. llvm-svn: 133355
* Directly print to a raw_ostream instead of printing to a buffer first.Benjamin Kramer2011-06-181-4/+1
| | | | llvm-svn: 133352
* Simplify code. No functionality change.Benjamin Kramer2011-06-181-18/+18
| | | | llvm-svn: 133351
* Simplify code. No change in functionality.Benjamin Kramer2011-06-181-6/+1
| | | | llvm-svn: 133350
* MC: Allow .common as alias for .comm assembler directive. PR10116.Hans Wennborg2011-06-181-1/+1
| | | | llvm-svn: 133349
* Don't allocate empty read-only SmallVectors during SelectionDAG deallocation.Benjamin Kramer2011-06-182-4/+4
| | | | llvm-svn: 133348
* Remove unused but set variables.Benjamin Kramer2011-06-184-23/+8
| | | | llvm-svn: 133347
* Fix PR10103: Less code for enum type translation.Hans Wennborg2011-06-181-0/+74
| | | | | | | | | | | In cases such as the attached test, where the case value for a switch destination is used in a phi node that follows the destination, it might be better to replace that value with the condition value of the switch, so that more blocks can be folded away with TryToSimplifyUncondBranchFromEmptyBlock because there are less conflicts in the phi node. llvm-svn: 133344
* When scalar replacement returns a vector type, only accept it if the vectorCameron Zwarich2011-06-181-0/+5
| | | | | | | | | | | | type's bitwidth matches the (allocated) size of the alloca. This severely pessimizes vector scalar replacement when the only vector type being used is something like <3 x float> on x86 or ARM whose allocated size matches a <4 x float>. I hope to fix some of the flawed assumptions about allocated size throughout scalar replacement and reenable this in most cases. llvm-svn: 133338
* rip out a ton of intrinsic modernization logic from AutoUpgrade.cpp, which isChris Lattner2011-06-181-1197/+23
| | | | | | | | | for pre-2.9 bitcode files. We keep x86 unaligned loads, movnt, crc32, and the target indep prefetch change. As usual, updating the testsuite is a PITA. llvm-svn: 133337
* Fix an invalid bitcast crash that occurs when doing a partial memset of a vectorCameron Zwarich2011-06-181-3/+15
| | | | | | alloca. Fixes part of <rdar://problem/9580800>. llvm-svn: 133336
* Remove a pointless assignment. Nothing checks the value of VectorTy anymore nowCameron Zwarich2011-06-181-1/+0
| | | | | | unless ScalarKind is Vector. llvm-svn: 133335
* Delete unneeded allocation order override.Jakob Stoklund Olesen2011-06-181-11/+1
| | | | llvm-svn: 133331
* Switch ARM to using AltOrders instead of MethodBodies.Jakob Stoklund Olesen2011-06-181-223/+26
| | | | | | | | | This slightly changes the GPR allocation order on Darwin where R9 is not a callee-saved register: Before: %R0 %R1 %R2 %R3 %R12 %R9 %LR %R4 %R5 %R6 %R8 %R10 %R11 After: %R0 %R1 %R2 %R3 %R9 %R12 %LR %R4 %R5 %R6 %R8 %R10 %R11 llvm-svn: 133326
* Switch x86 to using AltOrders instead of MethodBodies.Jakob Stoklund Olesen2011-06-181-67/+6
| | | | llvm-svn: 133325
* Reserve D16-D13 on subtargets that don't support them.Jakob Stoklund Olesen2011-06-181-0/+6
| | | | llvm-svn: 133321
* * Override the "EmitBytes" function, since it can sneak values in that way.Bill Wendling2011-06-181-1/+18
| | | | | | * Make this used only if CFI is used. llvm-svn: 133319
* Fix UMULO support for 2x register width to allow the fullEric Christopher2011-06-181-0/+21
| | | | | | | | | range without a libcall to a new mulo<mode> libcall that we'd have to create. Finishes the rest of rdar://9090077 and rdar://9210061 llvm-svn: 133318
* Remove false assertion.Bill Wendling2011-06-171-3/+1
| | | | llvm-svn: 133314
* Only call TRI::getRawAllocationOrder to resolve a target-dependent hint.Jakob Stoklund Olesen2011-06-171-2/+6
| | | | llvm-svn: 133313
* Zap the last reference to allocation_order_begin().Jakob Stoklund Olesen2011-06-171-3/+3
| | | | llvm-svn: 133310
* SI, DI, BP, and SP don't have 8-bit sub-registers in x86 mode.Jakob Stoklund Olesen2011-06-171-2/+9
| | | | llvm-svn: 133308
* Fix comment.Eric Christopher2011-06-171-2/+1
| | | | llvm-svn: 133307
* Fix -Asserts buildMatt Beaumont-Gay2011-06-171-2/+1
| | | | llvm-svn: 133305
* Revert r133285. Causing odd failures on Dragonegg.Chad Rosier2011-06-171-4/+5
| | | | llvm-svn: 133301
* Disable for another investigation.Bill Wendling2011-06-171-1/+2
| | | | llvm-svn: 133299
* Set debug loc for new preheader's terminator.Devang Patel2011-06-171-0/+1
| | | | llvm-svn: 133298
OpenPOWER on IntegriCloud