5a1acd9912 
								
							 
						 
						
							
							
								
								Move a few more APIs back to 2.5 forms.  The only remaining ones left to change back are  
							
							... 
							
							
							
							metadata related, which I'm waiting on to avoid conflicting with Devang.
llvm-svn: 77721 
							
						 
						
							2009-07-31 20:28:14 +00:00  
				
					
						
							
							
								 
						
							
								4056ca9568 
								
							 
						 
						
							
							
								
								Move types back to the 2.5 API.  
							
							... 
							
							
							
							llvm-svn: 77516 
							
						 
						
							2009-07-29 22:17:13 +00:00  
				
					
						
							
							
								 
						
							
								487375e9a2 
								
							 
						 
						
							
							
								
								Move ConstantExpr to 2.5 API.  
							
							... 
							
							
							
							llvm-svn: 77494 
							
						 
						
							2009-07-29 18:55:55 +00:00  
				
					
						
							
							
								 
						
							
								c2c7932c64 
								
							 
						 
						
							
							
								
								Change ConstantArray to 2.5 API.  
							
							... 
							
							
							
							llvm-svn: 77347 
							
						 
						
							2009-07-28 18:32:17 +00:00  
				
					
						
							
							
								 
						
							
								edb4a70325 
								
							 
						 
						
							
							
								
								Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types.  More to come.  
							
							... 
							
							
							
							llvm-svn: 77011 
							
						 
						
							2009-07-24 23:12:02 +00:00  
				
					
						
							
							
								 
						
							
								47db941fd3 
								
							 
						 
						
							
							
								
								Get rid of the Pass+Context magic.  
							
							... 
							
							
							
							llvm-svn: 76702 
							
						 
						
							2009-07-22 00:24:57 +00:00  
				
					
						
							
							
								 
						
							
								20b34ac794 
								
							 
						 
						
							
							
								
								Move the ConstantInt uniquing table into LLVMContextImpl.  This exposed a number of issues in  
							
							... 
							
							
							
							our current context-passing stuff, which is also fixed here
llvm-svn: 76089 
							
						 
						
							2009-07-16 18:04:31 +00:00  
				
					
						
							
							
								 
						
							
								4fdeba9706 
								
							 
						 
						
							
							
								
								Revert yesterday's change by removing the LLVMContext parameter to AllocaInst and MallocInst.  
							
							... 
							
							
							
							llvm-svn: 75863 
							
						 
						
							2009-07-15 23:53:25 +00:00  
				
					
						
							
							
								 
						
							
								b6b2530000 
								
							 
						 
						
							
							
								
								Move EVER MORE stuff over to LLVMContext.  
							
							... 
							
							
							
							llvm-svn: 75703 
							
						 
						
							2009-07-14 23:09:55 +00:00  
				
					
						
							
							
								 
						
							
								53a52215b5 
								
							 
						 
						
							
							
								
								Begin the painful process of tearing apart the rat'ss nest that is Constants.cpp and ConstantFold.cpp.  
							
							... 
							
							
							
							This involves temporarily hard wiring some parts to use the global context.  This isn't ideal, but it's
