summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Don't use the GOT for symbols that are not externally visible.Rafael Espindola2008-06-021-3/+6
| | | | llvm-svn: 51865
* move CannotBeNegativeZero to ValueTracking. Simplify some signbit comparisons.Chris Lattner2008-06-022-54/+52
| | | | llvm-svn: 51864
* move ComputeMaskedBits, MaskedValueIsZero, and ComputeNumSignBitsChris Lattner2008-06-022-651/+723
| | | | | | | out of instcombine into a new file in libanalysis. This also teaches ComputeNumSignBits about the number of sign bits in a constantint. llvm-svn: 51863
* Fix two issues that Eli Friedman pointed out, where would misoptimized code ↵Owen Anderson2008-06-011-3/+14
| | | | | | | | | | | | | | | | like: char a[200]; init(a, a+200); OR int a[200]; char* b = (char*)a; char* c = (char*)a; foo(b, c); llvm-svn: 51850
* Don't remove the memcpy when call slot substitution fails.Owen Anderson2008-06-011-0/+5
| | | | llvm-svn: 51848
* Remember to update the reverse non-local cache when cleaning up dirty ↵Owen Anderson2008-06-011-0/+5
| | | | | | entries. This fixes PR2397. llvm-svn: 51846
* Make ping more aggressive in finding nonlocal caching errors.Owen Anderson2008-06-011-0/+3
| | | | llvm-svn: 51845
* When simplifying a call to a bitcast function, tighten upDuncan Sands2008-06-011-18/+15
| | | | | | | | | | | | | | | | | | | | the conditions for performing the transform when only the function declaration is available: no longer allow turning i32 into i64 for example. Only allow changing between pointer types, and between pointer types and integers of the same size. For return values ptr -> intptr was already allowed; I added ptr -> ptr and intptr -> ptr while there. As shown by a recent objc testcase, changing the way parameters/return values are passed can be fatal when calling code written in assembler that directly manipulates call arguments and return values unless the transform has no impact on the way they are passed at the codegen level. While it is possible to imagine an ABI that treats integers of pointer size differently to pointers, I don't think LLVM supports any so the transform should now be safe while still being useful. llvm-svn: 51834
* Fixed flag issue that was generating infinite loop while in list scheduling. Bruno Cardoso Lopes2008-06-011-5/+7
| | | | llvm-svn: 51833
* AsmWriter support for insertvalue/extractvalue. These instructions canDan Gohman2008-05-311-0/+15
| | | | | | now round-trip through assembly and bitcode. llvm-svn: 51823
* Improved bitcode support for insertvalue/extractvalue.Dan Gohman2008-05-312-8/+15
| | | | llvm-svn: 51822
* Fix some bugs with the handling of indices in insertvalue/extractvalue.Dan Gohman2008-05-311-3/+3
| | | | llvm-svn: 51820
* Peer through sext/zext when looking for not(cmp).Nick Lewycky2008-05-312-26/+20
| | | | llvm-svn: 51819
* Yay us! Every one of these examples turns into icmp/zext/ret.Nick Lewycky2008-05-311-5/+0
| | | | llvm-svn: 51818
* Add more i1 optimizations. add, sub, mul, s/udiv on i1 are now simplified away.Nick Lewycky2008-05-311-5/+15
| | | | llvm-svn: 51817
* Adding i1 is always Xor.Nick Lewycky2008-05-311-0/+3
| | | | llvm-svn: 51816
* Fix the CBE's handling of instructions whose result is an i1. Previously,Chris Lattner2008-05-311-20/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | we did not truncate the value down to i1 with (x&1). This caused a problem when the computation of x was nontrivial, for example, "add i1 1, 1" would return 2 instead of 0. This makes the testcase compile into: ... llvm_cbe_t = (((llvm_cbe_r == 0u) + (llvm_cbe_r == 0u))&1); llvm_cbe_u = (((unsigned int )(bool )llvm_cbe_t)); ... instead of: ... llvm_cbe_t = ((llvm_cbe_r == 0u) + (llvm_cbe_r == 0u)); llvm_cbe_u = (((unsigned int )(bool )llvm_cbe_t)); ... This fixes a miscompilation of mediabench/adpcm/rawdaudio/rawdaudio and 403.gcc with the CBE, regressions from LLVM 2.2. Tanya, please pull this into the release branch. llvm-svn: 51813
* Factor several methods, including getInversePredicate andDan Gohman2008-05-311-43/+31
| | | | | | | | getSwappedPredicate, from ICmpInst and FCmpInst into common methods in CmpInst. This allows CmpInsts to be manipulated generically. llvm-svn: 51810
* Teach the DAGISelEmitter to not compute the variable_ops operandDan Gohman2008-05-313-10/+3
| | | | | | | | | | | index for the input pattern in terms of the output pattern. Instead keep track of how many fixed operands the input pattern actually has, and have the input matching code pass the output-emitting function that index value. This simplifies the code, disentangles variables_ops from the support for predication operations, and makes variable_ops more robust. llvm-svn: 51808
* Remove an unused variable.Dan Gohman2008-05-311-1/+0
| | | | llvm-svn: 51807
* IR, bitcode reader, bitcode writer, and asmparser changes toDan Gohman2008-05-319-1212/+1252
| | | | | | | | | | | insertvalue and extractvalue to use constant indices instead of Value* indices. And begin updating LangRef.html. There's definately more to come here, but I'm checking this basic support in now to make it available to people who are interested. llvm-svn: 51806
* Fix indentation.Evan Cheng2008-05-301-1/+1
| | | | llvm-svn: 51793
* Fix indentation.Evan Cheng2008-05-301-6/+6
| | | | llvm-svn: 51792
* The coalescer doesn't need LiveVariables now that we have register use ↵Owen Anderson2008-05-302-15/+6
| | | | | | iterators. llvm-svn: 51790
* rewrite operand loops to use iteratorsGabor Greif2008-05-301-24/+26
| | | | llvm-svn: 51789
* Preserve the register coallescer, and update live intervals more correctly ↵Owen Anderson2008-05-301-1/+4
| | | | | | by triggering a renumbering after phi elimination. llvm-svn: 51780
* Since LCSSA switched over to DenseMap, we have to be more careful to avoid ↵Owen Anderson2008-05-301-4/+5
| | | | | | iterator invalidation. Fixes PR2385. llvm-svn: 51777
* Give a proper error message when a command line option is defined more thanMatthijs Kooijman2008-05-301-1/+1
| | | | | | | once (ie, at two different places in the source, not two times on the commandline). llvm-svn: 51771
* Use eraseFromParent() instead of doing that manually in two places.Matthijs Kooijman2008-05-301-2/+2
| | | | llvm-svn: 51770
* Let Instruction::getOpcodeName() return something useful for the newMatthijs Kooijman2008-05-301-0/+2
| | | | | | insertvalue / extractvalue instructions. llvm-svn: 51766
* Add the "AsCheapAsAMove" flag to some 64-bit xor instructions.Bill Wendling2008-05-301-2/+3
| | | | llvm-svn: 51761
* Remove an unused variable.Dan Gohman2008-05-301-1/+0
| | | | llvm-svn: 51721
* Fix a typo in a comment.Dan Gohman2008-05-301-1/+1
| | | | llvm-svn: 51718
* Fix a copy+paste error in a comment.Dan Gohman2008-05-301-1/+1
| | | | llvm-svn: 51717
* Make the renumbering correct in the face of deleted instructions that have ↵Owen Anderson2008-05-291-7/+73
| | | | | | been removed from the LiveIntervals maps. llvm-svn: 51714
* Unbreak build.Bill Wendling2008-05-291-3/+3
| | | | llvm-svn: 51709
* Add patterns for CALL32m and CALL64m. They aren't matched in mostDan Gohman2008-05-292-2/+2
| | | | | | | | | | | | cases due to an isel deficiency already noted in lib/Target/X86/README.txt, but they can be matched in this fold-call.ll testcase, for example. This is interesting mainly because it exposes a tricky tblgen bug; tblgen was incorrectly computing the starting index for variable_ops in the case of a complex pattern. llvm-svn: 51706
* Remove more iostream header includes. Needed to implement a "FlushStream"Bill Wendling2008-05-295-8/+15
| | | | | | function to flush a specified std::ostream. llvm-svn: 51705
* Remove <iostream>.Bill Wendling2008-05-291-2/+0
| | | | llvm-svn: 51704
* Add newline at end of file.Owen Anderson2008-05-291-1/+1
| | | | llvm-svn: 51701
* Fix a tblgen problem handling variable_ops in tblgen instructionDan Gohman2008-05-294-32/+10
| | | | | | | | | | | | definitions. This adds a new construct, "discard", for indicating that a named node in the input matching pattern is to be discarded, instead of corresponding to a node in the output pattern. This allows tblgen to know where the arguments for the varaible_ops are supposed to begin. This fixes "rdar://5791600", whatever that is ;-). llvm-svn: 51699
* const-ify getOpcode.Dan Gohman2008-05-291-3/+3
| | | | llvm-svn: 51698
* Expand small memmovs using inline code. Set the X86 threshold for expandingDan Gohman2008-05-292-6/+74
| | | | | | memmove to a more plausible value, now that it's actually being used. llvm-svn: 51696
* Revert part of my last patch that I didn't intend to commit yet.Owen Anderson2008-05-291-0/+2
| | | | llvm-svn: 51694
* Renumbering needs to account for instruction slot offsets when performing ↵Owen Anderson2008-05-291-7/+20
| | | | | | lookups in the index maps. llvm-svn: 51691
* Force postdom to be linked into opt and bugpoint, even though it is no ↵Owen Anderson2008-05-291-0/+8
| | | | | | longer used by any passes. llvm-svn: 51686
* Add a newline at the end of this file.Duncan Sands2008-05-291-1/+1
| | | | llvm-svn: 51680
* Replace the old ADCE implementation with a new one that more simply solvesOwen Anderson2008-05-291-457/+62
| | | | | | | | | the one case that ADCE catches that normal DCE doesn't: non-induction variable loop computations. This implementation handles this problem without using postdominators. llvm-svn: 51668
* Implement vector shift up / down and insert zero with ps{rl}lq / ps{rl}ldq.Evan Cheng2008-05-295-5/+140
| | | | llvm-svn: 51667
* Remove debugging code.Owen Anderson2008-05-291-5/+1
| | | | llvm-svn: 51666
OpenPOWER on IntegriCloud