245dceb06d 
								
							 
						 
						
							
							
								
								Add APInt interfaces to APFloat (allows directly  
							
							... 
							
							
							
							access to bits).  Use them in place of float and
double interfaces where appropriate.
First bits of x86 long double constants handling 
(untested, probably does not work).
llvm-svn: 41858 
							
						 
						
							2007-09-11 18:32:33 +00:00  
				
					
						
							
							
								 
						
							
								b6d795c1fc 
								
							 
						 
						
							
							
								
								Revert previous change to IR.  
							
							... 
							
							
							
							llvm-svn: 41769 
							
						 
						
							2007-09-07 18:31:50 +00:00  
				
					
						
							
							
								 
						
							
								bed9dc423c 
								
							 
						 
						
							
							
								
								Next round of APFloat changes.  
							
							... 
							
							
							
							Use APFloat in UpgradeParser and AsmParser.
Change all references to ConstantFP to use the
APFloat interface rather than double.  Remove
the ConstantFP double interfaces.
Use APFloat functions for constant folding arithmetic
and comparisons.
(There are still way too many places APFloat is
just a wrapper around host float/double, but we're
getting there.)
llvm-svn: 41747 
							
						 
						
							2007-09-06 18:13:44 +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  
				
					
						
							
							
								 
						
							
								703623d571 
								
							 
						 
						
							
							
								
								Update InvokeInst to work like CallInst  
							
							... 
							
							
							
							llvm-svn: 41506 
							
						 
						
							2007-08-27 19:04:21 +00:00  
				
					
						
							
							
								 
						
							
								bdad80977b 
								
							 
						 
						
							
							
								
								Patch 10 for long double.  Doing constants right needs expanding ConstantFP  
							
							... 
							
							
							
							to handle values bigger than double.  If we assume host==target and host
long double works correctly, this is not too bad, but we don't want to
have that limitation longterm.  I could implement accepting double
constants as long double or something like that, which would lead to
incorrect codegen with no errors; the more I think about that the worse
it seems.  Rather than do such a hack that would be backed out later,
I'm settling for giving reasonable error messages, for now.
llvm-svn: 40974 
							
						 
						
							2007-08-09 22:51:36 +00:00  
				
					
						
							
							
								 
						
							
								7132e00de7 
								
							 
						 
						
							
							
								
								This is the patch to provide clean intrinsic function overloading support in LLVM. It cleans up the intrinsic definitions and generally smooths the process for more complicated intrinsic writing. It will be used by the upcoming atomic intrinsics as well as vector and float intrinsics in the future.  
							
							... 
							
							
							
							This also changes the syntax for llvm.bswap, llvm.part.set, llvm.part.select, and llvm.ct* intrinsics. They are automatically upgraded by both the LLVM ASM reader and the bitcode reader. The test cases have been updated, with special tests added to ensure the automatic upgrading is supported.
llvm-svn: 40807 
							
						 
						
							2007-08-04 01:51:18 +00:00  
				
					
						
							
							
								 
						
							
								ff4c3be741 
								
							 
						 
						
							
							
								
								Long double, part 1 of N.  Support in IR.  
							
							... 
							
							
							
							llvm-svn: 40774 
							
						 
						
							2007-08-03 01:03:46 +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  
				
					
						
							
							
								 
						
							
								e16561cd5d 
								
							 
						 
						
							
							
								
								Here is the bulk of the sanitizing.  
							
							... 
							
							
							
							Almost all occurrences of "bytecode" in the sources have been eliminated.
llvm-svn: 37913 
							
						 
						
							2007-07-05 17:07:56 +00:00  
				
					
						
							
							
								 
						
							
								9eeada9470 
								
							 
						 
						
							
							
								
								Fix PR1434 and test/Linker/link-archive.ll, this is a regression from 1.9.  
							
							... 
							
							
							
							llvm-svn: 37204 
							
						 
						
							2007-05-18 04:02:46 +00:00  
				
					
						
							
							
								 
						
							
								a6f88ced8b 
								
							 
						 
						
							
							
								
								implement the ModuleProvider::dematerializeFunction hook  
							
							... 
							
							
							
							llvm-svn: 37080 
							
						 
						
							2007-05-15 06:29:44 +00:00  
				
					
						
							
							
								 
						
							
								4c0a6d660e 
								
							 
						 
						
							
							
								
								Make a preemptive bitcode format change to support PR1146.  This lets us do  
							
							... 
							
							
							
							pr1146 in llvm 2.1 without ugly code to emulate old behavior.  This should
