Reid Spencer
a472f66dd0
For PR1146:
...
Put the parameter attributes in their own ParamAttr name space. Adjust the
rest of llvm as a result.
llvm-svn: 35877
2007-04-11 02:44:20 +00:00
Reid Spencer
d3f622e0d5
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.
llvm-svn: 35876
2007-04-11 02:02:09 +00:00
Chris Lattner
daa012d1fb
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 :)
llvm-svn: 35875
2007-04-11 00:57:54 +00:00
Reid Spencer
ccd4d2c8e4
Make isDynamicLibrary detect more than just an ELF file.
...
llvm-svn: 35874
2007-04-11 00:49:39 +00:00
Bill Wendling
f099841573
Add support for our first SSSE3 instruction "pmulhrsw".
...
llvm-svn: 35869
2007-04-10 22:10:25 +00:00
Chris Lattner
d4a9b92a13
new micro optzn
...
llvm-svn: 35867
2007-04-10 21:14:01 +00:00
Chris Lattner
9b6d69e0c2
restore support for negative strides
...
llvm-svn: 35859
2007-04-10 03:48:29 +00:00
Chris Lattner
f269d84ca0
apparently some people commit without building the tree, or they forget to
...
commit a LOT of files.
llvm-svn: 35858
2007-04-10 03:20:39 +00:00
Chris Lattner
0e772b7726
unbreak the build :(
...
llvm-svn: 35857
2007-04-10 03:18:19 +00:00
Jeff Cohen
a8644a6534
Fix build problem.
...
llvm-svn: 35856
2007-04-10 03:10:46 +00:00
Chris Lattner
467b69cabb
Strengthen the boundary conditions of this fold, implementing
...
InstCombine/set.ll:test25
llvm-svn: 35852
2007-04-09 23:52:13 +00:00
Jeff Cohen
e0bbbd3774
No longer needed.
...
llvm-svn: 35850
2007-04-09 23:42:32 +00:00
Owen Anderson
3c7867935e
Re-constify things that don't break the build. Last patch in this
...
series, I promise.
llvm-svn: 35848
2007-04-09 23:38:18 +00:00
Chris Lattner
35f0417ec1
remove dead target hooks.
...
llvm-svn: 35847
2007-04-09 23:34:08 +00:00
Chris Lattner
d44e24c896
remove dead target hooks
...
llvm-svn: 35846
2007-04-09 23:33:39 +00:00
Chris Lattner
808ac93f68
remove some dead hooks
...
llvm-svn: 35845
2007-04-09 23:31:19 +00:00
Chris Lattner
3e9690f987
eliminate the last uses of some TLI methods.
...
llvm-svn: 35844
2007-04-09 23:29:07 +00:00
Owen Anderson
f1ca1376d3
Unconst-ify stuff that broke the build.
...
llvm-svn: 35843
2007-04-09 23:08:26 +00:00
Owen Anderson
5917716146
Const-ify some parameters, and some cosmetic cleanups. No functionality
...
change.
llvm-svn: 35842
2007-04-09 22:54:50 +00:00
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
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
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
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
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