summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fixup for r165490: Use DenseMap instead of std::map. Simplify the loop in ↵Alexey Samsonov2012-10-091-13/+16
| | | | | | CollectFunctionDIs. llvm-svn: 165498
* Fix PR14016.Alexey Samsonov2012-10-091-0/+50
| | | | | | | | | | DeadArgumentElimination pass can replace one LLVM function with another, invalidating a pointer stored in debug info metadata entry for this function. To fix this, we collect debug info descriptors for functions before running a DeadArgumentElimination pass and "patch" pointers in metadata nodes if we replace a function. llvm-svn: 165490
* Query for attributes via the correct method call.Bill Wendling2012-10-041-2/+2
| | | | llvm-svn: 165206
* Move Attribute::typeIncompatible inside of the Attributes class.Bill Wendling2012-09-251-3/+3
| | | | llvm-svn: 164629
* switch AttrListPtr::get to take an ArrayRef, simplifying a lot of clients.Chris Lattner2012-05-281-5/+3
| | | | llvm-svn: 157556
* Remove all remaining uses of Value::getNameStr().Benjamin Kramer2011-11-151-1/+1
| | | | llvm-svn: 144648
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-181-6/+6
| | | | llvm-svn: 135375
* Convert CallInst and InvokeInst APIs to use ArrayRef.Jay Foad2011-07-151-4/+4
| | | | llvm-svn: 135265
* Second attempt at de-constifying LLVM Types in FunctionType::get(),Jay Foad2011-07-121-4/+4
| | | | | | StructType::get() and TargetData::getIntPtrType(). llvm-svn: 134982
* Revert r134893 and r134888 (and related patches in other trees). It was causingBill Wendling2011-07-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+2
| | | | llvm-svn: 134893
* De-constify Types in FunctionType::get().Jay Foad2011-07-111-2/+2
| | | | llvm-svn: 134888
* Fix a ton of comment typos found by codespell. Patch byChris Lattner2011-04-151-6/+6
| | | | | | Luis Felipe Strano Moraes! llvm-svn: 129558
* Add an obvious missing safety check to DAE::RemoveDeadArgumentsFromCallers.Eli Friedman2011-03-011-1/+1
| | | | llvm-svn: 126720
* Teach DAE to look for functions whose arguments are unused, and change all ↵Anders Carlsson2011-01-161-1/+61
| | | | | | callers to pass in an undefvalue instead. llvm-svn: 123596
* 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
* Now with fewer extraneous semicolons!Owen Anderson2010-10-071-2/+2
| | | | llvm-svn: 115996
* Massive rewrite of MMX: Dale Johannesen2010-09-301-2/+4
| | | | | | | | | | | | | | | | | | | The x86_mmx type is used for MMX intrinsics, parameters and return values where these use MMX registers, and is also supported in load, store, and bitcast. Only the above operations generate MMX instructions, and optimizations do not operate on or produce MMX intrinsics. MMX-sized vectors <2 x i32> etc. are lowered to XMM or split into smaller pieces. Optimizations may occur on these forms and the result casted back to x86_mmx, provided the result feeds into a previous existing x86_mmx operation. The point of all this is prevent optimizations from introducing MMX operations, which is unsafe due to the EMMS problem. llvm-svn: 115243
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-061-3/+3
| | | | llvm-svn: 110460
* Revert r110396 to fix buildbots.Owen Anderson2010-08-061-3/+3
| | | | llvm-svn: 110410
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-051-3/+3
| | | | | | | | 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-3/+3
| | | | | | from the tree llvm-svn: 109687
* Fix batch of converting RegisterPass<> to INTIALIZE_PASS().Owen Anderson2010-07-211-4/+4
| | | | llvm-svn: 109045
* Use getDebugLoc and setDebugLoc instead of getDbgMetadata and setDbgMetadata,Dan Gohman2010-07-201-4/+2
| | | | | | avoiding MDNode overhead. llvm-svn: 108909
* Make bugpoint dead-argument-hacking actually work, and actually test it.Dan Gohman2010-06-071-0/+7
| | | | llvm-svn: 105551
* Clean up, no functional change.Nick Lewycky2010-05-151-9/+9
| | | | llvm-svn: 103857
* Preserve debug info attached with call instruction while eliminating dead ↵Devang Patel2010-04-301-0/+6
| | | | | | | | argument. Radar 7927803 llvm-svn: 102760
* I don't know how, but I managed to goof the revert. Remove function that shouldNick Lewycky2010-04-141-37/+0
| | | | | | have been removed in r101231. llvm-svn: 101232
* Revert r101213.Nick Lewycky2010-04-141-29/+14
| | | | llvm-svn: 101231
* Remove tab.Nick Lewycky2010-04-141-1/+1
| | | | llvm-svn: 101223
* While DAE can't modify the function signature of an externally visible function,Nick Lewycky2010-04-141-14/+66
| | | | | | | | | it can check whether the visible direct callers are passing in parameters to dead arguments and replace those with undef. This reinstates r94322 with bugs fixed. llvm-svn: 101213
* Implement support for varargs functions without any fixedChris Lattner2010-04-101-15/+0
| | | | | | | | parameters in the CBE by implicitly adding a fixed argument. This allows eliminating a work-around from DAE. Patch by Sylvere Teissier! llvm-svn: 100944
* Introduce ImmutableCallSite, useful for contexts where no mutationGabor Greif2010-04-011-26/+28
| | | | | | | | | 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
* Finally land the InvokeInst operand reordering.Gabor Greif2010-03-241-1/+1
| | | | | | | | | | | | 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
* backing out r99170 because it still fails on clang-x86_64-darwin10-fntGabor Greif2010-03-221-3/+3
| | | | llvm-svn: 99171
* Now that hopefully all direct accesses to InvokeInst operands are fixedGabor Greif2010-03-221-3/+3
| | | | | | we can reapply the InvokeInst operand reordering patch. (see r98957). llvm-svn: 99170
* back out r98957, it broke ↵Gabor Greif2010-03-191-3/+3
| | | | | | 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-191-3/+3
| | | | | | | | | | | 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
* 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
* Speculatively revert r94322 to see if it fixes darwin selfhost buildbot.Nick Lewycky2010-01-231-70/+23
| | | | llvm-svn: 94331
* Teach DAE that even though it can't modify the function signature of anNick Lewycky2010-01-231-23/+70
| | | | | | | externally visible function, it can still find all callers of it and replace the parameters to a dead argument with undef. llvm-svn: 94322
* Change errs() to dbgs().David Greene2010-01-051-9/+9
| | | | llvm-svn: 92636
* 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
* back out my recent commit (r80858), it seems to break self-hosting ↵Gabor Greif2009-09-031-3/+3
| | | | | | buildbot's stage 2 configure llvm-svn: 80871
* re-commit r66920 (which has been backed out in r66953) I may have more luck ↵Gabor Greif2009-09-031-3/+3
| | | | | | this time. I'll back out if needed... llvm-svn: 80858
* remove a few DOUTs here and there.Chris Lattner2009-08-231-3/+3
| | | | llvm-svn: 79832
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-10/+10
| | | | llvm-svn: 78948
OpenPOWER on IntegriCloud