summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Replace two manual loops with calls to CallSite::hasArguments (no functional ↵Matthijs Kooijman2008-06-041-7/+5
| | | | | | changes). llvm-svn: 51947
* Use eraseFromParent() instead of doing that manually in two places.Matthijs Kooijman2008-05-301-2/+2
| | | | llvm-svn: 51770
* Factor code to copy global value attributes likeDuncan Sands2008-05-261-7/+2
| | | | | | | | | | | | | | | the section or the visibility from one global value to another: copyAttributesFrom. This is particularly useful for duplicating functions: previously this was done by explicitly copying each attribute in turn at each place where a new function was created out of an old one, with the result that obscure attributes were regularly forgotten (like the collector or the section). Hopefully now everything is uniform and nothing is forgotten. llvm-svn: 51567
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-131-5/+10
| | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017
* API changes for class Use size reduction, wave 1.Gabor Greif2008-04-061-9/+9
| | | | | | | | Specifically, introduction of XXX::Create methods for Users that have a potentially variable number of Uses. llvm-svn: 49277
* Don't include <map> in Pass.h, which doesn't need it. This requiresDan Gohman2008-03-211-0/+1
| | | | | | adding <map> to many files that actually do need it. llvm-svn: 48667
* Reimplement the parameter attributes support, phase #1. hilights:Chris Lattner2008-03-121-30/+22
| | | | | | | | | | | | | | | | | | | | | | | 1. There is now a "PAListPtr" class, which is a smart pointer around the underlying uniqued parameter attribute list object, and manages its refcount. It is now impossible to mess up the refcount. 2. PAListPtr is now the main interface to the underlying object, and the underlying object is now completely opaque. 3. Implementation details like SmallVector and FoldingSet are now no longer part of the interface. 4. You can create a PAListPtr with an arbitrary sequence of ParamAttrsWithIndex's, no need to make a SmallVector of a specific size (you can just use an array or scalar or vector if you wish). 5. All the client code that had to check for a null pointer before dereferencing the pointer is simplified to just access the PAListPtr directly. 6. The interfaces for adding attrs to a list and removing them is a bit simpler. Phase #2 will rename some stuff (e.g. PAListPtr) and do other less invasive changes. llvm-svn: 48289
* s/isReturnStruct()/hasStructRetAttr()/gDevang Patel2008-03-031-1/+1
| | | | llvm-svn: 47857
* Split ParameterAttributes.h, putting the complicatedDale Johannesen2008-02-221-1/+1
| | | | | | | stuff into ParamAttrsList.h. Per feedback from ParamAttrs changes. llvm-svn: 47504
* Expand ParameterAttributes to 32 bits (in preparationDale Johannesen2008-02-191-5/+8
| | | | | | | for adding alignment info, not there yet). Clean up interfaces to reference ParameterAttributes consistently. llvm-svn: 47342
* DAE bug fix. Don't lose parameter attributes on vararg arguments.Evan Cheng2008-01-171-5/+9
| | | | llvm-svn: 46113
* When DAE drops the varargs part of a function, ensure anyDuncan Sands2008-01-111-2/+15
| | | | | | attributes on the vararg call arguments are also dropped. llvm-svn: 45892
* Small cleanup for handling of type/parameter attributeDuncan Sands2008-01-071-2/+2
| | | | | | incompatibility. llvm-svn: 45704
* The transform that tries to turn calls to bitcast functions intoDuncan Sands2008-01-061-3/+2
| | | | | | | | | direct calls bails out unless caller and callee have essentially equivalent parameter attributes. This is illogical - the callee's attributes should be of no relevance here. Rework the logic, which incidentally fixes a crash when removed arguments have attributes. llvm-svn: 45658
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Fixing several transforms which would drop the collector attributeGordon Henriksen2007-12-251-0/+4
| | | | | | when copying functions. llvm-svn: 45356
* Make DAE not wipe out attributes on calls, and not dropDuncan Sands2007-12-211-36/+55
| | | | | | | | | | | | | | | return attributes on the floor. In the case of a call to a varargs function where the varargs arguments are being removed, any call attributes on those arguments need to be dropped. I didn't do this because I plan to make it illegal to have such attributes (see next patch). With this change, compiling the gcc filter2 eh test at -O0 and then running opt -std-compile-opts on it results in a correctly working program (compiling at -O1 or higher results in the test failing due to a problem with how we output eh info into the IR). llvm-svn: 45285
* Rather than having special rules like "intrinsics cannotDuncan Sands2007-12-031-1/+1
| | | | | | | | | throw exceptions", just mark intrinsics with the nounwind attribute. Likewise, mark intrinsics as readnone/readonly and get rid of special aliasing logic (which didn't use anything more than this anyway). llvm-svn: 44544
* Fix PR1146: parameter attributes are longer part ofDuncan Sands2007-11-271-4/+34
| | | | | | | | | | | | the function type, instead they belong to functions and function calls. This is an updated and slightly corrected version of Reid Spencer's original patch. The only known problem is that auto-upgrading of bitcode files doesn't seem to work properly (see test/Bitcode/AutoUpgradeIntrinsics.ll). Hopefully a bitcode guru (who might that be? :) ) will fix it. llvm-svn: 44359
* Fix PR1788 by taking the approach suggested by Richard Smith.Chris Lattner2007-11-151-11/+16
| | | | | | Thanks to him for his detailed analysis of the problem. llvm-svn: 44162
* Fix PR1735 and Transforms/DeadArgElim/2007-10-18-VarargsReturn.ll byChris Lattner2007-10-181-3/+3
| | | | | | fixing some obviously broken code :( llvm-svn: 43141
* Update InvokeInst to work like CallInstDavid Greene2007-08-271-2/+2
| | | | llvm-svn: 41506
* New CallInst interface to address GLIBCXX_DEBUG errors caused byDavid Greene2007-08-011-2/+2
| | | | | | | | indexing an empty std::vector. Updates to all clients. llvm-svn: 40660
* Fix typo in comment.Nick Lewycky2007-05-061-1/+1
| | | | llvm-svn: 36873
* Drop 'const'Devang Patel2007-05-031-4/+4
| | | | llvm-svn: 36662
* Use 'static const char' instead of 'static const int'.Devang Patel2007-05-021-4/+4
| | | | | | | Due to darwin gcc bug, one version of darwin linker coalesces static const int, which defauts PassID based pass identification. llvm-svn: 36652
* Do not use typeinfo to identify pass in pass manager.Devang Patel2007-05-011-0/+5
| | | | llvm-svn: 36632
* Eliminate use of ctors that take vectors.Chris Lattner2007-02-131-4/+4
| | | | llvm-svn: 34219
* simplify name juggling through the use of Value::takeName.Chris Lattner2007-02-111-14/+8
| | | | llvm-svn: 34175
* Fix Transforms/DeadArgElim/2007-02-07-FuncRename.ll, fallout from PR411.Chris Lattner2007-02-071-2/+4
| | | | | | | | | This happened because deadargelim now causes VMCore to auto-rename every function that it hacks arguments out of. Because it hacks arguments out of functions in a non-deterministic order, this caused the resultant numbering to be nondet. The fix is to just be careful to not rename functions! llvm-svn: 34005
* Apply the VISIBILITY_HIDDEN field to the remaining anonymous classes inReid Spencer2007-02-051-1/+2
| | | | | | | the Transforms library. This reduces debug library size by 132 KB, debug binary size by 376 KB, and reduces link time for llvm tools slightly. llvm-svn: 33939
* For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoidReid Spencer2007-01-301-1/+1
| | | | | | confusion with external linkage types. llvm-svn: 33663
* Propagate changes from my local tree. This patch includes:Anton Korobeynikov2007-01-281-3/+4
| | | | | | | | | | | | | | | | | | | | | | 1. New parameter attribute called 'inreg'. It has meaning "place this parameter in registers, if possible". This is some generalization of gcc's regparm(n) attribute. It's currently used only in X86-32 backend. 2. Completely rewritten CC handling/lowering code inside X86 backend. Merged stdcall + c CCs and fastcall + fast CC. 3. Dropped CSRET CC. We cannot add struct return variant for each target-specific CC (e.g. stdcall + csretcc and so on). 4. Instead of CSRET CC introduced 'sret' parameter attribute. Setting in on first attribute has meaning 'This is hidden pointer to structure return. Handle it gently'. 5. Fixed small bug in llvm-extract + add new feature to FunctionExtraction pass, which relinks all internal-linkaged callees from deleted function to external linkage. This will allow further linking everything together. NOTEs: 1. Documentation will be updated soon. 2. llvm-upgrade should be improved to translate csret => sret. Before this, there will be some unexpected test fails. llvm-svn: 33597
* For PR950:Reid Spencer2006-12-311-2/+2
| | | | | | | | | | | | | This patch replaces signed integer types with signless ones: 1. [US]Byte -> Int8 2. [U]Short -> Int16 3. [U]Int -> Int32 4. [U]Long -> Int64. 5. Removal of isSigned, isUnsigned, getSignedVersion, getUnsignedVersion and other methods related to signedness. In a few places this warranted identifying the signedness information from other sources. llvm-svn: 32785
* Eliminate static ctors due to Statistic objectsChris Lattner2006-12-191-5/+3
| | | | llvm-svn: 32693
* when inserting a dummy argument to work-around the CBE not supportingChris Lattner2006-12-161-3/+1
| | | | | | zero arg vararg functions, pass undef instead of 'int 0', which is cheaper. llvm-svn: 32634
* Detemplatize the Statistic class. The only type it is instantiated withChris Lattner2006-12-061-2/+2
| | | | | | is 'unsigned'. llvm-svn: 32279
* Replace #include <iostream> with llvm_* streams.Bill Wendling2006-11-261-10/+8
| | | | llvm-svn: 31924
* Implement a trivial optzn: of vastart is never called in a function that takesChris Lattner2006-09-181-2/+113
| | | | | | | | ... args, remove the '...'. This is Transforms/DeadArgElim/dead_vaargs.ll llvm-svn: 30459
* eliminate RegisterOpt. It does the same thing as RegisterPass.Chris Lattner2006-08-271-1/+1
| | | | llvm-svn: 29925
* Fix Transforms/DeadArgElim/2006-06-27-struct-ret.ll. -deadargelim should notChris Lattner2006-06-271-5/+11
| | | | | | | remove the struct return argument of a csret function, even if it is obviously dead. llvm-svn: 28943
* Make iostream #inclusion explicitChris Lattner2006-01-221-0/+1
| | | | llvm-svn: 25514
* add a debug typeChris Lattner2005-06-241-0/+1
| | | | llvm-svn: 22277
* Preserve calling conventions when doing IPOChris Lattner2005-05-091-0/+3
| | | | llvm-svn: 21798
* preserve the tail markerChris Lattner2005-05-061-0/+2
| | | | llvm-svn: 21734
* Wrap long linesChris Lattner2005-05-061-6/+10
| | | | llvm-svn: 21720
* Remove trailing whitespaceMisha Brukman2005-04-211-11/+11
| | | | llvm-svn: 21427
* This mega patch converts us from using Function::a{iterator|begin|end} toChris Lattner2005-03-151-8/+8
| | | | | | | | using Function::arg_{iterator|begin|end}. Likewise Module::g* -> Module::global_*. This patch is contributed by Gabor Greif, thanks! llvm-svn: 20597
* 'Pass' should now not be derived from by clients. Instead, they should deriveChris Lattner2004-09-201-5/+5
| | | | | | | from ModulePass. Instead of implementing Pass::run, then should implement ModulePass::runOnModule. llvm-svn: 16436
* Changes For Bug 352Reid Spencer2004-09-011-3/+3
| | | | | | | | Move include/Config and include/Support into include/llvm/Config, include/llvm/ADT and include/llvm/Support. From here on out, all LLVM public header files must be under include/llvm/. llvm-svn: 16137
OpenPOWER on IntegriCloud