Commit Graph

30927 Commits

Author SHA1 Message Date
Devang Patel b39885d23d LoopSimplify::FindPHIToPartitionLoops()
Use ETForest instead of DominatorSet.

llvm-svn: 35222
2007-03-20 20:19:48 +00:00
Devang Patel 1758cb50de LoopSimplify::FindPHIToPartitionLoops()
Use ETForest instead of DominatorSet.

llvm-svn: 35221
2007-03-20 20:18:12 +00:00
Lauro Ramos Venancio 971aa18867 Code clean up.
llvm-svn: 35220
2007-03-20 20:09:03 +00:00
Evan Cheng 550cf0369c Minor bug.
llvm-svn: 35219
2007-03-20 19:32:11 +00:00
Lauro Ramos Venancio a88c4a74f3 bugfix: When the source register of CALL_NOLINK was LR, the following code was emitted:
mov lr, pc
    bx lr
So, the function was not called.

llvm-svn: 35218
2007-03-20 17:57:23 +00:00
Chris Lattner cdf6823e10 llvm-gcc now requires -fnested-functions to enable them in C.
llvm-svn: 35217
2007-03-20 17:34:31 +00:00
Reid Spencer 98f0709618 Break up huge line so that this file is almost readable.
llvm-svn: 35216
2007-03-20 17:27:19 +00:00
Reid Spencer 8d364d0e17 Regenerate.
llvm-svn: 35215
2007-03-20 17:19:31 +00:00
Reid Spencer 0ad5cebb09 Don't delete things before their last use (avoids bad reads).
llvm-svn: 35214
2007-03-20 17:18:33 +00:00
Lauro Ramos Venancio 25878b45f5 CopyToReg source operand can be a physical register.
llvm-svn: 35213
2007-03-20 16:46:44 +00:00
Duncan Sands 76e4fdf879 Test handling of structs with multiple variable-sized fields.
llvm-svn: 35212
2007-03-20 14:13:20 +00:00
Zhou Sheng b3949340c8 Simplify isHighOnes().
llvm-svn: 35211
2007-03-20 12:49:06 +00:00
Duncan Sands dd066c34a9 Ada testcase for structs with multiple variable sized fields.
llvm-svn: 35210
2007-03-20 09:54:02 +00:00
Duncan Sands 2fd6a4bef5 Test that ARRAY_RANGE_REF returns an array not an element.
llvm-svn: 35209
2007-03-20 09:50:42 +00:00
Evan Cheng 0e3278e505 First cut trivial re-materialization support.
llvm-svn: 35208
2007-03-20 08:13:50 +00:00
Evan Cheng 9e7b838469 Make two piece constant generation as a single instruction. It's re-materialized as a load from constantpool.
llvm-svn: 35207
2007-03-20 08:11:30 +00:00
Evan Cheng 39eb62ea3b New entry.
llvm-svn: 35206
2007-03-20 08:10:17 +00:00
Evan Cheng 61f39d186c Added MRegisterInfo hook to re-materialize an instruction.
llvm-svn: 35205
2007-03-20 08:09:38 +00:00
Chris Lattner 3e1d917e80 Two changes:
1) codegen a shift of a register as a shift, not an LEA.
2) teach the RA to convert a shift to an LEA instruction if it wants something
   in three-address form.

This gives us asm diffs like:

-       leal (,%eax,4), %eax
+       shll $2, %eax

which is faster on some processors and smaller on all of them.

and, more interestingly:

-       movl 24(%esi), %eax
-       leal (,%eax,4), %edi
+       movl 24(%esi), %edi
+       shll $2, %edi

Without #2, #1 was a significant pessimization in some cases.

This implements CodeGen/X86/shift-codegen.ll

