Commit Graph

17 Commits

Author SHA1 Message Date
Owen Anderson bda59bd247 Revert r110396 to fix buildbots.
llvm-svn: 110410
2010-08-06 00:23:35 +00:00
Owen Anderson 755aceb5d0 Don't use PassInfo* as a type identifier for passes. Instead, use the address of the static
ID member as the sole unique type identifier.  Clean up APIs related to this change.

llvm-svn: 110396
2010-08-05 23:42:04 +00:00
Gabor Greif 75f6943c95 use ArgOperand API, also tighten the type of visitFree to make this work out smoothly
llvm-svn: 106736
2010-06-24 12:21:15 +00:00
Duncan Sands f162eace49 Teach instCombine to remove malloc+free if malloc's only uses are comparisons
to null.  Patch by Matti Niemenmaa.

llvm-svn: 104871
2010-05-27 19:09:06 +00:00
Duncan Sands 6c5e4355bb I got tired of VISIBILITY_HIDDEN colliding with the gcc enum. Rename it
to LLVM_LIBRARY_VISIBILITY and introduce LLVM_GLOBAL_VISIBILITY, which is
the opposite, for future use by dragonegg.

llvm-svn: 103495
2010-05-11 20:16:09 +00:00
Eric Christopher a7fb58f5f5 Migrate _chk call lowering from SimplifyLibCalls to InstCombine. Stub
out the remainder of the calls that we should lower in some way and
move the tests to the new correct directory. Fix up tests that are now
optimized more than they were before by -instcombine.

llvm-svn: 97875
2010-03-06 10:50:38 +00:00
Chris Lattner 067459c62b Fix PR6503. This turned into a much more interesting and nasty bug. Various
parts of the cmp|cmp and cmp&cmp folding logic wasn't prepared for vectors
(unrelated to the bug but noticed while in the code) and the code was 
*definitely* not safe to use by the (cast icmp)|(cast icmp) handling logic
that I added in r95855.  Fix all this up by changing the various routines
to more consistently use IRBuilder and not pass in the I which had the wrong 
type.

llvm-svn: 97801
2010-03-05 08:46:26 +00:00
Chris Lattner 4e8137d678 Rename ValueRequiresCast to ShouldOptimizeCast, to better reflect
what it does.  Enhance it to return false to optimizing vector
sign extensions from vector comparisions, which is the idiom used
to get a splatted vector for a vector comparison.

Doing this breaks vector-casts.ll, add some compensating 
transformations to handle the important case they cover without
depending on this canonicalization.

This fixes rdar://7434900 a serious pessimization of vector compares.

llvm-svn: 95855
2010-02-11 06:26:33 +00:00
Chris Lattner 883550afe8 inline and remove the rest of commonIntCastTransforms.
llvm-svn: 93091
2010-01-10 01:00:46 +00:00
Chris Lattner 554d0564ff make this a static function instead of a method.
llvm-svn: 92795
2010-01-05 22:30:42 +00:00
Chris Lattner dc054bf39a split mul/div/rem instructions out to their own file.
llvm-svn: 92689
2010-01-05 06:09:35 +00:00
Chris Lattner 27acfcd1c4 convert various IntrinsicInst's to use class instead of struct.
llvm-svn: 92681
2010-01-05 05:21:26 +00:00
Daniel Dunbar 72a87448c1 Fix some struct/class specifier mismatches.
llvm-svn: 92550
2010-01-05 00:15:58 +00:00
Chris Lattner 2b295a0eba split 943 lines of instcombine out to a new InstCombineCasts.cpp
file.  InstructionCombining.cpp is now down to a svelte 9300 lines :)

llvm-svn: 92468
2010-01-04 07:53:58 +00:00
Chris Lattner 2188e40e4c split instcombine of compares (visit[FI]Cmp) out to
a new InstCombineCompares.cpp file.

llvm-svn: 92467
2010-01-04 07:37:31 +00:00
Chris Lattner 7e0449172c move the 'SimplifyDemandedFoo' methods out to their own file, cutting 1K lines out of instcombine.cpp
llvm-svn: 92465
2010-01-04 07:17:19 +00:00
Chris Lattner 35522b7465 split the instcombine class definition out to a header shared
among the instcombine library.

llvm-svn: 92463
2010-01-04 07:12:23 +00:00