aboutsummaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Reorder some fields in SDNode. This avoids padding,Dan Gohman2008-06-211-5/+5
| | | | | | | reducings its size from 80 to 72 on 64-bit hosts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52584 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove ScheduleDAG's SUnitMap altogether. Instead, use SDNode's NodeIdDan Gohman2008-06-211-3/+1
| | | | | | | | field, which is otherwise unused after instruction selection, as an index into the SUnit array. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52583 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a priority queue class, which is a wrapper around std::priority_queueDan Gohman2008-06-212-1/+77
| | | | | | | | and provides fairly efficient removal of arbitrary elements. Switch ScheduleDAGRRList from std::set to this new priority queue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52582 91177308-0d34-0410-b5e6-96231b3b80d8
* Change ScheduleDAG's SUnitMap from DenseMap<SDNode*, vector<SUnit*> >Dan Gohman2008-06-211-8/+8
| | | | | | | | | to DenseMap<SDNode*, SUnit*>, and adjust the way cloned SUnit nodes are handled so that only the original node needs to be in the map. This speeds up llc on 447.dealII.llvm.bc by about 2%. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52576 91177308-0d34-0410-b5e6-96231b3b80d8
* Undo spill weight tweak. Need to investigate the performance regressions.Evan Cheng2008-06-211-6/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52572 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some methods for querying the nature of aDuncan Sands2008-06-201-14/+25
| | | | | | | | store, like the methods for loads (and neaten those up a bit while there). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52547 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an allnodes_size method.Dan Gohman2008-06-201-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52541 91177308-0d34-0410-b5e6-96231b3b80d8
* Add C binding for ExecutionEngine::addGlobalMapping.Gordon Henriksen2008-06-201-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52523 91177308-0d34-0410-b5e6-96231b3b80d8
* It's invalid to take the one-past-the-end address of a non-arrayDan Gohman2008-06-201-1/+2
| | | | | | | object. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52515 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an idx_iterator to the insertvalue and extractvalue instructions.Owen Anderson2008-06-191-4/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52493 91177308-0d34-0410-b5e6-96231b3b80d8
* The inline keyword goes before the return type. This fixes a compiler warning.Dan Gohman2008-06-191-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52492 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor spiller tweak to unfavor reload into load/store instructions.Evan Cheng2008-06-192-2/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52477 91177308-0d34-0410-b5e6-96231b3b80d8
* Move SCEVExpander::visitAddExpr out-of-line.Dan Gohman2008-06-181-9/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52464 91177308-0d34-0410-b5e6-96231b3b80d8
* Move LSR's private isZero function to a public SCEV memberDan Gohman2008-06-181-0/+4
| | | | | | | function, and make use of it in several places. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52463 91177308-0d34-0410-b5e6-96231b3b80d8
* Add MachineRegisterInfo::use_empty.Evan Cheng2008-06-181-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52451 91177308-0d34-0410-b5e6-96231b3b80d8
* Check empty dominance frontier.Devang Patel2008-06-181-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52437 91177308-0d34-0410-b5e6-96231b3b80d8
* Auto-upgrade code for multiple-value return statements. This codeDan Gohman2008-06-171-0/+6
| | | | | | | isn't actually called yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52435 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an insertBefore method for attaching previously unattached instructions,Owen Anderson2008-06-171-0/+4
| | | | | | | such as those created by clone(), to a basic block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52424 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix use of placement new to actually use an address. Owen Anderson2008-06-171-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52423 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide generic hooks for icache invalidation. Add PPC implementation.Anton Korobeynikov2008-06-171-0/+5
| | | | | | | Patch by Gary Benson! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52418 91177308-0d34-0410-b5e6-96231b3b80d8
* Forgot to commit the ValueTracking header file along with r52396.Matthijs Kooijman2008-06-171-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52401 91177308-0d34-0410-b5e6-96231b3b80d8
* 80 column fixes.Matthijs Kooijman2008-06-171-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52391 91177308-0d34-0410-b5e6-96231b3b80d8
* add a new -enable-value-prop flag for llcbeta, that enables propagationChris Lattner2008-06-172-2/+9
| | | | | | | | | | | | | | of value info (sign/zero ext info) from one MBB to another. This doesn't handle much right now because of two limitations: 1) only handles zext/sext, not random bit propagation (no assert exists for this) 2) doesn't handle phis. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52383 91177308-0d34-0410-b5e6-96231b3b80d8
* Horizontal-add instructions are not commutative.Evan Cheng2008-06-161-8/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52363 91177308-0d34-0410-b5e6-96231b3b80d8
* Move some documentation from the header file into ProgrammersManual. About ↵Gabor Greif2008-06-161-165/+0
| | | | | | to improve. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52360 91177308-0d34-0410-b5e6-96231b3b80d8
* - Add "Commutative" property to intrinsics. This allows tblgen to generate ↵Evan Cheng2008-06-162-87/+132
| | | | | | | | | the commuted variants for dagisel matching code. - Mark lots of X86 intrinsics as "Commutative" to allow load folding. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52353 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new flag that disables symbol lookup with dlsym when set. This allowsChris Lattner2008-06-161-3/+13
| | | | | | | | a JIT client to completely control symbol lookup with the LazyFunctionCreator interface. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52335 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the InsertBefore argument to FindInsertedValue optional, so you can ↵Matthijs Kooijman2008-06-161-1/+4
| | | | | | find an inserted value without modifying the code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52319 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass around Instruction* instead of Instruction& in FindInsertedValue and ↵Matthijs Kooijman2008-06-161-1/+1
| | | | | | friends. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52318 91177308-0d34-0410-b5e6-96231b3b80d8
* Move FindScalarValue from InstructionCombining.cpp to ValueTracking.cpp. WhileMatthijs Kooijman2008-06-161-0/+9
| | | | | | | | | | | I'm at it, rename it to FindInsertedValue. The only functional change is that newly created instructions are no longer added to instcombine's worklist, but that is not really necessary anyway (and I'll commit some improvements next that will completely remove the need). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52315 91177308-0d34-0410-b5e6-96231b3b80d8
* Add comment.Matthijs Kooijman2008-06-161-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52313 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow these transforms for types like i256 whileDuncan Sands2008-06-161-0/+6
| | | | | | | | | still excluding types like i1 (not byte sized) and i120 (loading an i120 requires loading an i64, an i32, an i16 and an i8, which is expensive). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52310 91177308-0d34-0410-b5e6-96231b3b80d8
* Add option to commuteInstruction() which forces it to create a new ↵Evan Cheng2008-06-161-2/+6
| | | | | | (commuted) instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52308 91177308-0d34-0410-b5e6-96231b3b80d8
* add a const version of stripPointerCastsChris Lattner2008-06-161-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52305 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR2434. When scanning for exising binary operator to reuse don't Wojciech Matyjewicz2008-06-151-1/+1
| | | | | | | | | | | | take into account the instrucion pointed by InsertPt. Thanks to it, returning the new value of InsertPt to the InsertBinop() caller can be avoided. The bug was, actually, in visitAddRecExpr() method which wasn't correctly handling changes of InsertPt. There shouldn't be any performance regression, as -gvn pass (run after -indvars) removes any redundant binops. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52291 91177308-0d34-0410-b5e6-96231b3b80d8
* add missing atomic intrinsic from gccAndrew Lenharth2008-06-142-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52270 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable some DAG combiner optimizations that may beDuncan Sands2008-06-131-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wrong for volatile loads and stores. In fact this is almost all of them! There are three types of problems: (1) it is wrong to change the width of a volatile memory access. These may be used to do memory mapped i/o, in which case a load can have an effect even if the result is not used. Consider loading an i32 but only using the lower 8 bits. It is wrong to change this into a load of an i8, because you are no longer tickling the other three bytes. It is also unwise to make a load/store wider. For example, changing an i16 load into an i32 load is wrong no matter how aligned things are, since the fact of loading an additional 2 bytes can have i/o side-effects. (2) it is wrong to change the number of volatile load/stores: they may be counted by the hardware. (3) it is wrong to change a volatile load/store that requires one memory access into one that requires several. For example on x86-32, you can store a double in one processor operation, but to store an i64 requires two (two i32 stores). In a multi-threaded program you may want to bitcast an i64 to a double and store as a double because that will occur atomically, and be indivisible to other threads. So it would be wrong to convert the store-of-double into a store of an i64, because this will become two i32 stores - no longer atomic. My policy here is to say that the number of processor operations for an illegal operation is undefined. So it is alright to change a store of an i64 (requires at least two stores; but could be validly lowered to memcpy for example) into a store of double (one processor op). In short, if the new store is legal and has the same size then I say that the transform is ok. It would also be possible to say that transforms are always ok if before they were illegal, whether after they are illegal or not, but that's more awkward to do and I doubt it buys us anything much. However this exposed an interesting thing - on x86-32 a store of i64 is considered legal! That is because operations are marked legal by default, regardless of whether the type is legal or not. In some ways this is clever: before type legalization this means that operations on illegal types are considered legal; after type legalization there are no illegal types so now operations are only legal if they really are. But I consider this to be too cunning for mere mortals. Better to do things explicitly by testing AfterLegalize. So I have changed things so that operations with illegal types are considered illegal - indeed they can never map to a machine operation. However this means that the DAG combiner is more conservative because before it was "accidentally" performing transforms where the type was illegal because the operation was nonetheless marked legal. So in a few such places I added a check on AfterLegalize, which I suppose was actually just forgotten before. This causes the DAG combiner to do slightly more than it used to, which resulted in the X86 backend blowing up because it got a slightly surprising node it wasn't expecting, so I tweaked it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52254 91177308-0d34-0410-b5e6-96231b3b80d8
* Crash less. The i64 restriction in BinomialCoefficient caused some problemsNick Lewycky2008-06-131-0/+5
| | | | | | | | | with code that was expecting different bit widths for different values. Make getTruncateOrZeroExtend a method on ScalarEvolution, and use it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52248 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not speculatively execute an instruction by hoisting it to its ↵Evan Cheng2008-06-121-0/+2
| | | | | | predecessor BB if any of its operands are defined but not used in BB. The transformation will prevent the operand from being sunk into the use block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52244 91177308-0d34-0410-b5e6-96231b3b80d8
* If queried as to whether an operation is legalDuncan Sands2008-06-121-13/+17
| | | | | | | | for a particular MVT, return false if the type is illegal rather than barfing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52229 91177308-0d34-0410-b5e6-96231b3b80d8
* remove bogus commentGabor Greif2008-06-111-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52216 91177308-0d34-0410-b5e6-96231b3b80d8
* op_iterator-ify dropAllReferencesGabor Greif2008-06-111-5/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52215 91177308-0d34-0410-b5e6-96231b3b80d8
* Sometimes (rarely) nodes held in LegalizeTypesDuncan Sands2008-06-112-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | maps can be deleted. This happens when RAUW replaces a node N with another equivalent node E, deleting the first node. Solve this by adding (N, E) to ReplacedNodes, which is already used to remap nodes to replacements. This means that deleted nodes are being allowed in maps, which can be delicate: the memory may be reused for a new node which might get confused with the old deleted node pointer hanging around in the maps, so detect this and flush out maps if it occurs (ExpungeNode). The expunging operation is expensive, however it never occurs during a llvm-gcc bootstrap or anywhere in the nightly testsuite. It occurs three times in "make check": Alpha/illegal-element-type.ll, PowerPC/illegal-element-type.ll and X86/mmx-shift.ll. If expunging proves to be too expensive then there are other more complicated ways of solving the problem. In the normal case this patch adds the overhead of a few more map lookups, which is hopefully negligable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52214 91177308-0d34-0410-b5e6-96231b3b80d8
* Small doc fix.Duncan Sands2008-06-101-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52190 91177308-0d34-0410-b5e6-96231b3b80d8
* Various tweaks related to apint codegen. No functionalityDuncan Sands2008-06-091-0/+4
| | | | | | | change for non-funky-sized integers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52151 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some DAG combiner assumptions about sizesDuncan Sands2008-06-091-2/+3
| | | | | | | | | | | | of integer types. Fix the isMask APInt method to actually work (hopefully) rather than crashing because it adds apints of different bitwidths. It looks like isShiftedMask is also broken, but I'm leaving that one to the APInt people (it is not used anywhere). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52142 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a simple, but efficient, generic scoped hash tableChris Lattner2008-06-091-0/+193
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52112 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove comparison methods for MVT. The main causeDuncan Sands2008-06-083-13/+38
| | | | | | | | | | | | of apint codegen failure is the DAG combiner doing the wrong thing because it was comparing MVT's using < rather than comparing the number of bits. Removing the < method makes this mistake impossible to commit. Instead, add helper methods for comparing bits and use them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52098 91177308-0d34-0410-b5e6-96231b3b80d8
* get rid of ExtractValueInst::init's Value argument, it is already passed to ↵Gabor Greif2008-06-061-6/+6
| | | | | | the UnaryInstruction ctor git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52064 91177308-0d34-0410-b5e6-96231b3b80d8
* make ExtractValueInst derived from UnaryInstructionGabor Greif2008-06-062-19/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52061 91177308-0d34-0410-b5e6-96231b3b80d8