summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
...
* LoopUnroll looks like it has some stale code. Remove it to prove my sanity ↵Andrew Trick2011-08-091-6/+1
| | | | | | and avoid further confusion. llvm-svn: 137106
* There is only one instance of this placeholder being created. Just use thatBill Wendling2011-08-091-6/+6
| | | | | | instead of a vector. llvm-svn: 137099
* Remove an instance where the 'unwind' instruction was created.Bill Wendling2011-08-091-2/+10
| | | | | | | | | The 'unwind' instruction was acting essentially as a placeholder, because it would be replaced at the end of this function by a branch to the "unwind handler". The 'unwind' instruction is going away, so use 'unreachable' instead, which serves the same purpose as a placeholder. llvm-svn: 137098
* Made SCEV's UDiv expressions more canonical. When dividing aAndrew Trick2011-08-061-0/+65
| | | | | | | | | | | | | | | | | | | | | | | recurrence, the initial values low bits can sometimes be ignored. To take advantage of this, added FoldIVUser to IndVarSimplify to fold an IV operand into a udiv/lshr if the operator doesn't affect the result. -indvars -disable-iv-rewrite now transforms i = phi i4 i1 = i0 + 1 idx = i1 >> (2 or more) i4 = i + 4 into i = phi i4 idx = i0 >> ... i4 = i + 4 llvm-svn: 137013
* Temporarily revert r135528 which distinguishes between two copies of oneChandler Carruth2011-08-051-8/+1
| | | | | | | | | | | | | | | | | | | inlined variable, based on the discussion in PR10542. This explodes the runtime of several passes down the pipeline due to a large number of "copies" remaining live across a large function. This only shows up with both debug and opt, but when it does it creates a many-minute compile when self-hosting LLVM+Clang. There are several other cases that show these types of regressions. All of this is tracked in PR10542, and progress is being made on fixing the issue. Once its addressed, the re-instated, but until then this restores the performance for self-hosting and other opt+debug builds. Devang, let me know if this causes any trouble, or impedes fixing it in any way, and thanks for working on this! llvm-svn: 136953
* We need to map DebugLoc. It leads to Fuction * (through subprogram entry ↵Devang Patel2011-08-041-3/+2
| | | | | | node) which should be appropriately mapped. llvm-svn: 136910
* Fix an obvious type. Patch by Ivan Krasin.Evan Cheng2011-08-041-1/+1
| | | | llvm-svn: 136900
* Remove the LowerSetJmp pass. It wasn't used effectively by any of the targets.Bill Wendling2011-08-033-553/+0
| | | | | | This is some of my original LLVM code. *wipes tear* llvm-svn: 136821
* SCEV: Use AssertingVH to catch dangling BasicBlock* when passes forgetAndrew Trick2011-08-032-2/+17
| | | | | | to notify SCEV of a change. Add forgetLoop in a couple of those places. llvm-svn: 136797
* whitespaceAndrew Trick2011-08-031-7/+7
| | | | llvm-svn: 136795
* Small cleanups:Nick Lewycky2011-08-031-3/+2
| | | | | | | | | - use SmallVectorImpl& for the function argument. - ignore the operands on the GEP, even if they aren't constant! Much as we pretend the malloc succeeds, we pretend that malloc + whatever-you-GEP'd-by is not null. It's magic! llvm-svn: 136757
* Fix logical error when detecting lifetime intrinsics.Nick Lewycky2011-08-031-33/+34
| | | | | | | | | Don't replace a gep/bitcast with 'undef' because that will form a "free(undef)" which in turn means "unreachable". What we wanted was a no-op. Instead, analyze the whole tree and look for all the instructions we need to delete first, then delete them second, not relying on the use_list to stay consistent. llvm-svn: 136752
* Teach InstCombine that lifetime intrincs aren't a real user on the result of aNick Lewycky2011-08-021-11/+35
| | | | | | malloc call. llvm-svn: 136732
* Move methods in PassManagerBuilder offline.Rafael Espindola2011-08-022-0/+249
| | | | llvm-svn: 136727
* Add new atomic instructions to SCCP. No functional change, but stops debug ↵Eli Friedman2011-08-021-0/+2
| | | | | | spam. llvm-svn: 136723
* Lifetime intrinsics on undef are dead.Nick Lewycky2011-08-021-3/+9
| | | | llvm-svn: 136722
* Revert r136503 and r136480 in an effort to fix non-determinism in the ↵Owen Anderson2011-08-021-22/+1
| | | | | | llvm-gcc buildbots on i386. Devang is looking into the root cause. llvm-svn: 136674
* Add the 'resume' instruction for the new EH rewrite.Bill Wendling2011-07-313-4/+7
| | | | | | | | | This adds the 'resume' instruction class, IR parsing, and bitcode reading and writing. The 'resume' instruction resumes propagation of an existing (in-flight) exception whose unwinding was interrupted with a 'landingpad' instruction (to be added later). llvm-svn: 136589
* Add a small gep optimization I noticed was missing while reading some IL.Rafael Espindola2011-07-311-11/+13
| | | | llvm-svn: 136585
* Revert r136253, r136263, r136269, r136313, r136325, r136326, r136329, r136338,Bill Wendling2011-07-304-150/+23
| | | | | | | r136339, r136341, r136369, r136387, r136392, r136396, r136429, r136430, r136444, r136445, r136446, r136253 pending review. llvm-svn: 136556
* Clear DbgValues in the end.Devang Patel2011-07-291-0/+1
| | | | llvm-svn: 136503
* Clean up debug info after reassociation.Devang Patel2011-07-291-1/+21
| | | | llvm-svn: 136480
* Misc optimizer+codegen work for 'cmpxchg' and 'atomicrmw'. They appear to beEli Friedman2011-07-292-16/+90
| | | | | | | | | working on x86 (at least for trivial testcases); other architectures will need more work so that they actually emit the appropriate instructions for orderings stricter than 'monotonic'. (As far as I can tell, the ARM, PPC, Mips, and Alpha backends need such changes.) llvm-svn: 136457
* Make sure to correctly clear the exact/nuw/nsw flags off of shifts when they ↵Eli Friedman2011-07-291-19/+27
| | | | | | are combined together. <rdar://problem/9859829> llvm-svn: 136435
* Rewrite the CMake build to use explicit dependencies between libraries,Chandler Carruth2011-07-295-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | specified in the same file that the library itself is created. This is more idiomatic for CMake builds, and also allows us to correctly specify dependencies that are missed due to bugs in the GenLibDeps perl script, or change from compiler to compiler. On Linux, this returns CMake to a place where it can relably rebuild several targets of LLVM. I have tried not to change the dependencies from the ones in the current auto-generated file. The only places I've really diverged are in places where I was seeing link failures, and added a dependency. The goal of this patch is not to start changing the dependencies, merely to move them into the correct location, and an explicit form that we can control and change when necessary. This also removes a serialization point in the build because we don't have to scan all the libraries before we begin building various tools. We no longer have a step of the build that regenerates a file inside the source tree. A few other associated cleanups fall out of this. This isn't really finished yet though. After talking to dgregor he urged switching to a single CMake macro to construct libraries with both sources and dependencies in the arguments. Migrating from the two macros to that style will be a follow-up patch. Also, llvm-config is still generated with GenLibDeps.pl, which means it still has slightly buggy dependencies. The internal CMake 'llvm-config-like' macro uses the correct explicitly specified dependencies however. A future patch will switch llvm-config generation (when using CMake) to be based on these deps as well. This may well break Windows. I'm getting a machine set up now to dig into any failures there. If anyone can chime in with problems they see or ideas of how to solve them for Windows, much appreciated. llvm-svn: 136433
* Some minor cleanups. No functionalitical change.Bill Wendling2011-07-281-17/+10
| | | | llvm-svn: 136341
* Leverage some of the code that John wrote to manage the landing pads.Bill Wendling2011-07-281-32/+56
| | | | | | | The new EH is more simple in many respects. Mainly, we don't have to worry about the "llvm.eh.exception" and "llvm.eh.selector" calls being in weird places. llvm-svn: 136339
* Automatically merge the landingpad clauses when we come across a callee'sBill Wendling2011-07-281-28/+12
| | | | | | landingpad. llvm-svn: 136329
* Fix a use after free. An instruction can't be both an intrinsic call and a ↵Benjamin Kramer2011-07-281-1/+1
| | | | | | fence. llvm-svn: 136319
* Initial stab at getting inlining working with the EH rewrite.Bill Wendling2011-07-281-10/+98
| | | | | | | | | This takes the new 'resume' instruction and turns it into a direct jump to the caller's landing pad code. The caller's landingpad instruction is merged with the landingpad instructions of the callee. This is a bit rough and makes some assumptions in how the code works. But it passes a simple test. llvm-svn: 136313
* Refuse to inline two functions which use different personality functions.Bill Wendling2011-07-271-0/+34
| | | | llvm-svn: 136269
* Merge the contents from exception-handling-rewrite to the mainline.Bill Wendling2011-07-273-4/+8
| | | | | | This adds the new instructions 'landingpad' and 'resume'. llvm-svn: 136253
* Teach the ConstantMerge pass about alignment. Fixes PR10514!Nick Lewycky2011-07-271-8/+41
| | | | llvm-svn: 136250
* Misc mid-level changes for new 'fence' instruction.Eli Friedman2011-07-273-5/+18
| | | | llvm-svn: 136205
* Use the correct for for the version. It's little endian and my brain isBill Wendling2011-07-261-1/+1
| | | | | | | obviously big endian. :-) PR10502 llvm-svn: 136111
* Add LLVMAddAlwaysInlinerPass to the C API.Rafael Espindola2011-07-261-0/+4
| | | | llvm-svn: 136083
* LLVM 3.0 is here, remove old do nothing method.Rafael Espindola2011-07-261-5/+0
| | | | llvm-svn: 136082
* Finish adding support for lifetime intrinsics to SROA. Fixes PR10121!Nick Lewycky2011-07-251-1/+110
| | | | llvm-svn: 136008
* Add clarifying comments for the new arguments to UnrollLoop.Andrew Trick2011-07-251-0/+12
| | | | llvm-svn: 135988
* Add missing space (this line is no longer pushing the 80-column limit).Nick Lewycky2011-07-251-1/+1
| | | | llvm-svn: 135973
* Add LLVMAddLowerExpectIntrinsicPass to the C API.Rafael Espindola2011-07-251-0/+4
| | | | llvm-svn: 135966
* Shorten some expressions by using ArrayRef::slice().Frits van Bommel2011-07-251-2/+1
| | | | llvm-svn: 135910
* Convert GetElementPtrInst to use ArrayRef.Jay Foad2011-07-2510-37/+24
| | | | llvm-svn: 135904
* Move trip count discovery outside of the generic LoopUnroll helper. ThisAndrew Trick2011-07-232-14/+9
| | | | | | removes its dependence on canonical induction variables. llvm-svn: 135829
* whitespaceAndrew Trick2011-07-232-15/+15
| | | | llvm-svn: 135828
* Move the last uses of RetainFunc etc. over to using getRetainCallee() etc.Dan Gohman2011-07-221-23/+35
| | | | | | | so that a declaration for objc_retain is created when needed if it doesn't already exist. rdar://9825114. llvm-svn: 135821
* Fix more MSVC warnings caused by a cases I missed when convertingJay Foad2011-07-221-1/+1
| | | | | | ConstantExpr::getGetElementPtr to use ArrayRef. llvm-svn: 135762
* Convert IRBuilder::CreateGEP and IRBuilder::CreateInBoundsGEP to useJay Foad2011-07-224-17/+11
| | | | | | ArrayRef. llvm-svn: 135761
* Fix an MSVC warning, caused by a case I missed when convertingJay Foad2011-07-221-1/+1
| | | | | | ConstantExpr::getGetElementPtr to use ArrayRef. llvm-svn: 135758
* Fix MergeInVectorType to check for vector types with the same allocDan Gohman2011-07-211-0/+6
| | | | | | | size but different element types, so that it filters out the cases that CreateShuffleVectorCast doesn't handle. This fixes rdar://9786827. llvm-svn: 135721
OpenPOWER on IntegriCloud