Chris Lattner [Wed, 11 Apr 2007 05:32:13 +0000 (05:32 +0000)]
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35882
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 11 Apr 2007 05:11:38 +0000 (05:11 +0000)]
Codegen integer abs more efficiently using the trick from the PPC CWG. This
improves codegen on many architectures. Tests committed as CodeGen/*/iabs.ll
X86 Old: X86 New:
_test: _test:
movl 4(%esp), %ecx movl 4(%esp), %eax
movl %ecx, %eax movl %eax, %ecx
negl %eax sarl $31, %ecx
testl %ecx, %ecx addl %ecx, %eax
cmovns %ecx, %eax xorl %ecx, %eax
ret ret
PPC Old: PPC New:
_test: _test:
cmpwi cr0, r3, -1 srawi r2, r3, 31
neg r2, r3 add r3, r3, r2
bgt cr0, LBB1_2 ; xor r3, r3, r2
LBB1_1: ; blr
mr r3, r2
LBB1_2: ;
blr
ARM Old: ARM New:
_test: _test:
rsb r3, r0, #0 add r3, r0, r0, asr #31
cmp r0, #0 eor r0, r3, r0, asr #31
movge r3, r0 bx lr
mov r0, r3
bx lr
Thumb Old: Thumb New:
_test: _test:
neg r2, r0 asr r2, r0, #31
cmp r0, #0 add r0, r0, r2
bge LBB1_2 eor r0, r2
LBB1_1: @ bx lr
cpy r0, r2
LBB1_2: @
bx lr
Sparc Old: Sparc New:
test: test:
save -96, %o6, %o6 save -96, %o6, %o6
sethi 0, %l0 sra %i0, 31, %l0
sub %l0, %i0, %l0 add %i0, %l0, %l1
subcc %i0, -1, %l1 xor %l1, %l0, %i0
bg .BB1_2 restore %g0, %g0, %g0
nop retl
.BB1_1: nop
or %g0, %l0, %i0
.BB1_2:
restore %g0, %g0, %g0
retl
nop
It also helps alpha/ia64 :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35881
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 11 Apr 2007 05:02:57 +0000 (05:02 +0000)]
new testcases for integer abs function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35880
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 11 Apr 2007 03:27:24 +0000 (03:27 +0000)]
fix a regression introduced by my last patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35879
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 11 Apr 2007 03:15:35 +0000 (03:15 +0000)]
Hack to get sys::Path to recognize macho dylibs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35878
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Wed, 11 Apr 2007 02:44:20 +0000 (02:44 +0000)]
For PR1146:
Put the parameter attributes in their own ParamAttr name space. Adjust the
rest of llvm as a result.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35877
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Wed, 11 Apr 2007 02:02:09 +0000 (02:02 +0000)]
Teach sys::Path how to recognize different kinds of object files for ELF
and Mach-O systems. Additionally, correct the Mach-O logic code to look at
byte 12 not byte 15. Hopefully this fixes the llvm-ld warning on Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35876
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 11 Apr 2007 00:57:54 +0000 (00:57 +0000)]
Simplify SROA conversion to integer in some ways, make it more general in others.
We now tolerate small amounts of undefined behavior, better emulating what
would happen if the transaction actually occurred in memory. This fixes
SingleSource/UnitTests/2007-04-10-BitfieldTest.c on PPC, at least until
Devang gets a chance to fix the CFE from doing undefined things with bitfields :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35875
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Wed, 11 Apr 2007 00:49:39 +0000 (00:49 +0000)]
Make isDynamicLibrary detect more than just an ELF file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35874
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Wed, 11 Apr 2007 00:33:43 +0000 (00:33 +0000)]
Hack the shared library extension for dylib. The existing code just looks
plain wrong since $module was never defined so we always get .so which is
broken on Darwin. Just force it to .dylib.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35873
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Wed, 11 Apr 2007 00:27:39 +0000 (00:27 +0000)]
Hopefully fix LTDL_SHLIB_EXT on Darwin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35872
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 10 Apr 2007 22:10:25 +0000 (22:10 +0000)]
Add support for our first SSSE3 instruction "pmulhrsw".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35869
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 10 Apr 2007 21:43:01 +0000 (21:43 +0000)]
New test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35868
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Apr 2007 21:14:01 +0000 (21:14 +0000)]
new micro optzn
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35867
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Tue, 10 Apr 2007 19:13:43 +0000 (19:13 +0000)]
Correctly report version of GCC used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35866
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 10 Apr 2007 16:57:08 +0000 (16:57 +0000)]
Add test case for PR 1154.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35865
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Apr 2007 16:33:06 +0000 (16:33 +0000)]
fix a comment bug Reid noticed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35864
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 10 Apr 2007 15:43:36 +0000 (15:43 +0000)]
Enable loop rotate pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35863
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Apr 2007 07:06:21 +0000 (07:06 +0000)]
add missing methods, mark stuff const
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35862
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Apr 2007 06:44:12 +0000 (06:44 +0000)]
getLimitedValue now just forward to APInt's getLimitedValue. Mark it const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35861
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Apr 2007 06:43:18 +0000 (06:43 +0000)]
add a method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35860
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Apr 2007 03:48:29 +0000 (03:48 +0000)]
restore support for negative strides
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35859
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Apr 2007 03:20:39 +0000 (03:20 +0000)]
apparently some people commit without building the tree, or they forget to
commit a LOT of files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35858
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Apr 2007 03:18:19 +0000 (03:18 +0000)]
unbreak the build :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35857
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Tue, 10 Apr 2007 03:10:46 +0000 (03:10 +0000)]
Fix build problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35856
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 10 Apr 2007 02:52:46 +0000 (02:52 +0000)]
Drop the "bit" prefix for the part.select intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35854
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 10 Apr 2007 02:51:31 +0000 (02:51 +0000)]
Fix name of an intrinsic: bit.part_select -> part.select
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35853
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Apr 2007 23:52:13 +0000 (23:52 +0000)]
Strengthen the boundary conditions of this fold, implementing
InstCombine/set.ll:test25
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35852
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Apr 2007 23:51:49 +0000 (23:51 +0000)]
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35851
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Mon, 9 Apr 2007 23:42:32 +0000 (23:42 +0000)]
No longer needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35850
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 9 Apr 2007 23:40:15 +0000 (23:40 +0000)]
Add check for opt crash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35849
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 9 Apr 2007 23:38:18 +0000 (23:38 +0000)]
Re-constify things that don't break the build. Last patch in this
series, I promise.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35848
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Apr 2007 23:34:08 +0000 (23:34 +0000)]
remove dead target hooks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35847
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Apr 2007 23:33:39 +0000 (23:33 +0000)]
remove dead target hooks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35846
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Apr 2007 23:31:19 +0000 (23:31 +0000)]
remove some dead hooks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35845
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Apr 2007 23:29:07 +0000 (23:29 +0000)]
eliminate the last uses of some TLI methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35844
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 9 Apr 2007 23:08:26 +0000 (23:08 +0000)]
Unconst-ify stuff that broke the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35843
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 9 Apr 2007 22:54:50 +0000 (22:54 +0000)]
Const-ify some parameters, and some cosmetic cleanups. No functionality
change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35842
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 9 Apr 2007 22:31:43 +0000 (22:31 +0000)]
Tabs -> Spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35841
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Apr 2007 22:27:04 +0000 (22:27 +0000)]
remove some dead target hooks, subsumed by isLegalAddressingMode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35840
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 9 Apr 2007 22:25:09 +0000 (22:25 +0000)]
Improve some _slow_ behavior introduced in my patches the last few days.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35839
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 9 Apr 2007 22:22:42 +0000 (22:22 +0000)]
Add Loop Rotate test cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35838
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Apr 2007 22:20:14 +0000 (22:20 +0000)]
switch LSR to use isLegalAddressingMode instead of other simpler hooks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35837
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 9 Apr 2007 22:20:10 +0000 (22:20 +0000)]
Check _all_ PHINodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35836
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Apr 2007 22:10:05 +0000 (22:10 +0000)]
Fix a bug in PPCTargetLowering::isLegalAddressingMode, scales other than 0/1/2
are always unsupported.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35835
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 9 Apr 2007 21:57:03 +0000 (21:57 +0000)]
Use integer log for metric calculation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35834
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 9 Apr 2007 21:40:43 +0000 (21:40 +0000)]
Insert new pre-header before new header. Original pre-header may
happen to be an entry, in such case, it is not a good idea to
insert new block before entry.
Also fix typo in assertion check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35833
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Apr 2007 21:18:34 +0000 (21:18 +0000)]
add a default ctor for AddrMode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35832
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Apr 2007 20:28:40 +0000 (20:28 +0000)]
Fix a bug where calling materializeModule could corrupt the module, reading
multiple copies of the function into the Function*.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35831
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 9 Apr 2007 20:19:46 +0000 (20:19 +0000)]
Preserve canonical loop form.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35829
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Mon, 9 Apr 2007 19:26:30 +0000 (19:26 +0000)]
When the number of elements is zero, don't malloc 32GB on 64-bit systems.
Fixes unexpected failures on FreeBSD/amd64 of:
CFrontend/2005-09-24-BitFieldCrash.c:
CFrontend/2007-02-04-EmptyStruct.c:
CFrontend/2007-03-26-ZeroWidthBitfield.c:
CodeGen/Generic/2005-10-18-ZeroSizeStackObject.ll:
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35828
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 9 Apr 2007 19:17:47 +0000 (19:17 +0000)]
Don't link against System or Support library. These things will already
be in the opt tool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35827
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 9 Apr 2007 19:08:58 +0000 (19:08 +0000)]
Speed up installation a bit by ignoring .svn directories.
Patch by Scott Michel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35826
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 9 Apr 2007 19:04:21 +0000 (19:04 +0000)]
Do not create new pre-header. Reuse original pre-header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35825
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 9 Apr 2007 18:00:57 +0000 (18:00 +0000)]
For PR1146:
* Add ParamAttrs to InvokeInst class too.
* Make sure all initializes of ParamAttrs in CallInst and InvokeInst are 0
* Destruct the ParamAttrs in Call/Invoke destructors to avoid memory
leaks. This will change when ParamAttrsList is uniquified but needs to
be correct until then.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35824
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 9 Apr 2007 17:20:18 +0000 (17:20 +0000)]
Remove a memory leak, until ParamAttrsList is uniqued.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35823
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 9 Apr 2007 17:09:13 +0000 (17:09 +0000)]
Simpler for() loops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35822
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 9 Apr 2007 16:41:46 +0000 (16:41 +0000)]
Fix future bug. Of course, Chris spotted this.
Handle Argument or Undef as an incoming PHI value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35821
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 9 Apr 2007 16:21:29 +0000 (16:21 +0000)]
More cosmetic changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35820
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 9 Apr 2007 16:11:48 +0000 (16:11 +0000)]
Only cosmetic changes. Zero functionality Change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35819
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 9 Apr 2007 15:01:12 +0000 (15:01 +0000)]
For PR1146:
* Add ParamAttrList pointers to Function and CallInst.
* Move the implementation of ParamAttrList from Type.cpp to Function.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35818
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Mon, 9 Apr 2007 14:32:59 +0000 (14:32 +0000)]
Unbreak VC++ build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35817
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 9 Apr 2007 12:31:58 +0000 (12:31 +0000)]
Next stage into switch lowering refactoring
1. Fix some bugs in the jump table lowering threshold
2. Implement much better metric for optimal pivot selection
3. Tune thresholds for different lowering methods
4. Implement shift-and trick for lowering small (<machine word
length) cases with few destinations. Good testcase will follow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35816
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Apr 2007 06:44:42 +0000 (06:44 +0000)]
Convert ImmediateDominators::DFSPass from being recursive to being iterative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35815
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 9 Apr 2007 06:17:21 +0000 (06:17 +0000)]
For PR1146:
Adapt handling of parameter attributes to use the new ParamAttrsList class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35814
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 9 Apr 2007 06:16:21 +0000 (06:16 +0000)]
Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35813
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 9 Apr 2007 06:15:59 +0000 (06:15 +0000)]
For PR1146:
Adapt handling of parameter attributes to use ParamAttrsList class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35812
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 9 Apr 2007 06:14:31 +0000 (06:14 +0000)]
For PR1146:
Use ParamAttrsList for writing parameter attributes. Since they are sparse
now, we also write them sparsely (saves a few bytes). Unfortunately, this
is a bytecode file format change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35811
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 9 Apr 2007 06:12:07 +0000 (06:12 +0000)]
For PR1146:
Simplify construction of FunctionType to use default arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35810
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 9 Apr 2007 06:11:23 +0000 (06:11 +0000)]
For PR1146:
Parameter attributes can now be defaulted for intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35809
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 9 Apr 2007 06:10:42 +0000 (06:10 +0000)]
For PR1146:
Adjust writing of parameter attributes to use ParamAttrList class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35808
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Apr 2007 06:10:06 +0000 (06:10 +0000)]
minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35807
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 9 Apr 2007 06:07:52 +0000 (06:07 +0000)]
For PR1146:
Move parameter attributes functionality to ParamAttrsList class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35806
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 9 Apr 2007 06:06:57 +0000 (06:06 +0000)]
For PR1146:
Remove the handling of ParameterAttributes from FunctionType as they are
their own object defined in ParameterAttributes.h now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35805
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Apr 2007 05:49:22 +0000 (05:49 +0000)]
move a bunch of register constraints from being handled by
getRegClassForInlineAsmConstraint to being handled by
getRegForInlineAsmConstraint. This allows us to let the llvm register allocator
allocate, which gives us better code. For example, X86/2007-01-29-InlineAsm-ir.ll
used to compile to:
_run_init_process:
subl $4, %esp
movl %ebx, (%esp)
xorl %ebx, %ebx
movl $11, %eax
movl %ebx, %ecx
movl %ebx, %edx
# InlineAsm Start
push %ebx ; movl %ebx,%ebx ; int $0x80 ; pop %ebx
# InlineAsm End
Now we get:
_run_init_process:
xorl %ecx, %ecx
movl $11, %eax
movl %ecx, %edx
# InlineAsm Start
push %ebx ; movl %ecx,%ebx ; int $0x80 ; pop %ebx
# InlineAsm End
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35804
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Apr 2007 05:31:48 +0000 (05:31 +0000)]
implement support for CodeGen/X86/inline-asm-x-scalar.ll:test3 - i32/i64 values
used with x constraints.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35803
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Apr 2007 05:31:20 +0000 (05:31 +0000)]
implement CodeGen/X86/inline-asm-x-scalar.ll:test3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35802
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Apr 2007 05:26:48 +0000 (05:26 +0000)]
add another test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35801
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Apr 2007 05:23:13 +0000 (05:23 +0000)]
add some assertions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35800
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Apr 2007 05:11:28 +0000 (05:11 +0000)]
implement CodeGen/X86/inline-asm-x-scalar.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35799
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Apr 2007 05:11:03 +0000 (05:11 +0000)]
The x constraint allows scalar FP values as well as vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35798
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 9 Apr 2007 04:07:36 +0000 (04:07 +0000)]
Move isReachableFromEntry out of line to avoid an unnecessary #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35797
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Apr 2007 03:37:36 +0000 (03:37 +0000)]
Fix a bug that caused alignment information to occasionally get stripped off
of an allocation instruction when writing to bytecode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35796
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 9 Apr 2007 01:56:05 +0000 (01:56 +0000)]
Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35795
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 9 Apr 2007 01:55:42 +0000 (01:55 +0000)]
Drop the implementation keyword.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35794
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 9 Apr 2007 01:53:54 +0000 (01:53 +0000)]
Chris convinced me that the default size of the SmallVector (2) was too
small. Since it doesn't cost much to have 2 more (8 bytes), but not having
them would require a malloc as soon as the third one is needed. Setting
the default to 4 delays the malloc until the 5th parameter attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35793
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Apr 2007 01:37:55 +0000 (01:37 +0000)]
Fix PR1304 and Transforms/InstCombine/2007-04-08-SingleEltVectorCrash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35792
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Apr 2007 01:37:35 +0000 (01:37 +0000)]
new testcase for PR1304
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35791
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 9 Apr 2007 01:26:02 +0000 (01:26 +0000)]
Remove redundancy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35790
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Apr 2007 01:19:33 +0000 (01:19 +0000)]
Fix a bug introduced with my previous patch, where it didn't correctly handle
instructions which replace themselves when FI's are rewritten (common on ppc).
This fixes CodeGen/PowerPC/2006-10-17-ppc64-alloca.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35789
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Apr 2007 01:11:16 +0000 (01:11 +0000)]
Eliminate useless insertelement instructions. This implements
Transforms/InstCombine/vec_insertelt.ll and fixes PR1286.
We now compile the code from that bug into:
_foo:
movl 4(%esp), %eax
movdqa (%eax), %xmm0
movl 8(%esp), %ecx
psllw (%ecx), %xmm0
movdqa %xmm0, (%eax)
ret
instead of:
_foo:
subl $4, %esp
movl %ebp, (%esp)
movl %esp, %ebp
movl 12(%ebp), %eax
movdqa (%eax), %xmm0
#IMPLICIT_DEF %eax
pinsrw $2, %eax, %xmm0
xorl %ecx, %ecx
pinsrw $3, %ecx, %xmm0
pinsrw $4, %eax, %xmm0
pinsrw $5, %ecx, %xmm0
pinsrw $6, %eax, %xmm0
pinsrw $7, %ecx, %xmm0
movl 8(%ebp), %eax
movdqa (%eax), %xmm1
psllw %xmm0, %xmm1
movdqa %xmm1, (%eax)
movl %ebp, %esp
popl %ebp
ret
woo :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35788
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Apr 2007 01:10:13 +0000 (01:10 +0000)]
new testcase for PR1286
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35787
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 9 Apr 2007 00:52:49 +0000 (00:52 +0000)]
Cleanup some from my DomSet-removal changes. Add a new
isReachableFromEntry
test to ETForest to factor a common test out of code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35786
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Apr 2007 00:46:10 +0000 (00:46 +0000)]
Fix CodeGen/Generic/2007-04-08-MultipleFrameIndices.ll and PR1308:
some instructions can have multiple frame indices in them. If this happens,
rewrite all of them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35785
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Apr 2007 00:45:42 +0000 (00:45 +0000)]
new testcase for PR1308
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35784
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Apr 2007 00:33:58 +0000 (00:33 +0000)]
Fix PR1316
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35783
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 8 Apr 2007 23:58:41 +0000 (23:58 +0000)]
No functional change, this is just easier to read and debug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35782
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 8 Apr 2007 22:50:29 +0000 (22:50 +0000)]
Fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35781
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 8 Apr 2007 22:30:27 +0000 (22:30 +0000)]
Implement more feedback:
* Allow attributes to be added and removed singly or jointly so that in
the future something like -pruneh can manipulate them more easily.
* Move functions generally only useful for LLVM internals to the end of
the accessors list instead of the beginning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35780
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 8 Apr 2007 22:23:26 +0000 (22:23 +0000)]
Fix for CodeGen/X86/2007-04-08-InlineAsmCrash.ll and PR1314
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35779
91177308-0d34-0410-b5e6-
96231b3b80d8