aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* fix PR5983, reject function bodies with no blocks per the grammar.Chris Lattner2010-01-091-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93067 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix http://llvm.org/PR5729: x86-64 tail calls were putting their targets intoJeffrey Yasskin2010-01-091-2/+2
| | | | | | | | | R11, and then asserting that the target was in R9. Since R9 isn't reserved for the target anymore, and is used as an argument, this patch changes the assertion. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93065 91177308-0d34-0410-b5e6-96231b3b80d8
* Use WriteAsOperand instead of getName() to print loop header names,Dan Gohman2010-01-092-8/+19
| | | | | | | so that unnamed blocks are handled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93059 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed linking of modules containing aliases to constant bitcasts. Existing ↵David Chisnall2010-01-091-5/+16
| | | | | | | | | | behaviour first tried to replace the aliases with the global that they aliased (rather than the bitcast), causing a crash on an assert because the types didn't match. When this was fixed, it then did the same thing creating the new alias (creating an alias with a different type to its aliasee). Linking modules containing aliases to GEPs is still not quite right. GEPs that are equivalent to bitcasts will be replaced by bitcasts, GEPs that are not will just break. Aliases to GEPs that are not equivalent to bitcasts are horribly broken anyway (it might be worth adding an assert when creating the alias to prevent these being created; they just cause problems later). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93052 91177308-0d34-0410-b5e6-96231b3b80d8
* Suppress use of uninitialized variable warning.Duncan Sands2010-01-091-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93046 91177308-0d34-0410-b5e6-96231b3b80d8
* only factor from expressions whose uses are empty and whoseChris Lattner2010-01-091-0/+5
| | | | | | | base is the right expression type. This fixes PR5981. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93045 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert an earlier change to SIGN_EXTEND_INREG for vectors. The VTSDNodeDan Gohman2010-01-097-67/+107
| | | | | | | | | | | really does need to be a vector type, because TargetLowering::getOperationAction for SIGN_EXTEND_INREG uses that type, and it needs to be able to distinguish between vectors and scalars. Also, fix some more issues with legalization of vector casts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93043 91177308-0d34-0410-b5e6-96231b3b80d8
* clean up this code, add a fixme.Chris Lattner2010-01-091-7/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93042 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete NamedMDSymTable while destrucing Module.Devang Patel2010-01-092-0/+3
| | | | | | | Disable copy ctor and operator= for NamedMDSymTable. Hide typedef that should be public. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93041 91177308-0d34-0410-b5e6-96231b3b80d8
* NamedMDNode is never used so there is no need to enumerate it here.Devang Patel2010-01-091-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93039 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix nondeterministic behavior.Julien Lerouge2010-01-091-6/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93038 91177308-0d34-0410-b5e6-96231b3b80d8
* NamedMDNode element is either null or MDNode. Otherwise this is a malformed ↵Devang Patel2010-01-091-1/+3
| | | | | | NamedMDNode record. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93037 91177308-0d34-0410-b5e6-96231b3b80d8
* Derive NamedMDNode from Value.Devang Patel2010-01-093-11/+25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93032 91177308-0d34-0410-b5e6-96231b3b80d8
* Dan pointed out checking whether a node is dead by comparing its opcode to ↵Evan Cheng2010-01-091-8/+26
| | | | | | ISD::DELETED_NODE is not safe. Use a DAGUpdateListener to remove dead nodes from work list instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93031 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a critical bug in 64-bit atomic operation lowering for 32-bit. The ↵Evan Cheng2010-01-081-8/+10
| | | | | | results of the cmpxchg8b instructions are being thrown away when it branches back to the top of the checking loop. This means the loop always compares against the old value and this can result in a dead lock. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93028 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unnecessary dyn_cast and add a comment. Part of a WIP.Eric Christopher2010-01-081-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93026 91177308-0d34-0410-b5e6-96231b3b80d8
* mplement a theoretical fixme.Chris Lattner2010-01-081-3/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93024 91177308-0d34-0410-b5e6-96231b3b80d8
* rename CanEvaluateInDifferentType -> CanEvaluateTruncated and Chris Lattner2010-01-081-71/+28
| | | | | | | simplify it now that it is only used for truncates. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93021 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comment.Evan Cheng2010-01-081-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93020 91177308-0d34-0410-b5e6-96231b3b80d8
* teach instcombine to delete sign extending shift pairs (sra(shl X, C), C) whenChris Lattner2010-01-081-4/+15
| | | | | | | the input is already sign extended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93019 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR5978 by peeling the loop so that we avoid shifting theChris Lattner2010-01-081-2/+2
| | | | | | | | result int by 8 for the first byte. While normally harmless, if the result is smaller than a byte, this shift is invalid. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93018 91177308-0d34-0410-b5e6-96231b3b80d8
* Suppress an unused variable warning when assertions are off;Duncan Sands2010-01-081-2/+3
| | | | | | | remove some trailing whitespace while there. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93008 91177308-0d34-0410-b5e6-96231b3b80d8
* tidy up some stuff duncan pointed out.Chris Lattner2010-01-081-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93007 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor change, change the order of two "let Inst{...}" stmts within multiclassJohnny Chen2010-01-081-1/+1
| | | | | | | T2I_bin_ii12rs definition. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93006 91177308-0d34-0410-b5e6-96231b3b80d8
* After further thought revert the patch to make fast-isel avoidEric Christopher2010-01-081-6/+0
| | | | | | | | | | | | putting relocations into the constant pool - this isn't needed for correctness and in the rare occasion it happens would pull us out of fast isel for the block. If fast-isel application startup time ever becomes an issue we can add better support for these addresses instead of bailing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92995 91177308-0d34-0410-b5e6-96231b3b80d8
* ReplaceAllUsesOfValueWith may delete other nodes that the one being ↵Evan Cheng2010-01-081-1/+2
| | | | | | replaced. Do not delete dead nodes again. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92988 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix what looks to me obvious instruction definition bugs.Evan Cheng2010-01-082-1/+3
| | | | | | | | 1. CMPXCHG8B and CMPXCHG16B did not specify implicit physical register defs and uses. 2. LCMPXCHG8B is loading 64 bit memory, not 32 bit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92985 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove extraneous include.Eric Christopher2010-01-081-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92972 91177308-0d34-0410-b5e6-96231b3b80d8
* teach ComputeNumSignBits to look through PHI nodes.Chris Lattner2010-01-072-7/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92964 91177308-0d34-0410-b5e6-96231b3b80d8
* Enhance instcombine to reason more strongly about promoting computationChris Lattner2010-01-071-51/+144
| | | | | | | | that feeds into a zext, similar to the patch I did yesterday for sext. There is a lot of room for extension beyond this patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92962 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix rdar://7517201, a regression introduced by r92849.Chris Lattner2010-01-071-1/+1
| | | | | | | | | | | When folding a and(any_ext(load)) both the any_ext and the load have to have only a single use. This removes the anyext-uses.ll testcase which started failing because it is unreduced and unclear what it is testing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92950 91177308-0d34-0410-b5e6-96231b3b80d8
* factor this code better and reduce nesting at the sameChris Lattner2010-01-071-61/+41
| | | | | | | time, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92948 91177308-0d34-0410-b5e6-96231b3b80d8
* APInt'fy TargetLowering::SimplifySetCC to fix PR5963.Evan Cheng2010-01-071-15/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92943 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify code. No intended functionality/performance change.Benjamin Kramer2010-01-071-37/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92938 91177308-0d34-0410-b5e6-96231b3b80d8
* If the data requires a relocation then don't attempt toEric Christopher2010-01-071-0/+7
| | | | | | | | add it to the constant pool for fast-isel. We already don't add it for the normal case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92934 91177308-0d34-0410-b5e6-96231b3b80d8
* We need to put any kind of data with a relocation into aEric Christopher2010-01-071-1/+1
| | | | | | | not-readonly segment on darwin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92933 91177308-0d34-0410-b5e6-96231b3b80d8
* Use separate namespace for named metadata.Devang Patel2010-01-075-12/+40
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92931 91177308-0d34-0410-b5e6-96231b3b80d8
* constant materialization could be improved.Chris Lattner2010-01-071-0/+33
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92921 91177308-0d34-0410-b5e6-96231b3b80d8
* Kill dead store.Benjamin Kramer2010-01-071-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92920 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead variable.Benjamin Kramer2010-01-071-7/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92919 91177308-0d34-0410-b5e6-96231b3b80d8
* Use pop_back_val instead of back()+pop_back.Benjamin Kramer2010-01-071-7/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92918 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a do-while loop instead of while + boolean.Benjamin Kramer2010-01-071-6/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92912 91177308-0d34-0410-b5e6-96231b3b80d8
* Be less stingy as to how many selects and phi nodes weDuncan Sands2010-01-071-2/+2
| | | | | | | are prepared to look through. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92898 91177308-0d34-0410-b5e6-96231b3b80d8
* More trivial optimizations to a function well outside the critical pathDouglas Gregor2010-01-071-15/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92896 91177308-0d34-0410-b5e6-96231b3b80d8
* handle ConstantVector while I'm in here.Chris Lattner2010-01-071-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92892 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a globalopt crash on 'bullet' (handling evaluation of a storeChris Lattner2010-01-071-16/+20
| | | | | | | | | | | to an element of a vector in a static ctor) which occurs with an unrelated patch I'm testing. Annoyingly, EvaluateStoreInto basically does exactly the same stuff as InsertElement constant folding, but it now handles vectors, and you can't insertelement into a vector. It would be 'really nice' if GEP into a vector were not legal. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92889 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a minor regression from my dag combiner changes. One more place which ↵Evan Cheng2010-01-071-4/+12
| | | | | | needs to look pass truncates. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92885 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch StringRef::edit_distance over to using raw pointers, since bothDouglas Gregor2010-01-071-7/+25
| | | | | | | | std::vector and llvm::SmallVector have annoying performance tradeoffs. No, I don't expect this to matter, and now it won't. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92884 91177308-0d34-0410-b5e6-96231b3b80d8
* 80 column violationsJim Grosbach2010-01-061-4/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92876 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow double defs after tail duplication.Jakob Stoklund Olesen2010-01-061-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92874 91177308-0d34-0410-b5e6-96231b3b80d8