summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils
Commit message (Collapse)AuthorAgeFilesLines
* rewrite RecursivelyDeleteTriviallyDeadInstructions to use a more efficientChris Lattner2008-11-281-16/+26
| | | | | | formulation that doesn't require set lookups or scanning a set. llvm-svn: 60203
* remove some weirdness that came from the LSR code that hasChris Lattner2008-11-281-8/+1
| | | | | | | nothing to do with dead instruction elimination. No tests in dejagnu depend on this, so I don't know what it was needed for. llvm-svn: 60202
* delete ErasePossiblyDeadInstructionTree, replacing uses of it withChris Lattner2008-11-271-41/+9
| | | | | | RecursivelyDeleteTriviallyDeadInstructions. llvm-svn: 60196
* enhance RecursivelyDeleteTriviallyDeadInstructions to makeChris Lattner2008-11-271-0/+9
| | | | | | PHIs dead if they are single-value. llvm-svn: 60194
* Enhance RecursivelyDeleteTriviallyDeadInstructions to optionallyChris Lattner2008-11-271-7/+15
| | | | | | return a list of deleted instructions. llvm-svn: 60193
* remove doConstantPropagation and dceInstruction, they are justChris Lattner2008-11-271-30/+25
| | | | | | | | | | wrappers around the interesting code and use an obscure iterator abstraction that dates back many many years. Move EraseDeadInstructions to Transforms/Utils and name it RecursivelyDeleteTriviallyDeadInstructions. llvm-svn: 60191
* switch InstCombine::visitLoadInst to use Chris Lattner2008-11-271-2/+25
| | | | | | FindAvailableLoadedValue llvm-svn: 60169
* enhance FindAvailableLoadedValue to make use of AliasAnalysisChris Lattner2008-11-271-1/+20
| | | | | | if it has it. llvm-svn: 60167
* move FindAvailableLoadedValue from JumpThreading to Transforms/Utils.Chris Lattner2008-11-271-0/+62
| | | | llvm-svn: 60166
* simplify this code a bit.Chris Lattner2008-11-271-4/+4
| | | | llvm-svn: 60164
* move MergeBasicBlockIntoOnlyPred to Transforms/Utils.Chris Lattner2008-11-271-0/+33
| | | | llvm-svn: 60162
* reapply Sanjiv's patch to genericize memcpy/memset/memmove to take anChris Lattner2008-11-211-1/+3
| | | | | | arbitrary integer width for the count. llvm-svn: 59823
* Revert r59802. It was breaking the build of llvm-gcc:Bill Wendling2008-11-211-3/+1
| | | | | | | | | | | | | | | | | | | | | g++ -m32 -c -g -DIN_GCC -W -Wall -Wwrite-strings -Wmissing-format-attribute -fno-common -mdynamic-no-pic -DHAVE_CONFIG_H -Wno-unused -DTARGET_NAME=\"i386-apple-darwin9.5.0\" -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include -DENABLE_LLVM -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/../llvm.src/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include ../../llvm-gcc.src/gcc/llvm-types.cpp -o llvm-types.o ../../llvm-gcc.src/gcc/llvm-convert.cpp: In member function 'void TreeToLLVM::EmitMemCpy(llvm::Value*, llvm::Value*, llvm::Value*, unsigned int)': ../../llvm-gcc.src/gcc/llvm-convert.cpp:1496: error: 'memcpy_i32' is not a member of 'llvm::Intrinsic' ../../llvm-gcc.src/gcc/llvm-convert.cpp:1496: error: 'memcpy_i64' is not a member of 'llvm::Intrinsic' ../../llvm-gcc.src/gcc/llvm-convert.cpp: In member function 'void TreeToLLVM::EmitMemMove(llvm::Value*, llvm::Value*, llvm::Value*, unsigned int)': ../../llvm-gcc.src/gcc/llvm-convert.cpp:1512: error: 'memmove_i32' is not a member of 'llvm::Intrinsic' ../../llvm-gcc.src/gcc/llvm-convert.cpp:1512: error: 'memmove_i64' is not a member of 'llvm::Intrinsic' ../../llvm-gcc.src/gcc/llvm-convert.cpp: In member function 'void TreeToLLVM::EmitMemSet(llvm::Value*, llvm::Value*, llvm::Value*, unsigned int)': ../../llvm-gcc.src/gcc/llvm-convert.cpp:1528: error: 'memset_i32' is not a member of 'llvm::Intrinsic' ../../llvm-gcc.src/gcc/llvm-convert.cpp:1528: error: 'memset_i64' is not a member of 'llvm::Intrinsic' make[3]: *** [llvm-convert.o] Error 1 make[3]: *** Waiting for unfinished jobs.... rm fsf-funding.pod gcov.pod gfdl.pod cpp.pod gpl.pod gcc.pod make[2]: *** [all-stage1-gcc] Error 2 make[1]: *** [stage1-bubble] Error 2 make: *** [all] Error 2 llvm-svn: 59809
* Make mem[cpy,move,set] intrinsics overloaded.Sanjiv Gupta2008-11-211-1/+3
| | | | llvm-svn: 59802
* Don't forget arguments!Devang Patel2008-11-201-1/+6
| | | | llvm-svn: 59745
* CMake: Removed source file.Oscar Fuentes2008-11-191-1/+0
| | | | llvm-svn: 59662
* Do not use separate utility to walk all instructions and remove dead dbg ↵Devang Patel2008-11-191-60/+0
| | | | | | intrinsics. Let instcombiner do this job. llvm-svn: 59659
* Initialize MallocFunc and FreeFunc properly.Devang Patel2008-11-181-1/+1
| | | | llvm-svn: 59538
* Let AnalyzeAlloca() remove debug intrinsics.Devang Patel2008-11-171-20/+11
| | | | llvm-svn: 59454
* CMake: Remove removed source file.Oscar Fuentes2008-11-121-1/+0
| | | | llvm-svn: 59098
* RemoveDevang Patel2008-11-111-0/+0
| | | | llvm-svn: 59093
* Undo previous check-in.Devang Patel2008-11-111-97/+0
| | | | llvm-svn: 59092
* CMake: Updated list of source files for lib/Transforms/Utils.Oscar Fuentes2008-11-111-0/+1
| | | | llvm-svn: 59077
* Add utility pass to remove dbg info.Devang Patel2008-11-111-0/+97
| | | | llvm-svn: 59068
* Update CMakeLists.txtCedric Venet2008-11-111-0/+1
| | | | llvm-svn: 59039
* Add utility routines to remove dead debug info.Devang Patel2008-11-111-0/+60
| | | | llvm-svn: 59011
* Rework r58829, allowing removal of dbg info intrinsics during allocaDaniel Dunbar2008-11-081-20/+24
| | | | | | | | promotion. - Eliminate uses after free and simplify tests. Devang: Please check that this is still doing what you intended. llvm-svn: 58887
* BCUI + 1 doesn't work. Use next instead.Bill Wendling2008-11-071-1/+2
| | | | llvm-svn: 58830
* Handle (delete) dbg intrinsics while promoting alloca.Devang Patel2008-11-071-3/+22
| | | | llvm-svn: 58826
* InstructionNamer preserves everything.Devang Patel2008-11-061-0/+4
| | | | llvm-svn: 58787
* Check Attribute::NoInline.Devang Patel2008-11-051-4/+2
| | | | llvm-svn: 58742
* Fix unused variable warnings.Devang Patel2008-11-031-1/+5
| | | | llvm-svn: 58651
* Fix warning.Daniel Dunbar2008-10-311-1/+1
| | | | llvm-svn: 58486
* Add InlineCost class for represent the estimated cost of inlining aDaniel Dunbar2008-10-302-12/+27
| | | | | | | | | function. - This explicitly models the costs for functions which should "always" or "never" be inlined. This fixes bugs where such costs were not previously respected. llvm-svn: 58450
* Fix PR2967 by not deleting volatile load/stores that occur before unreachable.Chris Lattner2008-10-291-0/+11
| | | | | | | I don't really see this as being needed, but there is little harm from doing it. llvm-svn: 58385
* Assorted comment/naming fixes, 80-col violations, and reindentation.Daniel Dunbar2008-10-281-9/+10
| | | | | | - No functionality change. llvm-svn: 58352
* export an ID for the instructionNamer, allowing analysis/transformation passesTorok Edwin2008-10-271-0/+1
| | | | | | that need it to require it by ID. llvm-svn: 58238
* Rewrite all the 'PromoteLocallyUsedAlloca[s]' logic. With the power ofChris Lattner2008-10-271-175/+97
| | | | | | | | | | | | | | | | LargeBlockInfo, we can now dramatically simplify their implementation and speed them up at the same time. Now the code has time proportional to the number of uses of the alloca, not the size of the block. This also eliminates code that tried to batch up different allocas which are used in the same blocks, and eliminates the 'retry list' logic which was baroque and no unneccesary. In addition to being a speedup for crazy cases, this is also a nice cleanup: PromoteMemoryToRegister.cpp | 270 +++++++++++++++----------------------------- 1 file changed, 96 insertions(+), 174 deletions(-) llvm-svn: 58229
* Add a new LargeBlockInfo helper, which is just a wrapper aroundChris Lattner2008-10-271-57/+123
| | | | | | | | | a trivial dense map. Use this in RewriteSingleStoreAlloca to avoid aggressively rescanning blocks over and over again. This fixes PR2925, speeding up mem2reg on the testcase in that bug from 4.56s to 0.02s in a debug build on my machine. llvm-svn: 58227
* Change create*Pass factory functions to return Pass* instead ofDaniel Dunbar2008-10-221-1/+1
| | | | | | | | | | | LoopPass*. - Although less precise, this means they can be used in clients without RTTI (who would otherwise need to include LoopPass.h, which eventually includes things using dynamic_cast). This was the simplest solution that presented itself, but I am happy to use a better one if available. llvm-svn: 58010
* Don't drop alignment on globals when cloning.Nick Lewycky2008-10-091-5/+9
| | | | llvm-svn: 57320
* Add <cstdio> include where needed by gcc-4.4.Duncan Sands2008-10-081-0/+1
| | | | | | Patch by Samuel Tardieu. llvm-svn: 57291
* Correctly set attributes when removing args during cloning. Fixes PR2765Andrew Lenharth2008-10-071-1/+17
| | | | llvm-svn: 57254
* Nick Lewycky's patch.Devang Patel2008-10-031-1/+1
| | | | | | While hosting instruction check PHI node. llvm-svn: 57025
* SplitBlock should only attempt to update LoopInfo if it is actually being used.Owen Anderson2008-10-031-4/+3
| | | | llvm-svn: 56994
* Rename isWeakForLinker to mayBeOverridden. Use itDuncan Sands2008-09-291-5/+9
| | | | | | | instead of hasWeakLinkage in a bunch of optimization passes. llvm-svn: 56782
* Implement function notes as function attributes. Devang Patel2008-09-261-1/+1
| | | | llvm-svn: 56716
* Large mechanical patch.Devang Patel2008-09-254-7/+7
| | | | | | | | | | | | | | | s/ParamAttr/Attribute/g s/PAList/AttrList/g s/FnAttributeWithIndex/AttributeWithIndex/g s/FnAttr/Attribute/g This sets the stage - to implement function notes as function attributes and - to distinguish between function attributes and return value attributes. This requires corresponding changes in llvm-gcc and clang. llvm-svn: 56622
* Put FN_NOTE_AlwaysInline and others in FnAttr namespace.Devang Patel2008-09-241-1/+1
| | | | llvm-svn: 56527
* Move FN_NOTE_AlwaysInline and other out of ParamAttrs namespace.Devang Patel2008-09-231-1/+1
| | | | | | Do not check isDeclaration() in hasNote(). It is clients' responsibility. llvm-svn: 56524
OpenPOWER on IntegriCloud