oota-llvm.git
17 years agoFix breakage of bytecode reader when built with VC++.
Jeff Cohen [Sat, 21 Apr 2007 15:29:13 +0000 (15:29 +0000)]
Fix breakage of bytecode reader when built with VC++.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36303 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoThe expression "SubclassData = (SubclassData & ~1) | (V) ? 1 : 0;" does not do what
Jeff Cohen [Sat, 21 Apr 2007 14:32:59 +0000 (14:32 +0000)]
The expression "SubclassData = (SubclassData & ~1) | (V) ? 1 : 0;" does not do what
was intended!  | has higher precedence than ?.  Caught by Visual Studio.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36302 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd support for alignment attributes on load/store instructions
Christopher Lamb [Sat, 21 Apr 2007 08:16:25 +0000 (08:16 +0000)]
add support for alignment attributes on load/store instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36301 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoMake PredicateSimplifier not use DominatorTree.
Owen Anderson [Sat, 21 Apr 2007 07:38:12 +0000 (07:38 +0000)]
Make PredicateSimplifier not use DominatorTree.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36300 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix a comment.
Owen Anderson [Sat, 21 Apr 2007 07:12:44 +0000 (07:12 +0000)]
Fix a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36299 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix some null checks to actually test the part that needs checking.
Owen Anderson [Sat, 21 Apr 2007 07:04:45 +0000 (07:04 +0000)]
Fix some null checks to actually test the part that needs checking.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36298 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agomake this portable to 64-bit hosts
Chris Lattner [Sat, 21 Apr 2007 03:35:28 +0000 (03:35 +0000)]
make this portable to 64-bit hosts

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36297 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoBug fix; add super-registers sets.
Evan Cheng [Sat, 21 Apr 2007 00:55:29 +0000 (00:55 +0000)]
Bug fix; add super-registers sets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36296 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd super-register set.
Evan Cheng [Sat, 21 Apr 2007 00:54:06 +0000 (00:54 +0000)]
Add super-register set.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36295 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoReset vertex.
Devang Patel [Sat, 21 Apr 2007 00:36:45 +0000 (00:36 +0000)]
Reset vertex.
Fix http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070416/048092.html

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36294 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoNew test case.
Devang Patel [Sat, 21 Apr 2007 00:34:37 +0000 (00:34 +0000)]
New test case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36293 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix a bug that prevented the JIT from working correctly after llvm_shutdown.
Chris Lattner [Sat, 21 Apr 2007 00:12:18 +0000 (00:12 +0000)]
Fix a bug that prevented the JIT from working correctly after llvm_shutdown.
Pass info objects are initialized by static ctors, so deleting them at
llvm_shutdown time prevents resurrection from working.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36292 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix regressions introduced by my previous patch: opt calls verifier in a
Chris Lattner [Fri, 20 Apr 2007 23:59:29 +0000 (23:59 +0000)]
Fix regressions introduced by my previous patch: opt calls verifier in a
way that the "Mod" ivar was not getting set.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36291 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAllow the lowering of ISD::GLOBAL_OFFSET_TABLE.
Lauro Ramos Venancio [Fri, 20 Apr 2007 23:02:39 +0000 (23:02 +0000)]
Allow the lowering of ISD::GLOBAL_OFFSET_TABLE.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36290 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoavoid mutating a global in an accessor
Chris Lattner [Fri, 20 Apr 2007 22:57:20 +0000 (22:57 +0000)]
avoid mutating a global in an accessor

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36289 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agofit in 80 cols
Chris Lattner [Fri, 20 Apr 2007 22:40:40 +0000 (22:40 +0000)]
fit in 80 cols

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36288 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoComment out usage of write() for now.
Jeff Cohen [Fri, 20 Apr 2007 22:40:10 +0000 (22:40 +0000)]
Comment out usage of write() for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36287 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agorename JIT::state -> JIT::jitstate to avoid shadowing ExecutionEngine::state
Chris Lattner [Fri, 20 Apr 2007 22:40:05 +0000 (22:40 +0000)]
rename JIT::state -> JIT::jitstate to avoid shadowing ExecutionEngine::state

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36286 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix a problem where primitive types lose their name after llvm_shutdown is called.
Chris Lattner [Fri, 20 Apr 2007 22:33:47 +0000 (22:33 +0000)]
Fix a problem where primitive types lose their name after llvm_shutdown is called.
This also reduces the amount of work done at static construction time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36285 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agocatch a case that was biting jeffc
Chris Lattner [Fri, 20 Apr 2007 21:48:08 +0000 (21:48 +0000)]
catch a case that was biting jeffc

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36284 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoImplement "general dynamic", "initial exec" and "local exec" TLS models for
Lauro Ramos Venancio [Fri, 20 Apr 2007 21:38:10 +0000 (21:38 +0000)]
Implement "general dynamic", "initial exec" and "local exec" TLS models for
X86 32 bits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36283 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd sub-registers set accessor.
Evan Cheng [Fri, 20 Apr 2007 21:28:05 +0000 (21:28 +0000)]
Add sub-registers set accessor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36282 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoEnable Objective-C tests.
Devang Patel [Fri, 20 Apr 2007 21:24:01 +0000 (21:24 +0000)]
Enable Objective-C tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36281 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoSpecify S registers as D registers' sub-registers.
Evan Cheng [Fri, 20 Apr 2007 21:20:10 +0000 (21:20 +0000)]
Specify S registers as D registers' sub-registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36280 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoSpecify sub-register relations. e.g. RAX: [EAX], EAX: [AX], AX: [AL,AH].
Evan Cheng [Fri, 20 Apr 2007 21:15:21 +0000 (21:15 +0000)]
Specify sub-register relations. e.g. RAX: [EAX], EAX: [AX], AX: [AL,AH].

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36279 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd sub-registers sets.
Evan Cheng [Fri, 20 Apr 2007 21:13:46 +0000 (21:13 +0000)]
Add sub-registers sets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36278 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd sub-register sets.
Evan Cheng [Fri, 20 Apr 2007 21:11:22 +0000 (21:11 +0000)]
Add sub-register sets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36277 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agotest
Chris Lattner [Fri, 20 Apr 2007 20:49:25 +0000 (20:49 +0000)]
test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36276 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agotest commit
Chris Lattner [Fri, 20 Apr 2007 20:46:43 +0000 (20:46 +0000)]
test commit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36275 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agotest commit
Chris Lattner [Fri, 20 Apr 2007 20:42:36 +0000 (20:42 +0000)]
test commit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36274 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd a crazy idea
Chris Lattner [Fri, 20 Apr 2007 20:18:43 +0000 (20:18 +0000)]
add a crazy idea

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36273 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAvoid recursion.
Devang Patel [Fri, 20 Apr 2007 20:04:37 +0000 (20:04 +0000)]
Avoid recursion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36272 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoMove more passes to using ETForest instead of DominatorTree.
Owen Anderson [Fri, 20 Apr 2007 06:27:13 +0000 (06:27 +0000)]
Move more passes to using ETForest instead of DominatorTree.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36271 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd null checks and const-ify these accessors.
Owen Anderson [Fri, 20 Apr 2007 05:44:16 +0000 (05:44 +0000)]
Add null checks and const-ify these accessors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36270 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoTest check in
Christopher Lamb [Fri, 20 Apr 2007 05:05:24 +0000 (05:05 +0000)]
Test check in

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36269 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoremove cruft
Chris Lattner [Fri, 20 Apr 2007 04:45:58 +0000 (04:45 +0000)]
remove cruft

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36268 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix a very strange assertion message, patch by Christopher Lamb
Chris Lattner [Fri, 20 Apr 2007 03:27:36 +0000 (03:27 +0000)]
Fix a very strange assertion message, patch by Christopher Lamb
 CVS: ----------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36267 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix test.
