summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/Interpreter
Commit message (Collapse)AuthorAgeFilesLines
...
* eliminate use of Instruction::getPrev(). Patch by Gabor Greif in 2005.Chris Lattner2007-04-171-3/+6
| | | | llvm-svn: 36198
* Implement @sext and @zext parameter attribute handling properly instead ofReid Spencer2007-04-161-11/+20
| | | | | | | forcing every small argument of every function regardless of attributes or calling convention to be expanded. llvm-svn: 36174
* For PR1293:Reid Spencer2007-03-301-49/+67
| | | | | | | | | | * Rename the FunctionType* parameter from M to FT on all the functions. * Implement a fix for PR1293 by just asserting that library functions that must return pointers should have pointer typed results. This just makes sure that we don't attempt to use an uninitialized integer or something later on. llvm-svn: 35508
* Don't use std::hex.Bill Wendling2007-03-081-1/+1
| | | | llvm-svn: 35038
* Don't use a cast. It causes an error on some platforms.Bill Wendling2007-03-081-1/+1
| | | | llvm-svn: 35037
* Fix some thinko's in the last patch. PtrSize has to be in bits and weReid Spencer2007-03-061-2/+2
| | | | | | might need to zext not just trunc the value. llvm-svn: 34955
* Fix a bug in IntToPtr. Truncating to 64-bits only works if the integerReid Spencer2007-03-061-1/+5
| | | | | | is larger. Adjust so that it truncates to pointer width, only if necessary. llvm-svn: 34954
* Radically simplify execution. This patch gets rid of all the specialReid Spencer2007-03-061-636/+128
| | | | | | | | handling for integer of various sizes. GenericValue now has just a single integer field of type APInt. We use its facilities directly in the execution of all instructions. llvm-svn: 34951
* Adjust and simplify external function processing now that GenericValue hasReid Spencer2007-03-061-33/+41
| | | | | | a single integer field of type APInt. llvm-svn: 34950
* APInt's are no longer allocated on the heap because they are directReid Spencer2007-03-061-12/+0
| | | | | | | members of GenericValue. Consequently the code to clean them up isn't needed. llvm-svn: 34948
* Remove the insufficient code in Interpreter::create that computed theReid Spencer2007-03-061-12/+0
| | | | | | | | Target DataLayout incorrectly. For now, we'll trust that the module has got the correct DataLayout. In the future, this needs to be changed to tell the TargetData to be "current host". llvm-svn: 34947
* Remove unnecessary #include.Reid Spencer2007-03-031-1/+0
| | | | llvm-svn: 34889
* Deal with error handling better.Reid Spencer2007-03-032-8/+16
| | | | llvm-svn: 34887
* Complete the APIntification of the interpreter. All asserts for > 64 bitsReid Spencer2007-03-031-118/+209
| | | | | | | have been removed and dealt with. The interpreter should now be able to execute any LLVM program using any bit width. llvm-svn: 34884
* Implement APInt support for the binary operators.Reid Spencer2007-03-031-254/+240
| | | | | | | Move the getConstantExpr function towards the end of the file so we don't need a dozen forward declarations. llvm-svn: 34877
* 1. Have the ExecutionContext keep track of the APInt's allocated andReid Spencer2007-03-031-11/+13
| | | | | | | ensure they are cleaned up when the stack frame exits. 2. Move a function to the Execution.cpp file where it belongs. llvm-svn: 34876
* From Dan Gohman:Chris Lattner2007-02-141-1/+1
| | | | | | | | | | While preparing http://llvm.org/PR1198 I noticed several asserts protecting unprepared code from i128 types that weren't actually failing when they should because they were written as assert("foo") instead of something like assert(0 && "foo"). This patch fixes all the cases that a quick grep found. llvm-svn: 34267
* Privatize StructLayout::MemberOffsets, adding an accessorChris Lattner2007-02-101-1/+1
| | | | llvm-svn: 34156
* For PR1188:Reid Spencer2007-02-082-2/+2
| | | | | | | | Compute BitMask correctly. Patch by Leo (wenwenti@hotmail.com). llvm-svn: 34026
* Changes to support making the shift instructions be true BinaryOperators.Reid Spencer2007-02-022-6/+7
| | | | | | | | | | | | This feature is needed in order to support shifts of more than 255 bits on large integer types. This changes the syntax for llvm assembly to make shl, ashr and lshr instructions look like a binary operator: shl i32 %X, 1 instead of shl i32 %X, i8 1 Additionally, this should help a few passes perform additional optimizations. llvm-svn: 33776
* For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoidReid Spencer2007-01-301-2/+2
| | | | | | confusion with external linkage types. llvm-svn: 33663
* Remove tabs.Reid Spencer2007-01-291-2/+2
| | | | llvm-svn: 33620
* Implement use of new IntrinsicLowering interface.Reid Spencer2007-01-291-1/+1
| | | | llvm-svn: 33619
* For PR761:Reid Spencer2007-01-261-12/+11
| | | | | | | The Module::setEndianness and Module::setPointerSize methods have been removed. Instead you can get/set the DataLayout. Adjust thise accordingly. llvm-svn: 33530
* For PR970:Reid Spencer2007-01-211-1/+1
| | | | | | | Clean up handling of isFloatingPoint() and dealing with PackedType. Patch by Gordon Henriksen! llvm-svn: 33415
* Implement the signed icmp instructions properly. To do this we introduceReid Spencer2007-01-201-17/+27
| | | | | | | | a small inline function to sign extend a uint64_t value based on its type's bitwidth. This function is then used in both executeSExtInst and the various executeICMP_S** functions. llvm-svn: 33403
* Implement bit-accurate sext instruction.Reid Spencer2007-01-201-10/+14
| | | | | | This patch fixes test/Integer/2007-01-17-TruncSext.ll llvm-svn: 33394
* Use the new maskToBitWidth function to ensure that the results ofReid Spencer2007-01-181-10/+15
| | | | | | computations do not overflow the intended bit width. llvm-svn: 33326
* Add an inline helper function that masks a GenericValue to a specifiedReid Spencer2007-01-181-0/+12
| | | | | | bit width. llvm-svn: 33325
* Make shl instruction mask its result to the correct bitsize. This isReid Spencer2007-01-181-5/+10
| | | | | | | sufficient to get llvm-test/SingleSource/UnitTests/Integer/general-test.ll working with lli in interpreter mode. llvm-svn: 33321
* Two changes:Reid Spencer2007-01-181-18/+17
| | | | | | | | | 1. Fix logic for executeGEP. Only 32-bit and 64-bit integer types are acceptable as indices. 2. Ensure that all integer cast operations truncate their result to the integer size of the operand. llvm-svn: 33318
* rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.Chris Lattner2007-01-151-6/+6
| | | | | | | | | rename Type::getIntegralTypeMask to Type::getIntegerTypeMask. This makes naming much more consistent. For example, there are now no longer any instances of IntegerType that are not considered isInteger! :) llvm-svn: 33225
* eliminate calls to Type::isInteger, preferring isIntegral instead.Chris Lattner2007-01-151-4/+4
| | | | llvm-svn: 33222
* For PR1064:Reid Spencer2007-01-123-385/+731
| | | | | | | | | | | | | | | | | | | | | | | Implement the arbitrary bit-width integer feature. The feature allows integers of any bitwidth (up to 64) to be defined instead of just 1, 8, 16, 32, and 64 bit integers. This change does several things: 1. Introduces a new Derived Type, IntegerType, to represent the number of bits in an integer. The Type classes SubclassData field is used to store the number of bits. This allows 2^23 bits in an integer type. 2. Removes the five integer Type::TypeID values for the 1, 8, 16, 32 and 64-bit integers. These are replaced with just IntegerType which is not a primitive any more. 3. Adjust the rest of LLVM to account for this change. Note that while this incremental change lays the foundation for arbitrary bit-width integers, LLVM has not yet been converted to actually deal with them in any significant way. Most optimization passes, for example, will still only deal with the byte-width integer types. Future increments will rectify this situation. llvm-svn: 33113
* Rename BoolTy as Int1Ty. Patch by Sheng Zhou.Reid Spencer2007-01-112-27/+27
| | | | llvm-svn: 33076
* For PR950:Reid Spencer2006-12-312-369/+253
| | | | | | Convert signed integer types to signless ones. llvm-svn: 32787
* For PR950:Reid Spencer2006-12-232-112/+331
| | | | | | | | This patch removes the SetCC instructions and replaces them with the ICmp and FCmp instructions. The SetCondInst instruction has been removed and been replaced with ICmpInst and FCmpInst. llvm-svn: 32751
* elimiante Statistic static ctorsChris Lattner2006-12-191-5/+2
| | | | llvm-svn: 32702
* Removing even more <iostream> includes.Bill Wendling2006-12-071-2/+1
| | | | llvm-svn: 32320
* Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, areBill Wendling2006-12-072-36/+35
| | | | | | now cerr, cout, and NullStream resp. llvm-svn: 32298
* Detemplatize the Statistic class. The only type it is instantiated withChris Lattner2006-12-061-1/+1
| | | | | | is 'unsigned'. llvm-svn: 32279
* Unbreak VC++ build.Jeff Cohen2006-12-022-0/+2
| | | | llvm-svn: 32113
* Removed #include <iostream> and replaced streams with llvm streams.Bill Wendling2006-11-272-35/+36
| | | | llvm-svn: 31949
* For PR950:Reid Spencer2006-11-272-36/+181
| | | | | | | | | | 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
* Simplify IntrinsicLowering and clarify that it is only for use by theChris Lattner2006-11-151-1/+1
| | | | | | CBE and interpreter. llvm-svn: 31755
* Remove redundant <cmath>.Jim Laskey2006-11-082-2/+0
| | | | llvm-svn: 31561
* For PR950:Reid Spencer2006-11-082-20/+52
| | | | | | | | This patch converts the old SHR instruction into two instructions, AShr (Arithmetic) and LShr (Logical). The Shr instructions now are not dependent on the sign of their operands. llvm-svn: 31542
* Remove a function prototype that is no longer needed (REM patch missed it)Reid Spencer2006-11-021-2/+0
| | | | llvm-svn: 31374
* For PR950:Reid Spencer2006-11-021-12/+50
| | | | | | Replace the REM instruction with UREM, SREM and FREM. llvm-svn: 31369
* Remove unnecessary sign conversions made possible by last patch.Reid Spencer2006-11-011-4/+0
| | | | llvm-svn: 31339
OpenPOWER on IntegriCloud