summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update inter-procedural optimizations for atomic load/store.Eli Friedman2011-08-151-2/+4
| | | | llvm-svn: 137667
* Convert GetElementPtrInst to use ArrayRef.Jay Foad2011-07-251-7/+4
| | | | llvm-svn: 135904
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-181-13/+13
| | | | llvm-svn: 135375
* Convert CallInst and InvokeInst APIs to use ArrayRef.Jay Foad2011-07-151-2/+2
| | | | llvm-svn: 135265
* Second attempt at de-constifying LLVM Types in FunctionType::get(),Jay Foad2011-07-121-1/+1
| | | | | | StructType::get() and TargetData::getIntPtrType(). llvm-svn: 134982
* Revert r134893 and r134888 (and related patches in other trees). It was causingBill Wendling2011-07-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 FunctionType::get().Jay Foad2011-07-111-1/+1
| | | | llvm-svn: 134888
* Fix a ton of comment typos found by codespell. Patch byChris Lattner2011-04-151-2/+2
| | | | | | Luis Felipe Strano Moraes! llvm-svn: 129558
* fix PR8932, a case where arg promotion could infinitely promote.Chris Lattner2011-01-161-24/+51
| | | | llvm-svn: 123574
* Add helper functions for computing the Location of load, store,Dan Gohman2010-11-111-4/+1
| | | | | | and vaarg instructions. llvm-svn: 118845
* Factor out Instruction::isSafeToSpeculativelyExecute's code forDan Gohman2010-11-111-14/+1
| | | | | | | | | | | | testing for dereferenceable pointers into a helper function, isDereferenceablePointer. Teach it how to reason about GEPs with simple non-zero indices. Also eliminate ArgumentPromtion's IsAlwaysValidPointer, which didn't check for weak externals or out of range gep indices. llvm-svn: 118840
* TBAA-enable ArgumentPromotion.Dan Gohman2010-11-111-8/+8
| | | | llvm-svn: 118804
* Reapply r116831 and r116839, converting AliasAnalysis to useDan Gohman2010-10-191-1/+1
| | | | | | uint64_t, plus fixes for places I missed before. llvm-svn: 116875
* Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson2010-10-191-1/+3
| | | | | | | | | | | | | | | | | exposes an initializeMyPassFunction(), which must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize the pass's dependencies. Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h before parsing commandline arguments. I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass registration/creation, please send the testcase to me directly. llvm-svn: 116820
* CallGraphSCC passes implicity require CallGraph analysis.Owen Anderson2010-10-131-0/+1
| | | | llvm-svn: 116443
* Begin adding static dependence information to passes, which will allow us toOwen Anderson2010-10-121-1/+4
| | | | | | | | | perform initialization without static constructors AND without explicit initialization by the client. For the moment, passes are required to initialize both their (potential) dependencies and any passes they preserve. I hope to be able to relax the latter requirement in the future. llvm-svn: 116334
* Now with fewer extraneous semicolons!Owen Anderson2010-10-071-1/+1
| | | | llvm-svn: 115996
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-061-1/+1
| | | | llvm-svn: 110460
* Revert r110396 to fix buildbots.Owen Anderson2010-08-061-1/+1
| | | | llvm-svn: 110410
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-051-1/+1
| | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
* simplify by using CallSite constructors; virtually eliminates CallSite::get ↵Gabor Greif2010-07-281-4/+3
| | | | | | from the tree llvm-svn: 109687
* Fix batch of converting RegisterPass<> to INTIALIZE_PASS().Owen Anderson2010-07-211-2/+2
| | | | llvm-svn: 109045
* cache result of operator*Gabor Greif2010-07-121-6/+9
| | | | llvm-svn: 108146
* Fix rdar://7879828 - crash in CallGraph, a self host issue.Chris Lattner2010-04-201-3/+9
| | | | | | | | Arg promotion was deleting call graph nodes that still had references from the 'indirect' CGN. Like the inliner, it should only delete the function if all references are gone. llvm-svn: 101845
* introduce a new CallGraphSCC class, and pass it aroundChris Lattner2010-04-161-5/+6
| | | | | | | | to CallGraphSCCPass's instead of passing around a std::vector<CallGraphNode*>. No functionality change, but now we have a much tidier interface. llvm-svn: 101558
* 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
* 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
* Correct whitespace.Nick Lewycky2010-02-251-1/+1
| | | | llvm-svn: 97120
* There are two ways of checking for a given type, for example isa<PointerType>(T)Duncan Sands2010-02-161-2/+2
| | | | | | | and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. llvm-svn: 96344
* Fix "the the" and similar typos.Dan Gohman2010-02-101-1/+1
| | | | llvm-svn: 95781
* Change errs() to dbgs().David Greene2010-01-051-5/+5
| | | | llvm-svn: 92639
* Remove includes of Support/Compiler.h that are no longer needed after theNick Lewycky2009-10-251-1/+0
| | | | | | VISIBILITY_HIDDEN removal. llvm-svn: 85043
* Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.Nick Lewycky2009-10-251-1/+1
| | | | | | | Chris claims we should never have visibility_hidden inside any .cpp file but that's still not true even after this commit. llvm-svn: 85042
* add a new CallGraphNode::replaceCallEdge method and use it fromChris Lattner2009-09-151-4/+4
| | | | | | | | argpromote to avoid invalidating an iterator. This fixes PR4977. All clang tests now pass with expensive checking (on my system at least). llvm-svn: 81843
* remove CallGraphNode::replaceCallSite, it is redundant with other APIs.Chris Lattner2009-09-011-1/+3
| | | | llvm-svn: 80708
* add -debug outputChris Lattner2009-08-311-0/+4
| | | | llvm-svn: 80539
* Fix some nasty callgraph dangling pointer problems in Chris Lattner2009-08-311-22/+30
| | | | | | | | | | | | | | | | | | | | | | | | | argpromotion and structretpromote. Basically, when replacing a function, they used the 'changeFunction' api which changes the entry in the function map (and steals/reuses the callgraph node). This has some interesting effects: first, the problem is that it doesn't update the "callee" edges in any callees of the function in the call graph. Second, this covers for a major problem in all the CGSCC pass stuff, which is that it is completely broken when functions are deleted if they *don't* reuse a CGN. (there is a cute little fixme about this though :). This patch changes the protocol that CGSCC passes must obey: now the CGSCC pass manager copies the SCC and preincrements its iterator to avoid passes invalidating it. This allows CGSCC passes to mutate the current SCC. However multiple passes may be run on that SCC, so if passes do this, they are now required to *update* the SCC to be current when they return. Other less interesting parts of this patch are that it makes passes update the CG more directly, eliminates changeFunction, and requires clients of replaceCallSite to specify the new callee CGN if they are changing it. llvm-svn: 80527
* prune the #includes in raw_ostream.h by moving a Chris Lattner2009-08-241-0/+1
| | | | | | | member out of line. ftostr is not particularly speedy, so that method is presumably not perf sensitive. llvm-svn: 79885
* Make TargetData optional in GlobalOpt and ArgumentPromotion.Dan Gohman2009-08-141-3/+3
| | | | llvm-svn: 78967
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-8/+13
| | | | llvm-svn: 78948
* Move a few more APIs back to 2.5 forms. The only remaining ones left to ↵Owen Anderson2009-07-311-3/+2
| | | | | | | | change back are metadata related, which I'm waiting on to avoid conflicting with Devang. llvm-svn: 77721
* Twines: Don't allow implicit conversion from integers, this is too tricky.Daniel Dunbar2009-07-301-2/+2
| | | | llvm-svn: 77605
* Switch obvious clients to Twine instead of utostr (when they were already usingDaniel Dunbar2009-07-301-3/+2
| | | | | | | | | a Twine, e.g., for names). - I am a little ambivalent about this; we don't want the string conversion of utostr, but using overload '+' mixed with string and integer arguments is sketchy. On the other hand, this particular usage is something of an idiom. llvm-svn: 77579
* Move types back to the 2.5 API.Owen Anderson2009-07-291-1/+1
| | | | llvm-svn: 77516
* More migration to raw_ostream, the water has dried up around the iostream hole.Daniel Dunbar2009-07-251-11/+12
| | | | | | | | | | - Some clients which used DOUT have moved to DEBUG. We are deprecating the "magic" DOUT behavior which avoided calling printing functions when the statement was disabled. In addition to being unnecessary magic, it had the downside of leaving code in -Asserts builds, and of hiding potentially unnecessary computations. llvm-svn: 77019
* Revert the ConstantInt constructors back to their 2.5 forms where possible, ↵Owen Anderson2009-07-241-5/+5
| | | | | | thanks to contexts-on-types. More to come. llvm-svn: 77011
* Remove unnecessary store to temporary std::string.Daniel Dunbar2009-07-221-3/+4
| | | | llvm-svn: 76782
* Get rid of the Pass+Context magic.Owen Anderson2009-07-221-8/+9
| | | | llvm-svn: 76702
* Revert yesterday's change by removing the LLVMContext parameter to ↵Owen Anderson2009-07-151-1/+1
| | | | | | AllocaInst and MallocInst. llvm-svn: 75863
* Move EVER MORE stuff over to LLVMContext.Owen Anderson2009-07-141-1/+1
| | | | llvm-svn: 75703
OpenPOWER on IntegriCloud