the only way I could figure out to make this process vaguely incremental.
llvm-svn: 75445 
							
						 
						
							2009-07-13 04:09:18 +00:00  
				
					
						
							
							
								 
						
							
								1e5f00e7a7 
								
							 
						 
						
							
							
								
								This started as a small change, I swear.  Unfortunately, lots of things call the [I|F]CmpInst constructors.  Who knew!?  
							
							... 
							
							
							
							llvm-svn: 75200 
							
						 
						
							2009-07-09 23:48:35 +00:00  
				
					
						
							
							
								 
						
							
								b17f32945f 
								
							 
						 
						
							
							
								
								Switch GlobalVariable ctors to a sane API, where *either* a context or a module is required.  
							
							... 
							
							
							
							llvm-svn: 75025 
							
						 
						
							2009-07-08 19:03:57 +00:00  
				
					
						
							
							
								 
						
							
								5948fdf68b 
								
							 
						 
						
							
							
								
								Push LLVMContext through GlobalVariables and IRBuilder.  
							
							... 
							
							
							
							llvm-svn: 74985 
							
						 
						
							2009-07-08 01:26:06 +00:00  
				
					
						
							
							
								 
						
							
								e70b637033 
								
							 
						 
						
							
							
								
								More LLVMContext-ification.  
							
							... 
							
							
							
							llvm-svn: 74807 
							
						 
						
							2009-07-05 22:41:43 +00:00  
				
					
						
							
							
								 
						
							
								8d62763779 
								
							 
						 
						
							
							
								
								remove trailing whitespace  
							
							... 
							
							
							
							llvm-svn: 69402 
							
						 
						
							2009-04-17 23:30:55 +00:00  
				
					
						
							
							
								 
						
							
								4bb96e9a50 
								
							 
						 
						
							
							
								
								Revert r66920. It was causing failures in the self-hosting buildbot (in release  
							
							... 
							
							
							
							mode).
Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/dg.exp ...
FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/crash-narrowfunctiontest.ll
Failed with signal(SIGBUS) at line 1
while running: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/crash-narrowfunctiontest.ll -bugpoint-crashcalls -silence-passes > /dev/null
0   bugpoint          0x0035dd25 llvm::sys::SetInterruptFunction(void (*)()) + 85
1   bugpoint          0x0035e382 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 706
2   libSystem.B.dylib 0x92f112bb _sigtramp + 43
3   libSystem.B.dylib 0xffffffff _sigtramp + 1829694831
4   bugpoint          0x00021d1c main + 92
5   bugpoint          0x00002106 start + 54
6   bugpoint          0x00000004 start + 18446744073709543220
Stack dump:
0.    Program arguments: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/crash-narrowfunctiontest.ll -bugpoint-crashcalls -silence-passes 
FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/misopt-basictest.ll
Failed with signal(SIGBUS) at line 1
while running: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/misopt-basictest.ll -dce -bugpoint-deletecalls -simplifycfg -silence-passes
0   bugpoint          0x0035dd25 llvm::sys::SetInterruptFunction(void (*)()) + 85
1   bugpoint          0x0035e382 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 706
2   libSystem.B.dylib 0x92f112bb _sigtramp + 43
3   libSystem.B.dylib 0xffffffff _sigtramp + 1829694831
4   bugpoint          0x00021d1c main + 92
5   bugpoint          0x00002106 start + 54
6   bugpoint          0x00000006 start + 18446744073709543222
Stack dump:
0.    Program arguments: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/misopt-basictest.ll -dce -bugpoint-deletecalls -simplifycfg -silence-passes 
FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/remove_arguments_test.ll
Failed with signal(SIGBUS) at line 1
while running: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/remove_arguments_test.ll  -bugpoint-crashcalls -silence-passes
0   bugpoint          0x0035dd25 llvm::sys::SetInterruptFunction(void (*)()) + 85
1   bugpoint          0x0035e382 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 706
2   libSystem.B.dylib 0x92f112bb _sigtramp + 43
3   libSystem.B.dylib 0xffffffff _sigtramp + 1829694831
4   bugpoint          0x00021d1c main + 92
5   bugpoint          0x00002106 start + 54
Stack dump:
0.    Program arguments: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/remove_arguments_test.ll -bugpoint-crashcalls -silence-passes 
--- Reverse-merging (from foreign repository) r66920 into '.':
U    include/llvm/Support/CallSite.h
U    include/llvm/Instructions.h
U    lib/Analysis/IPA/GlobalsModRef.cpp
U    lib/Analysis/IPA/Andersens.cpp
U    lib/Bitcode/Writer/BitcodeWriter.cpp
U    lib/VMCore/Instructions.cpp
U    lib/VMCore/Verifier.cpp
U    lib/VMCore/AsmWriter.cpp
U    lib/Transforms/Utils/LowerInvoke.cpp
U    lib/Transforms/Scalar/SimplifyCFGPass.cpp
U    lib/Transforms/IPO/PruneEH.cpp
U    lib/Transforms/IPO/DeadArgumentElimination.cpp
llvm-svn: 66953 
							
						 
						
							2009-03-13 21:15:59 +00:00  
				
					
						
							
							
								 
						
							
								258232fb80 
								
							 
						 
						
							
							
								
								Second installment of "BasicBlock operands to the back"  
							
							... 
							
							
							
							changes.
