summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* Add constant support to object size handling and remove defaultEric Christopher2010-01-291-10/+36
| | | | | | | | | lowering. We'll either figure it out, or not and be lowered by SelectionDAGBuild. Add test. llvm-svn: 94775
* Generic reformatting and comment fixing. No functionality change.Bill Wendling2010-01-291-19/+20
| | | | llvm-svn: 94771
* Add newline to debugging output, and fix some grammar-os in comment.Bill Wendling2010-01-291-5/+5
| | | | llvm-svn: 94765
* mem2reg erases the dbg.declare intrinsics that it converts to dbg.val intrinsicsVictor Hernandez2010-01-291-3/+13
| | | | llvm-svn: 94763
* Fix PR6165. The bug was that LHSKnownZero was being and'd with DemandedMaskDuncan Sands2010-01-281-2/+11
| | | | | | | when it should have been and'd with LowBits. Fix that and while there beef up the logic in the case of a negative LHS. llvm-svn: 94745
* Avoid creating redundant PHIs in SSAUpdater::GetValueInMiddleOfBlock.Bob Wilson2010-01-271-41/+75
| | | | | | | This was already being done in SSAUpdater::GetValueAtEndOfBlock so I've just changed SSAUpdater to check for existing PHIs in both places. llvm-svn: 94690
* Kill ModuleProvider and ghost linkage by inverting the relationship betweenJeffrey Yasskin2010-01-271-1/+0
| | | | | | | | | | | | | | | | | | | | | Modules and ModuleProviders. Because the "ModuleProvider" simply materializes GlobalValues now, and doesn't provide modules, it's renamed to "GVMaterializer". Code that used to need a ModuleProvider to materialize Functions can now materialize the Functions directly. Functions no longer use a magic linkage to record that they're materializable; they simply ask the GVMaterializer. Because the C ABI must never change, we can't remove LLVMModuleProviderRef or the functions that refer to it. Instead, because Module now exposes the same functionality ModuleProvider used to, we store a Module* in any LLVMModuleProviderRef and translate in the wrapper methods. The bindings to other languages still use the ModuleProvider concept. It would probably be worth some time to update them to follow the C++ more closely, but I don't intend to do it. Fixes http://llvm.org/PR5737 and http://llvm.org/PR5735. llvm-svn: 94686
* Don't bother with sprintf, just pass the Twine through.Benjamin Kramer2010-01-272-6/+2
| | | | llvm-svn: 94684
* Use the less expensive getName function instead of getNameStr.Benjamin Kramer2010-01-271-5/+4
| | | | llvm-svn: 94683
* some cleanups.Chris Lattner2010-01-271-14/+15
| | | | llvm-svn: 94649
* no need to check for nullChris Lattner2010-01-271-1/+1
| | | | llvm-svn: 94648
* When converting dbg.declare to dbg.value, attach promoted store's debug ↵Victor Hernandez2010-01-271-1/+4
| | | | | | metadata to dbg.value llvm-svn: 94634
* Avoid extra calls to MD->getNumOperands()Victor Hernandez2010-01-261-1/+1
| | | | llvm-svn: 94618
* Switch AllocaDbgDeclares to SmallVector and don't leak DIFactoryVictor Hernandez2010-01-261-1/+4
| | | | llvm-svn: 94567
* In mem2reg, for all alloca/stores that get promoted where the alloca has an ↵Victor Hernandez2010-01-261-1/+52
| | | | | | associated llvm.dbg.declare instrinsic, insert an llvm.dbg.var intrinsic before each store. llvm-svn: 94493
* Remove check for an impossible condition: the condition of the while loop hasBob Wilson2010-01-251-2/+0
| | | | | | already checked that TmpBB->getSinglePredecessor() is non-null. llvm-svn: 94451
* Change Value::getUnderlyingObject to have the MaxLookup value specified as aBob Wilson2010-01-251-3/+3
| | | | | | | | | | | | parameter with a default value, instead of just hardcoding it in the implementation. The limit of MaxLookup = 6 was introduced in r69151 to fix a performance problem with O(n^2) behavior in instcombine, but the scalarrepl pass is relying on getUnderlyingObject to go all the way back to an AllocaInst. Making the limit part of the method signature makes it clear that by default the result is limited and should help avoid similar problems in the future. This fixes pr6126. llvm-svn: 94433
* Revert r94260 until findDbgDeclare() is made more efficientVictor Hernandez2010-01-251-38/+3
| | | | llvm-svn: 94432
* make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.Chris Lattner2010-01-246-6/+0
| | | | llvm-svn: 94378
* change the canonical form of "cond ? -1 : 0" to be Chris Lattner2010-01-243-60/+44
| | | | | | | | "sext cond" instead of a select. This simplifies some instcombine code, matches the policy for zext (cond ? 1 : 0 -> zext), and allows us to generate better code for a testcase on ppc. llvm-svn: 94339
* fix a potential overflow issue Eli pointed out.Chris Lattner2010-01-231-3/+3
| | | | llvm-svn: 94336
* Speculatively revert r94322 to see if it fixes darwin selfhost buildbot.Nick Lewycky2010-01-231-70/+23
| | | | llvm-svn: 94331
* third bug from PR6119: the xor dupe extension allowsChris Lattner2010-01-231-2/+2
| | | | | | | | for arbitrary terminators in predecessors, don't assume it is a conditional or uncond branch. The testcase shows an example where they can happen with switches. llvm-svn: 94323
* Teach DAE that even though it can't modify the function signature of anNick Lewycky2010-01-231-23/+70
| | | | | | | externally visible function, it can still find all callers of it and replace the parameters to a dead argument with undef. llvm-svn: 94322
* add an early out to ProcessBranchOnXOR to speed it up,Chris Lattner2010-01-231-0/+25
| | | | | | | | handle the case when we can infer an input to the xor from all inputs that agree, instead of going into an infinite loop. Another part of PR6199 llvm-svn: 94321
* fix a crash in jump threading, PR6119Chris Lattner2010-01-231-0/+6
| | | | llvm-svn: 94319
* implement a simple instcombine xform that has been in theChris Lattner2010-01-231-5/+27
| | | | | | readme forever. llvm-svn: 94318
* Reapply 94059 while fixing the calling convention setupEric Christopher2010-01-231-0/+47
| | | | | | for strcpy. llvm-svn: 94287
* In mem2reg, for all alloca/stores that get promoted where the alloca has an ↵Victor Hernandez2010-01-231-3/+38
| | | | | | associated llvm.dbg.declare instrinsic, insert an llvm.dbg.var intrinsic before each store llvm-svn: 94260
* Another strncmp -> StringRef.startswith simplification.Benjamin Kramer2010-01-221-1/+1
| | | | llvm-svn: 94203
* Revert 94059. It is breaking the MultiSource/Benchmarks/Prolangs-C/bisonBob Wilson2010-01-221-45/+0
| | | | | | test on ARM. llvm-svn: 94198
* Keep ignoring pointer-to-pointer bitcastsVictor Hernandez2010-01-222-7/+8
| | | | llvm-svn: 94194
* Stop building RTTI information for *most* llvm libraries. NotableChris Lattner2010-01-226-0/+6
| | | | | | | | | | | missing ones are libsupport, libsystem and libvmcore. libvmcore is currently blocked on bugpoint, which uses EH. Once it stops using EH, we can switch it off. This #if 0's out 3 unit tests, because gtest requires RTTI information. Suggestions welcome on how to fix this. llvm-svn: 94164
* Revert LoopStrengthReduce.cpp to pre-r94061 for now.Dan Gohman2010-01-221-2355/+2268
| | | | llvm-svn: 94123
* No need to look through bitcasts for DbgInfoIntrinsicVictor Hernandez2010-01-211-5/+0
| | | | llvm-svn: 94114
* DbgInfoIntrinsic no longer appear in an instruction's use listVictor Hernandez2010-01-211-19/+4
| | | | llvm-svn: 94113
* No need to look through bitcasts for DbgInfoIntrinsicVictor Hernandez2010-01-211-13/+6
| | | | llvm-svn: 94112
* DbgInfoIntrinsics no longer appear in an instruction's use list; so clean up ↵Victor Hernandez2010-01-212-83/+7
| | | | | | looking for them in use iterations and remove OnlyUsedByDbgInfoIntrinsics() llvm-svn: 94111
* When inserting expressions for post-increment users which containDan Gohman2010-01-211-17/+32
| | | | | | | | loop-variant components, adds must be inserted after the increment. Keep track of the increment position for this case, and insert these adds in the correct location. llvm-svn: 94110
* Include IVUsers information in LSR's debug output.Dan Gohman2010-01-211-1/+1
| | | | llvm-svn: 94108
* Prune the search for candidate formulae if the number of registerDan Gohman2010-01-211-32/+67
| | | | | | | operands exceeds the number of registers used in the initial solution, as that wouldn't lead to a profitable solution anyway. llvm-svn: 94107
* Add a comment.Dan Gohman2010-01-211-1/+2
| | | | llvm-svn: 94104
* It turns out that this #include is needed because otherwiseChris Lattner2010-01-211-1/+1
| | | | | | | | | ValueMapper.cpp ends up calling an out of line __ZNK4llvm12PATypeHolder3getEv, which is a template and llvm-config determines arbitrarily to use the one in libipo. This sucks, but keeping the #include is a reasonable workaround. llvm-svn: 94103
* unbreak the build, apparently without this transformutils starts depending ↵Chris Lattner2010-01-211-0/+1
| | | | | | on libipa? llvm-svn: 94102
* tidy upChris Lattner2010-01-211-14/+7
| | | | llvm-svn: 94101
* Don't need to include IntrinsicInst.h any moreVictor Hernandez2010-01-211-1/+0
| | | | llvm-svn: 94092
* No need to map NULL operands of metadataVictor Hernandez2010-01-211-1/+1
| | | | llvm-svn: 94091
* Re-implement the main strength-reduction portion of LoopStrengthReduction.Dan Gohman2010-01-212-2273/+2315
| | | | | | | | | | | | | | This new version is much more aggressive about doing "full" reduction in cases where it reduces register pressure, and also more aggressive about rewriting induction variables to count down (or up) to zero when doing so reduces register pressure. It currently uses fairly simplistic algorithms for finding reuse opportunities, but it introduces a new framework allows it to combine multiple strategies at once to form hybrid solutions, instead of doing all full-reduction or all base+index. llvm-svn: 94061
* Add strcpy_chk -> strcpy support for "don't know" object sizeEric Christopher2010-01-211-0/+45
| | | | | | answers. This will update as object size checking gets better information. llvm-svn: 94059
* simplify this code.Chris Lattner2010-01-201-1/+1
| | | | llvm-svn: 94048
OpenPOWER on IntegriCloud