summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils
Commit message (Collapse)AuthorAgeFilesLines
...
* Cleanup. Added LoopBlocksDFS::perform for simple clients.Andrew Trick2011-08-101-7/+2
| | | | llvm-svn: 137195
* Fix the LoopUnroller to handle nontrivial loops and partial unrolling.Andrew Trick2011-08-101-52/+60
| | | | | | | | | | These are not individual bug fixes. I had to rewrite a good chunk of the unroller to make it sane. I think it was getting lucky on trivial completely unrolled loops with no early exits. I included some fairly simple unit tests for partial unrolling. I didn't do much stress testing, so it may not be perfect, but should be usable now. llvm-svn: 137190
* 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
* 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
* 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
* Lifetime intrinsics on undef are dead.Nick Lewycky2011-08-021-3/+9
| | | | llvm-svn: 136722
* Revert r136253, r136263, r136269, r136313, r136325, r136326, r136329, r136338,Bill Wendling2011-07-301-142/+19
| | | | | | | r136339, r136341, r136369, r136387, r136392, r136396, r136429, r136430, r136444, r136445, r136446, r136253 pending review. llvm-svn: 136556
* Rewrite the CMake build to use explicit dependencies between libraries,Chandler Carruth2011-07-291-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* 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
* Add clarifying comments for the new arguments to UnrollLoop.Andrew Trick2011-07-251-0/+12
| | | | llvm-svn: 135988
* Convert GetElementPtrInst to use ArrayRef.Jay Foad2011-07-252-11/+7
| | | | llvm-svn: 135904
* Move trip count discovery outside of the generic LoopUnroll helper. ThisAndrew Trick2011-07-231-12/+2
| | | | | | removes its dependence on canonical induction variables. llvm-svn: 135829
* whitespaceAndrew Trick2011-07-231-7/+7
| | | | llvm-svn: 135828
* Clean up includes of llvm/Analysis/ConstantFolding.h so it's included where ↵Eli Friedman2011-07-201-1/+0
| | | | | | it's used and not included where it isn't. llvm-svn: 135628
* PR10386: Don't try to split an edge from an indirectbr.Eli Friedman2011-07-191-2/+9
| | | | llvm-svn: 135534
* Distinguish between two copies of one inlined variable.Devang Patel2011-07-191-1/+8
| | | | llvm-svn: 135528
* Use ArrayRef in ConstantFoldInstOperands and ConstantFoldCall.Jay Foad2011-07-191-2/+1
| | | | llvm-svn: 135477
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-188-20/+20
| | | | llvm-svn: 135375
* fix a warning in TinyPtrVector, adopt it in SSAUpdater, saving someChris Lattner2011-07-181-3/+3
| | | | | | mallocs. llvm-svn: 135366
* fix rdar://9776316 - type remapping needed for inline asm blobs,Chris Lattner2011-07-151-1/+17
| | | | | | fixing some objc llvm-test crashes with LTO. llvm-svn: 135324
* No need to explicitly invoke the ArrayRef constructor here.Frits van Bommel2011-07-151-1/+1
| | | | llvm-svn: 135281
* Convert CallInst and InvokeInst APIs to use ArrayRef.Jay Foad2011-07-154-16/+9
| | | | llvm-svn: 135265
* Undo r135191 (i.e. reapply Chris's patch. Now linker maps NamedMDNodes ↵Devang Patel2011-07-141-2/+3
| | | | | | first, so there is not any need to map DebugLoc). llvm-svn: 135205
* revert r135172 until Devang and I figure out the right answer.Chris Lattner2011-07-141-3/+2
| | | | llvm-svn: 135191
* Stop the ValueMapper from calling getAllMetadata, which unpacks DebugLoc intoChris Lattner2011-07-141-2/+3
| | | | | | | an MDNode. This saves a bunch of time and memory in the IR linker, e.g. when doing LTO of files with debug info. llvm-svn: 135172
* Change Intrinsic::getDeclaration and friends to take an ArrayRef.Benjamin Kramer2011-07-141-1/+1
| | | | llvm-svn: 135154
* Second attempt at de-constifying LLVM Types in FunctionType::get(),Jay Foad2011-07-123-6/+6
| | | | | | StructType::get() and TargetData::getIntPtrType(). llvm-svn: 134982
* Revert r134893 and r134888 (and related patches in other trees). It was causingBill Wendling2011-07-123-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | an assert on Darwin llvm-gcc builds. Assertion failed: (castIsValid(op, S, Ty) && "Invalid cast!"), function Create, file /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.llvm-gcc-i386-darwin9-RA/llvm.src/lib/VMCore/Instructions.cpp, li\ ne 2067. etc. http://smooshlab.apple.com:8013/builders/llvm-gcc-i386-darwin9-RA/builds/2354 --- Reverse-merging r134893 into '.': U include/llvm/Target/TargetData.h U include/llvm/DerivedTypes.h U tools/bugpoint/ExtractFunction.cpp U unittests/Support/TypeBuilderTest.cpp U lib/Target/ARM/ARMGlobalMerge.cpp U lib/Target/TargetData.cpp U lib/VMCore/Constants.cpp U lib/VMCore/Type.cpp U lib/VMCore/Core.cpp U lib/Transforms/Utils/CodeExtractor.cpp U lib/Transforms/Instrumentation/ProfilingUtils.cpp U lib/Transforms/IPO/DeadArgumentElimination.cpp U lib/CodeGen/SjLjEHPrepare.cpp --- Reverse-merging r134888 into '.': G include/llvm/DerivedTypes.h U include/llvm/Support/TypeBuilder.h U include/llvm/Intrinsics.h U unittests/Analysis/ScalarEvolutionTest.cpp U unittests/ExecutionEngine/JIT/JITTest.cpp U unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp U unittests/VMCore/PassManagerTest.cpp G unittests/Support/TypeBuilderTest.cpp U lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp U lib/Target/Blackfin/BlackfinIntrinsicInfo.cpp U lib/VMCore/IRBuilder.cpp G lib/VMCore/Type.cpp U lib/VMCore/Function.cpp G lib/VMCore/Core.cpp U lib/VMCore/Module.cpp U lib/AsmParser/LLParser.cpp U lib/Transforms/Utils/CloneFunction.cpp G lib/Transforms/Utils/CodeExtractor.cpp U lib/Transforms/Utils/InlineFunction.cpp U lib/Transforms/Instrumentation/GCOVProfiling.cpp U lib/Transforms/Scalar/ObjCARC.cpp U lib/Transforms/Scalar/SimplifyLibCalls.cpp U lib/Transforms/Scalar/MemCpyOptimizer.cpp G lib/Transforms/IPO/DeadArgumentElimination.cpp U lib/Transforms/IPO/ArgumentPromotion.cpp U lib/Transforms/InstCombine/InstCombineCompares.cpp U lib/Transforms/InstCombine/InstCombineAndOrXor.cpp U lib/Transforms/InstCombine/InstCombineCalls.cpp U lib/CodeGen/DwarfEHPrepare.cpp U lib/CodeGen/IntrinsicLowering.cpp U lib/Bitcode/Reader/BitcodeReader.cpp llvm-svn: 134949
* De-constify Types in StructType::get() and TargetData::getIntPtrType().Jay Foad2011-07-111-1/+1
| | | | llvm-svn: 134893
* De-constify Types in FunctionType::get().Jay Foad2011-07-113-5/+5
| | | | llvm-svn: 134888
* Land the long talked about "type system rewrite" patch. ThisChris Lattner2011-07-093-71/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | patch brings numerous advantages to LLVM. One way to look at it is through diffstat: 109 files changed, 3005 insertions(+), 5906 deletions(-) Removing almost 3K lines of code is a good thing. Other advantages include: 1. Value::getType() is a simple load that can be CSE'd, not a mutating union-find operation. 2. Types a uniqued and never move once created, defining away PATypeHolder. 3. Structs can be "named" now, and their name is part of the identity that uniques them. This means that the compiler doesn't merge them structurally which makes the IR much less confusing. 4. Now that there is no way to get a cycle in a type graph without a named struct type, "upreferences" go away. 5. Type refinement is completely gone, which should make LTO much MUCH faster in some common cases with C++ code. 6. Types are now generally immutable, so we can use "Type *" instead "const Type *" everywhere. Downsides of this patch are that it removes some functions from the C API, so people using those will have to upgrade to (not yet added) new API. "LLVM 3.0" is the right time to do this. There are still some cleanups pending after this, this patch is large enough as-is. llvm-svn: 134829
* Remove unused copy of UpdateInlinedAtInfo.Benjamin Kramer2011-07-081-12/+0
| | | | llvm-svn: 134720
* Refactor. It is inliner's responsibility to update line number information.Devang Patel2011-07-082-38/+40
| | | | llvm-svn: 134708
* Fix a bug in the "expect" intrinsic lowering.Jakub Staszak2011-07-061-1/+4
| | | | llvm-svn: 134566
* Simplify. Consolidate dbg.declare handling in AllocaPromoter.Devang Patel2011-07-061-11/+3
| | | | llvm-svn: 134538
* Introduce "expect" intrinsic instructions.Jakub Staszak2011-07-062-0/+164
| | | | llvm-svn: 134516
* Add r134057 back, but splice the predecessor after the successors phiRafael Espindola2011-06-302-11/+13
| | | | | | | | | nodes. Original message: Let simplify cfg simplify bb with only debug and lifetime intrinsics. llvm-svn: 134182
* Temporarily revert r134057: "Let simplify cfg simplify bb with only debug and Chad Rosier2011-06-292-13/+11
| | | | | | lifetime intrinsics" due to buildbot failures. llvm-svn: 134071
* Let simplify cfg simplify bb with only debug and lifetime intrinsics.Rafael Espindola2011-06-292-11/+13
| | | | llvm-svn: 134057
* Fix typo in comment.Nick Lewycky2011-06-281-1/+1
| | | | llvm-svn: 133990
* Move onlyUsedByLifetimeMarkers to ValueTracking so that it can be used by otherNick Lewycky2011-06-271-16/+1
| | | | | | passes as well. llvm-svn: 133904
* Reinstate r133513 (reverted in r133700) with an additional fix for aJay Foad2011-06-237-94/+98
| | | | | | -Wshorten-64-to-32 warning in Instructions.h. llvm-svn: 133708
OpenPOWER on IntegriCloud