be merged into the 2.0 release branch.
llvm-svn: 36928 
							
						 
						
							2007-05-08 05:38:01 +00:00  
				
					
						
							
							
								 
						
							
								53862f7d2b 
								
							 
						 
						
							
							
								
								fix off-by-one that caused the llvm2cpp test to fail  
							
							... 
							
							
							
							llvm-svn: 36880 
							
						 
						
							2007-05-06 19:27:46 +00:00  
				
					
						
							
							
								 
						
							
								3c5616ee12 
								
							 
						 
						
							
							
								
								Allow structs with zero fields.  
							
							... 
							
							
							
							llvm-svn: 36862 
							
						 
						
							2007-05-06 08:21:50 +00:00  
				
					
						
							
							
								 
						
							
								a77bb942a2 
								
							 
						 
						
							
							
								
								add a missing check  
							
							... 
							
							
							
							llvm-svn: 36859 
							
						 
						
							2007-05-06 07:33:01 +00:00  
				
					
						
							
							
								 
						
							
								fd73e54ef8 
								
							 
						 
						
							
							
								
								Keep header file free of 'possible loss of data' warnings.  
							
							... 
							
							
							
							llvm-svn: 36832 
							
						 
						
							2007-05-06 03:23:14 +00:00  
				
					
						
							
							
								 
						
							
								af8fffc081 
								
							 
						 
						
							
							
								
								implement reading/writing of inlineasm objects  
							
							... 
							
							
							
							llvm-svn: 36827 
							
						 
						
							2007-05-06 01:58:20 +00:00  
				
					
						
							
							
								 
						
							
								f25f710c4d 
								
							 
						 
						
							
							
								
								add a denser encoding for null terminated strings, add a 6-bit abbrev as  
							
							... 
							
							
							
							well.  This shrinks kc++ from 2724088 to 2717360 bytes.
llvm-svn: 36821 
							
						 
						
							2007-05-06 00:53:07 +00:00  
				
					
						
							
							
								 
						
							
								036d1bddf2 
								
							 
						 
						
							
							
								
								implement the 'string constant' optimization.  This shrinks kc.bit from  
							
							... 
							
							
							
							2878544 to 2815788
llvm-svn: 36818 
							
						 
						
							2007-05-06 00:35:24 +00:00  
				
					
						
							
							
								 
						
							
								e9759c29d1 
								
							 
						 
						
							
							
								
								further reduce the redundancy of types in the instruction encoding.  This  
							
							... 
							
							
							
							shrinks function bodies in kc++ from 891913B to 884073B
llvm-svn: 36817 
							
						 
						
							2007-05-06 00:21:25 +00:00  
				
					
						
							
							
								 
						
							
								df1233dfbb 
								
							 
						 
						
							
							
								
								stop encoding type/value pairs when the type is implied by the value.  
							
							... 
							
							
							
							This shrinks the function block of kc++ from 1055K to 906K
llvm-svn: 36816 
							
						 
						
							2007-05-06 00:00:00 +00:00  
				
					
						
							
							
								 
						
							
								6eeea5dc05 
								
							 
						 
						
							
							
								
								add support for BLOCKINFO records at the module level.  This fixes the reader  
							
							... 
							
							
							
							issues reid noticed last night.
llvm-svn: 36785 
							
						 
						
							2007-05-05 18:57:30 +00:00  
				
					
						
							
							
								 
						
							
								982ec1eddc 
								
							 
						 
						
							
							
								
								Implement support for globally associating abbrevs with block IDs, which  
							
							... 
							
							
							
							relieves us from having to emit the abbrevs into each instance of the block.
This shrinks kc.bit from 3368K to 3333K, but will be a more significant win
once instructions are abbreviated.
The VST went from:
  Block ID #14  (VALUE_SYMTAB):
      Num Instances: 2345
         Total Size: 1.29508e+07b/1.61885e+06B/404713W
       Average Size: 5522.73b/690.342B/172.585W
          % of file: 48.0645
  Tot/Avg SubBlocks: 0/0
    Tot/Avg Abbrevs: 7035/3
    Tot/Avg Records: 120924/51.5667
      % Abbrev Recs: 100
