summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Simplify RecursivelyDeleteDeadPHINode. The only functionality changeDuncan Sands2011-02-211-28/+16
| | | | | | | | should be that if the phi is used by a side-effect free instruction with no uses then the phi and the instruction now get zapped (checked by the unittest). llvm-svn: 126124
* Target/X86/X86FastISel: [PR6275] Fix Win32's dllimport function with fastisel.NAKAMURA Takumi2011-02-211-2/+6
| | | | | | | "dllimport" function must not be GlobalVariable, but Function. It is enough to check with GlobalValue. test/CodeGen/X86/dll-linkage.ll is updated to check llc -O0. llvm-svn: 126110
* Generate correct Sparc32 ABI compliant code for functions that return a struct.Venkatraman Govindaraju2011-02-214-8/+84
| | | | llvm-svn: 126108
* add a missed loop deletion case.Chris Lattner2011-02-211-0/+14
| | | | llvm-svn: 126103
* Add some (disabled code) to print out negative strides.Chris Lattner2011-02-211-3/+15
| | | | llvm-svn: 126102
* add an idiom that loop idiom could theoretically catch.Chris Lattner2011-02-211-0/+10
| | | | llvm-svn: 126101
* A lo/hi mul has higher latency than an imul r,ri, e.g. 5 cycles compared to 3Cameron Zwarich2011-02-211-35/+0
| | | | | | on Core 2 and Nehalem, so the code we generate is better than GCC's here. llvm-svn: 126100
* Use a vector of pairs to implement the section stack, not twoJoerg Sonnenberger2011-02-211-2/+2
| | | | | | independent vectors. llvm-svn: 126099
* The signed version of our "magic number" computation for the integer ↵Cameron Zwarich2011-02-212-7/+5
| | | | | | | | | | | | | approximation of a constant had a minor typo introduced when copying it from the book, which caused it to favor negative approximations over positive approximations in many cases. Positive approximations require fewer operations beyond the multiplication. In the case of division by 3, we still generate code that is a single instruction larger than GCC's code. llvm-svn: 126097
* Add some limited support for labels in org directives. Hopefully enough to fixRafael Espindola2011-02-201-1/+17
| | | | | | PR9245. llvm-svn: 126091
* Make RecursivelyDeleteDeadPHINode delete a phi node that has no users and add aNick Lewycky2011-02-201-7/+12
| | | | | | | | | test for that. With this change, test/CodeGen/X86/codegen-dce.ll no longer finds any instructions to DCE, so delete the test. Also renamed J and JP to I and IP in RecursivelyDeleteDeadPHINode. llvm-svn: 126088
* Move "A | ~(A & ?) -> -1" from InstCombine to InstructionSimplify.Benjamin Kramer2011-02-202-16/+18
| | | | llvm-svn: 126082
* InstCombine: Add a bunch of combines of the form x | (y ^ z).Benjamin Kramer2011-02-201-0/+41
| | | | | | | | | We usually catch this kind of optimization through InstSimplify's distributive magic, but or doesn't distribute over xor in general. "A | ~(A | B) -> A | ~B" hits 24 times on gcc.c. llvm-svn: 126081
* Fix 9267; Add vector zext support.Nadav Rotem2011-02-201-1/+3
| | | | | | | | The DAGCombiner folds the zext into complex load instructions. This patch prevents this optimization on vectors since none of the supported targets knows how to perform load+vector_zext in one instruction. llvm-svn: 126080
* Teach RecursivelyDeleteDeadPHINodes to handle multiple self-references. PatchNick Lewycky2011-02-201-5/+21
| | | | | | by Andrew Clinton! llvm-svn: 126077
* Instead of keeping two Value*->id# mappings, keep one Value->Value mapping andNick Lewycky2011-02-201-12/+14
| | | | | | | one Value set. This is faster because we only need to use the set when there isn't already an entry in the map. No functionality change! llvm-svn: 126076
* If both operands are loads from stores in memory we can't use movlpd/movlpsEric Christopher2011-02-201-0/+4
| | | | | | | | | since one needs to be a register operand. Just use movss instead of forcing an operand into a register. Fixes PR9239 llvm-svn: 126072
* Use explicit add_subdirectory's for LLVM target sublibraries insteadOscar Fuentes2011-02-2016-10/+41
| | | | | | | | | of testing for its presence at cmake time. This way the build automatically regenerates the makefiles when a svn update brings in a new sublibrary. llvm-svn: 126068
* PR9218: SimplifyDemandedVectorElts can return a non-null value that is notEli Friedman2011-02-191-2/+7
| | | | | | | the instruction passed in. Make sure to account for this correctly, instead of looping infinitely. llvm-svn: 126058
* Minor x86 README updates.Eli Friedman2011-02-191-20/+14
| | | | llvm-svn: 126054
* implement PR9264: disambiguating 'bt mem, imm' as a btl.Chris Lattner2011-02-191-0/+3
| | | | | | | This is reasonable to do since all bt-mem forms do the same thing. llvm-svn: 126047
* rewrite the memset_pattern pattern generation stuff to accept any 2/4/8/16-byteChris Lattner2011-02-191-32/+12
| | | | | | | | | | | | | | | | | | constant, including globals. This makes us generate much more "pretty" pattern globals as well because it doesn't break it down to an array of bytes all the time. This enables us to handle stores of relocatable globals. This kicks in about 48 times in 254.gap, giving us stuff like this: @.memset_pattern40 = internal constant [2 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*] [%struct.TypHeader* (%struct.TypHeader*, %struct .TypHeader*)* @IsFalse, %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)* @IsFalse], align 16 ... call void @memset_pattern16(i8* %scevgep5859, i8* bitcast ([2 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]* @.memset_pattern40 to i8* ), i64 %tmp75) nounwind llvm-svn: 126044
* Stores of null pointers should turn into memset, we weren't recognizingChris Lattner2011-02-191-0/+5
| | | | | | them as splat values. llvm-svn: 126041
* Implement rdar://9009151, transforming strided loop stores ofChris Lattner2011-02-191-32/+125
| | | | | | | | | | | unsplatable values into memset_pattern16 when it is available (recent darwins). This transforms lots of strided loop stores of ints for example, like 5 in vpr: Formed memset: call void @memset_pattern16(i8* %4, i8* getelementptr inbounds ([16 x i8]* @.memset_pattern9, i32 0, i32 0), i64 %tmp25) from store to: {%3,+,4}<%11> at: store i32 3, i32* %scevgep, align 4, !tbaa !4 llvm-svn: 126040
* Fix typos.Eric Christopher2011-02-191-2/+2
| | | | llvm-svn: 126018
* Do not emit empty DW_TAG_lexical_block DIEs. In one test case, size of ↵Devang Patel2011-02-191-17/+20
| | | | | | debug info reduced by almost 7%. llvm-svn: 126009
* Give SplitAnalysis a VRM member to access VirtRegMap::getOriginal().Jakob Stoklund Olesen2011-02-193-5/+7
| | | | llvm-svn: 126005
* Avoid dangling else warnings.Joerg Sonnenberger2011-02-191-1/+2
| | | | llvm-svn: 126004
* Missed member rename for naming convention.Jakob Stoklund Olesen2011-02-192-9/+9
| | | | llvm-svn: 126003
* This method belonged in VirtRegMap.Jakob Stoklund Olesen2011-02-193-10/+10
| | | | llvm-svn: 126002
* Separate timers for local and global splitting.Jakob Stoklund Olesen2011-02-191-2/+5
| | | | llvm-svn: 126001
* These tags are now covered by dwarf::TagString().Devang Patel2011-02-181-9/+1
| | | | llvm-svn: 125987
* Provide tag strings for llvm specific tags.Devang Patel2011-02-181-0/+4
| | | | llvm-svn: 125986
* Do not lose debug info of an inlined function argument even if the argument ↵Devang Patel2011-02-184-14/+15
| | | | | | | | is only used through GEPs. This time with a fix that avoids using invalidated DenseMap iterator. llvm-svn: 125984
* Use VirtRegMap's Virt2SplitMap to keep track of the original live range ↵Jakob Stoklund Olesen2011-02-183-2/+12
| | | | | | | | before splitting. All new virtual registers created for spilling or splitting point back to their original. llvm-svn: 125980
* add a way to disable all builtins, wire it up to opt's ↵Chris Lattner2011-02-181-0/+6
| | | | | | -disable-simplifylibcalls flag. llvm-svn: 125978
* Make loop-idiom use TargetLibraryInfo to determine whether it is allowedChris Lattner2011-02-181-1/+18
| | | | | | to hack on memset, memcpy etc. llvm-svn: 125974
* Move library stuff out of the toplevel CMakeLists.txt file.Oscar Fuentes2011-02-188-0/+84
| | | | llvm-svn: 125968
* Add VirtRegMap::rewrite() and use it in the new register allocators.Jakob Stoklund Olesen2011-02-184-6/+81
| | | | | | | | | | The rewriter works almost identically to -rewriter=trivial, except it also eliminates any identity copies. This makes the new register allocators independent of VirtRegRewriter.cpp which will be going away at the same time as RegAllocLinearScan. llvm-svn: 125967
* introduce a new TargetLibraryInfo pass, which transformations can use toChris Lattner2011-02-183-0/+51
| | | | | | | | query about available library functions. For now this just has memset_pattern16, which exists on darwin, but it can be extended for a bunch of other things in the future. llvm-svn: 125965
* Reapply r114997 now that the buildbots have been updated.Bill Wendling2011-02-181-8/+4
| | | | llvm-svn: 125960
* Fix style and a typoBruno Cardoso Lopes2011-02-181-4/+4
| | | | llvm-svn: 125949
* Add assembly parsing support for "msr" and also fix its encoding. Also addBruno Cardoso Lopes2011-02-187-47/+169
| | | | | | testcases for the disassembler to make sure it still works for "msr". llvm-svn: 125948
* improve support for OpenBSD, patch by Amit Kulkarni!Chris Lattner2011-02-181-2/+4
| | | | llvm-svn: 125943
* Expose getTypeName to the C API. Patch by Patrick Walton.Rafael Espindola2011-02-181-0/+4
| | | | llvm-svn: 125845
* Add some transforms of the kind X-Y>X -> 0>Y which are valid when there is noDuncan Sands2011-02-181-18/+17
| | | | | | overflow. These subsume some existing equality transforms, so zap those. llvm-svn: 125843
* add a poor division by constant case.Chris Lattner2011-02-181-0/+37
| | | | llvm-svn: 125832
* Roll out r125794 to help diagnose the llvm-gcc-i386-linux-selfhost failure.Cameron Zwarich2011-02-184-10/+13
| | | | llvm-svn: 125830
* prevent jump threading from merging blocks when their address isChris Lattner2011-02-181-1/+11
| | | | | | | | | | | | | | | | | taken (and used!). This prevents merging the blocks (invalidating the block addresses) in a case like this: #define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) void foo() { printf("%p\n", _THIS_IP_); printf("%p\n", _THIS_IP_); printf("%p\n", _THIS_IP_); } which fixes PR4151. llvm-svn: 125829
* hoist GlobalValue::removeDeadConstantUsers up to being a method on Constant.Chris Lattner2011-02-182-49/+53
| | | | llvm-svn: 125828
OpenPOWER on IntegriCloud