Evan Cheng [Fri, 20 Apr 2007 00:45:36 +0000 (00:45 +0000)]
Fix test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36266 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoMake Microsoft assembler and linker happy.
Jeff Cohen [Fri, 20 Apr 2007 00:33:54 +0000 (00:33 +0000)]
Make Microsoft assembler and linker happy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36265 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix a message, patch by Christopher Lamb.
Chris Lattner [Thu, 19 Apr 2007 18:42:38 +0000 (18:42 +0000)]
Fix a message, patch by Christopher Lamb.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36264 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix a bug in getFrameRegister.
Lauro Ramos Venancio [Thu, 19 Apr 2007 14:09:38 +0000 (14:09 +0000)]
Fix a bug in getFrameRegister.
Reported by Raul Herbster.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36262 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoMake use of ConstantInt::isZero instead of ConstantInt::isNullValue.
Zhou Sheng [Thu, 19 Apr 2007 05:39:12 +0000 (05:39 +0000)]
Make use of ConstantInt::isZero instead of ConstantInt::isNullValue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36261 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoMake the operations of APInt variables more efficient.
Zhou Sheng [Thu, 19 Apr 2007 05:35:00 +0000 (05:35 +0000)]
Make the operations of APInt variables more efficient.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36260 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix some VC++ warnings.
Jeff Cohen [Thu, 19 Apr 2007 02:04:09 +0000 (02:04 +0000)]
Fix some VC++ warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36259 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoRevert Owen's last check-in. This is breaking Mac OS X / PPC llvm-gcc bootstrap.
Evan Cheng [Wed, 18 Apr 2007 22:39:00 +0000 (22:39 +0000)]
Revert Owen's last check-in. This is breaking Mac OS X / PPC llvm-gcc bootstrap.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36258 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoProvide link.
Jeff Cohen [Wed, 18 Apr 2007 17:26:14 +0000 (17:26 +0000)]
Provide link.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36257 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix the spelling of the prefetchnta instruction.
Dan Gohman [Wed, 18 Apr 2007 14:09:14 +0000 (14:09 +0000)]
Fix the spelling of the prefetchnta instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36256 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoRevert changes that caused breakage.
Owen Anderson [Wed, 18 Apr 2007 06:46:57 +0000 (06:46 +0000)]
Revert changes that caused breakage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36255 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoSwitch more uses of DominatorTree over to ETForest.
Owen Anderson [Wed, 18 Apr 2007 05:43:13 +0000 (05:43 +0000)]
Switch more uses of DominatorTree over to ETForest.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36254 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoUse ETForest instead of DominatorTree.
Owen Anderson [Wed, 18 Apr 2007 05:25:43 +0000 (05:25 +0000)]
Use ETForest instead of DominatorTree.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36252 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd accessor to get the blocks immediately dominated by a given block to ETForest.
Owen Anderson [Wed, 18 Apr 2007 05:25:09 +0000 (05:25 +0000)]
Add accessor to get the blocks immediately dominated by a given block to ETForest.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36251 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoVarInfo::UsedBlocks is no longer used. Remove.
Evan Cheng [Wed, 18 Apr 2007 05:04:38 +0000 (05:04 +0000)]
VarInfo::UsedBlocks is no longer used. Remove.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36250 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoUse ETForest instead of DominatorTree.
Owen Anderson [Wed, 18 Apr 2007 04:55:33 +0000 (04:55 +0000)]
Use ETForest instead of DominatorTree.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36249 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoUse new ETForest accessor.
Owen Anderson [Wed, 18 Apr 2007 04:46:35 +0000 (04:46 +0000)]
Use new ETForest accessor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36248 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoUse ETForest instead of DominatorTree.
Owen Anderson [Wed, 18 Apr 2007 04:39:32 +0000 (04:39 +0000)]
Use ETForest instead of DominatorTree.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36247 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd an accessor to make ETForest more useful.
Owen Anderson [Wed, 18 Apr 2007 04:38:39 +0000 (04:38 +0000)]
Add an accessor to make ETForest more useful.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36246 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoallow SRL to simplify its operands, as it doesn't demand all bits as input.
Chris Lattner [Wed, 18 Apr 2007 03:06:49 +0000 (03:06 +0000)]
allow SRL to simplify its operands, as it doesn't demand all bits as input.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36245 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoWhen replacing a node in SimplifyDemandedBits, if the old node used any
Chris Lattner [Wed, 18 Apr 2007 03:05:22 +0000 (03:05 +0000)]
When replacing a node in SimplifyDemandedBits, if the old node used any
single-use nodes, they will be dead soon.  Make sure to remove them before
processing other nodes.  This implements CodeGen/X86/shl_elim.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36244 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agonew testcase
Chris Lattner [Wed, 18 Apr 2007 03:04:37 +0000 (03:04 +0000)]
new testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36243 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agofix a pasto
Chris Lattner [Wed, 18 Apr 2007 03:01:40 +0000 (03:01 +0000)]
fix a pasto

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36242 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoNew crasher test case.
Evan Cheng [Wed, 18 Apr 2007 02:35:10 +0000 (02:35 +0000)]
New crasher test case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36241 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoDon't populate TryAgainList when coalescing only physical registers with virtual...
Evan Cheng [Wed, 18 Apr 2007 02:30:19 +0000 (02:30 +0000)]
Don't populate TryAgainList when coalescing only physical registers with virtual registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36240 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoCache DT[*SI] lookup.
Devang Patel [Wed, 18 Apr 2007 01:19:55 +0000 (01:19 +0000)]
Cache DT[*SI] lookup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36239 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agodon't access argument list of prototypes
Chris Lattner [Wed, 18 Apr 2007 00:57:22 +0000 (00:57 +0000)]
don't access argument list of prototypes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36238 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix
Devang Patel [Wed, 18 Apr 2007 00:53:01 +0000 (00:53 +0000)]
Fix
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070416/047971.html

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36236 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoNew test.
Devang Patel [Wed, 18 Apr 2007 00:51:43 +0000 (00:51 +0000)]
New test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36235 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agowhat's an & between friends?
Chris Lattner [Wed, 18 Apr 2007 00:43:05 +0000 (00:43 +0000)]
what's an & between friends?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36234 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoIncrement use count of new virtuals created during PHI elimination.
Evan Cheng [Wed, 18 Apr 2007 00:36:11 +0000 (00:36 +0000)]
Increment use count of new virtuals created during PHI elimination.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36233 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoBe more careful when inserting reused instructions. This fixes CodeGen/Generic/2007...
Chris Lattner [Tue, 17 Apr 2007 23:43:50 +0000 (23:43 +0000)]
Be more careful when inserting reused instructions.  This fixes CodeGen/Generic/2007-04-17-lsr-crash.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36231 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agonew testcase
Chris Lattner [Tue, 17 Apr 2007 23:43:31 +0000 (23:43 +0000)]
new testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36230 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoOops. Didn't mean to check in a quick hack.
Evan Cheng [Tue, 17 Apr 2007 23:33:39 +0000 (23:33 +0000)]
Oops. Didn't mean to check in a quick hack.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36227 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix a bug in my previous patch, grabbing the shift amount width from the
Chris Lattner [Tue, 17 Apr 2007 22:53:02 +0000 (22:53 +0000)]
Fix a bug in my previous patch, grabbing the shift amount width from the
wrong operand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36223 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agodag combiner just got better at pruning bits. This fixes CodeGen/ARM/rev.ll
Chris Lattner [Tue, 17 Apr 2007 22:39:58 +0000 (22:39 +0000)]
dag combiner just got better at pruning bits.  This fixes CodeGen/ARM/rev.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36222 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFold (x << c1)>> c2 into a single shift if the bits shifted out aren't used.
Chris Lattner [Tue, 17 Apr 2007 21:14:16 +0000 (21:14 +0000)]
Fold (x << c1)>> c2 into a single shift if the bits shifted out aren't used.