to:
  Block ID #14  (VALUE_SYMTAB):
      Num Instances: 2345
         Total Size: 1.26713e+07b/1.58391e+06B/395978W
       Average Size: 5403.53b/675.442B/168.86W
          % of file: 47.5198
  Tot/Avg SubBlocks: 0/0
    Tot/Avg Abbrevs: 0/0
    Tot/Avg Records: 120924/51.5667
      % Abbrev Recs: 100
because we didn't emit the same 3 abbrevs 2345 times :)
llvm-svn: 36767 
							
						 
						
							2007-05-05 00:17:00 +00:00  
				
					
						
							
							
								 
						
							
								e14cb88e56 
								
							 
						 
						
							
							
								
								eliminate internal length fields from record.  Records already know their  
							
							... 
							
							
							
							total length
llvm-svn: 36752 
							
						 
						
							2007-05-04 19:11:41 +00:00  
				
					
						
							
							
								 
						
							
								beca065b1e 
								
							 
						 
						
							
							
								
								storeinst ctor takes isvolatile before alignment.  With this, 176.gcc roundtrips  
							
							... 
							
							
							
							llvm-svn: 36738 
							
						 
						
							2007-05-04 03:57:30 +00:00  
				
					
						
							
							
								 
						
							
								e11c6ce3bc 
								
							 
						 
						
							
							
								
								fix a misplaced error  
							
							... 
							
							
							
							llvm-svn: 36736 
							
						 
						
							2007-05-04 03:50:29 +00:00  
				
					
						
							
							
								 
						
							
								70f4566d8a 
								
							 
						 
						
							
							
								
								encode and read param attrs along with function type.  WE can now roundtrip Olden/voronoi loslessly  
							
							... 
							
							
							
							llvm-svn: 36735 
							
						 
						
							2007-05-04 03:41:34 +00:00  
				
					
						
							
							
								 
						
							
								fee5a3752a 
								
							 
						 
						
							
							
								
								add support for reading the param attrs block  
							
							... 
							
							
							
							llvm-svn: 36731 
							
						 
						
							2007-05-04 03:30:17 +00:00  
				
					
						
							
							
								 
						
							
								a68e3c7cf3 
								
							 
						 
						
							
							
								
								remove dead code  
							
							... 
							
							
							
							llvm-svn: 36728 
							
						 
						
							2007-05-04 03:02:54 +00:00  
				
					
						
							
							
								 
						
							
								dea02bd840 
								
							 
						 
						
							
							
								
								Allow this to compile with gcc 4.0.X  
							
							... 
							
							
							
							llvm-svn: 36723 
							
						 
						
							2007-05-04 01:43:33 +00:00  
				
					
						
							
							
								 
						
							
								4704527576 
								
							 
						 
						
							
							
								
								Encoding calling conv info in call/invoke instrs, tree add now round trips completely  
							
							... 
							
							
							
							llvm-svn: 36707 
							
						 
						
							2007-05-03 22:34:03 +00:00  
				
					
						
							
							
								 
						
							
								c1d86cda8c 
								
							 
						 
						
							
							
								
								the type field for a store is the type of the pointer, not the value.  
							
							... 
							
							
							
							With this fix I can round trip treeaadd, only losing calling conv info.
llvm-svn: 36706 
							
						 
						
							2007-05-03 22:21:59 +00:00  
				
					
						
							
							
								 
						
							
								6be58c65d4 
								
							 
						 
						
							
							
								
								fix encoding of BB names in the symtab  
							
							... 
							
							
							
							llvm-svn: 36704 
							
						 
						
							2007-05-03 22:18:21 +00:00  
				
					
						
							
							
								 
						
							
								6ce15cb71e 
								
							 
						 
						
							
							
								
								bug fixes  
							
							... 
							
							
							
							llvm-svn: 36701 
							
						 
						
							2007-05-03 22:09:51 +00:00  
				
					
						
							
							
								 
						
							
								9f600c5d9d 
								
							 
						 
						
							
							
								
								implement the rest of the instructions  
							
							... 
							
							
							
							llvm-svn: 36699 
							
						 
						
							2007-05-03 22:04:19 +00:00  
				
					
						
							
							
								 
						
							
								c332bbaae4 
								
							 
						 
						
							
							
								
								add a few more instructions, getting close  
							
							... 
							
							
							
							llvm-svn: 36688 
							
						 
						
							2007-05-03 18:58:09 +00:00  
				
					
						
							
							
								 
						
							
								5285b5ea2f 
								
							 
						 
						
							
							
								
								add reader logic for terminator instrs.  
							
							... 
							
							
							
							llvm-svn: 36642 
							
						 
						
							2007-05-02 05:46:45 +00:00  
				
					
						
							
							
								 
						
							
								1fc27f0cdb 
								
							 
						 
						
							
							
								
								add reader support for a bunch of new instructions  
							
							... 
							
							
							
							llvm-svn: 36641 
							
						 
						
							2007-05-02 05:16:49 +00:00  
				
					
						
							
							
								 
						
							
								e53603e4e2 
								
							 
						 
						
							
							
								
								read a few instructions, fix some bugs.  This is enough to be able to round  
							
							... 
							
							
							
							trip function bodies like this:
define <2 x i64> @foo(<2 x i64> %x, <2 x i64> %y) {
        %tmp4 = bitcast <2 x i64> %y to <8 x i16>               ; <<8 x i16>> [#uses=1]
        %tmp5 = bitcast <2 x i64> %x to <8 x i16>               ; <<8 x i16>> [#uses=1]
        %tmp = add <8 x i16> %tmp5, %tmp4               ; <<8 x i16>> [#uses=1]
        %tmp6 = bitcast <8 x i16> %tmp to <2 x i64>             ; <<2 x i64>> [#uses=1]
        ret <2 x i64> %tmp6
}
llvm-svn: 36640 
							
						 
						
							2007-05-02 04:27:25 +00:00  
				
					
						
							
							
								 
						
							
								8393055447 
								
							 
						 
						
							
							
								
								handle function-level forward references, read binops.  
							
							... 
							
							
							
							llvm-svn: 36620 
							
						 
						
							2007-05-01 07:01:57 +00:00  
				
					
						
							
							
								 
						
							
								85b7b40621 
								
							 
						 
						
							
							
								
								implement materializeModule, force deallocation of vector memory when we  
							
							... 
							
							
							
							are done with them, start implementing ParseFunctionBody
llvm-svn: 36617 
							
						 
						
							2007-05-01 05:52:21 +00:00  
				
					
						
							
							
								 
						
							
								48a8de3f4d 
								
							 
						 
						
							
							
								
								The stream to read from is now an ivar  
							
							... 
							
							
							
							llvm-svn: 36615 
							
						 
						
							2007-05-01 05:01:34 +00:00  
				
					
						
							
							
								 
						
							
								51ffe7ce15 
								
							 
						 
						
							
							
								
								implement scafolding for lazy deserialization of function bodies  
							
							... 
							
							
							
							llvm-svn: 36614 
							
						 
						
							2007-05-01 04:59:48 +00:00  
				
					
						
							
							
								 
						
							
								31fc4f9526 
								
							 
						 
						
							
							
								
								Implement visibility checking during linking. Also implement protected  
							
							... 
							
							
							
							visibility support for bitcode.
llvm-svn: 36577 
							
						 
						
							2007-04-29 20:56:48 +00:00  
				
					
						
							
							
								 
						
							
								6694f60bec 
								
							 
						 
						
							
							
								
								Switch the bitcode reader interface to take a MemoryBuffer instead of knowing  
							
							... 
							
							
							
							anything about disk I/O itself.  This greatly simplifies its interface -
eliminating the need for the ReaderWrappers.cpp file.
This adds a new option to llvm-dis (-bitcode) which instructs it to read
the input file as bitcode.  Until/unless the bytecode reader is taught to
read from MemoryBuffer, there is no way to handle stdin reading without it.
I don't plan to switch the bytecode reader over, I'd rather delete it :),
so the option will stay around temporarily.
llvm-svn: 36554 
							
						 
						
							2007-04-29 07:54:31 +00:00  
				
					
						
							
							
								 
						
							
								daf358bbff 
								
							 
						 
						
							
							
								
								This is not "FIXME" anymore  
							
							... 
							
							
							
							llvm-svn: 36541 
							
						 
						
							2007-04-28 14:57:59 +00:00  
				
					
						
							
							
								 
						
							
								831d420256 
								
							 
						 
						
							
							
								
								move some code around, fix a bug in the reader reading globalinits (which  
							
							... 
							
							
							
							I just introduced), stub out function reading, purge aggregate values from
the value table before reading functions.
llvm-svn: 36463 
							
						 
						
							2007-04-26 03:27:58 +00:00  
				
					
						
							
							
								 
						
							
								44c1707207 
								
							 
						 
						
							
							
								
								add bitcode alias support  
							
							... 
							
							
							
							llvm-svn: 36461 
							
						 
						
							2007-04-26 02:46:40 +00:00  
				
					
						
							
							
								 
						
							
								890683d636 
								
							 
						 
						
							
							
								
								ensure that every error return sets a message (and goes through Error, for  
							
							... 
							
							
							
							easy breakpointing).
Fix bugs reading constantexpr geps.  We now can disassemble kc++ global
initializers.
llvm-svn: 36398 
							
						 
						
							2007-04-24 18:15:21 +00:00  
				
					
						
							
							
								 
						
							
								0ee6a3a561 
								
							 
						 
						
							
							
								
								fix memory leak  
							
							... 
							
							
							
							llvm-svn: 36397 
							
						 
						
							2007-04-24 17:22:05 +00:00  
				
					
						
							
							
								 
						
							
								1e16bcf7ff 
								
							 
						 
						
							
							
								
								implement reading and writing of constant exprs.  
							
							... 
							
							
							
							llvm-svn: 36394 
							
						 
						
							2007-04-24 07:07:11 +00:00  
				
					
						
							
							
								 
						
							
								1663ccaf13 
								
							 
						 
						
							
							
								
								implement support for reading aggregate constants, including handling forward  
							
							... 
							
							
							
							constant references, etc.
llvm-svn: 36391 
							
						 
						
							2007-04-24 05:48:56 +00:00  
				
					
						
							
							
								 
						
							
								08feb1e73a 
								
							 
						 
						
							
							
								
								add supprot for FP constants, wide integers, and fix the encoding of MININT  
							
							... 
							
							
							
							llvm-svn: 36390 
							
						 
						
							2007-04-24 04:04:35 +00:00  
				
					
						
							
							
								 
						
							
								fbc1d33b81 
								
							 
						 
						
							
							
								
								read basic constants: null, undef, integers <= 64bits  
							
							... 
							
							
							
							llvm-svn: 36389 
							
						 
						
							2007-04-24 03:30:34 +00:00  
				
					
						
							
							
								 
						
							
								a272ead35a 
								
							 
						 
						
							
							
								
								move check to the right place :)  
							
							... 
							
							
							
							llvm-svn: 36386 
							
						 
						
							2007-04-24 00:21:45 +00:00  
				
					
						
							
							
								 
						
							
								47d131bd32 
								
							 
						 
						
							
							
								
								track global inits  
							
							... 
							
							
							
							llvm-svn: 36385 
							
						 
						
							2007-04-24 00:18:21 +00:00  
				
					
						
							
							
								 
						
							
								ccaa448dcf 
								
							 
						 
						
							
							
								
								Read global symtab  
							
							... 
							
							
							
							llvm-svn: 36378 
							
						 
						
							2007-04-23 21:26:05 +00:00  
				
					
						
							
							
								 
						
							
								b5491378b1 
								
							 
						 
						
							
							
								
								implement reading of abbrevs, and writing of abbreviated global varrs.  
							
							... 
							
							
							
							llvm-svn: 36367 
							
						 
						
							2007-04-23 18:58:34 +00:00  
				
					
						
							
							
								 
						
							
								4b00d92a09 
								
							 
						 
						
							
							
								
								first part of implementation of abbrevs.  The writer isn't fully there yet and the  
							
							... 
							
							
							
							reader doesn't handle them at all yet.
llvm-svn: 36363 
							
						 
						
							2007-04-23 16:04:05 +00:00  
				
					
						
							
							
								 
						
							
								362b4a1c92 
								
							 
						 
						
							
							
								
								promote LLVMBitCodes to be a public header  
							
							... 
							
							
							
							llvm-svn: 36358 
							
						 
						
							2007-04-23 01:01:37 +00:00  
				
					
						
							
							
								 
						
							
								33be4c78ef 
								
							 
						 
						
							
							
								
								Fix build problem with Gentoo 4.1.1-r3.  
							
							... 
							
							
							
							llvm-svn: 36348 
							
						 
						
							2007-04-22 18:49:32 +00:00  
				
					
						
							
							
								 
						
							
								1314b9996d 
								
							 
						 
						
							
							
								
								Initial support for reading bitcode files.  They currently only read types,  
							
							... 
							
							
							
							the type symtab, and global/function protos, and are missing the important
size optimization, but it is a place to start.
llvm-svn: 36330 
							
						 
						
							2007-04-22 06:23:29 +00:00