llvm-svn: 35204
2007-03-20 06:08:29 +00:00
Chris Lattner d95d748a4d These functions should use shll, not lea.
llvm-svn: 35203
2007-03-20 06:01:41 +00:00
Chris Lattner f806e1cdbc fix indentation
llvm-svn: 35202
2007-03-20 02:25:53 +00:00
Zhou Sheng 4852dc1cd5 Correct the name: isStrictPositive --> isStrictlyPositive.
llvm-svn: 35201
2007-03-20 02:18:16 +00:00
Chris Lattner cc411d66d0 Add a dtor to fix leaks from all clients of BitVector.
llvm-svn: 35200
2007-03-20 02:10:56 +00:00
Reid Spencer 6fb989c5cd Regenerate.
llvm-svn: 35199
2007-03-20 01:13:36 +00:00
Reid Spencer d05bc52fec Plug some PATypeHolder memory leaks.
llvm-svn: 35198
2007-03-20 01:13:00 +00:00
Dale Johannesen e3a02be5f1 use types of loads and stores, not address, in CheckForIVReuse
llvm-svn: 35197
2007-03-20 00:47:50 +00:00
Dale Johannesen 8447d34903 fix obvious comment bug
llvm-svn: 35196
2007-03-20 00:30:56 +00:00
Chris Lattner af867a3937 Fix a nasty memory leak, caused by my revamp of the value symbol table.
llvm-svn: 35195
2007-03-20 00:18:10 +00:00
Reid Spencer 6682721316 Make isOneBitSet faster by using APInt::isPowerOf2. Thanks Chris.
llvm-svn: 35194
2007-03-20 00:16:52 +00:00
Reid Spencer 09f4eb1098 Make this test a little simpler/faster.
llvm-svn: 35193
2007-03-19 23:36:19 +00:00
Reid Spencer eb0a221186 Add test case for PR1261, currently XFAILed.
llvm-svn: 35192
2007-03-19 23:28:16 +00:00
Devang Patel 1d3bb03aa1 Document LoopPass.
llvm-svn: 35191
2007-03-19 22:21:25 +00:00
Reid Spencer cc031a43aa APIntify the isHighOnes utility function.
llvm-svn: 35190
2007-03-19 21:29:50 +00:00
Reid Spencer b1ec2e8ec7 Fix coding standards violation.
llvm-svn: 35189
2007-03-19 21:19:02 +00:00
Reid Spencer ef599b0786 Implement isMaxValueMinusOne in terms of APInt instead of uint64_t.
Patch by Sheng Zhou.

llvm-svn: 35188
2007-03-19 21:10:28 +00:00
Reid Spencer 3b93db72b4 Implement isMinValuePlusOne using facilities of APInt instead of uint64_t
Patch by Zhou Sheng.

llvm-svn: 35187
2007-03-19 21:08:07 +00:00
Reid Spencer 129a86792d Implement isOneBitSet in terms of APInt::countPopulation.
llvm-svn: 35186
2007-03-19 21:04:43 +00:00
Reid Spencer 450434ed65 1. Use APInt::getSignBit to reduce clutter (patch by Sheng Zhou)
2. Replace uses of the "isPositive" utility function with APInt::isPositive

llvm-svn: 35185
2007-03-19 20:58:18 +00:00
Reid Spencer 03c31d5bb0 Remove a redundant clause in an if statement.
Patch by Sheng Zhou.

llvm-svn: 35184
2007-03-19 20:47:50 +00:00
Reid Spencer a7bed60ab3 Regenerate.
llvm-svn: 35183
2007-03-19 20:40:51 +00:00
Reid Spencer 363fd46199 Fix test/Assembler/2007-03-19-NegValue.ll by using the new "isSigned"
parameter on ConstantInt::get to indicate the signedness of the intended
value.

llvm-svn: 35182
2007-03-19 20:40:22 +00:00
Reid Spencer 362fb29d80 Allow ConstantInt::get(Ty, uint64_t) to interpret the 64-bit values as a
negative number. This is needed to fix test/Assembler/2007-03-19-NegValue.ll

llvm-svn: 35181
2007-03-19 20:39:08 +00:00
Reid Spencer 6fae35acd3 Implement extension of sign bits for negative values in the uint64_t
constructor. This helps to fix test/Assembler/2007-03-19-NegValue.ll

llvm-svn: 35180
2007-03-19 20:37:47 +00:00
Reid Spencer 568b8b54dc Add an indication of signedness to the uint64_t constructor so sign bits
can be extended. This helps fix test/Assembler/2007-03-19-NegValue.ll

llvm-svn: 35179
2007-03-19 20:36:48 +00:00
Reid Spencer 732f0a838e Test case noticed by Sheng that fails because negative values that are
greater than 64-bits don't have the sign bits extended on construction of
the APInt.

llvm-svn: 35178
2007-03-19 20:35:26 +00:00
Anton Korobeynikov 2946e07557 Fix mingw32 build
llvm-svn: 35177
2007-03-19 20:19:08 +00:00
Duncan Sands cbf49a803c Test handling of ARRAY_REF when the component type is of unknown size.
llvm-svn: 35176
2007-03-19 19:56:18 +00:00
Reid Spencer 37f629a953 For PR1258:
Test that invalid numbered value references get an error message.

llvm-svn: 35175
2007-03-19 18:41:37 +00:00
Reid Spencer d0e8d382db Regenerate.
llvm-svn: 35174
2007-03-19 18:40:50 +00:00
Reid Spencer fe65ae88fe For PR1248:
Eliminate support for type planes in numbered values. This simplifies the
data structures involved in managing forward definitions, etc. Instead of
requiring maps from type to value, we can now just use a vector of values.
These changes also required rewrites of some support functions such as
InsertValue, getBBVal, and ResolveDefinitions. Some other cosmetic changes
were made as well.

llvm-svn: 35173
2007-03-19 18:39:36 +00:00