This compiles:
int baz(long long a) { return (short)(((int)(a >>24)) >> 9); }

into:
_baz:
        srwi r2, r3, 1
        extsh r3, r2
        blr

on PPC, instead of:
_baz:
        slwi r2, r3, 8
        srwi r2, r2, 9
        extsh r3, r2
        blr

GCC produces:
_baz:
        srwi r10,r4,24
        insrwi r10,r3,24,0
        srawi r9,r3,24
        srawi r3,r10,9
        extsh r3,r3
        blr

This implements CodeGen/PowerPC/shl_elim.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36221 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agonew testcase
Chris Lattner [Tue, 17 Apr 2007 21:12:26 +0000 (21:12 +0000)]
new testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36220 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoUse // not ; since this is C.
Duncan Sands [Tue, 17 Apr 2007 20:50:33 +0000 (20:50 +0000)]
Use // not ; since this is C.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36219 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoCopy coalescing change to prevent a physical register from being pin to a
Evan Cheng [Tue, 17 Apr 2007 20:32:26 +0000 (20:32 +0000)]
Copy coalescing change to prevent a physical register from being pin to a
long live interval that has low usage density.
1. Change order of coalescing to join physical registers with virtual
   registers first before virtual register intervals become too long.
2. Check size and usage density to determine if it's worthwhile to join.
3. If joining is aborted, assign virtual register live interval allocation
   preference field to the physical register.
