Chris Lattner
c7c7a4712e
fix a regression introduced by my last patch.
...
llvm-svn: 35879
2007-04-11 03:27:24 +00:00
Chris Lattner
2e1f36a4dc
Hack to get sys::Path to recognize macho dylibs.
...
llvm-svn: 35878
2007-04-11 03:15:35 +00:00
Reid Spencer
2792e203c5
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
caf5a6cbd7
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
4ea7a156ba
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
e580735108
Make isDynamicLibrary detect more than just an ELF file.
...
llvm-svn: 35874
2007-04-11 00:49:39 +00:00
Bill Wendling
3b1189afbf
Add support for our first SSSE3 instruction "pmulhrsw".
...
llvm-svn: 35869
2007-04-10 22:10:25 +00:00
Chris Lattner
60f3ece40f
new micro optzn
...
llvm-svn: 35867
2007-04-10 21:14:01 +00:00
Chris Lattner
3bbd376057
restore support for negative strides
...
llvm-svn: 35859
2007-04-10 03:48:29 +00:00
Chris Lattner
e2444f7ec8
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
8557e71577
unbreak the build :(
...
llvm-svn: 35857
2007-04-10 03:18:19 +00:00
Jeff Cohen
9bc2960be6
Fix build problem.
...
llvm-svn: 35856
2007-04-10 03:10:46 +00:00
Chris Lattner
fe1860b138
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
bd7d060e79
No longer needed.
...
llvm-svn: 35850
2007-04-09 23:42:32 +00:00
Owen Anderson
5d0148ae7c
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
461f7ed33b
remove dead target hooks.
...
llvm-svn: 35847
2007-04-09 23:34:08 +00:00
Chris Lattner
98199016ae
remove dead target hooks
...
llvm-svn: 35846
2007-04-09 23:33:39 +00:00
Chris Lattner
3f9ff05309
remove some dead hooks
...
llvm-svn: 35845
2007-04-09 23:31:19 +00:00
Chris Lattner
78fffcb81b
eliminate the last uses of some TLI methods.
...
llvm-svn: 35844
2007-04-09 23:29:07 +00:00
Owen Anderson
94e3511ef6
Unconst-ify stuff that broke the build.
...
llvm-svn: 35843
2007-04-09 23:08:26 +00:00
Owen Anderson
3d132f812a
Const-ify some parameters, and some cosmetic cleanups. No functionality
...
change.
llvm-svn: 35842
2007-04-09 22:54:50 +00:00
Owen Anderson
148566d2e3
Tabs -> Spaces
...
llvm-svn: 35841
2007-04-09 22:31:43 +00:00
Chris Lattner
ae6e2c0ee5
remove some dead target hooks, subsumed by isLegalAddressingMode
...
llvm-svn: 35840
2007-04-09 22:27:04 +00:00
Owen Anderson
6f5fe179cc
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
87c89cafb2
switch LSR to use isLegalAddressingMode instead of other simpler hooks
...
llvm-svn: 35837
2007-04-09 22:20:14 +00:00
Devang Patel
70205cceea
Check _all_ PHINodes.
...
llvm-svn: 35836
2007-04-09 22:20:10 +00:00
Chris Lattner
b4ef9c8be3
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
6e6b2d493a
Use integer log for metric calculation
...
llvm-svn: 35834
2007-04-09 21:57:03 +00:00
Devang Patel
5392489e86
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
d186d37694
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
cdea453adb
Preserve canonical loop form.
...
llvm-svn: 35829
2007-04-09 20:19:46 +00:00
Jeff Cohen
f489bef844
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
60da7b09e7
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
9263a797b3
Do not create new pre-header. Reuse original pre-header.
...
llvm-svn: 35825
2007-04-09 19:04:21 +00:00
Reid Spencer
93a57ef458
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
1acc089771
Remove a memory leak, until ParamAttrsList is uniqued.
...
llvm-svn: 35823
2007-04-09 17:20:18 +00:00
Devang Patel
e038420dc6
Simpler for() loops.
...
llvm-svn: 35822
2007-04-09 17:09:13 +00:00
Devang Patel
dd269ce747
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
ba5018aaff
More cosmetic changes.
...
llvm-svn: 35820
2007-04-09 16:21:29 +00:00
Devang Patel
f66f3dd962
Only cosmetic changes. Zero functionality Change.
...
llvm-svn: 35819
2007-04-09 16:11:48 +00:00
Reid Spencer
d2380cfb76
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
b3d61e6c05
Unbreak VC++ build.
...
llvm-svn: 35817
2007-04-09 14:32:59 +00:00
Anton Korobeynikov
6ee97ee42a
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
730f5588be
Convert ImmediateDominators::DFSPass from being recursive to being iterative.
...
llvm-svn: 35815
2007-04-09 06:44:42 +00:00
Reid Spencer
2660b8dccb
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
3ffd70d6e4
Regenerate
...
llvm-svn: 35813
2007-04-09 06:16:21 +00:00
Reid Spencer
b43eb600c2
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
1f674acbdf
For PR1146:
...
Simplify construction of FunctionType to use default arguments.
llvm-svn: 35810
2007-04-09 06:12:07 +00:00
Reid Spencer
a2b16b4ee5
For PR1146:
...
Parameter attributes can now be defaulted for intrinsics.
llvm-svn: 35809
2007-04-09 06:11:23 +00:00
Reid Spencer
3d414b473d
For PR1146:
...
Adjust writing of parameter attributes to use ParamAttrList class.
llvm-svn: 35808
2007-04-09 06:10:42 +00:00