summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* Make globalopt refine global variable alignment.Dan Gohman2010-04-021-1/+7
| | | | llvm-svn: 100160
* Check for terminating conditions before adding PHIs to the worklists.Bob Wilson2010-04-021-21/+29
| | | | | | This is more efficient than adding them to the worklist and then ignoring them. llvm-svn: 100158
* Remove trailing whitespace.Bob Wilson2010-04-011-5/+5
| | | | llvm-svn: 100148
* Rewrite another SSAUpdater function to avoid recursion.Bob Wilson2010-04-011-32/+46
| | | | llvm-svn: 100147
* Change another SSAUpdater function to avoid recursion.Bob Wilson2010-04-011-18/+24
| | | | llvm-svn: 100131
* Simplify the code to check for existing PHIs, now that it is only used inBob Wilson2010-04-011-30/+12
| | | | | | one place. This removes the template function added in svn 94690. llvm-svn: 100130
* The SSAUpdater should avoid recursive traversals of the CFG, since that mayBob Wilson2010-04-011-15/+23
| | | | | | blow out the stack for really big functions. Start by fixing an easy case. llvm-svn: 100126
* Introduce ImmutableCallSite, useful for contexts where no mutationGabor Greif2010-04-013-64/+66
| | | | | | | | | is necessary. Inherits from new templated baseclass CallSiteBase<> which is highly customizable. Base CallSite on it too, in a configuration that allows full mutation. Adapt some call sites in analyses to employ ImmutableCallSite. llvm-svn: 100100
* Clean up this file a little, no functionality change. This is a subset of myNick Lewycky2010-04-011-11/+10
| | | | | | patch back in r94322. llvm-svn: 100097
* Rewrite part of the SSAUpdater to be more careful about inserting redundantBob Wilson2010-03-311-150/+263
| | | | | | | | PHIs. The previous algorithm was unable to reliably detect when existing PHIs in a cycle can be reused. I'm still working on reducing a testcase. Radar 7711900. llvm-svn: 100047
* Fix a nasty dangling-pointer heisenbug that couldDale Johannesen2010-03-311-1/+5
| | | | | | | | | | | | | | | | | | generate wrong code pretty much anywhere AFAICT. A case that hits the bug reproducibly is impossible, but the situation was like this: Addr = ... Store -> Addr Addr2 = GEP , 0, 0 Store -> Addr2 Handling the first store, the code changed replaced Addr with a sunkaddr and deleted Addr, but not its table entry. Code in OptimizedBlock replaced Addr2 with a bitcast; if that happened to reuse the memory of Addr, the old table entry was erroneously found when handling the second store. llvm-svn: 100044
* Revert Mon Ping's change 99928, since it broke all the llvm-gcc buildbots.Bob Wilson2010-03-306-127/+75
| | | | llvm-svn: 99948
* Added support for address spaces and added a isVolatile field to memcpy, ↵Mon P Wang2010-03-306-75/+127
| | | | | | | | | memmove, and memset, e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1) A update of langref will occur in a subsequent checkin. llvm-svn: 99928
* Fix a grammaro.Dan Gohman2010-03-301-1/+1
| | | | llvm-svn: 99917
* fix two cases where the arguments were extracted from the wrong range out of ↵Gabor Greif2010-03-301-3/+3
| | | | | | | | the InvokeInst spotted by baldrick -- thanks\! llvm-svn: 99914
* Remove another memory leak from ABCD by using Edges by value instead ofJeffrey Yasskin2010-03-271-29/+21
| | | | | | | pointer. There was also a SmallPtrSet whose settiness wasn't being used, so I changed it to a SmallVector. llvm-svn: 99713
* In ABCD, change the non-null Bound*s to Bound&s.Jeffrey Yasskin2010-03-271-79/+74
| | | | llvm-svn: 99711
* Fix a memory leak in ABCD by giving ownership of Bound objects to theJeffrey Yasskin2010-03-271-68/+76
| | | | | | MemoizedResultChart. llvm-svn: 99710
* When we promote a load of an argument make sure to take the alignmentEric Christopher2010-03-271-1/+5
| | | | | | | of the previous load - it's usually important. For example, we don't want to blindly turn an unaligned load into an aligned one. llvm-svn: 99699
* Ignore debug intrinsics in yet more places.Dan Gohman2010-03-261-1/+4
| | | | llvm-svn: 99580
* rename pred_const_iterator to const_pred_iterator for consistency's sakeGabor Greif2010-03-251-1/+1
| | | | llvm-svn: 99567
* rename use_const_iterator to const_use_iterator for consistency's sakeGabor Greif2010-03-255-5/+5
| | | | llvm-svn: 99564
* fix PR6642, GVN forwarding from memset to load of the base of the memset.Chris Lattner2010-03-251-7/+7
| | | | llvm-svn: 99488
* Temporarily revert this, it's causing an issue with an internal project.Eric Christopher2010-03-241-3/+1
| | | | llvm-svn: 99451
* Move OptChkCall off LibCallOptimization into StrCpyOpt.Evan Cheng2010-03-241-7/+6
| | | | llvm-svn: 99418
* Finally land the InvokeInst operand reordering.Gabor Greif2010-03-245-6/+7
| | | | | | | | | | | | I have audited all getOperandNo calls now, fixing hidden assumptions. CallSite related uglyness will be eliminated successively. Note this patch has a long and griveous history, for all the back-and-forths have a look at CallSite.h's log. llvm-svn: 99399
* tighten a type and remove trailing whitespace, no functional changesGabor Greif2010-03-241-12/+12
| | | | llvm-svn: 99398
* increase const goodness and remove pointless getUser() callsGabor Greif2010-03-241-7/+9
| | | | llvm-svn: 99395
* cache result of UI.getOperandNo() instead of calling it twice, it is cheaper ↵Gabor Greif2010-03-241-2/+3
| | | | | | this way llvm-svn: 99394
* add some accessors to callsite/callinst/invokeinst to checkChris Lattner2010-03-231-1/+3
| | | | | | | | for the noinline attribute, and make the inliner refuse to inline a call site when the call site is marked noinline even if the callee isn't. This fixes PR6682. llvm-svn: 99341
* Skip debugging intrinsics when sinking unused invariants.Bill Wendling2010-03-231-10/+24
| | | | llvm-svn: 99324
* Teach simplify libcall to transform __strcpy_chk to __memcpy_chk to enable ↵Evan Cheng2010-03-232-6/+45
| | | | | | optimizations down stream. llvm-svn: 99282
* add assert in argpromotion, which cannot triggerGabor Greif2010-03-231-4/+5
| | | | | | | | if Function::hasAddressTaken works as advertised also included some cosmetic cleanups llvm-svn: 99276
* Fix an incorrect logic causing instcombine to miss some _chk -> non-chk ↵Evan Cheng2010-03-231-1/+1
| | | | | | transformations. llvm-svn: 99263
* Fix 80 col violation.Evan Cheng2010-03-221-1/+1
| | | | llvm-svn: 99224
* backing out r99170 because it still fails on clang-x86_64-darwin10-fntGabor Greif2010-03-224-7/+7
| | | | llvm-svn: 99171
* Now that hopefully all direct accesses to InvokeInst operands are fixedGabor Greif2010-03-224-7/+7
| | | | | | we can reapply the InvokeInst operand reordering patch. (see r98957). llvm-svn: 99170
* Add a setCalledFunction member to InvokeInst (like in CallInst)Gabor Greif2010-03-202-3/+3
| | | | | | | and use this (as well as getCalledValue) to access the callee, instead of {g|s}etOperand(0). llvm-svn: 99084
* Clear the SCEVExpander's insertion point after making deletions,Dan Gohman2010-03-201-0/+4
| | | | | | | | | | | | | | so that the SCEVExpander doesn't retain a dangling pointer as its insert position. The dangling pointer in this case wasn't ever used to insert new instructions, but it was causing trouble with SCEVExpander's code for automatically advancing its insert position past debug intrinsics. This fixes use-after-free errors that valgrind noticed in test/Transforms/IndVarSimplify/2007-06-06-DeleteDanglesPtr.ll and test/Transforms/IndVarSimplify/exit_value_tests.ll. llvm-svn: 99036
* back out r98957, it broke ↵Gabor Greif2010-03-194-7/+7
| | | | | | http://smooshlab.apple.com:8010/builders/clang-x86_64-darwin10-fnt/builds/703 in the nightly test suite llvm-svn: 98958
* Recommit r80858 again (which has been backed out in r80871).Gabor Greif2010-03-194-7/+7
| | | | | | | | | | | This time I did a self-hosted bootstrap on Linux x86-64, with no problems. Let's see how darwin 64-bit self-hosting goes. At the first sign of failure I'll back this out. Maybe the valgrind bots give me a hint of what may be wrong (it at all). llvm-svn: 98957
* str[r]chr returns its pointer argument so we cannot mark it as nocapture. ↵Benjamin Kramer2010-03-161-1/+0
| | | | | | Thanks to Duncan for spotting my mistake. llvm-svn: 98671
* Mark str[r]chr readonly.Benjamin Kramer2010-03-161-1/+10
| | | | llvm-svn: 98663
* Skip debug info intrinsics.Devang Patel2010-03-151-0/+4
| | | | llvm-svn: 98584
* Skip debug info intrinsics.Devang Patel2010-03-151-0/+4
| | | | llvm-svn: 98581
* In "empty" bb, the return instruction may not be first instruction, if dbg ↵Devang Patel2010-03-151-1/+1
| | | | | | value intrinsics are present in this bb. Use terminator to find return instructions. llvm-svn: 98565
* Skip over debug info when trying to merge two return BBs.Bill Wendling2010-03-141-4/+9
| | | | llvm-svn: 98491
* Make returns more consistent with others.Bill Wendling2010-03-141-2/+2
| | | | llvm-svn: 98490
* Add a virtual destructor and give vtable a home.Benjamin Kramer2010-03-121-0/+2
| | | | llvm-svn: 98376
* Factor checked library call optimization into a common helper class and use itBenjamin Kramer2010-03-123-200/+128
| | | | | | to unify the almost identical code in CodeGenPrepare and InstCombineCalls. llvm-svn: 98338
OpenPOWER on IntegriCloud