summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp
Commit message (Collapse)AuthorAgeFilesLines
* For PR1195:Reid Spencer2007-02-151-8/+8
| | | | | | | Change use of "packed" term to "vector" in comments, strings, variable names, etc. llvm-svn: 34300
* For PR1195:Reid Spencer2007-02-151-14/+14
| | | | | | | Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and PackedTyID -> VectorTyID. No functional changes. llvm-svn: 34293
* stop using methods that take vectors.Chris Lattner2007-02-121-6/+10
| | | | llvm-svn: 34205
* Simplify code by using value::takenameChris Lattner2007-02-111-3/+2
| | | | llvm-svn: 34176
* Privatize StructLayout::MemberOffsets, adding an accessorChris Lattner2007-02-101-1/+2
| | | | llvm-svn: 34156
* Use short form of binary operator create functions.Reid Spencer2007-02-021-2/+2
| | | | llvm-svn: 33783
* Changes to support making the shift instructions be true BinaryOperators.Reid Spencer2007-02-021-6/+6
| | | | | | | | | | | | 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 PR970:Reid Spencer2007-01-211-1/+1
| | | | | | | Clean up handling of isFloatingPoint() and dealing with PackedType. Patch by Gordon Henriksen! llvm-svn: 33415
* For PR1043:Reid Spencer2007-01-191-1/+1
| | | | | | | | | | | | | | This is the final patch for this PR. It implements some minor cleanup in the use of IntegerType, to wit: 1. Type::getIntegerTypeMask -> IntegerType::getBitMask 2. Type::Int*Ty changed to IntegerType* from Type* 3. ConstantInt::getType() returns IntegerType* now, not Type* This also fixes PR1120. Patch by Sheng Zhou. llvm-svn: 33370
* rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.Chris Lattner2007-01-151-7/+7
| | | | | | | | | 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 isInteger, generalizing code and tightening checks as needed.Chris Lattner2007-01-151-2/+2
| | | | llvm-svn: 33218
* For PR1064:Reid Spencer2007-01-121-3/+4
| | | | | | | | | | | | | | | | | | | | | | | 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
* Comparison of primitive type sizes should now be done in bits, not bytes.Reid Spencer2007-01-081-2/+2
| | | | | | | This patch converts getPrimitiveSize to getPrimitiveSizeInBits where it is appropriate to do so (comparison of integer primitive types). llvm-svn: 33012
* For PR950:Reid Spencer2006-12-311-23/+20
| | | | | | | | | | | | | 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
* For PR950:Reid Spencer2006-12-231-2/+2
| | | | | | | | 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
* add a simple fast-path for dead allocasChris Lattner2006-12-221-1/+8
| | | | llvm-svn: 32750
* Switch over Transforms/Scalar to use the STATISTIC macro. For each statisticChris Lattner2006-12-191-5/+5
| | | | | | | converted, we lose a static initializer. This also allows GCC to emit warnings about unused statistics. llvm-svn: 32690
* re-enable a temporarily-reverted patchChris Lattner2006-12-151-53/+132
| | | | llvm-svn: 32595
* revert my recent int<->fp and vector union promotion changes, they exposeChris Lattner2006-12-131-132/+53
| | | | | | | obscure bugs affecting the X86 code generator. I will reenable this when fixed. llvm-svn: 32524
* Patch for PR1045 and Transforms/ScalarRepl/2006-12-11-SROA-Crash.llChris Lattner2006-12-121-0/+2
| | | | llvm-svn: 32468
* trunc to integer, not to FP.Chris Lattner2006-12-111-2/+11
| | | | llvm-svn: 32426
* implement promotion of unions containing two packed types of the same width.Chris Lattner2006-12-111-15/+30
| | | | | | This implements Transforms/ScalarRepl/union-packed.ll llvm-svn: 32422
* * Eliminate calls to CastInst::createInferredCast.Chris Lattner2006-12-101-40/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add support for promoting unions with fp values in them. This produces our new int<->fp bitcast instructions, implementing Transforms/ScalarRepl/union-fp-int.ll As an example, this allows us to compile this: union intfloat { int i; float f; }; float invsqrt(const float arg_x) { union intfloat x = { .f = arg_x }; const float xhalf = arg_x * 0.5f; x.i = 0x5f3759df - (x.i >> 1); return x.f * (1.5f - xhalf * x.f * x.f); } into: _invsqrt: movss 4(%esp), %xmm0 movd %xmm0, %eax sarl %eax movl $1597463007, %ecx subl %eax, %ecx movd %ecx, %xmm1 mulss LCPI1_0, %xmm0 mulss %xmm1, %xmm0 movss LCPI1_1, %xmm2 mulss %xmm1, %xmm0 subss %xmm0, %xmm2 movl 8(%esp), %eax mulss %xmm2, %xmm1 movss %xmm1, (%eax) ret instead of: _invsqrt: subl $4, %esp movss 8(%esp), %xmm0 movss %xmm0, (%esp) movl (%esp), %eax movl $1597463007, %ecx sarl %eax subl %eax, %ecx movl %ecx, (%esp) mulss LCPI1_0, %xmm0 movss (%esp), %xmm1 mulss %xmm1, %xmm0 mulss %xmm1, %xmm0 movss LCPI1_1, %xmm2 subss %xmm0, %xmm2 mulss %xmm2, %xmm1 movl 12(%esp), %eax movss %xmm1, (%eax) addl $4, %esp ret llvm-svn: 32418
* Detemplatize the Statistic class. The only type it is instantiated withChris Lattner2006-12-061-3/+3
| | | | | | is 'unsigned'. llvm-svn: 32279
* For PR950:Reid Spencer2006-11-271-6/+7
| | | | | | | | | | 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
* Removed #include <iostream> and replaced with llvm_* streams.Bill Wendling2006-11-261-7/+5
| | | | llvm-svn: 31923
* For PR950:Reid Spencer2006-11-081-3/+4
| | | | | | | | 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
* scalarrepl should not split the two elements of the vsiidx array:Chris Lattner2006-11-071-3/+7
| | | | | | | | | | | | | | | int func(vFloat v0, vFloat v1) { int ii; vSInt32 vsiidx[2]; vsiidx[0] = _mm_cvttps_epi32(v0); vsiidx[1] = _mm_cvttps_epi32(v1); ii = ((int *) vsiidx)[4]; return ii; } This fixes Transforms/ScalarRepl/2006-11-07-InvalidArrayPromote.ll llvm-svn: 31524
* For PR786:Reid Spencer2006-11-021-1/+1
| | | | | | | | | | Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. llvm-svn: 31380
* Fix Transforms/ScalarRepl/2006-10-23-PointerUnionCrash.llChris Lattner2006-10-241-5/+10
| | | | llvm-svn: 31151
* For PR950:Reid Spencer2006-10-201-12/+12
| | | | | | | | 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
* Implement SROA of unions with mixed pointers/integers in them. This implementsChris Lattner2006-10-081-10/+16
| | | | | | PR892 and Transforms/ScalarRepl/union-pointer.ll:test2 llvm-svn: 30825
* Implement Transforms/ScalarRepl/union-pointer.ll:testChris Lattner2006-10-081-9/+13
| | | | llvm-svn: 30823
* 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
* Use hidden visibility to make symbols in an anonymous namespace getChris Lattner2006-06-281-2/+3
| | | | | | dropped. This shrinks libllvmgcc.dylib another 67K llvm-svn: 28975
* Fix Transforms/ScalarRepl/2006-04-20-PromoteCrash.llChris Lattner2006-04-201-1/+1
| | | | llvm-svn: 27912
* Teach scalarrepl to promote unions of vectors and floats, producingChris Lattner2006-04-141-46/+101
| | | | | | | insert/extractelement operations. This implements Transforms/ScalarRepl/vector_promote.ll llvm-svn: 27710
* Fix a miscompilation of 188.ammp with the new CFE. 188.ammp is accessingChris Lattner2006-03-081-3/+19
| | | | | | | arrays out of range in a horrible way, but we shouldn't break it anyway. Details in the comments. llvm-svn: 26606
* Fix Regression/Transforms/ScalarRepl/2006-01-24-IllegalUnionPromoteCrash.llChris Lattner2006-01-241-3/+1
| | | | llvm-svn: 25587
* Make iostream #inclusion explicitChris Lattner2006-01-221-0/+1
| | | | llvm-svn: 25514
* Fix Transforms/ScalarRepl/2005-12-14-UnionPromoteCrash.ll, a crash on undefinedChris Lattner2005-12-141-2/+2
| | | | | | behavior in 126.gcc on big-endian systems. llvm-svn: 24708
* Implement a little hack for parity with GCC on crafty. This speeds upChris Lattner2005-12-121-2/+277
| | | | | | | | | | | | | | | | | | | | | | 186.crafty by about 16% (from 15.109s to 13.045s) on my system. This turns allocas with unions/casts into scalars. For example crafty has something like this: union doub { unsigned short i[4]; long long d; }; int f(long long a) { return ((union doub){.d=a}).i[1]; } Instead of generating loads and stores to an alloca, we now promote the whole thing to a scalar long value. This implements: Transforms/ScalarRepl/AggregatePromote.ll llvm-svn: 24667
* Add support alignment of allocation instructions.Nate Begeman2005-11-051-2/+3
| | | | | | | | | Add support for specifying alignment and size of setjmp jmpbufs. No targets currently do anything with this information, nor is it presrved in the bytecode representation. That's coming up next. llvm-svn: 24196
* Remove trailing whitespaceMisha Brukman2005-04-211-12/+12
| | | | llvm-svn: 21427
* Silence warningsChris Lattner2005-01-081-1/+2
| | | | llvm-svn: 19379
* Remove unused variable for compilation by VC++.Reid Spencer2004-11-151-1/+1
| | | | | | Patch contributed by Morten Ofstad. llvm-svn: 17830
* Teach SROA how to promote an array index that is variable, if the dimensionChris Lattner2004-11-141-40/+98
| | | | | | | | | of the array is just two. This occurs 8 times in gcc, 6 times in crafty, and 12 times in 099.go. This implements ScalarRepl/sroa_two.ll llvm-svn: 17727
* Rearrange some code, no functionality changes.Chris Lattner2004-11-141-49/+68
| | | | llvm-svn: 17724
* Prototype these functions more accuratelyChris Lattner2004-09-201-1/+1
| | | | llvm-svn: 16432
OpenPOWER on IntegriCloud