summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/LowerGC.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Deleting an empty file. Thanks, /usr/bin/patch!Gordon Henriksen2008-01-071-0/+0
| | | | llvm-svn: 45675
* With this patch, the LowerGC transformation becomes theGordon Henriksen2008-01-071-350/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ShadowStackCollector, which additionally has reduced overhead with no sacrifice in portability. Considering a function @fun with 8 loop-local roots, ShadowStackCollector introduces the following overhead (x86): ; shadowstack prologue movl L_llvm_gc_root_chain$non_lazy_ptr, %eax movl (%eax), %ecx movl $___gc_fun, 20(%esp) movl $0, 24(%esp) movl $0, 28(%esp) movl $0, 32(%esp) movl $0, 36(%esp) movl $0, 40(%esp) movl $0, 44(%esp) movl $0, 48(%esp) movl $0, 52(%esp) movl %ecx, 16(%esp) leal 16(%esp), %ecx movl %ecx, (%eax) ; shadowstack loop overhead (none) ; shadowstack epilogue movl 48(%esp), %edx movl %edx, (%ecx) ; shadowstack metadata .align 3 ___gc_fun: # __gc_fun .long 8 .space 4 In comparison to LowerGC: ; lowergc prologue movl L_llvm_gc_root_chain$non_lazy_ptr, %eax movl (%eax), %ecx movl %ecx, 48(%esp) movl $8, 52(%esp) movl $0, 60(%esp) movl $0, 56(%esp) movl $0, 68(%esp) movl $0, 64(%esp) movl $0, 76(%esp) movl $0, 72(%esp) movl $0, 84(%esp) movl $0, 80(%esp) movl $0, 92(%esp) movl $0, 88(%esp) movl $0, 100(%esp) movl $0, 96(%esp) movl $0, 108(%esp) movl $0, 104(%esp) movl $0, 116(%esp) movl $0, 112(%esp) ; lowergc loop overhead leal 44(%esp), %eax movl %eax, 56(%esp) leal 40(%esp), %eax movl %eax, 64(%esp) leal 36(%esp), %eax movl %eax, 72(%esp) leal 32(%esp), %eax movl %eax, 80(%esp) leal 28(%esp), %eax movl %eax, 88(%esp) leal 24(%esp), %eax movl %eax, 96(%esp) leal 20(%esp), %eax movl %eax, 104(%esp) leal 16(%esp), %eax movl %eax, 112(%esp) ; lowergc epilogue movl 48(%esp), %edx movl %edx, (%ecx) ; lowergc metadata (none) llvm-svn: 45670
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Change the PointerType api for creating pointer types. The old functionality ↵Christopher Lamb2007-12-171-7/+7
| | | | | | 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
* 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-0/+2
| | | | | | | | | | | | 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
* Change llvm.gcroot to not init the root to null at runtime, this preventsChris Lattner2007-09-121-4/+1
| | | | | | using it for live-in values etc. llvm-svn: 41879
* Update GEP constructors to use an iterator interface to fixDavid Greene2007-09-041-4/+11
| | | | | | GLIBCXX_DEBUG issues. llvm-svn: 41697
* Fix a gcroot lowering bug.Evan Cheng2007-09-011-2/+5
| | | | llvm-svn: 41668
* Update InvokeInst to work like CallInstDavid Greene2007-08-271-1/+1
| | | | llvm-svn: 41506
* Fix comment typoDavid Greene2007-08-071-1/+1
| | | | llvm-svn: 40898
* Make this code more efficient.David Greene2007-08-061-5/+5
| | | | llvm-svn: 40861
* New CallInst interface to address GLIBCXX_DEBUG errors caused byDavid Greene2007-08-011-2/+13
| | | | | | | | 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-2/+2
| | | | llvm-svn: 36662
* Use 'static const char' instead of 'static const int'.Devang Patel2007-05-021-2/+2
| | | | | | | 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-1/+4
| | | | llvm-svn: 36632
* Eliminate use of ctors that take vectors.Chris Lattner2007-02-131-3/+3
| | | | llvm-svn: 34219
* For PR411:Reid Spencer2007-02-051-3/+3
| | | | | | | | Adjust to changes in Module interface: getMainFunction() -> getFunction("main") getNamedFunction(X) -> getFunction(X) llvm-svn: 33922
* remove temporary vectors.Chris Lattner2007-01-311-9/+6
| | | | llvm-svn: 33715
* For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoidReid Spencer2007-01-301-1/+1
| | | | | | confusion with external linkage types. llvm-svn: 33663
* relax some typesChris Lattner2007-01-071-1/+1
| | | | llvm-svn: 32980
* For PR950:Reid Spencer2006-12-311-9/+9
| | | | | | | | | | | | | 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
* Replace CastInst::createInferredCast calls with more accurate castReid Spencer2006-12-131-2/+1
| | | | | | creation calls. llvm-svn: 32521
* For PR950:Reid Spencer2006-11-271-5/+9
| | | | | | | | | | The long awaited CAST patch. This introduces 12 new instructions into LLVM to replace the cast instruction. Corresponding changes throughout LLVM are provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the exception of 175.vpr which fails only on a slight floating point output difference. llvm-svn: 31931
* For PR950:Reid Spencer2006-10-201-6/+6
| | | | | | | | This patch implements the first increment for the Signless Types feature. All changes pertain to removing the ConstantSInt and ConstantUInt classes in favor of just using ConstantInt. llvm-svn: 31063
* eliminate RegisterOpt. It does the same thing as RegisterPass.Chris Lattner2006-08-271-1/+1
| | | | llvm-svn: 29925
* s|llvm/Support/Visibility.h|llvm/Support/Compiler.h|Chris Lattner2006-08-271-1/+1
| | | | llvm-svn: 29911
* Shrink libllvmgcc.dylib by another 23KChris Lattner2006-06-281-1/+2
| | | | llvm-svn: 28972
* FunctionPass's cannot do IPO things.Chris Lattner2006-01-141-4/+0
| | | | llvm-svn: 25315
* When a function takes a variable number of pointer arguments, with a zeroJeff Cohen2005-10-231-2/+3
| | | | | | | | | | | | | pointer marking the end of the list, the zero *must* be cast to the pointer type. An un-cast zero is a 32-bit int, and at least on x86_64, gcc will not extend the zero to 64 bits, thus allowing the upper 32 bits to be random junk. The new END_WITH_NULL macro may be used to annotate a such a function so that GCC (version 4 or newer) will detect the use of un-casted zero at compile time. llvm-svn: 23888
* Remove trailing whitespaceMisha Brukman2005-04-211-9/+9
| | | | llvm-svn: 21427
* Initialize with the correct constant typeChris Lattner2004-10-271-2/+3
| | | | llvm-svn: 17270
* Correction to allow compilation with Visual C++.Reid Spencer2004-10-181-2/+2
| | | | | | Patch contributed by Morten Ofstad. Thanks Morten! llvm-svn: 17123
* Update GC intrinsics to take a pointer to the object as well as a pointerChris Lattner2004-07-221-5/+8
| | | | | | to the field being updated. Patch contributed by Tobias Nurmiranta llvm-svn: 15097
* Expand the coercion of constants to include the newly constant Globals.Reid Spencer2004-07-181-2/+1
| | | | llvm-svn: 14966
* bug 122:Reid Spencer2004-07-181-3/+3
| | | | | | | - Minimize redundant isa<GlobalValue> usage - Correct isa<Constant> for GlobalValue subclass llvm-svn: 14946
* Spelling people's names right is kinda importantChris Lattner2004-05-231-1/+1
| | | | llvm-svn: 13702
* Implement the -lowergc pass which is used by code generators (like the CBE)Chris Lattner2004-05-231-0/+326
that do not have builtin support for garbage collection. llvm-svn: 13688
OpenPOWER on IntegriCloud