summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/InlineFunction.cpp
Commit message (Collapse)AuthorAgeFilesLines
* introduce typedef for complicated vector, and use it tooGabor Greif2009-01-171-2/+1
| | | | llvm-svn: 62384
* typoGabor Greif2009-01-161-1/+1
| | | | llvm-svn: 62377
* avoid using iterators when they get invalidated potentiallyGabor Greif2009-01-151-4/+14
| | | | | | this fixes PR3332 llvm-svn: 62271
* Fix testsuite regressions from recursive inlining.Dale Johannesen2009-01-131-3/+3
| | | | llvm-svn: 62189
* 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
* Large mechanical patch.Devang Patel2008-09-251-2/+2
| | | | | | | | | | | | | | | 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
* s/ParameterAttributes/Attributes/gDevang Patel2008-09-231-1/+1
| | | | llvm-svn: 56513
* Reapply 55859. This doesn't change anything asDuncan Sands2008-09-081-6/+7
| | | | | | | long as the callgraph is correct. It checks for wrong callgraphs more strictly. llvm-svn: 55894
* Revert r55859. This is breaking the build in the abscence of its companion ↵Owen Anderson2008-09-051-7/+6
| | | | | | commit. llvm-svn: 55865
* Delete the removeCallEdgeTo callgraph method,Duncan Sands2008-09-051-6/+7
| | | | | | | | | | | | | | | because it does not maintain a correct list of callsites. I discovered (see following commit) that the inliner will create a wrong callgraph if it is fed a callgraph with correct edges but incorrect callsites. These were created by Prune-EH, and while it wasn't done via removeCallEdgeTo, it could have been done via removeCallEdgeTo, which is an accident waiting to happen. Use removeCallEdgeFor instead. llvm-svn: 55859
* Remove trailing whitespace.Duncan Sands2008-09-051-36/+36
| | | | llvm-svn: 55835
* Rename some GC classes so that their roll will hopefully be clearer.Gordon Henriksen2008-08-171-4/+4
| | | | | | | | | | | | | | | | | | In particular, Collector was confusing to implementors. Several thought that this compile-time class was the place to implement their runtime GC heap. Of course, it doesn't even exist at runtime. Specifically, the renames are: Collector -> GCStrategy CollectorMetadata -> GCFunctionInfo CollectorModuleMetadata -> GCModuleInfo CollectorRegistry -> GCRegistry Function::getCollector -> getGC (setGC, hasGC, clearGC) Several accessors and nested types have also been renamed to be consistent. These changes should be obvious. llvm-svn: 54899
* Enable first-class aggregates support.Dan Gohman2008-07-231-60/+14
| | | | | | | | | | | | Remove the GetResultInst instruction. It is still accepted in LLVM assembly and bitcode, where it is now auto-upgraded to ExtractValueInst. Also, remove support for return instructions with multiple values. These are auto-upgraded to use InsertValueInst instructions. The IRBuilder still accepts multiple-value returns, and auto-upgrades them to InsertValueInst instructions. llvm-svn: 53941
* Use Instruction::eraseFromParent().Dan Gohman2008-06-211-3/+3
| | | | llvm-svn: 52606
* Clean up a use of std::distance.Dan Gohman2008-06-201-2/+1
| | | | llvm-svn: 52544
* Teach InlineFunction how to differentiate between multiple-valueDan Gohman2008-06-201-2/+10
| | | | | | | return statements and aggregate returns so that it handles both correctly. llvm-svn: 52519
* Fix a bunch of 80col violations that arose from the Create API change. Tweak ↵Gabor Greif2008-05-151-1/+2
| | | | | | makefile targets to find these better. llvm-svn: 51143
* Remove 'unwinds to' support from mainline. This patch undoes r47802 r47989Nick Lewycky2008-04-251-13/+0
| | | | | | r48047 r48084 r48085 r48086 r48088 r48096 r48099 r48109 and r48123. llvm-svn: 50265
* Check type instead of no. of operands.Devang Patel2008-04-231-1/+1
| | | | llvm-svn: 50179
* The "stacksave is not nounwind problem" no longerDuncan Sands2008-04-071-8/+3
| | | | | | | | | needs to be fixed here - a previous commit made sure that intrinsics always get the right attributes. So remove no-longer needed code, and while there use Intrinsic::getDeclaration rather than getOrInsertFunction. llvm-svn: 49337
* Mark calls to llvm.stacksave, llvm.stackrestore asDale Johannesen2008-04-071-1/+4
| | | | | | | | nounwind. When such calls are inlined into something else that is invoked, they were getting changed to invokes, which is badness. llvm-svn: 49299
* API changes for class Use size reduction, wave 1.Gabor Greif2008-04-061-17/+17
| | | | | | | | Specifically, introduction of XXX::Create methods for Users that have a potentially variable number of Uses. llvm-svn: 49277
* Restore optimization that merges blocks when inline function Devang Patel2008-03-101-6/+24
| | | | | | has single return value. llvm-svn: 48162
* SimplifyDevang Patel2008-03-101-18/+15
| | | | llvm-svn: 48161
* Update the inliner and simplifycfg to handle unwind_to.Nick Lewycky2008-03-091-0/+13
| | | | llvm-svn: 48086
* Update inliner to handle functions that return multiple values.Devang Patel2008-03-071-43/+52
| | | | llvm-svn: 48020
* Use while loop.Devang Patel2008-03-041-3/+2
| | | | llvm-svn: 47909
* Use cast instead of dyn_cast.Devang Patel2008-03-041-2/+1
| | | | | | Update test to use multiple return value directly, instead of relying on -sretpromotion. llvm-svn: 47907
* Handle multiple return values.Devang Patel2008-03-041-3/+15
| | | | llvm-svn: 47904
* Revert r46393: readonly/readnone functions are noDuncan Sands2008-01-271-9/+6
| | | | | | longer allowed to write through byval arguments. llvm-svn: 46416
* Create an explicit copy for byval parameters evenDuncan Sands2008-01-261-6/+9
| | | | | | when inlining a readonly function. llvm-svn: 46393
* Do this more neatly.Duncan Sands2008-01-251-2/+1
| | | | llvm-svn: 46369
* we don't have to make an explicit copy of a byval argument when Chris Lattner2008-01-121-4/+6
| | | | | | | inlining a function if we know that the function does not write to *any* memory. This implements test/Transforms/Inline/byval2.ll llvm-svn: 45912
* When inlining a functino with a byval argument, make an explicit Chris Lattner2008-01-111-6/+57
| | | | | | copy of it in case the callee modifies the struct. llvm-svn: 45853
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* GC poses hazards to the inliner. Consider:Gordon Henriksen2007-12-251-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | define void @f() { ... call i32 @g() ... } define void @g() { ... } The hazards are: - @f and @g have GC, but they differ GC. Inlining is invalid. This may never occur. - @f has no GC, but @g does. g's GC must be propagated to @f. The other scenarios are safe: - @f and @g have the same GC. - @f and @g have no GC. - @g has no GC. This patch adds inliner checks for the former two scenarios. llvm-svn: 45351
* When inlining through an 'nounwind' call, mark inlinedDuncan Sands2007-12-191-5/+27
| | | | | | | | | calls 'nounwind'. It is important for correct C++ exception handling that nounwind markings do not get lost, so this transformation is actually needed for correctness. llvm-svn: 45218
* Rename isNoReturn to doesNotReturn, and isNoUnwind toDuncan Sands2007-12-181-1/+1
| | | | | | doesNotThrow. llvm-svn: 45160
* Make invokes of inline asm legal. Teach codegenDuncan Sands2007-12-171-3/+2
| | | | | | | | how to lower them (with no attempt made to be efficient, since they should only occur for unoptimized code). llvm-svn: 45108
* Change the PointerType api for creating pointer types. The old functionality ↵Christopher Lamb2007-12-171-1/+1
| | | | | | of PointerType::get() has become PointerType::getUnqual(), which returns a pointer in the generic address space. The new prototype of PointerType::get() requires both a type and an address space. llvm-svn: 45082
* Revert this part of r45073 until the verifier isDuncan Sands2007-12-161-2/+3
| | | | | | changed not to reject invoke of inline asm. llvm-svn: 45077
* Make instcombine promote inline asm calls to 'nounwind'Duncan Sands2007-12-161-3/+2
| | | | | | | | | | | | | calls. Remove special casing of inline asm from the inliner. There is a potential problem: the verifier rejects invokes of inline asm (not sure why). If an asm call is not marked "nounwind" in some .ll, and instcombine is not run, but the inliner is run, then an illegal module will be created. This is bad but I'm not sure what the best approach is. I'm tempted to remove the check in the verifier... llvm-svn: 45073
* Rather than having special rules like "intrinsics cannotDuncan Sands2007-12-031-5/+3
| | | | | | | | | 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-0/+1
| | | | | | | | | | | | 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
* Update InvokeInst to work like CallInstDavid Greene2007-08-271-1/+1
| | | | llvm-svn: 41506
* Fix PR1335 and Transforms/Inline/2007-04-15-InlineEH.llChris Lattner2007-04-151-4/+5
| | | | llvm-svn: 36090
* Change uses of Function::front to Function::getEntryBlock for readability.Dan Gohman2007-03-221-3/+4
| | | | llvm-svn: 35265
* Fix typos in comments.Dan Gohman2007-02-201-1/+1
| | | | llvm-svn: 34456
OpenPOWER on IntegriCloud