For InvokeInst now all arguments begin at op_begin().
The Callee, Cont and Fail are now faster to get by
access relative to op_end().
This patch introduces some temporary uglyness in CallSite.
Next I'll bring CallInst up to a similar scheme and then
the uglyness will magically vanish.
This patch also exposes all the reliance of the libraries
on InvokeInst's operand ordering. I am thinking of taking
care of that too.
llvm-svn: 66920 
							
						 
						
							2009-03-13 18:27:29 +00:00  
				
					
						
							
							
								 
						
							
								12da8ce3d2 
								
							 
						 
						
							
							
								
								Introduce new linkage types linkonce_odr, weak_odr, common_odr  
							
							... 
							
							
							
							and extern_weak_odr.  These are the same as the non-odr versions,
except that they indicate that the global will only be overridden
by an *equivalent* global.  In C, a function with weak linkage can
be overridden by a function which behaves completely differently.
This means that IP passes have to skip weak functions, since any
deductions made from the function definition might be wrong, since
the definition could be replaced by something completely different
at link time.   This is not allowed in C++, thanks to the ODR
(One-Definition-Rule): if a function is replaced by another at
link-time, then the new function must be the same as the original
function.  If a language knows that a function or other global can
only be overridden by an equivalent global, it can give it the
weak_odr linkage type, and the optimizers will understand that it
is alright to make deductions based on the function body.  The
code generators on the other hand map weak and weak_odr linkage
to the same thing.
llvm-svn: 66339 
							
						 
						
							2009-03-07 15:45:40 +00:00  
				
					
						
							
							
								 
						
							
								4c758ea3e0 
								
							 
						 
						
							
							
								
								Large mechanical patch.  
							
							... 
							
							
							
							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 
							
						 
						
							2008-09-25 21:00:45 +00:00  
				
					
						
							
							
								 
						
							
								a79db30d28 
								
							 
						 
						
							
							
								
								Tidy up several unbeseeming casts from pointer to intptr_t.  
							
							... 
							
							
							
							llvm-svn: 55779 
							
						 
						
							2008-09-04 17:05:41 +00:00  
				
					
						
							
							
								 
						
							
								f96e1371e8 
								
							 
						 
						
							
							
								
								Tidy up BasicBlock::getFirstNonPHI, and change a bunch of places to  
							
							... 
							
							
							
							use it instead of duplicating its functionality.
llvm-svn: 51499 
							
						 
						
							2008-05-23 21:05:58 +00:00  
				
					
						
							
							
								 
						
							
								0479aa5c0b 
								
							 
						 
						
							
							
								
								Change class' public PassInfo variables to by initialized with the  
							
							... 
							
							
							
							address of the PassInfo directly instead of calling getPassInfo.
This eliminates a bunch of dynamic initializations of static data.
Also, fold RegisterPassBase into PassInfo, make a bunch of its
data members const, and rearrange some code to initialize data
members in constructors instead of using setter member functions.
llvm-svn: 51022 
							
						 
						
							2008-05-13 02:05:11 +00:00  
				
					
						
							
							
								 
						
							
								d78c400b5b 
								
							 
						 
						
							
							
								
								Clean up the use of static and anonymous namespaces. This turned up  
							
							... 
							
							
							
							several things that were neither in an anonymous namespace nor static
