Dale Johannesen [Tue, 20 Mar 2007 21:54:54 +0000 (21:54 +0000)]
do not share old induction variables when this would result in invalid
instructions (that would have to be split later)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35227
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 20 Mar 2007 21:35:06 +0000 (21:35 +0000)]
maintain LiveIn when splitting blocks (register scavenging needs it)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35226
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 20 Mar 2007 21:25:31 +0000 (21:25 +0000)]
DominanceFrontier::calculate().
Avoid recursion, Use iterative algorithm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35225
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Tue, 20 Mar 2007 20:43:18 +0000 (20:43 +0000)]
Fix some VC++ warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35224
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Tue, 20 Mar 2007 20:42:36 +0000 (20:42 +0000)]
Fix (and simplify) 48-bit byte swap.
Get pos/neg infinity the correct way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35223
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 20 Mar 2007 20:19:48 +0000 (20:19 +0000)]
LoopSimplify::FindPHIToPartitionLoops()
Use ETForest instead of DominatorSet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35222
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 20 Mar 2007 20:18:12 +0000 (20:18 +0000)]
LoopSimplify::FindPHIToPartitionLoops()
Use ETForest instead of DominatorSet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35221
91177308-0d34-0410-b5e6-
96231b3b80d8
Lauro Ramos Venancio [Tue, 20 Mar 2007 20:09:03 +0000 (20:09 +0000)]
Code clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35220
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 20 Mar 2007 19:32:11 +0000 (19:32 +0000)]
Minor bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35219
91177308-0d34-0410-b5e6-
96231b3b80d8
Lauro Ramos Venancio [Tue, 20 Mar 2007 17:57:23 +0000 (17:57 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35218
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Mar 2007 17:34:31 +0000 (17:34 +0000)]
llvm-gcc now requires -fnested-functions to enable them in C.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35217
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 20 Mar 2007 17:27:19 +0000 (17:27 +0000)]
Break up huge line so that this file is almost readable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35216
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 20 Mar 2007 17:19:31 +0000 (17:19 +0000)]
Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35215
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 20 Mar 2007 17:18:33 +0000 (17:18 +0000)]
Don't delete things before their last use (avoids bad reads).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35214
91177308-0d34-0410-b5e6-
96231b3b80d8
Lauro Ramos Venancio [Tue, 20 Mar 2007 16:46:44 +0000 (16:46 +0000)]
CopyToReg source operand can be a physical register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35213
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 20 Mar 2007 14:13:20 +0000 (14:13 +0000)]
Test handling of structs with multiple variable-sized fields.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35212
91177308-0d34-0410-b5e6-
96231b3b80d8
Zhou Sheng [Tue, 20 Mar 2007 12:49:06 +0000 (12:49 +0000)]
Simplify isHighOnes().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35211
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 20 Mar 2007 09:54:02 +0000 (09:54 +0000)]
Ada testcase for structs with multiple variable sized fields.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35210
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 20 Mar 2007 09:50:42 +0000 (09:50 +0000)]
Test that ARRAY_RANGE_REF returns an array not an element.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35209
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 20 Mar 2007 08:13:50 +0000 (08:13 +0000)]
First cut trivial re-materialization support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35208
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 20 Mar 2007 08:11:30 +0000 (08:11 +0000)]
Make two piece constant generation as a single instruction. It's re-materialized as a load from constantpool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35207
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 20 Mar 2007 08:10:17 +0000 (08:10 +0000)]
New entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35206
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 20 Mar 2007 08:09:38 +0000 (08:09 +0000)]
Added MRegisterInfo hook to re-materialize an instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35205
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Mar 2007 06:08:29 +0000 (06:08 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35204
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Mar 2007 06:01:41 +0000 (06:01 +0000)]
These functions should use shll, not lea.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35203
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Mar 2007 02:25:53 +0000 (02:25 +0000)]
fix indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35202
91177308-0d34-0410-b5e6-
96231b3b80d8
Zhou Sheng [Tue, 20 Mar 2007 02:18:16 +0000 (02:18 +0000)]
Correct the name: isStrictPositive --> isStrictlyPositive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35201
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Mar 2007 02:10:56 +0000 (02:10 +0000)]
Add a dtor to fix leaks from all clients of BitVector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35200
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 20 Mar 2007 01:13:36 +0000 (01:13 +0000)]
Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35199
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 20 Mar 2007 01:13:00 +0000 (01:13 +0000)]
Plug some PATypeHolder memory leaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35198
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 20 Mar 2007 00:47:50 +0000 (00:47 +0000)]
use types of loads and stores, not address, in CheckForIVReuse
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35197
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 20 Mar 2007 00:30:56 +0000 (00:30 +0000)]
fix obvious comment bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35196
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Mar 2007 00:18:10 +0000 (00:18 +0000)]
Fix a nasty memory leak, caused by my revamp of the value symbol table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35195
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 20 Mar 2007 00:16:52 +0000 (00:16 +0000)]
Make isOneBitSet faster by using APInt::isPowerOf2. Thanks Chris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35194
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 19 Mar 2007 23:36:19 +0000 (23:36 +0000)]
Make this test a little simpler/faster.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35193
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 19 Mar 2007 23:28:16 +0000 (23:28 +0000)]
Add test case for PR1261, currently XFAILed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35192
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 19 Mar 2007 22:21:25 +0000 (22:21 +0000)]
Document LoopPass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35191
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 19 Mar 2007 21:29:50 +0000 (21:29 +0000)]
APIntify the isHighOnes utility function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35190
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 19 Mar 2007 21:19:02 +0000 (21:19 +0000)]
Fix coding standards violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35189
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 19 Mar 2007 21:10:28 +0000 (21:10 +0000)]
Implement isMaxValueMinusOne in terms of APInt instead of uint64_t.
Patch by Sheng Zhou.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35188
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 19 Mar 2007 21:08:07 +0000 (21:08 +0000)]
Implement isMinValuePlusOne using facilities of APInt instead of uint64_t
Patch by Zhou Sheng.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35187
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 19 Mar 2007 21:04:43 +0000 (21:04 +0000)]
Implement isOneBitSet in terms of APInt::countPopulation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35186
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 19 Mar 2007 20:58:18 +0000 (20:58 +0000)]
1. Use APInt::getSignBit to reduce clutter (patch by Sheng Zhou)
2. Replace uses of the "isPositive" utility function with APInt::isPositive
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35185
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 19 Mar 2007 20:47:50 +0000 (20:47 +0000)]
Remove a redundant clause in an if statement.
Patch by Sheng Zhou.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35184
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 19 Mar 2007 20:40:51 +0000 (20:40 +0000)]
Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35183
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 19 Mar 2007 20:40:22 +0000 (20:40 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35182
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 19 Mar 2007 20:39:08 +0000 (20:39 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35181
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 19 Mar 2007 20:37:47 +0000 (20:37 +0000)]
Implement extension of sign bits for negative values in the uint64_t
constructor. This helps to fix test/Assembler/2007-03-19-NegValue.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35180
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 19 Mar 2007 20:36:48 +0000 (20:36 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35179
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 19 Mar 2007 20:35:26 +0000 (20:35 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35178
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 19 Mar 2007 20:19:08 +0000 (20:19 +0000)]
Fix mingw32 build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35177
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 19 Mar 2007 19:56:18 +0000 (19:56 +0000)]
Test handling of ARRAY_REF when the component type is of unknown size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35176
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 19 Mar 2007 18:41:37 +0000 (18:41 +0000)]
For PR1258:
Test that invalid numbered value references get an error message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35175
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 19 Mar 2007 18:40:50 +0000 (18:40 +0000)]
Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35174
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 19 Mar 2007 18:39:36 +0000 (18:39 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35173
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 19 Mar 2007 18:34:28 +0000 (18:34 +0000)]
Add and Operator== method to ValID so equality can be done properly for
named or numbered ValIDs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35172
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 19 Mar 2007 18:32:53 +0000 (18:32 +0000)]
For PR1258:
Radically simplify the SlotMachine. There is no need to keep Value planes
around any more. This change causes slot numbering to number all un-named,
non-void values starting at 0 and incrementing monotonically through the
function, regardless of type (including BasicBlocks). Getting slot numbers
is now a single lookup operation instead of a double lookup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35171
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 19 Mar 2007 18:27:35 +0000 (18:27 +0000)]
For PR1258:
Revise numeric value references to accommodate collapsed type planes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35170
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Mar 2007 18:25:57 +0000 (18:25 +0000)]
fix ScalarRepl/2007-03-19-CanonicalizeMemcpy.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35169
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 19 Mar 2007 18:25:55 +0000 (18:25 +0000)]
Use opt instead of gccas.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35168
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Mar 2007 18:25:48 +0000 (18:25 +0000)]
add a testcase the resent patches fail on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35167
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 19 Mar 2007 18:08:42 +0000 (18:08 +0000)]
Don't upgrade these.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35166
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 19 Mar 2007 18:08:26 +0000 (18:08 +0000)]
Remove -reduce-joining-phys-regs options. Make it on by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35165
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 19 Mar 2007 14:25:02 +0000 (14:25 +0000)]
Fix obvious typo in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35164
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 19 Mar 2007 07:48:02 +0000 (07:48 +0000)]
Fix naming inconsistencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35163
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 19 Mar 2007 07:20:03 +0000 (07:20 +0000)]
Special LDR instructions to load from non-pc-relative constantpools. These are
rematerializable. Only used for constant generation for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35162
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 19 Mar 2007 07:09:02 +0000 (07:09 +0000)]
Constant generation instructions are re-materializable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35161
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 19 Mar 2007 06:22:07 +0000 (06:22 +0000)]
Added isReMaterializable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35160
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 19 Mar 2007 06:20:37 +0000 (06:20 +0000)]
Recognize target instruction flag 'isReMaterializable'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35159
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 19 Mar 2007 06:19:16 +0000 (06:19 +0000)]
Add a TargetInstrDescriptor flag to mark an instruction as "re-materializable".
It means the instruction can be easily re-materialized at any point. e.g.
constant generation, load from constantpool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35158
91177308-0d34-0410-b5e6-
96231b3b80d8
Zhou Sheng [Mon, 19 Mar 2007 05:22:18 +0000 (05:22 +0000)]
Add isStrictPositive() to APInt to determine if this APInt Value > 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35156
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 19 Mar 2007 04:22:35 +0000 (04:22 +0000)]
Minor bug fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35153
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Mar 2007 00:39:32 +0000 (00:39 +0000)]
fix a warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35152
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Mar 2007 00:17:19 +0000 (00:17 +0000)]
add PR#
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35151
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Mar 2007 00:16:43 +0000 (00:16 +0000)]
implement the next chunk of SROA with memset/memcpy's of aggregates. This
implements Transforms/ScalarRepl/memset-aggregate-byte-leader.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35150
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Mar 2007 00:15:43 +0000 (00:15 +0000)]
add pr#
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35149
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Mar 2007 00:11:30 +0000 (00:11 +0000)]
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35148
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Mar 2007 00:09:00 +0000 (00:09 +0000)]
testcase for SROA with memset etc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35147
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 18 Mar 2007 22:58:46 +0000 (22:58 +0000)]
Clean up this code and fix subtract miscompile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35146
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Mar 2007 22:51:34 +0000 (22:51 +0000)]
Implement InstCombine/and-xor-merge.ll:test[12].
Rearrange some code to simplify it now that shifts are binops
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35145
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Mar 2007 22:50:57 +0000 (22:50 +0000)]
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35144
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Mar 2007 22:41:33 +0000 (22:41 +0000)]
minor updates
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35143
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 18 Mar 2007 14:37:20 +0000 (14:37 +0000)]
This is implemented. We now generate:
entry:
icmp ugt i32 %x, 4 ; <i1>:0 [#uses=1]
br i1 %0, label %cond_true, label %cond_false
cond_true: ; preds = %entry
%tmp1 = tail call i32 (...)* @bar( i32 12 ) ; <i32> [#uses=0]
ret void
cond_false: ; preds = %entry
switch i32 %x, label %cond_true15 [
i32 4, label %cond_true3
i32 3, label %cond_true7
i32 2, label %cond_true11
i32 0, label %cond_false17
]
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35142
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 18 Mar 2007 09:05:55 +0000 (09:05 +0000)]
- Merge UsedBlocks info after two virtual registers are coalesced.
- Use distance to closest use to determine whether to abort coalescing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35141
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 18 Mar 2007 09:02:31 +0000 (09:02 +0000)]
Keep UsedBlocks info accurate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35140
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 18 Mar 2007 03:26:04 +0000 (03:26 +0000)]
Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35139
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 18 Mar 2007 01:09:32 +0000 (01:09 +0000)]
Propagate ValueRanges across equality.
Add some more micro-optimizations: x * 0 = 0, a - x = a --> x = 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35138
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sat, 17 Mar 2007 14:48:06 +0000 (14:48 +0000)]
Silence warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35137
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 17 Mar 2007 09:29:54 +0000 (09:29 +0000)]
Track the BB's where each virtual register is used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35135
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 17 Mar 2007 09:27:35 +0000 (09:27 +0000)]
Joining a live interval of a physical register with a virtual one can turn out
to be really bad. Once they are joined they are not broken apart. Also, physical
intervals cannot be spilled!
Added a heuristic as a workaround for this. Be careful coalescing with a
physical register if the virtual register uses are "far". Check if there are
uses in the same loop as the source (copy instruction). Check if it is in the
loop preheader, etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35134
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 17 Mar 2007 08:53:30 +0000 (08:53 +0000)]
Use SmallSet instead of std::set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35133
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 17 Mar 2007 08:22:49 +0000 (08:22 +0000)]
If sdisel has decided to sink GEP index expression into any BB. Replace all uses
in that BB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35132
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 17 Mar 2007 03:18:32 +0000 (03:18 +0000)]
GEP index sink test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35131
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Sat, 17 Mar 2007 00:14:52 +0000 (00:14 +0000)]
Test case for X86 inline asm constraint 'I'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35130
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Sat, 17 Mar 2007 00:13:28 +0000 (00:13 +0000)]
Support 'I' inline asm constraint.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35129
91177308-0d34-0410-b5e6-
96231b3b80d8
Lauro Ramos Venancio [Fri, 16 Mar 2007 22:54:16 +0000 (22:54 +0000)]
Only ARMv6 has BSWAP.
Fix MultiSource/Applications/aha test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35128
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 16 Mar 2007 18:32:30 +0000 (18:32 +0000)]
Turn on GEP index sinking by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35127
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 16 Mar 2007 17:50:20 +0000 (17:50 +0000)]
Stupid bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35126
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 16 Mar 2007 09:44:46 +0000 (09:44 +0000)]
And now support for MMX logical operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35125
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 16 Mar 2007 08:46:27 +0000 (08:46 +0000)]
Sink a binary expression into its use blocks if it is a loop invariant
computation used as GEP indexes and if the expression can be folded into
target addressing mode of GEP load / store use types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35123
91177308-0d34-0410-b5e6-
96231b3b80d8