4. Register allocator should try to allocate to the preferred register
   first (if available) to create identify moves that can be eliminated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36218 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoNew test case.
Devang Patel [Tue, 17 Apr 2007 20:29:12 +0000 (20:29 +0000)]
New test case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36217 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd a register allocation preference field; add a method to compute size of a live...
Evan Cheng [Tue, 17 Apr 2007 20:25:11 +0000 (20:25 +0000)]
Add a register allocation preference field; add a method to compute size of a live interval.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36216 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoChange getAllocatableSet() so it returns allocatable registers for a specific registe...
Evan Cheng [Tue, 17 Apr 2007 20:23:34 +0000 (20:23 +0000)]
Change getAllocatableSet() so it returns allocatable registers for a specific register class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36215 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoKeep track of number of uses within the function per virtual register.
Evan Cheng [Tue, 17 Apr 2007 20:22:11 +0000 (20:22 +0000)]
Keep track of number of uses within the function per virtual register.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36214 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd comment
Anton Korobeynikov [Tue, 17 Apr 2007 19:34:00 +0000 (19:34 +0000)]
Add comment

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36213 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoSIGN_EXTEND_INREG does not demand its top bits. Give SimplifyDemandedBits
Chris Lattner [Tue, 17 Apr 2007 19:03:21 +0000 (19:03 +0000)]
SIGN_EXTEND_INREG does not demand its top bits.  Give SimplifyDemandedBits
a chance to hack on it.  This compiles:

int baz(long long a) { return (short)(((int)(a >>24)) >> 9); }

into:
_baz:
        slwi r2, r3, 8
        srwi r2, r2, 9
        extsh r3, r2
        blr

instead of:

_baz:
        srwi r2, r4, 24
        rlwimi r2, r3, 8, 0, 23
        srwi r2, r2, 9
        extsh r3, r2
        blr

This implements CodeGen/PowerPC/sign_ext_inreg1.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36212 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agonew testcase
Chris Lattner [Tue, 17 Apr 2007 19:03:02 +0000 (19:03 +0000)]
new testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36211 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoCommit an patch from Gabor Greif in Mar 2005. This eliminates the tail
Chris Lattner [Tue, 17 Apr 2007 18:41:42 +0000 (18:41 +0000)]
Commit an patch from Gabor Greif in Mar 2005.  This eliminates the tail
pointer from ilist, storing it in the prev pointer of the first node in the
list instead.

This shrinks ilist from 8 to 4 bytes, BasicBlock from 40->36 bytes, Function
from 76->68 bytes, Module from 52->44 bytes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36210 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agomake getnext/getprev accessors private.
Chris Lattner [Tue, 17 Apr 2007 18:30:41 +0000 (18:30 +0000)]
make getnext/getprev accessors private.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36209 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoSpell doFinalization right, so that it is a proper virtual override and
Dan Gohman [Tue, 17 Apr 2007 18:21:36 +0000 (18:21 +0000)]
Spell doFinalization right, so that it is a proper virtual override and
gets called.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36208 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agomake next/prev accessors private
Chris Lattner [Tue, 17 Apr 2007 18:16:39 +0000 (18:16 +0000)]
make next/prev accessors private

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36207 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agobool on darwin/ppc is 4 bytes.
Chris Lattner [Tue, 17 Apr 2007 18:15:04 +0000 (18:15 +0000)]
bool on darwin/ppc is 4 bytes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36206 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoremove use of BasicBlock::getNext
Chris Lattner [Tue, 17 Apr 2007 18:09:47 +0000 (18:09 +0000)]
remove use of BasicBlock::getNext

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36205 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoInstruction:: Next/Prev accessors are now private
Chris Lattner [Tue, 17 Apr 2007 18:03:55 +0000 (18:03 +0000)]
Instruction:: Next/Prev accessors are now private

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36204 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd a note
Chris Lattner [Tue, 17 Apr 2007 18:03:00 +0000 (18:03 +0000)]
add a note

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36203 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoremove use of BasicBlock::getNext
Chris Lattner [Tue, 17 Apr 2007 17:54:12 +0000 (17:54 +0000)]
remove use of BasicBlock::getNext

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36202 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoRemove use of Instruction::getNext
Chris Lattner [Tue, 17 Apr 2007 17:52:45 +0000 (17:52 +0000)]
Remove use of Instruction::getNext

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36201 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoeliminate use of Instruction::getNext()
Chris Lattner [Tue, 17 Apr 2007 17:51:03 +0000 (17:51 +0000)]
eliminate use of Instruction::getNext()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36200 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoremove use of Instruction::getNext
Chris Lattner [Tue, 17 Apr 2007 17:47:54 +0000 (17:47 +0000)]
remove use of Instruction::getNext

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36199 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoeliminate use of Instruction::getPrev(). Patch by Gabor Greif in 2005.
Chris Lattner [Tue, 17 Apr 2007 17:38:28 +0000 (17:38 +0000)]
eliminate use of Instruction::getPrev().  Patch by Gabor Greif in 2005.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36198 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoeliminate a use of Instruction::getPrev(), patch by Gabor Greif in 2005.
Chris Lattner [Tue, 17 Apr 2007 17:36:12 +0000 (17:36 +0000)]
eliminate a use of Instruction::getPrev(), patch by Gabor Greif in 2005.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36197 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agorename X86FunctionInfo to X86MachineFunctionInfo to match the header file
Chris Lattner [Tue, 17 Apr 2007 17:21:52 +0000 (17:21 +0000)]
rename X86FunctionInfo to X86MachineFunctionInfo to match the header file
it is defined in.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36196 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoImplemented correct stack probing on mingw/cygwin for dynamic alloca's.
Anton Korobeynikov [Tue, 17 Apr 2007 09:20:00 +0000 (09:20 +0000)]
Implemented correct stack probing on mingw/cygwin for dynamic alloca's.
Also, fixed static case in presence of eax livin. This fixes PR331

PS: Why don't we still have push/pop instructions? :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36195 91177308-0d34-0410-b5e6-96231b3b80d8