but not intended to be global.
llvm-svn: 51017 
							
						 
						
							2008-05-13 00:00:25 +00:00  
				
					
						
							
							
								 
						
							
								c6a47e8a79 
								
							 
						 
						
							
							
								
								VisualStudio project files updated.  #include <algorithm> added to make VisualStudio happy.  Also had to undefine setjmp because of #include <csetjmp> turning setjmp into _setjmp in VisualStudio.  
							
							... 
							
							
							
							llvm-svn: 49743 
							
						 
						
							2008-04-15 21:27:11 +00:00  
				
					
						
							
							
								 
						
							
								fbc6adcc59 
								
							 
						 
						
							
							
								
								Use Intrinsic::getDeclaration to get hold of  
							
							... 
							
							
							
							intrinsics.  Fix up the argument type (should
be i8*, was an array*).
llvm-svn: 49336 
							
						 
						
							2008-04-07 13:41:19 +00:00  
				
					
						
							
							
								 
						
							
								e9ecc68d8f 
								
							 
						 
						
							
							
								
								API changes for class Use size reduction, wave 1.  
							
							... 
							
							
							
							Specifically, introduction of XXX::Create methods
for Users that have a potentially variable number of
Uses.
llvm-svn: 49277 
							
						 
						
							2008-04-06 20:25:17 +00:00  
				
					
						
							
							
								 
						
							
								5e4e051c2a 
								
							 
						 
						
							
							
								
								Revert 49006 for the moment.  
							
							... 
							
							
							
							llvm-svn: 49046 
							
						 
						
							2008-04-01 20:00:57 +00:00  
				
					
						
							
							
								 
						
							
								7d02cf3c9c 
								
							 
						 
						
							
							
								
								Emit exception handling info for functions which are  
							
							... 
							
							
							
							not marked nounwind, or for all functions when -enable-eh
is set, provided the target supports Dwarf EH.
llvm-gcc generates nounwind in the right places; other FEs
will need to do so also.  Given such a FE, -enable-eh should
no longer be needed.
llvm-svn: 49006 
							
						 
						
							2008-03-31 23:40:23 +00:00  
				
					
						
							
							
								 
						
							
								c3591a0d48 
								
							 
						 
						
							
							
								
								remove the LowerSelect pass.  The last client was the old Sparc backend, which is long dead by now.  
							
							... 
							
							
							
							llvm-svn: 47323 
							
						 
						
							2008-02-19 07:49:17 +00:00  
				
					
						
							
							
								 
						
							
								70e294660a 
								
							 
						 
						
							
							
								
								Fix PR2029  
							
							... 
							
							
							
							llvm-svn: 47129 
							
						 
						
							2008-02-14 19:18:13 +00:00  
				
					
						
							
							
								 
						
							
								f3ebc3f3d2 
								
							 
						 
						
							
							
								
								Remove attribution from file headers, per discussion on llvmdev.  
							
							... 
							
							
							
							llvm-svn: 45418 
							
						 
						
							2007-12-29 20:36:04 +00:00  
				
					
						
							
							
								 
						
							
								edf0788758 
								
							 
						 
						
							
							
								
								Change the PointerType api for creating pointer types. The old functionality 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 
							
						 
						
							2007-12-17 01:12:55 +00:00  
				
					
						
							
							
								 
						
							
								ad0ea2d430 
								
							 
						 
						
							
							
								
								Fix PR1146: parameter attributes are longer part of  
							
							... 
							
							
							
							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 
							
						 
						
							2007-11-27 13:23:08 +00:00  
				
					
						
							
							
								 
						
							
								c656cbb8c2 
								
							 
						 
						
							
							
								
								Update GEP constructors to use an iterator interface to fix  
							
							... 
							
							
							
							GLIBCXX_DEBUG issues.
llvm-svn: 41697 
							
						 
						
							2007-09-04 15:46:09 +00:00  
				
					
						
							
							
								 
						
							
								34d442f274 
								
							 
						 
						
							
							
								
								More explicit keywords.  
							
							... 
							
							
							
							llvm-svn: 40673 
							
						 
						
							2007-08-01 15:32:29 +00:00  
				
					
						
							
							
								 
						
							
								17a5dfe6f7 
								
							 
						 
						
							
							
								
								New CallInst interface to address GLIBCXX_DEBUG errors caused by  
							
							... 
							
							
							
							indexing an empty std::vector.
