Owen Anderson
e0ef5ac6bd
Tabs -> Spaces
...
llvm-svn: 35841
2007-04-09 22:31:43 +00:00
Chris Lattner
39f65335d5
remove some dead target hooks, subsumed by isLegalAddressingMode
...
llvm-svn: 35840
2007-04-09 22:27:04 +00:00
Owen Anderson
83efbc84f7
Improve some _slow_ behavior introduced in my patches the last few days.
...
llvm-svn: 35839
2007-04-09 22:25:09 +00:00
Devang Patel
5391501f05
Add Loop Rotate test cases.
...
llvm-svn: 35838
2007-04-09 22:22:42 +00:00
Chris Lattner
780c009756
switch LSR to use isLegalAddressingMode instead of other simpler hooks
...
llvm-svn: 35837
2007-04-09 22:20:14 +00:00
Devang Patel
bca0d57179
Check _all_ PHINodes.
...
llvm-svn: 35836
2007-04-09 22:20:10 +00:00
Chris Lattner
19ccd6226c
Fix a bug in PPCTargetLowering::isLegalAddressingMode, scales other than 0/1/2
...
are always unsupported.
llvm-svn: 35835
2007-04-09 22:10:05 +00:00
Anton Korobeynikov
da964a2852
Use integer log for metric calculation
...
llvm-svn: 35834
2007-04-09 21:57:03 +00:00
Devang Patel
8eb8eeada9
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.
llvm-svn: 35833
2007-04-09 21:40:43 +00:00
Chris Lattner
288c994403
add a default ctor for AddrMode.
...
llvm-svn: 35832
2007-04-09 21:18:34 +00:00
Chris Lattner
09d78fc3cf
Fix a bug where calling materializeModule could corrupt the module, reading
...
multiple copies of the function into the Function*.
llvm-svn: 35831
2007-04-09 20:28:40 +00:00
Devang Patel
854197884b
Preserve canonical loop form.
...
llvm-svn: 35829
2007-04-09 20:19:46 +00:00
Jeff Cohen
4397363c16
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:
llvm-svn: 35828
2007-04-09 19:26:30 +00:00
Reid Spencer
8436cdfda2
Don't link against System or Support library. These things will already
...
be in the opt tool.
llvm-svn: 35827
2007-04-09 19:17:47 +00:00
Reid Spencer
c82c2cf483
Speed up installation a bit by ignoring .svn directories.
...
Patch by Scott Michel.
llvm-svn: 35826
2007-04-09 19:08:58 +00:00
Devang Patel
b9af5747a5
Do not create new pre-header. Reuse original pre-header.
...
llvm-svn: 35825
2007-04-09 19:04:21 +00:00
Reid Spencer
ce38beb6a4
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.
llvm-svn: 35824
2007-04-09 18:00:57 +00:00
Reid Spencer
8684923644
Remove a memory leak, until ParamAttrsList is uniqued.
...
llvm-svn: 35823
2007-04-09 17:20:18 +00:00
Devang Patel
03d7ae3a74
Simpler for() loops.
...
llvm-svn: 35822
2007-04-09 17:09:13 +00:00
Devang Patel
d6ba41e02d
Fix future bug. Of course, Chris spotted this.
...
Handle Argument or Undef as an incoming PHI value.
llvm-svn: 35821
2007-04-09 16:41:46 +00:00
Devang Patel
b28a391a8d
More cosmetic changes.
...
llvm-svn: 35820
2007-04-09 16:21:29 +00:00
Devang Patel
88bc2c6f82
Only cosmetic changes. Zero functionality Change.
...
llvm-svn: 35819
2007-04-09 16:11:48 +00:00
Reid Spencer
019c8869ed
For PR1146:
...
* Add ParamAttrList pointers to Function and CallInst.
* Move the implementation of ParamAttrList from Type.cpp to Function.cpp
llvm-svn: 35818
2007-04-09 15:01:12 +00:00
Jeff Cohen
0475f3b4e9
Unbreak VC++ build.
...
llvm-svn: 35817
2007-04-09 14:32:59 +00:00
Anton Korobeynikov
506eaf7915
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.
llvm-svn: 35816
2007-04-09 12:31:58 +00:00
Chris Lattner
d112a031ea
Convert ImmediateDominators::DFSPass from being recursive to being iterative.
...
llvm-svn: 35815
2007-04-09 06:44:42 +00:00
Reid Spencer
71b79e3d99
For PR1146:
...
Adapt handling of parameter attributes to use the new ParamAttrsList class.
llvm-svn: 35814
2007-04-09 06:17:21 +00:00
Reid Spencer
f51a7050dd
Regenerate
...
llvm-svn: 35813
2007-04-09 06:16:21 +00:00
Reid Spencer
4d4d3f9682
For PR1146:
...
Adapt handling of parameter attributes to use ParamAttrsList class.
llvm-svn: 35812
2007-04-09 06:15:59 +00:00
Reid Spencer
52796e819f
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.
llvm-svn: 35811
2007-04-09 06:14:31 +00:00
Reid Spencer
e76289b8ea
For PR1146:
...
Simplify construction of FunctionType to use default arguments.
llvm-svn: 35810
2007-04-09 06:12:07 +00:00
Reid Spencer
26d9ff65a3
For PR1146:
...
Parameter attributes can now be defaulted for intrinsics.
llvm-svn: 35809
2007-04-09 06:11:23 +00:00
Reid Spencer
1517de317a
For PR1146:
...
Adjust writing of parameter attributes to use ParamAttrList class.
llvm-svn: 35808
2007-04-09 06:10:42 +00:00
Chris Lattner
0a5677d912
minor cleanups
...
llvm-svn: 35807
2007-04-09 06:10:06 +00:00
Reid Spencer
238633f17e
For PR1146:
...
Move parameter attributes functionality to ParamAttrsList class.
llvm-svn: 35806
2007-04-09 06:07:52 +00:00
Reid Spencer
1ba12951e4
For PR1146:
...
Remove the handling of ParameterAttributes from FunctionType as they are
their own object defined in ParameterAttributes.h now.
llvm-svn: 35805
2007-04-09 06:06:57 +00:00
Chris Lattner
7451e4d6a1
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
llvm-svn: 35804
2007-04-09 05:49:22 +00:00
Chris Lattner
2b6b4eb471
implement support for CodeGen/X86/inline-asm-x-scalar.ll:test3 - i32/i64 values
...
used with x constraints.
llvm-svn: 35803
2007-04-09 05:31:48 +00:00
Chris Lattner
7b2decfa0a
implement CodeGen/X86/inline-asm-x-scalar.ll:test3
...
llvm-svn: 35802
2007-04-09 05:31:20 +00:00
Chris Lattner
ea1369275b
add another test
...
llvm-svn: 35801
2007-04-09 05:26:48 +00:00
Chris Lattner
18d6718e78
add some assertions
...
llvm-svn: 35800
2007-04-09 05:23:13 +00:00
Chris Lattner
590ed5e5b7
implement CodeGen/X86/inline-asm-x-scalar.ll
...
llvm-svn: 35799
2007-04-09 05:11:28 +00:00
Chris Lattner
8a06ca02d8
The x constraint allows scalar FP values as well as vectors.
...
llvm-svn: 35798
2007-04-09 05:11:03 +00:00
Owen Anderson
6978893a8f
Move isReachableFromEntry out of line to avoid an unnecessary #include
...
llvm-svn: 35797
2007-04-09 04:07:36 +00:00
Chris Lattner
a2e2e5640a
Fix a bug that caused alignment information to occasionally get stripped off
...
of an allocation instruction when writing to bytecode.
llvm-svn: 35796
2007-04-09 03:37:36 +00:00
Reid Spencer
7ae03fc5fb
Regenerate
...
llvm-svn: 35795
2007-04-09 01:56:05 +00:00
Reid Spencer
bef90fe7a7
Drop the implementation keyword.
...
llvm-svn: 35794
2007-04-09 01:55:42 +00:00
Reid Spencer
bdcf9d6f08
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.
llvm-svn: 35793
2007-04-09 01:53:54 +00:00
Chris Lattner
a87c9f6114
Fix PR1304 and Transforms/InstCombine/2007-04-08-SingleEltVectorCrash.ll
...
llvm-svn: 35792
2007-04-09 01:37:55 +00:00
Chris Lattner
e04c652f5d
new testcase for PR1304
...
llvm-svn: 35791
2007-04-09 01:37:35 +00:00