summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* Revert this part of r45073 until the verifier isDuncan Sands2007-12-161-2/+3
| | | | | | changed not to reject invoke of inline asm. llvm-svn: 45077
* Make instcombine promote inline asm calls to 'nounwind'Duncan Sands2007-12-162-3/+15
| | | | | | | | | | | | | calls. Remove special casing of inline asm from the inliner. There is a potential problem: the verifier rejects invokes of inline asm (not sure why). If an asm call is not marked "nounwind" in some .ll, and instcombine is not run, but the inliner is run, then an illegal module will be created. This is bad but I'm not sure what the best approach is. I'm tempted to remove the check in the verifier... llvm-svn: 45073
* Fix typo.Evan Cheng2007-12-131-1/+1
| | | | llvm-svn: 44997
* Be extra careful with extension use optimation. Now turned on by default.Evan Cheng2007-12-131-3/+10
| | | | llvm-svn: 44981
* Fix for edge profiling, patch by 'Marc' for PR1857Chris Lattner2007-12-131-1/+1
| | | | llvm-svn: 44965
* 1. "Upgrage" comments.Wojciech Matyjewicz2007-12-121-15/+16
| | | | | | | | | | | | | | 2. Using zero-extended value of Scale and unsigned division is safe provided that Scale doesn't have the sign bit set. Previously these 2 instructions: %p = bitcast [100 x {i8,i8,i8}]* %x to i8* %q = getelementptr i8* %p, i32 -4 were combined into: %q = getelementptr [100 x { i8, i8, i8 }]* %x, i32 0, i32 1431655764, i32 0 what was incorrect. llvm-svn: 44936
* Don't muck with phi nodes; bug fixes.Evan Cheng2007-12-121-2/+11
| | | | llvm-svn: 44905
* Bug fix. Only safe to perform extension uses optimization if the source of ↵Evan Cheng2007-12-121-0/+5
| | | | | | extension is also defined in the same BB as the extension. llvm-svn: 44896
* Fix PR1850 by removing an unsafe transformation from VMCore/ConstantFold.cpp.Chris Lattner2007-12-101-1/+7
| | | | | | | | Reimplement the xform in Analysis/ConstantFolding.cpp where we can use targetdata to validate that it is safe. While I'm in there, fix some const correctness issues and generalize the interface to the "operand folder". llvm-svn: 44817
* Make PruneEH update the nounwind/noreturn attributesDuncan Sands2007-12-102-76/+81
| | | | | | on functions as it calculates them. llvm-svn: 44802
* Adding a collector name attribute to Function in the IR. These Gordon Henriksen2007-12-101-0/+2
| | | | | | | | | | | | | | | | | | | | methods are new to Function: bool hasCollector() const; const std::string &getCollector() const; void setCollector(const std::string &); void clearCollector(); The assembly representation is as such: define void @f() gc "shadow-stack" { ... The implementation uses an on-the-side table to map Functions to collector names, such that there is no overhead. A StringPool is further used to unique collector names, which are extremely likely to be unique per process. llvm-svn: 44769
* Fix several cache coherence bugs in MemDep/GVN that were found. Also add ↵Owen Anderson2007-12-081-2/+6
| | | | | | | | some (disabled) debugging code to make such problems easier to diagnose in the future, written by Duncan Sands. llvm-svn: 44695
* simplify some code.Chris Lattner2007-12-061-2/+1
| | | | llvm-svn: 44655
* move some ashr-specific code out of commonShiftTransforms into visitAShr.Chris Lattner2007-12-061-15/+16
| | | | llvm-svn: 44650
* If both result of the {s|z}xt and its source are live out, rewrite all uses ↵Evan Cheng2007-12-051-3/+71
| | | | | | of the source with result of extension. llvm-svn: 44643
* Rather than having special rules like "intrinsics cannotDuncan Sands2007-12-034-8/+6
| | | | | | | | | throw exceptions", just mark intrinsics with the nounwind attribute. Likewise, mark intrinsics as readnone/readonly and get rid of special aliasing logic (which didn't use anything more than this anyway). llvm-svn: 44544
* update file comment.Chris Lattner2007-12-031-2/+5
| | | | llvm-svn: 44543
* If ExitValue operand is also defined in Loop header thenDevang Patel2007-12-031-0/+17
| | | | | | | | insert new ExitValue after this operand definition. This fixes PR1828. llvm-svn: 44539
* Integrate the readonly/readnone logic more deeplyDuncan Sands2007-12-014-27/+19
| | | | | | | | | | | | | | | into alias analysis. This meant updating the API which now has versions of the getModRefBehavior, doesNotAccessMemory and onlyReadsMemory methods which take a callsite parameter. These should be used unless the callsite is not known, since in general they can do a better job than the versions that take a function. Also, users should no longer call the version of getModRefBehavior that takes both a function and a callsite. To reduce the chance of misuse it is now protected. llvm-svn: 44487
* Fix a miscompilation in spiff on PPC.Owen Anderson2007-11-291-1/+2
| | | | llvm-svn: 44437
* Add some convenience methods for querying attributes, andDuncan Sands2007-11-281-31/+2
| | | | | | use them. llvm-svn: 44403
* Fix PR1146: parameter attributes are longer part ofDuncan Sands2007-11-2713-37/+104
| | | | | | | | | | | | the function type, instead they belong to functions and function calls. This is an updated and slightly corrected version of Reid Spencer's original patch. The only known problem is that auto-upgrading of bitcode files doesn't seem to work properly (see test/Bitcode/AutoUpgradeIntrinsics.ll). Hopefully a bitcode guru (who might that be? :) ) will fix it. llvm-svn: 44359
* Make LoopInfoBase more generic, in preparation for having MachineLoopInfo. ↵Owen Anderson2007-11-277-15/+15
| | | | | | This involves a small interface change. llvm-svn: 44348
* Fix another bug that was causing siod to fail.Owen Anderson2007-11-261-19/+29
| | | | llvm-svn: 44325
* Allow GVN to eliminate read-only function calls when it can detect that they ↵Owen Anderson2007-11-261-1/+18
| | | | | | are redundant. llvm-svn: 44323
* Remove another leak. Due to some reason AliasSetTracker didn't had any dtor...Anton Korobeynikov2007-11-251-0/+5
| | | | llvm-svn: 44320
* Implement PR1822Chris Lattner2007-11-251-0/+7
| | | | llvm-svn: 44318
* Fix PR1816. If a bitcast of a function only exists because of aDuncan Sands2007-11-251-4/+5
| | | | | | | | | trivial difference in function attributes, allow calls to it to be converted to direct calls. Based on a patch by Török Edwin. While there, move the various lists of mutually incompatible parameters etc out of the verifier and into ParameterAttributes.h. llvm-svn: 44315
* add a comment.Chris Lattner2007-11-231-1/+1
| | | | llvm-svn: 44293
* Remove some logic I thoughtlessly copied overDuncan Sands2007-11-231-3/+0
| | | | | | | | from the old ADCE implementation (there it was correct because the transform was being done for read-only functions). llvm-svn: 44287
* Fix PR1817.Chris Lattner2007-11-221-1/+6
| | | | llvm-svn: 44284
* Don't crash on bogus llvm.noinline. This is first part of PR1817 (preventing ↵Anton Korobeynikov2007-11-221-0/+4
| | | | | | reduction) llvm-svn: 44281
* Turn invokes of nounwind functions into ordinary calls.Duncan Sands2007-11-221-1/+49
| | | | llvm-svn: 44280
* Readonly/readnone functions are allowed to throwDuncan Sands2007-11-221-27/+1
| | | | | | | exceptions, so don't turn invokes of them into calls. llvm-svn: 44278
* typoNick Lewycky2007-11-211-1/+1
| | | | llvm-svn: 44262
* Add explicit keywords.Dan Gohman2007-11-191-4/+4
| | | | llvm-svn: 44234
* Remove indeterminism from a loop. We think this willDale Johannesen2007-11-171-2/+6
| | | | | | | fix an occasional nonrepeatable bootstrap failure we've been seeing on Darwin. llvm-svn: 44202
* Fix PR1800 by correcting mistaken logic.Chris Lattner2007-11-161-2/+1
| | | | llvm-svn: 44188
* Fix PR1788 by taking the approach suggested by Richard Smith.Chris Lattner2007-11-151-11/+16
| | | | | | Thanks to him for his detailed analysis of the problem. llvm-svn: 44162
* Allow the block extractor take to take a list of basic blocks to not extractNick Lewycky2007-11-141-1/+58
| | | | | | | | | from a file containing Function/BasicBlock pairings. This is not safe against anonymous or abnormally-named Funcs or BBs. Make bugpoint use this interface to pass the BBs list to the child bugpoint. llvm-svn: 44101
* Implement PR1796 and Transforms/SimplifyCFG/noreturn-call.llChris Lattner2007-11-141-15/+59
| | | | | | by inserting unreachable after no-return calls. llvm-svn: 44099
* Fix the regression on Transforms/GlobalOpt/deadglobal-2.ll from myChris Lattner2007-11-131-3/+3
| | | | | | patch on friday. llvm-svn: 44068
* Implement PR1786 by iterating between dead cycle eliminationChris Lattner2007-11-131-33/+63
| | | | | | and simplifycfg in the rare cases when it is needed. llvm-svn: 44044
* Tighten up a check for folding away loads from (newly constant) globals. ThisChris Lattner2007-11-091-6/+11
| | | | | | | fixes a crash on Transforms/GlobalOpt/2007-11-09-GEP-GEP-Crash.ll and rdar://5585488. llvm-svn: 43949
* Fix indentAnton Korobeynikov2007-11-091-12/+11
| | | | llvm-svn: 43941
* Forget to commit users part of value mapper interfaceAnton Korobeynikov2007-11-094-4/+4
| | | | llvm-svn: 43940
* And delete this oneAnton Korobeynikov2007-11-091-29/+0
| | | | llvm-svn: 43939
* Better checkAndrew Lenharth2007-11-081-1/+1
| | | | llvm-svn: 43897
* Fix PR1780Andrew Lenharth2007-11-081-1/+1
| | | | llvm-svn: 43893
* fix const correctness, BB is const, so its predecessors are tooChris Lattner2007-11-061-1/+1
| | | | llvm-svn: 43780
OpenPOWER on IntegriCloud