Updates to all clients.
llvm-svn: 40660 
							
						 
						
							2007-08-01 03:43:44 +00:00  
				
					
						
							
							
								 
						
							
								e7da2d6ac3 
								
							 
						 
						
							
							
								
								Fix typo in comment.  
							
							... 
							
							
							
							llvm-svn: 36873 
							
						 
						
							2007-05-06 13:37:16 +00:00  
				
					
						
							
							
								 
						
							
								8c78a0bff0 
								
							 
						 
						
							
							
								
								Drop 'const'  
							
							... 
							
							
							
							llvm-svn: 36662 
							
						 
						
							2007-05-03 01:11:54 +00:00  
				
					
						
							
							
								 
						
							
								e95c6ad802 
								
							 
						 
						
							
							
								
								Use 'static const char' instead of 'static const int'.  
							
							... 
							
							
							
							Due to darwin gcc bug, one version of darwin linker coalesces
static const int, which defauts PassID based pass identification.
llvm-svn: 36652 
							
						 
						
							2007-05-02 21:39:20 +00:00  
				
					
						
							
							
								 
						
							
								09f162ca6a 
								
							 
						 
						
							
							
								
								Do not use typeinfo to identify pass in pass manager.  
							
							... 
							
							
							
							llvm-svn: 36632 
							
						 
						
							2007-05-01 21:15:47 +00:00  
				
					
						
							
							
								 
						
							
								5959f42498 
								
							 
						 
						
							
							
								
								Comment out usage of write() for now.  
							
							... 
							
							
							
							llvm-svn: 36287 
							
						 
						
							2007-04-20 22:40:10 +00:00  
				
					
						
							
							
								 
						
							
								fb80151c42 
								
							 
						 
						
							
							
								
								Removed tabs everywhere except autogenerated & external files. Add make  
							
							... 
							
							
							
							target for tabs checking.
llvm-svn: 36146 
							
						 
						
							2007-04-16 18:10:23 +00:00  
				
					
						
							
							
								 
						
							
								d879dfbf1c 
								
							 
						 
						
							
							
								
								Revert changes for a simplier solution.  
							
							... 
							
							
							
							llvm-svn: 34495 
							
						 
						
							2007-02-22 16:21:18 +00:00  
				
					
						
							
							
								 
						
							
								e4ccf22c34 
								
							 
						 
						
							
							
								
								Itanium ABI exception handing support.  
							
							... 
							
							
							
							llvm-svn: 34480 
							
						 
						
							2007-02-21 22:49:50 +00:00  
				
					
						
							
							
								 
						
							
								b5f6d0c15a 
								
							 
						 
						
							
							
								
								eliminate use of deprecated apis  
							
							... 
							
							
							
							llvm-svn: 34417 
							
						 
						
							2007-02-19 07:34:47 +00:00  
				
					
						
							
							
								 
						
							
								a06a8fd2d7 
								
							 
						 
						
							
							
								
								Eliminate use of ctors that take vectors.  
							
							... 
							
							
							
							llvm-svn: 34219 
							
						 
						
							2007-02-13 02:10:56 +00:00  
				
					
						
							
							
								 
						
							
								a731513406 
								
							 
						 
						
							
							
								
								stop using methods that take vectors.  
							
							... 
							
							
							
							llvm-svn: 34205 
							
						 
						
							2007-02-12 22:56:41 +00:00  
				
					
						
							
							
								 
						
							
								8dd4cae4f8 
								
							 
						 
						
							
							
								
								simplify code by using Value::takeName  
							
							... 
							
							
							
							llvm-svn: 34177 
							
						 
						
							2007-02-11 01:37:51 +00:00  
				
					
						
							
							
								 
						
							
								3f4e6e84dc 
								
							 
						 
						
							
							
								
								For PR1163:  
							
							... 
							
							
							
							Make the Module's dependent library use a std::vector instead of SetVector
adjust #includes in .cpp files because SetVector.h is no longer included.
llvm-svn: 33855 
							
						 
						
							2007-02-04 00:40:42 +00:00  
				
					
						
							
							
								 
						
							
								34acba48cc 
								
							 
						 
						
							
							
								
								Change the interface to Module::getOrInsertFunction to be easier to use,to resolve PR1088, and to help PR411.  
							
							... 
							
							
							
							This simplifies many clients also
llvm-svn: 32989 
							
						 
						
							2007-01-07 08:12:01 +00:00