Chris Lattner
1dc35111f1
straighten out various memory ownership issues in the callgraph stuff.
...
This fixes Regression/Other/2002-01-31-CallGraph.ll.
llvm-svn: 32237
2006-12-05 19:46:12 +00:00
Reid Spencer
f024dd475f
Regenerate.
...
llvm-svn: 32233
2006-12-05 19:16:11 +00:00
Reid Spencer
7b292216d6
Remove various old upgrade hacks that are no longer needed.
...
llvm-svn: 32232
2006-12-05 19:15:41 +00:00
Reid Spencer
c87c3e5a70
Bail on the getInferredCast idea. Remove the function and convert
...
remaining uses to more specific casts.
llvm-svn: 32231
2006-12-05 19:14:13 +00:00
Chris Lattner
6a9de21df5
If we have ScalarSSE, we can select bitconvert into single instructions.
...
This compiles bitcast.ll:test3/test4 into:
_test3:
movd %xmm0, %eax
ret
_test4:
movd %edi, %xmm0
ret
llvm-svn: 32230
2006-12-05 18:45:06 +00:00
Chris Lattner
0edf53eb71
Add a perf optzn corresponding to PR1033.
...
llvm-svn: 32229
2006-12-05 18:25:10 +00:00
Chris Lattner
4ad68ab4d7
Fix PR1033 and CodeGen/X86/bitcast.ll, by expanding bitcast to a load/store pair.
...
This could be better, readme entry pending.
llvm-svn: 32228
2006-12-05 18:22:22 +00:00
Rafael Espindola
5e8a6ca4c0
expand memmove and memcpy
...
llvm-svn: 32226
2006-12-05 17:57:23 +00:00
Reid Spencer
5bf28d5efe
Eliminate "control reaches end of non-void function" warnings.
...
llvm-svn: 32225
2006-12-05 17:53:26 +00:00
Rafael Espindola
38062acebb
add support for the "r" asm constraint
...
patch by Lauro Ramos Venancio
llvm-svn: 32224
2006-12-05 17:37:31 +00:00
Chris Lattner
7368984a3d
Fix typo noticed by Lauro Ramos Venancio, thanks!
...
llvm-svn: 32223
2006-12-05 17:29:40 +00:00
Rafael Espindola
da1fffc4e1
add support for weak linkage
...
llvm-svn: 32222
2006-12-05 17:00:17 +00:00
Evan Cheng
32c16b7d3a
JIT large code model support.
...
llvm-svn: 32220
2006-12-05 07:29:55 +00:00
Reid Spencer
28a5079f58
Can't make these fail now with just BitCast. Previous failures must have
...
been in conjunction with something else. By right, they should just be
BitCasts.
llvm-svn: 32219
2006-12-05 07:18:07 +00:00
Evan Cheng
2c48ef5aab
Asm printing bug.
...
llvm-svn: 32218
2006-12-05 06:43:58 +00:00
Evan Cheng
2c35691a02
- Fix X86-64 JIT by temporarily disabling code that treats GV address as 32-bit
...
immediate in small code model. The JIT cannot ensure GV's are placed in the
lower 4G.
- Some preliminary support for large code model.
llvm-svn: 32215
2006-12-05 04:01:03 +00:00
Evan Cheng
b16bf52453
Update
...
llvm-svn: 32214
2006-12-05 03:58:23 +00:00
Reid Spencer
679821dd29
Remove the last inferred casts from VMCore.
...
llvm-svn: 32213
2006-12-05 03:30:09 +00:00
Reid Spencer
4f42ccea23
Implement createPointerCast.
...
llvm-svn: 32212
2006-12-05 03:28:26 +00:00
Reid Spencer
c5727bf642
Implement getPointerCast.
...
llvm-svn: 32211
2006-12-05 03:25:26 +00:00
Chris Lattner
e0738f8f8b
add an instcombine xform. This speeds up 462.libquantum from 9.78s to
...
7.48s. This regression is due to unforseen consequences of the cast patch.
llvm-svn: 32209
2006-12-05 01:26:29 +00:00
Devang Patel
ae17721f63
SCCP does not handle Packed Type properly. Disable Packed Type handling
...
for now.
llvm-svn: 32208
2006-12-04 23:54:59 +00:00
Chris Lattner
0be88afd90
Add support for 64-bit 'r' constraint. Patch by by Rafael ~Avila de EspÃndol!
...
This fixes PR1029 and Regression/CodeGen/X86/x86-64-asm.ll
llvm-svn: 32206
2006-12-04 22:38:21 +00:00
Jim Laskey
1dcda902cd
Restoration of the stack pointer after a deallocation of a alloca was not
...
updating the SP link.
llvm-svn: 32202
2006-12-04 22:04:42 +00:00
Reid Spencer
10b94bb9f5
Separate getCompare from get and getCompareTy from getTy.
...
llvm-svn: 32200
2006-12-04 21:35:24 +00:00
Reid Spencer
9161e033cd
Fix comment grammaro
...
llvm-svn: 32198
2006-12-04 21:33:23 +00:00
Chris Lattner
1eaa3ef5b3
Add a comment and fix a memory leak. Thanks to Vikram for pointing this out.
...
llvm-svn: 32196
2006-12-04 21:22:45 +00:00
Reid Spencer
2d2a26767e
Implement new cast creation functions for both instructions and constant
...
expressions. These will get used to reduce clutter as we replace various
calls to createInferredCast and getCast.
llvm-svn: 32191
2006-12-04 20:17:56 +00:00
Reid Spencer
94096ebd7c
Reduce the size of the ExprMapKeyType class.
...
llvm-svn: 32186
2006-12-04 18:38:05 +00:00
Evan Cheng
11e73ffe93
Non-darwin gcc should default to static relocation to match gcc.
...
llvm-svn: 32184
2006-12-04 18:07:10 +00:00
Reid Spencer
e7de1b3255
Fix inferred casts.
...
llvm-svn: 32180
2006-12-04 17:05:42 +00:00
Reid Spencer
01a0443bdd
Fix 80 cols violation
...
llvm-svn: 32179
2006-12-04 17:04:44 +00:00
Reid Spencer
8921f36bbd
Regenerate.
...
llvm-svn: 32173
2006-12-04 05:24:24 +00:00
Reid Spencer
ccdc1ac3a7
For PR950: Implement read/write of ICmp and FCmp constant expressions
...
llvm-svn: 32172
2006-12-04 05:23:49 +00:00
Reid Spencer
807b56d92b
For PR950: For ICmp and FCmp constant expressions, put the predicate outiside the parentheses to match what llvm-upgrade generates.
...
llvm-svn: 32171
2006-12-04 05:20:06 +00:00
Reid Spencer
e6770851c0
For PR950: Fix constant expressions to properly support ICmp and FCmp type expressions.
...
llvm-svn: 32170
2006-12-04 05:19:50 +00:00
Reid Spencer
2580dd751f
For PR950: Implement a stub for folding ICmp and FCmp instructions
...
llvm-svn: 32169
2006-12-04 05:19:34 +00:00
Reid Spencer
ca27d66971
For PR950: Implement ICmp/FCmp predicate printing for constant expressions
...
llvm-svn: 32168
2006-12-04 05:19:18 +00:00
Reid Spencer
d727d239f8
Update call to CastInst::getCastOpcode for its new signature.
...
llvm-svn: 32166
2006-12-04 02:48:01 +00:00
Reid Spencer
0668975146
Change inferred casts to explicit casts.
...
llvm-svn: 32165
2006-12-04 02:46:44 +00:00
Reid Spencer
4cb4234c17
Take a baby step towards getting rid of inferred casts. Provide methods on
...
CastInst and ConstantExpr that allow the signedness to be explicitly passed
in and reliance on signedness removed from getCastOpcode. These are
temporary measures useful during the conversion of inferred casts.
llvm-svn: 32164
2006-12-04 02:43:42 +00:00
Reid Spencer
41583e85cb
Support ICmp/FCmp constant expression reading and writing.
...
llvm-svn: 32160
2006-12-03 17:17:02 +00:00
Reid Spencer
470e894f5c
Remove dead code.
...
llvm-svn: 32157
2006-12-03 16:21:33 +00:00
Reid Spencer
2d9ef9ff2d
Regenerate.
...
llvm-svn: 32156
2006-12-03 16:20:14 +00:00
Reid Spencer
178ca8ccb7
Remove useless #include.
...
llvm-svn: 32155
2006-12-03 16:19:43 +00:00
Reid Spencer
45af0be5e4
Regenerate.
...
llvm-svn: 32152
2006-12-03 06:59:29 +00:00
Reid Spencer
1f0ce9daae
Shorten the FCmp and ICmp mnemonics to 3 letters. Make the parser
...
disambiguate them.
llvm-svn: 32151
2006-12-03 06:58:07 +00:00
Reid Spencer
f78fe29ca8
Shorten the FCmp predicate mnemonics.
...
llvm-svn: 32150
2006-12-03 06:35:48 +00:00
Reid Spencer
7a449dd20b
Implement reading and writing of the ICmp and FCmp instructions.
...
llvm-svn: 32149
2006-12-03 06:28:54 +00:00
Reid Spencer
904e41f87e
Allow the ICmp and FCmp instructions to be written by the AsmWriter
...
llvm-svn: 32148
2006-12-03 06:27:29 +00:00
Reid Spencer
a468638458
Implement creation of ICmp and FCmp constant expressions.
...
llvm-svn: 32147
2006-12-03 05:48:19 +00:00
Reid Spencer
5f687b7190
Remove backwards compatibility goop. This is now handled by llvm-upgrade.
...
llvm-svn: 32146
2006-12-03 05:47:10 +00:00
Reid Spencer
c7ef78e5be
Regenerate.
...
llvm-svn: 32145
2006-12-03 05:46:11 +00:00
Reid Spencer
e7083039e5
Remove backwards compatibility goop. Now implemented in llvm-upgrade.
...
llvm-svn: 32144
2006-12-03 05:45:44 +00:00
Jeff Cohen
f99052befb
Unbreak VC++ build.
...
llvm-svn: 32113
2006-12-02 02:22:01 +00:00
Chris Lattner
1629b0d995
disable transformations that are invalid for fp vectors. This fixes
...
Transforms/InstCombine/2006-12-01-BadFPVectorXform.ll
llvm-svn: 32112
2006-12-02 00:13:08 +00:00
Chris Lattner
7a39941897
Switch analysis groups to be unregistered when llvm_shutdown is called.
...
llvm-svn: 32110
2006-12-01 23:46:50 +00:00
Chris Lattner
1b0e89e022
Start moving pass registration over to using the ManagedStatic mechanism.
...
This fixes issues where passes get unregistered before llvm_shutdown is
called, and is generally cleaner and simpler. Analysis groups up next.
llvm-svn: 32108
2006-12-01 23:27:45 +00:00
Chris Lattner
a2bd5d4aaa
move 'cfgonly' pass tracking into PassInfo, instead of handling it with
...
yet-another global data structure.
llvm-svn: 32102
2006-12-01 22:21:11 +00:00
Evan Cheng
bf13611e84
Match TargetInstrInfo changes.
...
llvm-svn: 32098
2006-12-01 21:52:58 +00:00
Evan Cheng
5c7e78886c
convertToThreeAddress() is now responsible for updating live info as well as inserting the new MI's.
...
llvm-svn: 32097
2006-12-01 21:52:41 +00:00
Evan Cheng
c5ad9caeff
Add weak reference directive.
...
llvm-svn: 32091
2006-12-01 20:47:11 +00:00
Chris Lattner
64b24381a8
These should be rewritten to fold without using the 'Rules' mechanism, but
...
until this happens at least make sext from bool and sitofp from bool do the
right thing.
llvm-svn: 32087
2006-12-01 19:50:54 +00:00
Chris Lattner
7e0d6868fd
this logic is broken for trunc to bool, replace the folding logic for trunc
...
completely, as it is trivial. We should probably do this for the rest of the
cast operations. This fixes ConstProp/2006-12-01-TruncBoolBug.ll.
llvm-svn: 32081
2006-12-01 19:22:41 +00:00
Chris Lattner
497c976859
add a new ConstantIntegral::get method. Simplify the implementation of
...
ConstantInt::get
llvm-svn: 32080
2006-12-01 19:20:02 +00:00
Evan Cheng
1d611158eb
Copy and paste error. An initialized global cannot be a weak reference.
...
llvm-svn: 32075
2006-12-01 17:39:22 +00:00
Jim Laskey
8f43fbf759
1. In ppc64 mode we need only use one GPR.
...
2. Float values need to be promoted to double when they are vararg.
llvm-svn: 32074
2006-12-01 16:30:47 +00:00
Jim Laskey
a8db40105b
ExternalWeak case in wrong location.
...
llvm-svn: 32073
2006-12-01 14:37:39 +00:00
Evan Cheng
04e66b07dc
Fix 2005-05-08-FPStackifierPHI.ll failure.
...
llvm-svn: 32071
2006-12-01 10:11:51 +00:00
Evan Cheng
3cc87db480
A initialized global variable cannot be extern weak. However, if a global value's initializer is itself a external weak symbol, emit the weak reference.
...
llvm-svn: 32069
2006-12-01 09:13:26 +00:00
Evan Cheng
6f5f81722b
Darwin PPC external weak linkage support.
...
llvm-svn: 32068
2006-12-01 07:56:37 +00:00
Evan Cheng
d326e5b35e
Minor code clean up.
...
llvm-svn: 32067
2006-12-01 07:38:23 +00:00
Evan Cheng
5b43e8613e
Fix indentation.
...
llvm-svn: 32066
2006-12-01 07:17:00 +00:00
Evan Cheng
1dfe5221c1
Darwin X86 external weak linkage support.
...
llvm-svn: 32065
2006-12-01 07:15:24 +00:00
Chris Lattner
c65612e859
Fix a typo introduced by the cast patch that horribly broke a lot of vector
...
code. Testcase here: Transforms/ConstProp/2006-11-30-vector-cast.ll
llvm-svn: 32062
2006-12-01 05:55:25 +00:00
Reid Spencer
a1613b631b
Don't fold "ptrtoint GV to bool" since this should be doing a truncate not
...
a comparison against zero. Instead fold setne(GV,null) and seteq(GV,null)
to ConstantBool::True or ConstantBool::False, respectively.
llvm-svn: 32060
2006-12-01 03:56:30 +00:00
Chris Lattner
860908f98c
Fix the CodeGen/PowerPC/vec_constants.ll regression.
...
llvm-svn: 32057
2006-12-01 01:45:39 +00:00
Reid Spencer
f13a49f6aa
Regenerate.
...
llvm-svn: 32053
2006-12-01 00:33:46 +00:00
Anton Korobeynikov
f627d28d9c
Introducing external weak linkage. Darwin codegen should be added later.
...
llvm-svn: 32052
2006-12-01 00:25:12 +00:00
Reid Spencer
529fb41272
Remove 4 FIXMEs to hack around cast-to-bool problems which no longer exist.
...
llvm-svn: 32051
2006-11-30 23:13:36 +00:00
Anton Korobeynikov
25535e6c64
Factor out GVRequiresExtraLoad() from .h to .cpp
...
llvm-svn: 32048
2006-11-30 22:42:55 +00:00
Evan Cheng
456101ebb9
- Use a different wrapper node for RIP-relative GV, etc.
...
- Proper support for both small static and PIC modes under X86-64
- Some (non-optimal) support for medium modes.
llvm-svn: 32046
2006-11-30 21:55:46 +00:00
Jim Laskey
32137fffa5
better check for version
...
llvm-svn: 32045
2006-11-30 18:29:23 +00:00
Chris Lattner
f3806f1c16
make it clear that this is always a zext
...
llvm-svn: 32044
2006-11-30 17:35:08 +00:00
Chris Lattner
affa9441cd
One more bugfix, 3 cases of making casts explicit.
...
llvm-svn: 32043
2006-11-30 17:32:29 +00:00
Chris Lattner
0b4753a96c
Fix a bug in globalopt due to the recent cast patch.
...
llvm-svn: 32042
2006-11-30 17:26:08 +00:00
Jim Laskey
0369cab61e
Change global descriptor names to provide name, full name and linkage name.
...
llvm-svn: 32036
2006-11-30 14:35:45 +00:00
Jim Laskey
831e2376f2
Temp fix to deal gdb issue.
...
llvm-svn: 32035
2006-11-30 11:09:42 +00:00
Evan Cheng
d8be97599a
MachineInstr::setOpcode -> MachineInstr::setInstrDescriptor
...
llvm-svn: 32034
2006-11-30 07:12:03 +00:00
Evan Cheng
08e6984667
Remove the ugly SPARCV9 TargetInstrDescriptors hack.
...
llvm-svn: 32033
2006-11-30 07:10:43 +00:00
Evan Cheng
cb65ba1821
- MachineInstr now keeps a ptr to TargetInstrDescriptor instead of Opcode.
...
- Remove the ugly TargetInstrDescriptors hack.
llvm-svn: 32032
2006-11-30 07:08:44 +00:00
Evan Cheng
f64e341522
In PIC mode, GV not requiring an extra load can be used as address immediate.
...
llvm-svn: 32028
2006-11-29 23:48:14 +00:00
Evan Cheng
1e3f41acde
Clean up.
...
llvm-svn: 32027
2006-11-29 23:46:27 +00:00
Evan Cheng
7e20347607
Fix for PR1018 - Better support for X86-64 Linux in small code model.
...
llvm-svn: 32026
2006-11-29 23:19:46 +00:00
Chris Lattner
3219b522c8
Fix bug codegen'ing FP constant vectors with integer splats. Make sure the
...
created intrinsics have the right integer types. This fixes
PowerPC/2006-11-29-AltivecFPSplat.ll
llvm-svn: 32024
2006-11-29 19:58:49 +00:00
Evan Cheng
c9710a3e29
Avoid inifinite looping if READCYCLECOUNTER isn't custom lowered.
...
llvm-svn: 32022
2006-11-29 19:13:47 +00:00
Jim Laskey
d7db5b4a9c
Eliminate unnecessary scopes.
...
llvm-svn: 32020
2006-11-29 16:55:57 +00:00
Jim Laskey
00bcb51943
Offset for load of 32-bit arg in 64-bit world was incorrect.
...
llvm-svn: 32019
2006-11-29 13:37:09 +00:00
Evan Cheng
f968824cdb
Custom lower READCYCLECOUNTER for x86-64.
...
llvm-svn: 32017
2006-11-29 08:28:13 +00:00
Evan Cheng
2acb6345d8
Allow target to custom lower READCYCLECOUNTER (when it doesn't have to be expanded).
...
llvm-svn: 32016
2006-11-29 08:26:18 +00:00