Reid Spencer
2854cb9ab8
For PR1094:
...
Make the SetVector::iterator be the vector's const_iterator.
llvm-svn: 33279
2007-01-17 02:22:18 +00:00
Reid Spencer
e6fd0e826b
For PR1074:
...
Remove the projects/Stacker directory. LLVM is now free of dependency
on llvm-gcc.
llvm-svn: 33278
2007-01-17 02:18:44 +00:00
Reid Spencer
b4e0f9b52e
For PR1074:
...
Adjust configuration for Stacker's new name: llvm-stacker.
llvm-svn: 33277
2007-01-17 02:14:46 +00:00
Reid Spencer
8da11cde85
Remove unused forward class declarations.
...
llvm-svn: 33276
2007-01-17 01:49:59 +00:00
Reid Spencer
0fa0670b8b
Ignore the output directory.
...
llvm-svn: 33275
2007-01-17 01:48:42 +00:00
Reid Spencer
7dac4c31a4
Join two lines that caused awk to squak on some platforms.
...
llvm-svn: 33274
2007-01-16 22:41:12 +00:00
Devang Patel
d85662f67d
Pass manager may require certain analysis. In such cases, initially
...
pass manager is last user.
llvm-svn: 33273
2007-01-16 22:38:10 +00:00
Reid Spencer
4eac5b315d
Fix test cases. Patch by Guoling Han.
...
llvm-svn: 33272
2007-01-16 22:31:46 +00:00
Reid Spencer
a3facd734a
Remove this test case. LLVM doesn't currently support comparison of packed.
...
llvm-svn: 33271
2007-01-16 21:58:58 +00:00
Devang Patel
3312f75071
Undo last check-in.
...
Remove setupPassManager() and its use.
llvm-svn: 33270
2007-01-16 21:43:18 +00:00
Anton Korobeynikov
31fcc2cde9
Missed "<" :)
...
llvm-svn: 33265
2007-01-16 20:22:18 +00:00
Devang Patel
68dc3d2263
Setup pass manager before scheduling required analysis.
...
llvm-svn: 33262
2007-01-16 19:46:09 +00:00
Reid Spencer
8c87f124dc
Add a test case for bit accurate integer types in llvm-gcc. This is
...
XFAILed for now until llvm-gcc changes are committed.
llvm-svn: 33261
2007-01-16 18:40:08 +00:00
Anton Korobeynikov
922965aa29
Cleanup. Comments added.
...
llvm-svn: 33260
2007-01-16 18:23:09 +00:00
Reid Spencer
50006ba566
New test cases for bit accurate integers developed by Guoling Han.
...
llvm-svn: 33259
2007-01-16 18:08:22 +00:00
Chris Lattner
4202f37352
Fix SMG2000 with the CBE: opaque types need names too.
...
llvm-svn: 33258
2007-01-16 18:02:45 +00:00
Chris Lattner
6cc58a0dc5
document some subtlety
...
llvm-svn: 33257
2007-01-16 17:51:40 +00:00
Anton Korobeynikov
4f01b783a3
Emit symbol type information for ELF/COFF targets
...
llvm-svn: 33256
2007-01-16 16:41:57 +00:00
Bill Wendling
c7b2ab9bdf
Instead of yet another enum indicating the "assembly language flavor",
...
just use the one that's in the subtarget.
llvm-svn: 33255
2007-01-16 09:29:17 +00:00
Chris Lattner
5488ade154
Fix PR918 by only using typedefs to name struct types. This makes the later
...
type ordering stuff work better. This fixes PR918 and
CodeGen/CBackend/2007-01-15-NamedArrayType.ll
Patch by Gordon Henriksen.
llvm-svn: 33254
2007-01-16 07:22:23 +00:00
Chris Lattner
1249d41950
testcase for PR918
...
llvm-svn: 33253
2007-01-16 07:21:28 +00:00
Chris Lattner
89e5813312
add a note: we need whole-function selectiondags :)
...
llvm-svn: 33252
2007-01-16 06:39:48 +00:00
Chris Lattner
4dc4489286
Fix PR1114 and CodeGen/Generic/2007-01-15-LoadSelectCycle.ll by being
...
careful when folding "c ? load p : load q" that C doesn't reach either load.
If so, folding this into load (c ? p : q) will induce a cycle in the graph.
llvm-svn: 33251
2007-01-16 05:59:59 +00:00
Chris Lattner
68a980b674
new testcase for PR1114
...
llvm-svn: 33250
2007-01-16 05:58:50 +00:00
Chris Lattner
f70c5cd5db
add options to view the dags before the first or second pass of dag combine.
...
llvm-svn: 33249
2007-01-16 04:55:25 +00:00
Bill Wendling
841d20cd16
Added a -mtriple flag to force darwin backend.
...
llvm-svn: 33248
2007-01-16 04:15:20 +00:00
Bill Wendling
0b3a451e1b
Make inline ASM the INTEL one if it's in that emission mode.
...
llvm-svn: 33247
2007-01-16 04:13:03 +00:00
Bill Wendling
e21237e59a
Fix for PR1095:
...
LLVM would miscompile ASM dialects when compiling for PPC. Added dialects for
the X86 and PPC backends. It defaults to "0", the first variant of a compound
inline asm expression.
llvm-svn: 33246
2007-01-16 03:42:04 +00:00
Devang Patel
4268fc08d3
Code refactoring.
...
llvm-svn: 33245
2007-01-16 02:00:38 +00:00
Devang Patel
6975b6ec09
Remove extra white spaces. Fix comments.
...
llvm-svn: 33244
2007-01-15 23:06:56 +00:00
Devang Patel
39786a90d0
Do not record last users of Pass Manager.
...
llvm-svn: 33243
2007-01-15 20:31:54 +00:00
Jeff Cohen
9431075206
Unbreak VC++ build.
...
llvm-svn: 33242
2007-01-15 20:27:18 +00:00
Chris Lattner
388f649203
test darwin too! :)
...
llvm-svn: 33241
2007-01-15 18:32:24 +00:00
Reid Spencer
e6a338d263
One more @ to remove.
...
llvm-svn: 33240
2007-01-15 18:28:34 +00:00
Chris Lattner
90d2e426f9
make this more efficient in release builds (time and space)
...
llvm-svn: 33239
2007-01-15 18:28:18 +00:00
Reid Spencer
cf7ebf5cef
Update documentation for parameter attributes for the syntax change.
...
llvm-svn: 33238
2007-01-15 18:27:39 +00:00
Chris Lattner
479a9fc492
Fix a regression in my isIntegral patch that broke 471.omnetpp. This is
...
because TargetData::getTypeSize() returns the same for i1 and i8. This fix
is not right for the full generality of bitwise types, but it fixes the
regression.
llvm-svn: 33237
2007-01-15 17:55:20 +00:00
Nick Lewycky
6ce36cff3a
Don't print address of ETNode. Print the DFSNumIn which uniquely identifies
...
the basic block and is stable across runs in gdb or valgrind.
Make Node::update handle edges which dominate and are tighter than
existing edges.
Replace makeEqual's "squeeze theorem" code. Fixes miscompilation.
Gate the calls to defToOps and opsToDef. Before this, we were getting IG
edges about values which weren't even defined in the dominated area. This
reduces the size of the IG by about half.
llvm-svn: 33236
2007-01-15 14:30:07 +00:00
Chris Lattner
faa060878b
Run an instcombine pass after inlining but before scalarrepl. This allows
...
instcombine to clean up the code, which makes more code suitable for SRoA.
This helps C++ code in particular, e.g. speeding up tramp3d by 31%.
llvm-svn: 33235
2007-01-15 07:41:51 +00:00
Chris Lattner
c8dcede292
Implement InstCombine/phi.ll:test7, deletion of trivial value loops for
...
induction variables.
llvm-svn: 33234
2007-01-15 07:30:06 +00:00
Chris Lattner
aed9f046f3
new testcase
...
llvm-svn: 33233
2007-01-15 07:29:29 +00:00
Chris Lattner
27df1db485
simplify some code now that types are signless
...
llvm-svn: 33232
2007-01-15 07:02:54 +00:00
Chris Lattner
a4beeef76c
delete stores to allocas with one use. This is a trivial form of DSE which
...
often kicks in for ?: expressions.
llvm-svn: 33231
2007-01-15 06:51:56 +00:00
Chris Lattner
8938a7c930
add a simple case where instcombine can detect and remove a dead alloca
...
llvm-svn: 33230
2007-01-15 06:51:25 +00:00
Chris Lattner
26933ddb10
Constant fold llvm.powi.*. This speeds up tramp3d--v4 by 9.5%
...
llvm-svn: 33229
2007-01-15 06:27:37 +00:00
Chris Lattner
e76908ba81
add some notes
...
llvm-svn: 33228
2007-01-15 06:25:39 +00:00
Reid Spencer
6eb2990810
Regenerate.
...
llvm-svn: 33227
2007-01-15 02:41:46 +00:00
Reid Spencer
8307a54baa
For PR1113:
...
Increment the counter after the second use, not after the first use. This
fixes PR1113.
Also, rename some classes for simplicity and to more naturally be
reminscient of LLVM 1.9. This in preparation for additional classes that
will provide a scaled down model of the LLVM 1.9 IR.
llvm-svn: 33226
2007-01-15 02:40:33 +00:00
Chris Lattner
03c4953cdd
rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.
...
rename Type::getIntegralTypeMask to Type::getIntegerTypeMask.
This makes naming much more consistent. For example, there are now no longer any
instances of IntegerType that are not considered isInteger! :)
llvm-svn: 33225
2007-01-15 02:27:26 +00:00
Chris Lattner
c1be5ac420
regenerate
...
llvm-svn: 33224
2007-01-15 02:12:07 +00:00
Chris Lattner
57eedaca52
teach VMCore to accept i1 add's and shifts
...
llvm-svn: 33223
2007-01-15 02:05:34 +00:00
Chris Lattner
c69c6c4db2
eliminate calls to Type::isInteger, preferring isIntegral instead.
...
llvm-svn: 33222
2007-01-15 02:03:16 +00:00
Chris Lattner
b02536cadf
allow i1 to operators like shift and add.
...
llvm-svn: 33221
2007-01-15 02:00:29 +00:00
Chris Lattner
4442e4b401
Update code to eliminate calls to isInteger, calling isIntegral instead.
...
llvm-svn: 33220
2007-01-15 01:58:56 +00:00
Chris Lattner
298ca5518d
Change to match API changes.
...
llvm-svn: 33219
2007-01-15 01:55:32 +00:00
Chris Lattner
1942249c5b
Eliminate calls to isInteger, generalizing code and tightening checks as needed.
...
llvm-svn: 33218
2007-01-15 01:55:30 +00:00
Chris Lattner
c0f423a452
Terminology change: drop 'integral' completely. Now we just have integer,
...
which includes i1. Change the semantics of the various instructions to
support i1 where they didn't before: for example, it is now legal [though
not terribly useful, as it is the same as xor] to add two i1 values.
llvm-svn: 33217
2007-01-15 01:54:13 +00:00
Chris Lattner
f448a8c8ac
Make use of isInteger vs isIntegral more explicit
...
llvm-svn: 33216
2007-01-15 01:48:11 +00:00
Chris Lattner
2a84487895
ensure these don't xpass if opt crashes
...
llvm-svn: 33215
2007-01-15 01:04:21 +00:00
Chris Lattner
f9478e757b
Fix correlated exprs regressions
...
llvm-svn: 33214
2007-01-15 01:02:34 +00:00
Chris Lattner
885433b15b
don't discriminate against i1
...
llvm-svn: 33213
2007-01-15 00:45:50 +00:00
Reid Spencer
7ef3e49193
Regenerate
...
llvm-svn: 33212
2007-01-15 00:26:18 +00:00
Reid Spencer
04a03f2075
Reorganize things a bit in preparation for rewrite. Although this looks
...
like a lot, its really only two changes:
1. Move stuff that should be private to .y out of the .h file.
2. Make all semantic values pointers.
This cleans up the silly destroy methods and changes them to delete. It
also moves the TypeInfo and ValueInfo classes into the .y where we can
modify them more readily because they have no clients any more.
This shouldn't result in any functional changes in llvm-upgrade.
llvm-svn: 33211
2007-01-15 00:25:53 +00:00
Chris Lattner
f739d01059
Fix Analysis/Dominators/2006-10-02-BreakCritEdges.ll
...
llvm-svn: 33210
2007-01-15 00:15:09 +00:00
Reid Spencer
0bfae31cf9
Primitive types don't include integers any more, adjust.
...
llvm-svn: 33209
2007-01-14 21:46:42 +00:00
Chris Lattner
6ee923f3bb
instcombine has always been miscompiling fcmp x, x, disregarding possible
...
NANs. This fixes PR1111 and Transforms/InstCombine/2007-01-14-FcmpSelf.ll
llvm-svn: 33208
2007-01-14 19:42:17 +00:00
Chris Lattner
1ca997078c
add accessors
...
llvm-svn: 33207
2007-01-14 19:41:24 +00:00
Chris Lattner
0abf4ed41e
new testcase
...
llvm-svn: 33206
2007-01-14 19:40:48 +00:00
Chris Lattner
be388d791a
verify that hidden visibility support never goes away
...
llvm-svn: 33205
2007-01-14 18:57:37 +00:00
Chris Lattner
9818a6fd76
Fix PR1110 and Analysis/Dominators/2007-01-14-BreakCritEdges.ll by being
...
more careful about unreachable code when updating dominator info.
llvm-svn: 33204
2007-01-14 18:33:35 +00:00
Chris Lattner
838458a783
testcase for pr1110
...
llvm-svn: 33203
2007-01-14 18:33:11 +00:00
Anton Korobeynikov
cce06fd277
No hidden visiblity on Mingw32/Cygwin
...
llvm-svn: 33202
2007-01-14 11:49:39 +00:00
Chris Lattner
e20b4707c6
clarify linkonce/weak linkage
...
llvm-svn: 33201
2007-01-14 06:51:48 +00:00
Chris Lattner
3c84b551db
add support for hidden visibility to darwin/ppc and linux/ppc targets
...
llvm-svn: 33200
2007-01-14 06:37:54 +00:00
Reid Spencer
69240dfa72
Fix an incorrect conversion of int -> i32
...
llvm-svn: 33199
2007-01-14 06:29:54 +00:00
Chris Lattner
8c51bf5bf6
add support for hidden visibility to darwin/x86
...
llvm-svn: 33198
2007-01-14 06:29:53 +00:00
Chris Lattner
9f6badbc41
add a new HiddenDirective member for handling visibility.
...
llvm-svn: 33197
2007-01-14 06:27:21 +00:00
Chris Lattner
ae5db00419
add a missing else. This caused globals to be printed as:
...
movq ___dso_handle@GOTPCREL(%rip)(%rip), %rsi
instead of:
movq ___dso_handle@GOTPCREL(%rip), %rsi
llvm-svn: 33196
2007-01-14 06:08:14 +00:00
Chris Lattner
875d7b2b1d
fit to 80 cols.
...
Remove now-extraneous checks for ptr->ptr bitcasts.
Fix PR1109 and Analysis/BasicAA/2007-01-13-BasePointerBadNoAlias.ll. We
need to consider arbitrary sized objects when checking for nested GEP offsets.
llvm-svn: 33195
2007-01-14 05:57:53 +00:00
Chris Lattner
7a0e0ce2c4
testcase for pr1109
...
llvm-svn: 33194
2007-01-14 05:56:45 +00:00
Chris Lattner
5a55476211
Fix PR1101 and Analysis/ScalarEvolution/trip-count.ll
...
llvm-svn: 33193
2007-01-14 01:24:47 +00:00
Chris Lattner
0a57468829
new testcase for pr1101
...
llvm-svn: 33192
2007-01-14 01:23:43 +00:00
Chris Lattner
6bbb29ba40
darwin doesn't use .hidden. Disable this until we fix it right.
...
llvm-svn: 33191
2007-01-14 00:50:56 +00:00
Chris Lattner
5760c5042c
add a global variable example
...
llvm-svn: 33190
2007-01-14 00:27:09 +00:00
Chris Lattner
5544e17a08
Fix PR1103 and Regression/CodeGen/X86/2007-01-13-StackPtrIndex.ll
...
llvm-svn: 33189
2007-01-14 00:13:07 +00:00
Chris Lattner
79500e62d9
new testcase for pr1103
...
llvm-svn: 33188
2007-01-14 00:12:50 +00:00
Chris Lattner
de86991b14
remove dead code, frameindices must be resolve before the asmprinter runs.
...
llvm-svn: 33187
2007-01-13 23:59:03 +00:00
Chris Lattner
ded827dd27
testcase reduced from pr1107
...
llvm-svn: 33186
2007-01-13 23:11:45 +00:00
Chris Lattner
387bf3f700
Fix Transforms/InstCombine/2007-01-13-ExtCompareMiscompile.ll, which is part
...
of PR1107
llvm-svn: 33185
2007-01-13 23:11:38 +00:00
Reid Spencer
47bb5c996e
Fix indentation to prior level for easier diffs.
...
llvm-svn: 33184
2007-01-13 05:10:53 +00:00
Reid Spencer
985e52f7c6
For PR1043:
...
Bye, Bye Booly. Remove the use of the bool type from non-upgraded test
cases and from grep expressions. The parser doesn't accept it and the
asm writer doesn't produce it any more.
llvm-svn: 33183
2007-01-13 05:06:52 +00:00
Reid Spencer
58a8db0a3f
Regenerate.
...
llvm-svn: 33182
2007-01-13 05:00:46 +00:00
Reid Spencer
502d64e654
Bye bye bool. AsmWriter doesn't generate it any more so AsmParser shouldn't
...
read it any more. This is consistent with the new IR as well.
llvm-svn: 33181
2007-01-13 05:00:20 +00:00
Reid Spencer
d18708fce0
Regenerate.
...
llvm-svn: 33180
2007-01-13 04:40:16 +00:00
Reid Spencer
876bc59822
Can't generate "bool" any more. Change to i1
...
llvm-svn: 33179
2007-01-13 04:39:47 +00:00
Reid Spencer
161ad399d4
Can't grep for bool any more.
...
llvm-svn: 33178
2007-01-13 04:36:22 +00:00
Nick Lewycky
4294446fcb
"Default context" blocks can occur after a non-default one. This meant
...
that properties were being applied where they didn't belong. Fixes crash
in new MiBench testcase.
Also mark debugging code as such in #ifdef.
llvm-svn: 33177
2007-01-13 02:05:28 +00:00
Reid Spencer
91d93de25e
Fix a FIXME. 1 bit integer types are now printed as i1 not bool.
...
llvm-svn: 33176
2007-01-13 01:09:33 +00:00
Chris Lattner
ff7434a526
Fix a minor bug handling constant exprs, introduced by a recent patch.
...
llvm-svn: 33175
2007-01-13 00:42:58 +00:00
Chris Lattner
ae3b372318
Remove this obsolete test. The CBE will never be able to handle zero argument
...
vararg functions.
llvm-svn: 33174
2007-01-13 00:40:40 +00:00
Reid Spencer
13958b3a3c
Whoops. Give this test some input. Doubly important since its XFAIL.
...
llvm-svn: 33173
2007-01-13 00:28:36 +00:00
Reid Spencer
eb30497472
Regenerate.
...
llvm-svn: 33172
2007-01-13 00:23:06 +00:00
Reid Spencer
316ffe33fd
Don't attempt to upgrade argument to va.start and va.end if there are none.
...
llvm-svn: 33171
2007-01-13 00:22:40 +00:00
Reid Spencer
1f9188e6d3
This is not an upgrade candidate any more.
...
llvm-svn: 33170
2007-01-13 00:19:13 +00:00
Reid Spencer
93ef7ee4d1
Regenerate.
...
llvm-svn: 33169
2007-01-13 00:13:49 +00:00
Reid Spencer
ea4374c0d4
Make sure the IntegerValType has enough space for 2^23 bits.
...
llvm-svn: 33168
2007-01-13 00:12:29 +00:00
Reid Spencer
d8d0540d9b
Make sure that GEP indices are only 32 or 64 bits. We're not ready for
...
indices with other bit sizes yet.
llvm-svn: 33167
2007-01-13 00:10:02 +00:00
Reid Spencer
bea2e4cf23
Get rid of some useless distinction between bool and integer.
...
llvm-svn: 33166
2007-01-13 00:09:12 +00:00
Reid Spencer
ae7e9c5b35
Regenerate.
...
llvm-svn: 33165
2007-01-13 00:03:30 +00:00
Chris Lattner
ca82a908e3
fix a bug in a recent patch
...
llvm-svn: 33164
2007-01-13 00:02:49 +00:00
Reid Spencer
15f159b00d
For PR1093:
...
Implement upgrading of the varargs intrinsics. These must now have i8*
arguments. This patch bitcasts arguments to i8* and fixes the prototypes.
llvm-svn: 33163
2007-01-13 00:02:00 +00:00
Reid Spencer
1da3a4fca3
Test case for PR1093 for llvm.va_* intrinsics upgrade.
...
llvm-svn: 33162
2007-01-13 00:00:43 +00:00
Jim Laskey
3dd792294f
virtual not needed.
...
llvm-svn: 33161
2007-01-12 23:39:50 +00:00
Reid Spencer
73497b26cd
Remove this file. It was inadvertently added because I could not find
...
TargetLowering.cpp in CodeGen/SelectionDAG (location makes no sense to me)
llvm-svn: 33160
2007-01-12 23:32:11 +00:00
Reid Spencer
a8a0f2cf68
Compensate for loss of DerivedTypes.h in TargetLowering.h
...
llvm-svn: 33159
2007-01-12 23:31:12 +00:00
Reid Spencer
ddf1421b8e
Move a function out of line.
...
llvm-svn: 33158
2007-01-12 23:30:31 +00:00
Chris Lattner
5699b8e3d0
remove over-general code.
...
llvm-svn: 33157
2007-01-12 23:28:32 +00:00
Chris Lattner
90c6e6835d
remove unneeded special case for bool
...
llvm-svn: 33156
2007-01-12 23:26:17 +00:00
Chris Lattner
65258e9ef3
Eliminate a log(n) lookup
...
llvm-svn: 33155
2007-01-12 23:23:08 +00:00
Reid Spencer
015b432b54
Adjust #includes to compensate for lost of DerivedTypes.h in
...
TargetLowering.h
llvm-svn: 33154
2007-01-12 23:22:14 +00:00
Reid Spencer
6434db7897
Don't #include DerivedTypes.h in this header. Make adjustments to
...
compensate. Move a function out of line to TargetLowering.cpp
llvm-svn: 33153
2007-01-12 23:21:42 +00:00
Reid Spencer
44e3d4ec40
Add a new home for TargetLowering member functions.
...
llvm-svn: 33152
2007-01-12 23:18:18 +00:00
Chris Lattner
afdee2062c
remove obsolete fixme
...
llvm-svn: 33151
2007-01-12 22:52:50 +00:00
Chris Lattner
f5e5236b57
simplify some code
...
llvm-svn: 33150
2007-01-12 22:51:20 +00:00
Evan Cheng
61a4be88b4
Minor fix.
...
llvm-svn: 33149
2007-01-12 22:51:10 +00:00
Evan Cheng
12c063c405
- Move RTLIB::Libcall enum to a separate file.
...
- Code clean up.
llvm-svn: 33148
2007-01-12 22:49:32 +00:00
Chris Lattner
3b6058c278
Remove over-general comparisons
...
llvm-svn: 33147
2007-01-12 22:49:11 +00:00
Jim Laskey
f047882b15
Allow isAllOnesValue testing on packed constants
...
llvm-svn: 33146
2007-01-12 22:39:14 +00:00
Evan Cheng
01503121c1
Silence a bogus compiler warning.
...
llvm-svn: 33145
2007-01-12 22:30:07 +00:00
Chris Lattner
7c41c19c02
inline isIntegral to make this method look like classof for all other
...
derived types
llvm-svn: 33144
2007-01-12 22:11:53 +00:00
Chris Lattner
234fa71793
update this to work with recent asmprinter change
...
llvm-svn: 33143
2007-01-12 21:16:56 +00:00
Lauro Ramos Venancio
901d9e65f6
Don't add or sub zero to sp.
...
llvm-svn: 33142
2007-01-12 20:52:27 +00:00
Lauro Ramos Venancio
c4235e5521
Build constants using instructions mov/orr or mvn/eor.
...
llvm-svn: 33141
2007-01-12 20:35:49 +00:00
Reid Spencer
4d06a85487
Regenerate.
...
llvm-svn: 33140
2007-01-12 20:10:51 +00:00
Reid Spencer
2dd0c0b27f
Remove support for upgrading NOT. The llvm-upgrade lexer didn't recognize
...
it either. NOT is just plain illegal now.
llvm-svn: 33139
2007-01-12 20:09:48 +00:00
Devang Patel
f85793d171
s/addPassToManager/add/g
...
llvm-svn: 33138
2007-01-12 20:07:16 +00:00
Anton Korobeynikov
8ea9d3a687
Regenerate
...
llvm-svn: 33137
2007-01-12 19:22:51 +00:00
Anton Korobeynikov
a0554d90e8
* PIC codegen for X86/Linux has been implemented
...
* PIC-aware internal structures in X86 Codegen have been refactored
* Visibility (default/weak) has been added
* Docs fixes (external weak linkage, visibility, formatting)
llvm-svn: 33136
2007-01-12 19:20:47 +00:00
Devang Patel
e759955c66
Move PMTopLevelManager, PMDataManager and FPPassManger classes into
...
new PassManagers.h header.
This opens door for implementing CGPassManager in IPA library.
llvm-svn: 33135
2007-01-12 18:52:44 +00:00
Chris Lattner
344da52c4c
Remove a bunch of duplicated code. Among other things, this fixes
...
constant folding of signed comparisons of bool.
llvm-svn: 33134
2007-01-12 18:42:52 +00:00
Chris Lattner
d99bff4ef6
unbreak i1 constants with the cpp writer, eliminate special case.
...
llvm-svn: 33133
2007-01-12 18:37:29 +00:00
Chris Lattner
e3721e3002
eliminate redundant check
...
llvm-svn: 33132
2007-01-12 18:35:11 +00:00
Chris Lattner
67598a8ccc
regenerate
...
llvm-svn: 33131
2007-01-12 18:33:30 +00:00
Chris Lattner
f2a4af8da3
This production is dead, the lexer can never return 'NOT'
...
llvm-svn: 33130
2007-01-12 18:32:39 +00:00
Chris Lattner
15649084e9
Branch conditions must be i1
...
llvm-svn: 33129
2007-01-12 18:30:11 +00:00
Chris Lattner
19cfb04d04
don't discriminate against bool
...
llvm-svn: 33128
2007-01-12 18:28:58 +00:00
Chris Lattner
3b641bfba5
remove unneeded special cases
...
llvm-svn: 33127
2007-01-12 18:23:49 +00:00
Jeff Cohen
c5e5b27573
'==' is not a legal test operator on BSD. Use '='.
...
llvm-svn: 33126
2007-01-12 18:22:38 +00:00
Chris Lattner
0fd2b9f5c0
GEP operands can't be bools
...
llvm-svn: 33125
2007-01-12 18:20:48 +00:00
Chris Lattner
7f6fac4bb5
Simplify code
...
llvm-svn: 33123
2007-01-12 18:15:09 +00:00
Reid Spencer
2759b18e5d
Make a couple organizational changes. Type no longer derives from Value
...
(hasn't for ages) so move it up one level in the table of contents.
Type needs to be understood before Value so move it before Value. Make
the descriptions of types stand out a little more. Add references to the
doxygen for the Type class.
llvm-svn: 33122
2007-01-12 17:26:25 +00:00
Devang Patel
0f08004ac0
Remove dead code.
...
llvm-svn: 33121
2007-01-12 17:23:48 +00:00
Reid Spencer
b9e5d10cf7
Update documentation for arbitrary precision integers:
...
1. int -> i32
2. Describe the IntegerType class.
3. Correct the description of Type and its primitive type subclasses.
4. Document OpaqueType and PackedType a little better.
llvm-svn: 33120
2007-01-12 17:11:23 +00:00
Reid Spencer
07c9c68825
Fix a typo.
...
llvm-svn: 33118
2007-01-12 15:46:11 +00:00
Reid Spencer
b20ef92e42
Regenerate.
...
llvm-svn: 33117
2007-01-12 07:28:27 +00:00
Reid Spencer
0879a87a0d
Integer type names need 1 or more digits, not zero or more.
...
llvm-svn: 33116
2007-01-12 07:27:59 +00:00
Reid Spencer
c87215900d
Always write 1 bit integers as i1 not "bool".
...
llvm-svn: 33115
2007-01-12 07:25:20 +00:00
Evan Cheng
a557a0028d
Comment.
...
llvm-svn: 33114
2007-01-12 07:25:16 +00:00
Reid Spencer
7a9c62baa6
For PR1064:
...
Implement the arbitrary bit-width integer feature. The feature allows
integers of any bitwidth (up to 64) to be defined instead of just 1, 8,
16, 32, and 64 bit integers.
This change does several things:
1. Introduces a new Derived Type, IntegerType, to represent the number of
bits in an integer. The Type classes SubclassData field is used to
store the number of bits. This allows 2^23 bits in an integer type.
2. Removes the five integer Type::TypeID values for the 1, 8, 16, 32 and
64-bit integers. These are replaced with just IntegerType which is not
a primitive any more.
3. Adjust the rest of LLVM to account for this change.
Note that while this incremental change lays the foundation for arbitrary
bit-width integers, LLVM has not yet been converted to actually deal with
them in any significant way. Most optimization passes, for example, will
still only deal with the byte-width integer types. Future increments
will rectify this situation.
llvm-svn: 33113
2007-01-12 07:05:14 +00:00
Chris Lattner
899a89b11b
Fix persistent conflict madness by removing these from cvs.
...
llvm-svn: 33111
2007-01-12 05:35:13 +00:00
Reid Spencer
cddc9dfe97
Implement review feedback for the ConstantBool->ConstantInt merge. Chris
...
recommended that getBoolValue be replaced with getZExtValue and that
get(bool) be replaced by get(const Type*, uint64_t). This implements
those changes.
llvm-svn: 33110
2007-01-12 04:24:46 +00:00
Reid Spencer
e4c7fcd1bd
Update for changes in the IR. The ConstantIntegral, ConstantBool, and
...
ConstantInt classes were merged into just ConstantInt.
llvm-svn: 33107
2007-01-12 03:36:33 +00:00
Reid Spencer
36a1542bcb
Update for changes in the assembly syntax. bool is replaced with i1.
...
llvm-svn: 33106
2007-01-12 03:35:51 +00:00
Evan Cheng
31cbddf28a
Store default libgcc routine names and allow them to be redefined by target.
...
llvm-svn: 33105
2007-01-12 02:11:51 +00:00
Nick Lewycky
ee32ee0250
If we know that it's a constant being casted, propagate through the cast
...
instruction. Doesn't work the other way though (can't recover bits that
have been truncated).
llvm-svn: 33104
2007-01-12 01:23:53 +00:00
Nick Lewycky
4a74a75bbb
Clean up logic after ConstantBool removal.
...
llvm-svn: 33096
2007-01-12 00:02:12 +00:00
Devang Patel
ad98d23f16
Start using PMStack. Now each pass is responsibe for assinging
...
a pass manager for itself.
There is some opportunity to remove some dead code from PassManager.cpp.
llvm-svn: 33087
2007-01-11 22:15:30 +00:00
Reid Spencer
582db976d8
Don't remove the find_rule label from FLEX output. It is needed by some
...
versions of FLEX even through we don't use REJECT. Thanks to Jeff Cohen
for tracking this down.
llvm-svn: 33085
2007-01-11 21:40:25 +00:00
Devang Patel
ac99eca428
Use getPassManagerType() instead of dynamic_cast.
...
llvm-svn: 33078
2007-01-11 19:59:06 +00:00
Reid Spencer
542964f55b
Rename BoolTy as Int1Ty. Patch by Sheng Zhou.
...
llvm-svn: 33076
2007-01-11 18:21:29 +00:00
Zhou Sheng
bd23db9968
Remove unnecessary boolean type check.
...
llvm-svn: 33075
2007-01-11 14:38:17 +00:00
Zhou Sheng
eb29b0bb6e
Fixed a bug in ConstantInt::Inverted().
...
Modified comment of that method.
llvm-svn: 33074
2007-01-11 14:31:10 +00:00
Zhou Sheng
75b871fb1e
For PR1043:
...
Merge ConstantIntegral and ConstantBool into ConstantInt.
Remove ConstantIntegral and ConstantBool from LLVM.
llvm-svn: 33073
2007-01-11 12:24:14 +00:00
Zhou Sheng
691b263e07
Fixed indentation.
...
llvm-svn: 33072
2007-01-11 10:33:26 +00:00
Reid Spencer
5656cad97d
Shut up a warning about signed/unsigned.
...
llvm-svn: 33071
2007-01-11 07:58:19 +00:00
Reid Spencer
81accb5f08
Put in some needed \ at the end of lines!!!
...
llvm-svn: 33070
2007-01-11 06:51:56 +00:00
Chris Lattner
550a8f3760
simplify some logic further
...
llvm-svn: 33069
2007-01-11 04:30:21 +00:00
Chris Lattner
5e04332326
Recommit my previous patch with a bugfix: printInfoComment works on both
...
local and global values.
llvm-svn: 33068
2007-01-11 03:54:27 +00:00
Nick Lewycky
5d6ede524a
Quiet compiler warning. The only reason the function is marked virtual
...
is so that it can be called from inside a debugger.
llvm-svn: 33067
2007-01-11 02:38:21 +00:00
Nick Lewycky
2fc338f923
New predicate simplifier!
...
Please do not enable, there is still some known miscompile problem.
llvm-svn: 33066
2007-01-11 02:32:38 +00:00
Devang Patel
3b3f89900e
Add PassManagerType enum.
...
llvm-svn: 33065
2007-01-11 01:10:25 +00:00
Reid Spencer
750f80e306
Avoid taking the address of a macro by checking to see if stdin is defined
...
or not. This allows DynamicLibrary.cpp to compile on Darwin.
llvm-svn: 33064
2007-01-11 00:35:10 +00:00
Reid Spencer
74bd036059
Implement better constant folding of unordered FCMP predicates.
...
llvm-svn: 33063
2007-01-11 00:25:45 +00:00
Devang Patel
15701b5c0d
Robustify assingPassManager() for Module, Function and Basic Block
...
Passes.
Robustify PMStack.push()
Add dump() routine to print PMStack.
llvm-svn: 33062
2007-01-11 00:19:00 +00:00
Reid Spencer
1b2eeedd85
Allow LLI, in interpreter mode, to find stdin, stdout, and stderr. This is
...
a bit of a hack but it lets some of the llvm-test programs run.
llvm-svn: 33058
2007-01-10 19:50:43 +00:00
Reid Spencer
c6c4fab067
Back out the last patch which is a nightly test killer. The assertion
...
in getLocalSlot fires on many, many values. It broke nearly all of
the dejagnu tests. Simple changes to the assertion did not fix the
problem.
llvm-svn: 33054
2007-01-10 09:18:16 +00:00
Chris Lattner
2d56715015
Last refactoring before PR645: split up getSlot into getLocalSlot and getGlobalSlot.
...
No functionality change.
llvm-svn: 33053
2007-01-10 07:01:46 +00:00
Chris Lattner
2cf85c7507
eliminate some iterator gymnastics.
...
llvm-svn: 33052
2007-01-10 06:43:26 +00:00
Reid Spencer
69fb861b19
Change the file header name as this file was renamed.
...
llvm-svn: 33051
2007-01-10 04:17:32 +00:00
Reid Spencer
2972099ff1
Rename Writer.cpp as CBackend.cpp so it doesn't conflict with Writer.cpp
...
in the bytecode writer library. This helps with debugging.
llvm-svn: 33050
2007-01-10 04:16:17 +00:00
Chris Lattner
8571caa99b
Fix a bug in heap-sra that caused compilation failure of office-ispell.
...
llvm-svn: 33043
2007-01-09 23:29:37 +00:00
Reid Spencer
e3db84c6c2
Explain that bitcast can only cast a pointer to another pointer.
...
llvm-svn: 33041
2007-01-09 20:08:58 +00:00
Reid Spencer
1fc9be30ef
For PR1099:
...
Invert the "isSigned" logic in calls to printType and printPrimitiveType.
We want variables to be declared unsigned by default so that signless
operators like + and - perform the unsigned operation that LLVM expects
by default. Parameters with the sext attribute will be declared signed and
signed instructions will case operand values to signed regardless of the
type of the variable. This passes all tests and fixes PR1099.
llvm-svn: 33039
2007-01-09 17:09:09 +00:00
Chris Lattner
04398e8d48
Inline insertValue into CreateModuleSlot/CreateFunctionSlot
...
llvm-svn: 33038
2007-01-09 08:04:59 +00:00
Chris Lattner
721c213c0e
Remove a bunch of complex logic that is completely dead: duplicates can
...
never be inserted!
llvm-svn: 33037
2007-01-09 07:58:11 +00:00
Chris Lattner
ea862a33d9
Split CreateSlot into two versions, one for globals and one for function-local
...
values
llvm-svn: 33036
2007-01-09 07:55:49 +00:00
Chris Lattner
89e774efaa
Remove extraneous return value from insertValue and getOrCreateSlot. Since
...
getOrCreateSlot no longer gets the slot, rename it to CreateSlot.
llvm-svn: 33035
2007-01-09 07:46:21 +00:00
Reid Spencer
bf38bf7143
For PR1099:
...
Partial fix for this PR. Default function parameters to signed integer, just
like everything else in CBE. The bug was caused by incorrectly introducing
parameter attributes feature by choosing "signed" parameter if the
SExtAttribute was specified. Howeer, if no attribute is specified, this
causes it to become unsigned which is incorrect. Reversing the logic so
that signedness is detected by "not ZExtAttribute" set fixes the issue.
This fixes 197.parser but there is more to do. Any comparison and possibly
other operators involving arguments may need to correctly cast the parameter
before its use, depending on the sign of the operator.
llvm-svn: 33034
2007-01-09 06:38:06 +00:00
Reid Spencer
d3ee816c17
Test case for PR1099.
...
llvm-svn: 33033
2007-01-09 06:25:15 +00:00
Chandler Carruth
15719d08cc
Fixing a ">" redirect to be a ">>" redirect, so a sed command doesn't get clobbered.
...
llvm-svn: 33032
2007-01-09 02:38:29 +00:00
Chris Lattner
1b1bb222bd
Add PR number for future reference
...
llvm-svn: 33031
2007-01-09 00:31:52 +00:00
Evan Cheng
232e751988
Fix test case.
...
llvm-svn: 33030
2007-01-09 00:09:34 +00:00
Reid Spencer
a2d9adfa9a
PR1085 is fixed now.
...
llvm-svn: 33029
2007-01-09 00:05:55 +00:00
Evan Cheng
be68c65cf3
Added a test case from PR1075.
...
llvm-svn: 33028
2007-01-08 23:58:27 +00:00
Evan Cheng
0daf445878
Undo xfail now scheduler deficiency has been fixed.
...
llvm-svn: 33027
2007-01-08 23:57:40 +00:00
Evan Cheng
6730f03370
Naming consistency.
...
llvm-svn: 33026
2007-01-08 23:55:53 +00:00
Evan Cheng
961bbd393b
Fix for PR1075: bottom-up register-reduction scheduling actually increases register pressure.
...
- Fixed bugs in sethi-ullman number computation and priority queue comparison
functions.
- Separate code that handles priority computation special cases from SU number computation.
llvm-svn: 33025
2007-01-08 23:50:38 +00:00
Chris Lattner
0199fd6d59
Implement some trivial FP foldings when -enable-unsafe-fp-math is specified.
...
This implements CodeGen/PowerPC/unsafe-math.ll
llvm-svn: 33024
2007-01-08 23:04:05 +00:00
Chris Lattner
8b574a767e
new testcase
...
llvm-svn: 33023
2007-01-08 23:03:19 +00:00
Jim Laskey
3106724a03
Need to handle static declarations properly.
...
llvm-svn: 33022
2007-01-08 22:15:18 +00:00
Jeff Cohen
223004cd12
Unbreak VC++ build.
...
llvm-svn: 33021
2007-01-08 20:17:17 +00:00
Reid Spencer
7254c25fad
Parameter attributes are part of a FunctionType and deserve to be factored
...
into comparisons of two FunctionTypes. Make it so.
llvm-svn: 33020
2007-01-08 19:41:01 +00:00
Reid Spencer
7b6fb56ec0
XFAIL this test until PR1085 mystery is resolved.
...
llvm-svn: 33019
2007-01-08 19:38:58 +00:00
Devang Patel
1c56a638a4
Add PMStack, a Pass Manager stack.
...
Eventually, Top level pass managers will use this to keep track of
active pass managers. Eass pass will also learn how to find appropriate
manager from these managers stack.
llvm-svn: 33018
2007-01-08 19:29:38 +00:00
Devang Patel
73d40ac101
Modules are consumed when they are merged together by Linker.
...
Clear modules vector so that destructure does not try to
delete these modules again. Patch by Chandler Carruth.
llvm-svn: 33017
2007-01-08 18:42:27 +00:00
Andrew Lenharth
0d124b8e00
And asm writing for packed struct initializers
...
llvm-svn: 33016
2007-01-08 18:21:30 +00:00
Andrew Lenharth
e3c5a4cfed
Make packed structs use packed initialiers for consistency
...
llvm-svn: 33015
2007-01-08 18:16:47 +00:00
Andrew Lenharth
25ac8676ca
Packed structs use packed struct initializers
...
llvm-svn: 33014
2007-01-08 18:15:35 +00:00
Chris Lattner
6bff61da4f
testcase for PR1097
...
llvm-svn: 33013
2007-01-08 17:52:29 +00:00
Reid Spencer
8f166b0ef3
Comparison of primitive type sizes should now be done in bits, not bytes.
...
This patch converts getPrimitiveSize to getPrimitiveSizeInBits where it is
appropriate to do so (comparison of integer primitive types).
llvm-svn: 33012
2007-01-08 16:32:00 +00:00
Reid Spencer
bf96e02a54
For PR1097:
...
Enable complex addressing modes on 64-bit platforms involving two induction
variables by keeping a size and scale in 64-bits not 32.
Patch by Dan Gohman.
llvm-svn: 33011
2007-01-08 16:17:51 +00:00
Reid Spencer
c0b86d5dc4
For PR1090:
...
Clean up the definitions of the helper functions per Chris' review
suggestions so they are easier to read.
For PR1091:
Print minimum signed integer values as unsigned so that we get no warnings
from the C compiler about constant ranges and value comparisons.
llvm-svn: 33010
2007-01-08 08:00:00 +00:00
Chris Lattner
db0790c2fd
Fully specify the type of the llvm.va* intrinsics. This helps resolve
...
Pr1093
llvm-svn: 33009
2007-01-08 07:55:15 +00:00
Chris Lattner
e05182cd1e
fix atexit. This is an overcomplex way of calling exit, but it is required,
...
as the jit intercepts exit calls to implement atexit handlers. This
fixes SingleSource/UnitTests/2003-05-14-AtExit
llvm-svn: 33008
2007-01-08 07:36:34 +00:00
Reid Spencer
13cae7c2a7
Fix PR1090:
...
Implemented some llvm_fcmp_{pred} functions at the start of the function bodies
and use them for fcmp instructions and constant expressions. These help
implement the ordered and unordered comparisons necessary for correct exectuion
of these comparisons.
llvm-svn: 33007
2007-01-08 06:58:32 +00:00
Chandler Carruth
b2d4caaaa8
Build libLLVMlto on non-Darwin architectures. Resolves PR1055: http://llvm.org/PR1055
...
llvm-svn: 33006
2007-01-08 06:25:29 +00:00
Reid Spencer
23414c0033
Fix a bug in an assert that would never trigger.
...
llvm-svn: 33005
2007-01-08 05:34:39 +00:00
Chandler Carruth
52b15458d4
Testing commit, and adding an entry to CREDITS.TXT
...
llvm-svn: 33004
2007-01-08 03:10:00 +00:00
Reid Spencer
7928c2fb9c
Convert uses of getPrimitiveSize that should be getPrimitiveSizeInBits.
...
llvm-svn: 33003
2007-01-08 01:26:33 +00:00
Reid Spencer
4ef2c1c705
llvm.isunordered.* are gone.
...
llvm-svn: 33002
2007-01-07 23:30:23 +00:00
Reid Spencer
4f98e62831
Types should be const.
...
llvm-svn: 33001
2007-01-07 21:45:41 +00:00
Reid Spencer
968a5290f3
Redefinition of functions is no longer permitted.
...
llvm-svn: 33000
2007-01-07 19:33:49 +00:00
Chris Lattner
47d012e1c0
the old trace values pass has been removed, remove its runtime library.
...
llvm-svn: 32999
2007-01-07 18:13:48 +00:00
Chris Lattner
950d0e9926
this pass is unused
...
llvm-svn: 32998
2007-01-07 18:12:43 +00:00
Chris Lattner
9416cba610
remove an old instrumentation pass that is not used anymore.
...
llvm-svn: 32997
2007-01-07 18:12:13 +00:00
Chris Lattner
65842fe4cd
llvm.isunordered is no longer alive.
...
llvm-svn: 32995
2007-01-07 08:53:26 +00:00
Chris Lattner
2a116abf3a
llvm 2.0 doesn't support llvm.isunordered.*
...
llvm-svn: 32994
2007-01-07 08:52:43 +00:00
Chris Lattner
59585a61fc
relax type
...
llvm-svn: 32993
2007-01-07 08:39:27 +00:00
Chris Lattner
10cae15d8e
remove support for llvm.isunordered
...
llvm-svn: 32992
2007-01-07 08:37:22 +00:00
Chris Lattner
d0c91e1c2e
remove llvm.isunordered
...
llvm-svn: 32991
2007-01-07 08:19:47 +00:00
Chris Lattner
7b864c0d9e
relax type
...
llvm-svn: 32990
2007-01-07 08:13:39 +00:00
Chris Lattner
34acba48cc
Change the interface to Module::getOrInsertFunction to be easier to use,to resolve PR1088, and to help PR411.
...
This simplifies many clients also
llvm-svn: 32989
2007-01-07 08:12:01 +00:00
Chris Lattner
505c06b739
Change the interface to Module::getOrInsertFunction to be easier to use,
...
to resolve PR1088, and to help PR411.
llvm-svn: 32988
2007-01-07 08:09:25 +00:00
Reid Spencer
1d48a8b9fb
Regenerate.
...
llvm-svn: 32987
2007-01-07 08:07:39 +00:00
Reid Spencer
2af5100b53
Upgrade the llvm.isunordered intrinsics to "fcmp uno" instruction.
...
llvm-svn: 32986
2007-01-07 08:07:10 +00:00
Chris Lattner
d97f1936bb
prepare for adjustment to getOrInsertFunction method
...
llvm-svn: 32985
2007-01-07 07:54:34 +00:00
Chris Lattner
b800b3921c
add some casts to support a change in the getOrInsertFunction interface
...
llvm-svn: 32984
2007-01-07 07:40:09 +00:00
Chris Lattner
f7eef61f20
relax type
...
llvm-svn: 32983
2007-01-07 07:24:32 +00:00
Chris Lattner
cc4715e06e
relax some types
...
llvm-svn: 32982
2007-01-07 07:22:20 +00:00
Chris Lattner
9641ab26ec
relax types
...
llvm-svn: 32981
2007-01-07 06:59:47 +00:00
Chris Lattner
fbc524fe87
relax some types
...
llvm-svn: 32980
2007-01-07 06:58:05 +00:00
Chris Lattner
cd65cf6095
remove support for old-style varargs upgrading
...
llvm-svn: 32979
2007-01-07 06:45:57 +00:00
Chris Lattner
bc3ffdda4c
this is an overcomplex way to call exit :)
...
llvm-svn: 32978
2007-01-07 06:43:08 +00:00
Reid Spencer
96b3ffe309
Add a test case for PR1086
...
llvm-svn: 32977
2007-01-07 03:27:39 +00:00
Reid Spencer
df7c61da7e
For PR1086:
...
Parameter attributes do have to be specially handled in the CBE. Implement
their handling.
llvm-svn: 32976
2007-01-07 03:24:48 +00:00
Chris Lattner
783c1c47a5
Simplify the testcase
...
llvm-svn: 32975
2007-01-07 02:28:52 +00:00
Chris Lattner
18954852ae
Fix PR1015 and Transforms/IndVarsSimplify/2007-01-06-TripCount.ll, a
...
miscompilation of Qt.
llvm-svn: 32974
2007-01-07 02:24:26 +00:00
Chris Lattner
a4c150b69e
Testcase for PR1015
...
llvm-svn: 32973
2007-01-07 02:24:10 +00:00
Chris Lattner
39087c7127
cast of int to bool no longer does a compare, rendering this fixme
...
obsolete
llvm-svn: 32972
2007-01-07 02:05:20 +00:00
Chris Lattner
0816559b13
add -debug output for -indvars.
...
llvm-svn: 32971
2007-01-07 01:14:12 +00:00
Reid Spencer
9e224a2533
Update the documentation for SymbolTable class.
...
llvm-svn: 32970
2007-01-07 00:41:39 +00:00
Anton Korobeynikov
a9ab10942d
As PR1085 was fixed, back out workaround
...
llvm-svn: 32969
2007-01-07 00:41:20 +00:00
Chris Lattner
f6e91576dc
Testcase for PR1085
...
llvm-svn: 32968
2007-01-07 00:32:15 +00:00
Chris Lattner
6a10713fea
New testcase for PR1084
...
llvm-svn: 32967
2007-01-07 00:02:20 +00:00
Chris Lattner
7fab842b1f
Add C wrappers for the LTO library (PR1081). Patch by Chandler Carruth!
...
llvm-svn: 32966
2007-01-06 23:53:43 +00:00
Chris Lattner
350563eba7
fix typo
...
llvm-svn: 32965
2007-01-06 23:51:31 +00:00
Chris Lattner
5967600442
testcase for pr1083
...
llvm-svn: 32964
2007-01-06 23:38:37 +00:00
Chris Lattner
dff39e53f1
wow, the link was already broken :)
...
llvm-svn: 32963
2007-01-06 23:20:51 +00:00
Chris Lattner
8a7183b5b8
add a note
...
llvm-svn: 32962
2007-01-06 23:19:38 +00:00
Chris Lattner
72a56fc44c
Disable the macho writer until it is 100% functional. Enabling it when
...
broken invites bug reports.
llvm-svn: 32961
2007-01-06 22:27:58 +00:00
Chris Lattner
67a1ef647a
this testcase is too large to be useful, and requires a .bc file to be
...
kept around. We can do without it.
llvm-svn: 32960
2007-01-06 22:02:26 +00:00
Chris Lattner
7051d758de
Fix regressions in InstCombine/call-cast-target.ll and InstCombine/2003-11-13-ConstExprCastCall.ll
...
llvm-svn: 32959
2007-01-06 19:53:32 +00:00
Anton Korobeynikov
bb162f48ba
gcc often inserts it's own names for sections (e.g.
...
gnu.linkonce.t.FunctionName). Convert them to "normal" LLVM names,
otherwise linker won't be able to merge them.
llvm-svn: 32958
2007-01-06 18:24:26 +00:00
Reid Spencer
aeeeaea5a3
Regenerate for new bytecode file format.
...
llvm-svn: 32957
2007-01-06 07:28:52 +00:00
Reid Spencer
32af9e8cc5
For PR411:
...
Take an incremental step towards type plane elimination. This change
separates types from values in the symbol tables by finally making use
of the TypeSymbolTable class. This yields more natural interfaces for
dealing with types and unclutters the SymbolTable class.
llvm-svn: 32956
2007-01-06 07:24:44 +00:00
Reid Spencer
ebbbbf6273
Regenerate.
...
llvm-svn: 32955
2007-01-06 06:04:32 +00:00
Reid Spencer
ba19a40e8c
Accomodate new name manglinge done by llvm-upgrade
...
llvm-svn: 32954
2007-01-06 06:04:04 +00:00
Reid Spencer
cf025ad44a
For PR1082:
...
Solve several related problems by making variable names more unique and
dealing with recursive phi nodes. Unfortunately, this doesn't solve the
main issue reported in the PR, but its a step in that direction.
llvm-svn: 32953
2007-01-06 06:03:09 +00:00
Reid Spencer
5f678a48ff
Currently, there is no fix for this.
...
llvm-svn: 32952
2007-01-06 05:16:27 +00:00
Reid Spencer
d0842cdeca
Test case for PR1082, an llvm-upgrade bug.
...
llvm-svn: 32951
2007-01-06 05:15:27 +00:00
Reid Spencer
780d4abb8c
Add an option for getting the C compiler flags, --cflags.
...
Patch contributed by Chandler Carruth
llvm-svn: 32950
2007-01-06 02:48:03 +00:00
Chris Lattner
c343a99786
this final call to canLosslesslyBitCastTo is dead, because ValueRequiresCast
...
is only called on integers.
llvm-svn: 32949
2007-01-06 02:11:56 +00:00
Chris Lattner
400f959a0c
simplify some more code now that there are not multiple different integer
...
types of the same size
llvm-svn: 32948
2007-01-06 02:09:32 +00:00
Chris Lattner
64d87b0215
eliminate some uses of canLosslesslyBitCastTo, this actually makes the code stronger, by nuking
...
relational pointer comparisons with casts.
llvm-svn: 32947
2007-01-06 01:45:59 +00:00
Chris Lattner
3fe98ae10a
no need to worry about int vs uint any more.
...
llvm-svn: 32946
2007-01-06 01:37:35 +00:00
Chris Lattner
af31398295
new note
...
llvm-svn: 32945
2007-01-06 01:30:45 +00:00
Reid Spencer
5f92611284
Regenerate
...
llvm-svn: 32944
2007-01-06 00:23:53 +00:00
Reid Spencer
b82bb9b903
Test Case for PR1080.
...
llvm-svn: 32943
2007-01-06 00:22:38 +00:00
Reid Spencer
bfa5df2604
For PR1080:
...
Emit the correct syntax for icmp and fcmp constant expressions. The
predicate goes outside the parentheses not inside. This was a change made
in the assembler without the corresponding change made in llvm-upgrade.
llvm-svn: 32942
2007-01-06 00:12:05 +00:00
Evan Cheng
8bc7ddb84d
setSetCCIsExpensive is gone.
...
llvm-svn: 32941
2007-01-05 23:42:53 +00:00
Evan Cheng
5f80c450f3
Expand fcopysign to the bitwise sequence if select is marked as expensive.
...
llvm-svn: 32940
2007-01-05 23:33:44 +00:00
Evan Cheng
549163707c
- Remove isSetCCExpensive() etc. These are no longer used.
...
- Add isSelectExpensive() etc. It's used to tell codegen that select is expensive for a given target, avoid using it if possible. Currently it's only
used to expand FCOPYSIGN.
llvm-svn: 32939
2007-01-05 23:31:08 +00:00
Devang Patel
b66334b73b
1) Remove old AnalysisResolver.
...
2) Rename AnalysisResolver_New as AnalysisResolver
llvm-svn: 32938
2007-01-05 22:47:07 +00:00
Reid Spencer
9329c5f06b
Fix dependencies. The lexer depends on the grammar for the UpgradeParser.h
...
file so make it depend on the .y file as well. This ensures that in
parallel builds the lexer is built after bison runs.
llvm-svn: 32937
2007-01-05 22:03:42 +00:00
Evan Cheng
97cbd70494
Update test case.
...
llvm-svn: 32936
2007-01-05 21:53:15 +00:00
Reid Spencer
f7d59e282d
For PR1077:
...
Remove the XFAIL now that global redefinitions are not permitted.
llvm-svn: 32935
2007-01-05 21:51:57 +00:00
Reid Spencer
3325908643
Regenerate.
...
llvm-svn: 32934
2007-01-05 21:51:07 +00:00
Reid Spencer
6c435f0fa0
For PR1077:
...
Disallow merging of dupliate global variables. It is now illegal to declare
or define two global variables of the same name and same type. llvm-gcc3 is
dead in 2.0 and llvm-gcc4 doesn't have that problem nor need the hack.
llvm-svn: 32933
2007-01-05 21:50:38 +00:00
Evan Cheng
82241c86e9
- FCOPYSIGN custom lowering bug. Clear the sign bit of operand 0 first before
...
or'ing in the sign bit of operand 1.
- Tweaking: rather than left shift the sign bit, fp_extend operand 1 first
before taking its sign bit if its type is smaller than that of operand 0.
llvm-svn: 32932
2007-01-05 21:37:56 +00:00
Reid Spencer
db94353bff
Add an example to the trunc instruction to clarify trunc to bool.
...
Example provided by Baptiste Lepilleur.
llvm-svn: 32931
2007-01-05 21:33:08 +00:00
Evan Cheng
3b841ddbe0
Bug in ExpandFCOPYSIGNToBitwiseOps(). Clear the old sign bit of operand 0
...
before or'ing in the sign bit of operand 1.
llvm-svn: 32930
2007-01-05 21:31:51 +00:00
Evan Cheng
376c9c4c97
CopyToReg source operand can be a register as well. e.g. Copy from GlobalBaseReg.
...
llvm-svn: 32929
2007-01-05 20:59:06 +00:00
Devang Patel
20f9e22ae2
Remove PassManagerT.h
...
llvm-svn: 32928
2007-01-05 20:21:13 +00:00
Devang Patel
c6b5a554a4
Remove old pass manager.
...
llvm-svn: 32927
2007-01-05 20:16:23 +00:00
Reid Spencer
d35f7d9240
This test case needs parameter attributes, manually upgrade and don't
...
run llvm-upgrade.
llvm-svn: 32926
2007-01-05 18:38:33 +00:00
Reid Spencer
ad3398ce7d
Global variables are not renamed by llvm-upgrade any more.
...
llvm-svn: 32925
2007-01-05 18:37:18 +00:00
Reid Spencer
b4d32e8bcd
Update for change in parameter attribute syntax.
...
llvm-svn: 32924
2007-01-05 18:35:52 +00:00
Reid Spencer
adabc4b5b8
Update for change in parameter attributes syntax.
...
llvm-svn: 32923
2007-01-05 18:34:20 +00:00
Reid Spencer
f72ca86125
Wrap long RUN: line.
...
llvm-svn: 32922
2007-01-05 18:33:43 +00:00
Reid Spencer
a3188cfe06
Globals are not renamed any more.
...
llvm-svn: 32921
2007-01-05 18:33:16 +00:00
Reid Spencer
c82fade7b2
This test case needs zext and sext attributes so manually upgrade it and
...
don't run llvm-upgrade.
llvm-svn: 32920
2007-01-05 18:31:56 +00:00
Reid Spencer
1cc9bbd5a3
Changes to parameter attribute syntax.
...
llvm-svn: 32919
2007-01-05 17:41:34 +00:00
Reid Spencer
791fbf64fc
Changes to parameter attributes syntax.
...
llvm-svn: 32918
2007-01-05 17:40:40 +00:00
Reid Spencer
629aff553a
Globals are not being renamed any more.
...
llvm-svn: 32917
2007-01-05 17:39:54 +00:00
Reid Spencer
ba1ad0236a
This test case has been translated to 2.0 assembly so don't run
...
llvm-upgrade on it.
llvm-svn: 32916
2007-01-05 17:39:07 +00:00
Reid Spencer
ec18a463d7
Fix this to check for the correct error message.
...
llvm-svn: 32915
2007-01-05 17:37:59 +00:00
Reid Spencer
ab9842ea8b
This tests for something that will become illegal soon. The test/Feature
...
suite has a test for renaming of global variables.
llvm-svn: 32914
2007-01-05 17:36:59 +00:00
Reid Spencer
c01fe62caa
Beef up this test case a little by introducing a global variable name
...
conflict after upgrade resulting from collapsed type planes. The test now
checks to make sure llvm-upgrade produces appropriate warning messages.
llvm-svn: 32913
2007-01-05 17:35:05 +00:00
Reid Spencer
0ea405d0eb
Make this test that we can drop the implementation keyword for llvm-as.
...
llvm-upgrade is irrelevant for this test case.
llvm-svn: 32912
2007-01-05 17:29:41 +00:00
Reid Spencer
6acdd1973d
Fix the test case for the change in parameter attribute syntax. The @ is
...
no longer needed and the @(...) syntax has been dropped in favor of a
simple space separated list of attribute names.
llvm-svn: 32911
2007-01-05 17:26:04 +00:00
Reid Spencer
6bcc22ce57
For PR1077:
...
Split this test case into three cases. globalredefinition.ll just tests
that a global can be forward referenced. globalredefinition2.ll tests
that llvm-upgrade will warn about renaming duplicate global variables.
globalredefinition3.ll tests that llvm-as will generate an error on
duplicate global variables. This last test is currently XFAIL because
the restriction is not implemented yet.
llvm-svn: 32910
2007-01-05 17:25:12 +00:00
Reid Spencer
fc899e6f74
For PR1077:
...
Global variable definitions with the same name and same type are no longer
valid so don't attempt to test for this "feature".
llvm-svn: 32909
2007-01-05 17:22:13 +00:00
Reid Spencer
02165c634e
Regenerate
...
llvm-svn: 32908
2007-01-05 17:20:02 +00:00
Reid Spencer
9ca1b589af
Adjust to new header file name.
...
llvm-svn: 32907
2007-01-05 17:19:32 +00:00
Reid Spencer
6ee573f523
Major update of llvm-upgrade:
...
1. Completely revise the type system so that types are handled as const
objects and not created multiple times, cloned, or otherwise copied.
This gets around memory issues, saves memory, and also emulates LLVM's
no-two-types-of-the-same-shape-created semantics.
2. Adjust the handling of global names. Basically, we cannot rename them
for a variety of reasons: linking, forward references, etc.
3. Detect global names that have name conflicts as the result of collapsed
type planes or redefinitions that llvm-as no longer accepts. These will
produce warnings on stderr and one of the globals will be renamed.
4. Rename ParserInternals.h as UpgradeInternals.h so it doesn't conflict
in the debugger with ParserInternals.h from lib/AsmParser.
5. Move the guts of the TypeInfo class into the grammar so we aren't
implementing large functions in a header file. This also helps with
debugging a bit.
llvm-svn: 32906
2007-01-05 17:18:58 +00:00
Reid Spencer
bf48e3c87d
Regenerate.
...
llvm-svn: 32905
2007-01-05 17:07:23 +00:00
Reid Spencer
136a91c4e7
Change the syntax for parameter attributes:
...
1. The @ sign is no longer necessary.
2. We now support "function attributes" as parameter attribute 0.
3. Instead of locating the return type attributes after the type of a
function result, they are now located after the function header's
closing paranthesis and before any alignment or section options.
4. The way has been prepared for a new "noreturn" function attribute but
there is no support for recognizing it in the lexer nor doing anything
with it if it does get set.
5. The FunctionType::getParamAttrsText method now has support for
returning multiple attributes. This required a change in its interface.
I'm unhappy that this change leads to 6 new shift/reduce conflicts, but
in each case bison's decision to choose the shift is correct so there
shouldn't be any damage from these conflicts.
llvm-svn: 32904
2007-01-05 17:06:19 +00:00
Reid Spencer
edd3ad549a
Give the assembler some input.
...
llvm-svn: 32903
2007-01-05 16:45:06 +00:00
Evan Cheng
8c7094a770
Typo
...
llvm-svn: 32902
2007-01-05 08:32:24 +00:00
Evan Cheng
e8345f2445
Add a test case for SSE fcopysign using SSE bitwise operations.
...
llvm-svn: 32901
2007-01-05 08:12:59 +00:00
Evan Cheng
4363e884c0
With SSE2, expand FCOPYSIGN to a series of SSE bitwise operations.
...
llvm-svn: 32900
2007-01-05 07:55:56 +00:00
Chris Lattner
d7b6ea166d
Implement InstCombine/vec_shuffle.ll:%test7, simplifying shuffles with
...
undef operands.
llvm-svn: 32899
2007-01-05 07:36:08 +00:00
Chris Lattner
e4f7c5cf35
new test
...
llvm-svn: 32898
2007-01-05 07:35:24 +00:00
Chris Lattner
dc1e33ace7
manually upgrade this testcase
...
llvm-svn: 32897
2007-01-05 07:34:41 +00:00
Chris Lattner
17c7c030c2
fold things like a^b != c^a -> b != c. This implements InstCombine/xor.ll:test27
...
llvm-svn: 32893
2007-01-05 03:04:57 +00:00
Chris Lattner
130fff0d03
new testcase
...
llvm-svn: 32892
2007-01-05 03:03:51 +00:00
Chris Lattner
54ea1ec249
llvm upgrade doesn't accept 'define'
...
llvm-svn: 32891
2007-01-05 03:03:27 +00:00
Chris Lattner
23eb8ec78b
Compile X + ~X to -1. This implements Instcombine/add.ll:test34
...
llvm-svn: 32890
2007-01-05 02:17:46 +00:00
Chris Lattner
ce0f91ebd6
new testcase
...
llvm-svn: 32889
2007-01-05 02:16:36 +00:00
Evan Cheng
8ec5283dc4
GEP subscript is interpreted as a signed value.
...
llvm-svn: 32888
2007-01-05 01:46:20 +00:00
Reid Spencer
92c671e77e
Correct the documentation for function declarations. They can have dllimport
...
or extern_weak linkage as well as "externally visible".
llvm-svn: 32887
2007-01-05 00:59:10 +00:00
Chris Lattner
a0e341f429
add missing flags
...
llvm-svn: 32885
2007-01-04 23:18:14 +00:00
Chris Lattner
96035bed51
fix PowerPC/2007-01-04-ArgExtension.ll, a bug handling K&R prototypes with
...
the recent signless changes.
llvm-svn: 32884
2007-01-04 22:22:37 +00:00
Chris Lattner
447a9dd56e
new testcase
...
llvm-svn: 32883
2007-01-04 22:22:07 +00:00
Chris Lattner
bc5cc2e7fa
Fix broken links, reported by Baptiste Lepilleur
...
llvm-svn: 32882
2007-01-04 22:01:45 +00:00
Evan Cheng
003feb03d5
Expand fcopysign to a series of bitwise of operations when it's profitable to
...
do so.
llvm-svn: 32881
2007-01-04 21:56:39 +00:00
Chris Lattner
c205585943
regenerate
...
llvm-svn: 32880
2007-01-04 18:46:42 +00:00
Chris Lattner
a0058929bc
If we hit a parse error, emit something bad to the output stream. This ensures that
...
llvm-upgrade < foo | llvm-as | llvm-dis
will fail if llvm-upgrade fails.
llvm-svn: 32879
2007-01-04 18:45:51 +00:00
Reid Spencer
8392ed123a
Document this tool as experimental and list its deficiencies.
...
llvm-svn: 32878
2007-01-04 17:55:11 +00:00
Chris Lattner
11c822d053
remove the 'protected' workaround now that we don't care about gcc 2.95 anymore.
...
Reid already did this for FunctionType, this just cleans the rest up.
llvm-svn: 32877
2007-01-04 17:50:42 +00:00
Chris Lattner
354a911b90
remove xfailed test that depends on obsolete argument to lli
...
llvm-svn: 32876
2007-01-04 17:47:42 +00:00
Reid Spencer
2c3d9e64b7
Remove a manual renaming of a variable that was introduced before
...
llvm-upgrade could properly handle collapsed type planes.
llvm-svn: 32875
2007-01-04 16:46:46 +00:00
Reid Spencer
3e628eb989
Clean up usage of "unsigned" and "signed" in the documentation to indicate
...
only that specific instructions regard their operands as signed and
unsigned not that the operands *are* signed or unsigned.
llvm-svn: 32874
2007-01-04 16:43:23 +00:00
Lauro Ramos Venancio
4464d208de
Add test for constructor and destructor sections.
...
llvm-svn: 32873
2007-01-04 14:41:33 +00:00
Lauro Ramos Venancio
697f86bbe3
Add extload(i1) test.
...
llvm-svn: 32872
2007-01-04 14:27:21 +00:00
Lauro Ramos Venancio
8c45da0664
Add test for FCOPYSIGN.
...
llvm-svn: 32871
2007-01-04 14:24:32 +00:00
Lauro Ramos Venancio
7284073ec2
Expand SELECT (f32/f64) and FCOPYSIGN (f32/f64).
...
llvm-svn: 32870
2007-01-04 14:01:38 +00:00
Bill Wendling
4d95e91eca
Removed reference to "cnull" because typical users shouldn't need to use
...
it.
llvm-svn: 32869
2007-01-04 08:38:04 +00:00
Chris Lattner
424d4dc713
ding dong llvm-gcc3 is dead
...
llvm-svn: 32868
2007-01-04 07:08:27 +00:00
Chris Lattner
13ce918505
gcc 4.1.1 on amd64 is broken
...
llvm-svn: 32867
2007-01-04 07:06:05 +00:00
Reid Spencer
6ff3e73db6
Death to useless bitcast instructions!
...
llvm-svn: 32866
2007-01-04 05:23:51 +00:00
Reid Spencer
438f562e56
Do not allow packed types for icmp and fcmp instructions.
...
llvm-svn: 32865
2007-01-04 05:22:18 +00:00
Reid Spencer
784ef79b55
icmp and fcmp do not take packed type operands.
...
llvm-svn: 32864
2007-01-04 05:19:58 +00:00
Reid Spencer
1434f95410
XFAIL this test until such time that code gen can handle a comparison of
...
packed types.
llvm-svn: 32863
2007-01-04 03:06:23 +00:00
Reid Spencer
494289f70e
Regenerate.
...
llvm-svn: 32862
2007-01-04 02:57:52 +00:00
Reid Spencer
8a1be97a9e
Disallow packed types in icmp/fcmp instructions. The code generator is
...
not prepared to handle them yet.
llvm-svn: 32861
2007-01-04 02:57:22 +00:00
Chris Lattner
f96f4492e0
Now that setcondinst has been eliminated, we can mark Value::SubclassID
...
const and remove the ugly mutator methods.
llvm-svn: 32860
2007-01-04 02:15:37 +00:00
Chris Lattner
858f4e9362
fix typo
...
llvm-svn: 32859
2007-01-04 02:13:20 +00:00
Chris Lattner
806adafd95
Enable a couple xforms for packed vectors (undef | v) -> -1 for packed.
...
llvm-svn: 32858
2007-01-04 02:12:40 +00:00
Chris Lattner
26f13eb1f3
fix some bugs handling vectors, avoid host-specific handling of undefined shift results.
...
llvm-svn: 32857
2007-01-04 01:56:39 +00:00
Chris Lattner
ecab54cfc0
Add a new ConstantPacked::getAllOnesValue method
...
llvm-svn: 32856
2007-01-04 01:49:26 +00:00
Devang Patel
2f0b276731
Enable new pass manager, which was accidentally disabled.
...
llvm-svn: 32855
2007-01-04 01:27:03 +00:00
Reid Spencer
836567a9d8
Add a test to ensure that we can assembly comparisons of packed values.
...
llvm-svn: 32854
2007-01-04 00:29:09 +00:00
Reid Spencer
ca3d1cb840
Regenerate.
...
llvm-svn: 32853
2007-01-04 00:06:14 +00:00
Reid Spencer
4eda71eec1
Permit icmp and fcmp to have packed operands.
...
Make an error message a little more useful.
llvm-svn: 32852
2007-01-04 00:05:48 +00:00
Reid Spencer
6fb16b1bce
Test @zext and @sext fully as well as testing the "short" call syntax.
...
llvm-svn: 32851
2007-01-04 00:03:37 +00:00
Reid Spencer
724ffc6cd0
Add a test case to test parameter attributes feature.
...
llvm-svn: 32850
2007-01-03 23:54:02 +00:00
Reid Spencer
db879b6013
Update test cases that grepped for register names that have now changed
...
as a result of llvm-upgrade handling collapsed type planes better.
llvm-svn: 32849
2007-01-03 23:47:29 +00:00
Reid Spencer
844c7121c7
Regenerate.
...
llvm-svn: 32848
2007-01-03 23:45:42 +00:00
Reid Spencer
66ed21c213
Implement many new type features including upreferences, proper retention
...
of structure contents, counts of packed and array types, etc.
llvm-svn: 32847
2007-01-03 23:45:17 +00:00
Reid Spencer
c13fac5526
Finish implementation of variable renaming to handle collapsed type planes
...
by correctly handling up references and enumerated types. Previously there
was some confusion of these two. Thanks to Chris Lattner for demistifying
llvm up references.
llvm-svn: 32846
2007-01-03 23:43:55 +00:00
Bill Wendling
4ec17c3951
The previous implementation of LLVM Streams wasn't removing symbols. This
...
one should.
llvm-svn: 32845
2007-01-03 22:37:27 +00:00
Reid Spencer
bf671f17cb
Fix a configure warning noticed by Duncan Sands.
...
llvm-svn: 32844
2007-01-03 20:59:52 +00:00
Reid Spencer
b8f3fe8ec5
Remove the find_rule label from the output of flex. This will break any
...
use of the REJECT macro but we don't use it. This just hushes up a warning
in the presence of -Wno-unused.
llvm-svn: 32843
2007-01-03 19:56:14 +00:00
Chris Lattner
f9cf05370f
fix testcase. It's not safe to strictly evaluate a load that should be lazy.
...
llvm-svn: 32842
2007-01-03 19:12:31 +00:00
Chris Lattner
4889a7af36
Private labels start with .L on linux, not just .
...
llvm-svn: 32841
2007-01-03 18:16:48 +00:00
Reid Spencer
e87b5e9825
Fix a comment that referred to the now defunct ubyte type.
...
llvm-svn: 32840
2007-01-03 17:24:59 +00:00
Reid Spencer
fb4070521a
Remove two useless bit casts.
...
llvm-svn: 32839
2007-01-03 17:24:11 +00:00
Reid Spencer
95c466a52b
It is no longer permissible to have undefined types in function parameters.
...
Just fix it by defining the type as opaque.
llvm-svn: 32838
2007-01-03 17:03:48 +00:00
Reid Spencer
98fd5eb48c
Fix this test case. It is no longer permissible to have undefined types
...
in function parameters. Fix by just defining the type as opaque.
llvm-svn: 32837
2007-01-03 17:01:18 +00:00
Reid Spencer
e6f81876eb
Legalizer doesn't do an ANY_EXTEND if we don't ask for one so make sure
...
that we default to an ANY_EXTEND if no parameter attribute is set on the
result value of a function.
llvm-svn: 32836
2007-01-03 16:49:33 +00:00
Jim Laskey
7601f2f36e
NULL names should pass validation.
...
llvm-svn: 32835
2007-01-03 13:46:20 +00:00
Jim Laskey
751314fab9
Silence warning.
...
llvm-svn: 32834
2007-01-03 13:36:40 +00:00
Anton Korobeynikov
4efbbc963f
Really big cleanup.
...
- New target type "mingw" was introduced
- Same things for both mingw & cygwin are marked as "cygming" (as in
gcc)
- .lcomm is supported here, so allow LLVM to use it
- Correctly use underscored versions of setjmp & _longjmp for both mingw
& cygwin
llvm-svn: 32833
2007-01-03 11:43:14 +00:00
Evan Cheng
a50e3919b1
A bit more debugging printf's.
...
llvm-svn: 32832
2007-01-03 07:44:30 +00:00
Reid Spencer
2a34b91666
Restore previous behavior of defaulting to ZEXT. This works around two
...
things: (1) preventing PR1071 and (2) working around missing parameter
attributes for bool type. (2) will be fixed shortly. When PR1071 is fixed,
this patch should be undone.
llvm-svn: 32831
2007-01-03 05:03:05 +00:00
Reid Spencer
0917adf614
Two changes:
...
1. Switch expression and cases are compared signed and are sign extended.
2. For function results needing extended, do SIGN_EXTEND if the SExtAttribute
is set and ZERO_EXTEND if the ZExtAttribute is set, otherwise just let
the Legalizer do ANY_EXTEND.
This fixes the recent regression in kimwitu++ and probably the llvm-gcc
bootstrap issue we had today.
llvm-svn: 32830
2007-01-03 04:25:33 +00:00
Reid Spencer
791864c6a5
Clean up from recent changes. Comment the new parameter to ExpandLibCall.
...
Consolidate some lines of code and remove duplication.
llvm-svn: 32829
2007-01-03 04:22:32 +00:00
Reid Spencer
a6fda18b13
Fix this test cases to use parameter attributes for its parameter and
...
result types. These tests are checking for sext behavior and it won't
happen unless requested with the parameter attribute.
llvm-svn: 32828
2007-01-03 04:20:23 +00:00
Jim Laskey
c4ba9c161b
Vectors are not supported by ConstantInt::getAllOnesValue.
...
llvm-svn: 32827
2007-01-03 00:11:03 +00:00
Reid Spencer
ab2fccd9eb
This test case previously passed the assembler without error even though
...
it used an undefined type name as a parameter argument. This bug in the
assembler has been fixed and it is now necessary to define the type.
llvm-svn: 32826
2007-01-02 21:56:26 +00:00
Reid Spencer
87622ae03d
Regenerate.
...
llvm-svn: 32825
2007-01-02 21:54:12 +00:00
Reid Spencer
6130ae0000
Implement checking for unresolved types in the argument types and result
...
type of function definitions.
This fixes test/Regression/Assember/2007-01-02-Undefined-Arg-Type.ll
llvm-svn: 32824
2007-01-02 21:53:43 +00:00
Evan Cheng
74b46e8c05
Fix naming inconsistency.
...
llvm-svn: 32823
2007-01-02 21:33:40 +00:00
Evan Cheng
92484c2aa4
- Fixing naming inconsistency: calleesave -> calleesaved.
...
- Make use of spillCalleeSavedRegisters() and restoreCalleeSavedRegisters().
llvm-svn: 32822
2007-01-02 21:31:15 +00:00
Evan Cheng
07140c22c7
Fix naming inconsistency: calleesave -> calleesaved.
...
llvm-svn: 32821
2007-01-02 21:30:17 +00:00
Evan Cheng
f43d679951
Add virtual method spillCalleeSaveRegisters() and restoreCalleeSaveRegisters()
...
to MRegisterInfo. These allow the target to issue instructions to spill and
restore callee saved registers in case where individual stores / loads aren't
the correct / profitable choice.
llvm-svn: 32820
2007-01-02 20:55:17 +00:00
Reid Spencer
42a1cb7c0c
Add a test case for abstract parameter and result types in function
...
definitions. The assembler should produce an error on this input.
llvm-svn: 32819
2007-01-02 20:47:51 +00:00
Jim Laskey
a131cf78ad
PR1068 - Unbounded array debug info.
...
llvm-svn: 32818
2007-01-02 11:53:52 +00:00
Reid Spencer
03c80e72d1
Regenerate.
...
llvm-svn: 32817
2007-01-02 06:34:08 +00:00
Reid Spencer
77283c18a1
Permit signed and unsigned integer constants to be used with either signed
...
or unsigned integer types.
llvm-svn: 32816
2007-01-02 06:33:02 +00:00
Reid Spencer
e9da1b0ae0
For PR1070:
...
Tweak the RUN: lines of these tests to accommodate the renaming of
variables done by llvm-upgrade. The renaming occurs as a result of avoiding
name collisons for collapsed type planes. Conflicting names have a .u
(unsigned) or .s (signed) suffix added. This patch updates the grep
expression to accommodate the new names.
llvm-svn: 32815
2007-01-02 05:55:05 +00:00
Reid Spencer
9f7ab3a3cd
For PR1070:
...
Revert previous patch now that llvm-upgrade can handle collapsed type
plane conversion properly.
llvm-svn: 32814
2007-01-02 05:53:06 +00:00
Reid Spencer
5b353d3116
Manually upgrade this test case to make sure that the new cast-to-bool
...
semantics are retained.
llvm-svn: 32813
2007-01-02 05:50:11 +00:00
Reid Spencer
f8e060f589
For PR1070:
...
Add a test case to ensure that llvm-upgrade retains correct semantics
for the previous definition of "cast to bool" which compared against null.
llvm-svn: 32812
2007-01-02 05:48:32 +00:00
Reid Spencer
62ad3bbd4c
Regenerate.
...
llvm-svn: 32811
2007-01-02 05:45:11 +00:00
Reid Spencer
25f4cd093b
For PR1070:
...
Revise the upgrade parser to keep track of types more faithfully and use
this information to resolve name conflicts resulting from collapsed type
planes. The type planes have collapsed because the integer types are now
signless so that uint and int became i32. Where two planes existed for uint
and int, only i32 exists. Any variable names depending on the type planes
to pmake the identifier unique would cause a conflict. This patch resolves
that conflict for many but not all cases.
Situations involving the integer types and pointers to them are handled
by this patch. However, there are corner cases that are not handled
well, such as:
%t1 = type { uint, int }
%t2 = type { int, uint }
void %myfunc(%t1* one, %t2* two) {
%var = load %t1* one
%var = load %t2* two
}
In the scenario above, %t1 and %t2 are really the same type: { i32, i32 }
Consequently attempting to name %var twice will yield a redefinition error
when assembled.
While this patch is sufficien to allow the llvm/test suite to pass, More
work needs to be to complete the handling of these corner cases.
llvm-svn: 32810
2007-01-02 05:44:33 +00:00
Reid Spencer
51397401ba
Reverse last patch, committed by accident.
...
llvm-svn: 32809
2007-01-02 04:30:40 +00:00
Reid Spencer
8218de2f01
Fix this test case to be legal. There is no ubyte %tmp ever defined!
...
llvm-svn: 32808
2007-01-02 04:19:32 +00:00
Reid Spencer
45fe75d755
Add some convenience functions for getting the source and destination
...
types from any Cast instruction.
llvm-svn: 32807
2007-01-02 02:08:27 +00:00
Reid Spencer
7b25bf07af
Back out last revision now that llvm-upgrade can remove useless bitcasts.
...
This serves as a test of that feature.
llvm-svn: 32806
2007-01-01 01:22:53 +00:00
Reid Spencer
97f4ee7e93
Regenerate.
...
llvm-svn: 32805
2007-01-01 01:20:41 +00:00
Reid Spencer
1a5d6f56e2
For PR1070:
...
Remove useless bitcasts by commenting them out.
llvm-svn: 32804
2007-01-01 01:20:16 +00:00
Reid Spencer
e8a74ee5ea
Fix a typo.
...
llvm-svn: 32803
2006-12-31 22:26:06 +00:00
Reid Spencer
62f3c0d57b
Convert the intrinsic function definitions to use llvm_i32_ty instead of
...
llvm_uint_ty or llvm_int_ty. Similarly for i8, i16 and i64
llvm-svn: 32802
2006-12-31 22:24:55 +00:00
Reid Spencer
9cfa4e8459
Fix a cut-and-paste bug for processing of InvokeInst parameter attributes.
...
The lookup of parameter attributes was offset by two because of the
additional operands in an invoke instruction.
llvm-svn: 32801
2006-12-31 22:17:01 +00:00
Reid Spencer
d0da3e200a
Regenerate.
...
llvm-svn: 32800
2006-12-31 21:47:02 +00:00
Reid Spencer
d6979030c1
Remove an extra semi-colon.
...
llvm-svn: 32799
2006-12-31 21:46:36 +00:00
Reid Spencer
c90cf77367
Fix a bug in comparison of GEP indices.
...
llvm-svn: 32798
2006-12-31 21:43:30 +00:00
Reid Spencer
72ba499004
Remove documentation of non-existent cextcc and csretextcc calling
...
conventions as these have been replaced with parameter attributes.
llvm-svn: 32797
2006-12-31 21:30:18 +00:00
Reid Spencer
6829c25a3c
Add a missing colon. Noticed by Jeff Cohen.
...
llvm-svn: 32796
2006-12-31 21:25:25 +00:00
Rafael Espindola
fd68718467
implement missing compares
...
patch by Lauro
bug fixed by me
llvm-svn: 32795
2006-12-31 18:52:39 +00:00
Reid Spencer
4e746749de
Fix a bug in getParamAttrs where an invalid value would be returned if the
...
index passed in was out of range for the number of parameter attributes set.
llvm-svn: 32794
2006-12-31 17:50:33 +00:00
Reid Spencer
655dcc6fce
One more try on the table formatting.
...
llvm-svn: 32793
2006-12-31 07:20:23 +00:00
Reid Spencer
58c08716af
Clean up some typos and formatting.
...
llvm-svn: 32792
2006-12-31 07:18:34 +00:00
Reid Spencer
b5ebf3d667
For PR950:
...
Update for signless integer types:
1. Replace [us]byte with i8
2. Replace [u]short with i16
3. Replace [u]int with i32
4. Replace [u]long with i64
5. Document the "define" keyword and use it in all examples.
6. Document parameter attributes and how they affect function types.
llvm-svn: 32791
2006-12-31 07:07:53 +00:00
Reid Spencer
eb14edc646
For PR950:
...
Convert signed integer types to signless.
llvm-svn: 32790
2006-12-31 06:02:26 +00:00
Reid Spencer
deb4d5ab46
For PR950:
...
Update the test suite to accommodate the change from signed integer types
to signless integer types. The changes were of only a few kinds:
1. Make sure llvm-upgrade is run on the source which does the bulk of the
changes automatically.
2. Change things like "grep 'int'" to "grep 'i32'"
3. In several tests bitcasting caused the same name to be reused in the
same type plane. These had to be manually fixed. The fix was (generally)
to leave the bitcast and provide the instruction with a new name. This
should not affect the semantics of the test. In a few cases, the
bitcasts were known to be superfluous and irrelevant to the test case
so they were removed.
4. One test case uses a bytecode file which needed to be updated to the
latest bytecode format.
llvm-svn: 32789
2006-12-31 06:02:00 +00:00
Reid Spencer
e63b6518fa
For PR950:
...
Three changes:
1. Convert signed integer types to signless versions.
2. Implement the @sext and @zext parameter attributes. Previously the
type of an function parameter was used to determine whether it should
be sign extended or zero extended before the call. This information is
now communicated via the function type's parameter attributes.
3. The interface to LowerCallTo had to be changed in order to accommodate
the parameter attribute information. Although it would have been
convenient to pass in the FunctionType itself, there isn't always one
present in the caller. Consequently, a signedness indication for the
result type and for each parameter was provided for in the interface
to this method. All implementations were changed to make the adjustment
necessary.
llvm-svn: 32788
2006-12-31 05:55:36 +00:00
Reid Spencer
0d54e78a39
For PR950:
...
Convert signed integer types to signless ones.
llvm-svn: 32787
2006-12-31 05:51:36 +00:00
Reid Spencer
bc013ba367
For PR950:
...
Convert signed integer types to signless.
llvm-svn: 32786
2006-12-31 05:50:28 +00:00
Reid Spencer
c635f47d9a
For PR950:
...
This patch replaces signed integer types with signless ones:
1. [US]Byte -> Int8
2. [U]Short -> Int16
3. [U]Int -> Int32
4. [U]Long -> Int64.
5. Removal of isSigned, isUnsigned, getSignedVersion, getUnsignedVersion
and other methods related to signedness. In a few places this warranted
identifying the signedness information from other sources.
llvm-svn: 32785
2006-12-31 05:48:39 +00:00
Reid Spencer
be5fd4a771
For PR950:
...
Don't attempt to parse both the old and new grammars. It is near impossible
to get it right. Remove support for the new define keyword and don't
attempt to insert parameter attributes because there isn't enough
contextual information for it.
llvm-svn: 32784
2006-12-31 05:45:57 +00:00
Reid Spencer
b46895bc1f
For PR950:
...
Update for signless integer types and parameter attribute implementation.
Of significant note:
1. This changes the bytecode format yet again.
2. There are 1/2 as many integer type planes (this is a good thing)
3. GEP indices now use only 1 bit to identify their type which means
more GEP instructions won't be relegated to format 0 (size win)
4. Parameter attributes are implemented but currently being stored
verbosely for each function type. Some other day this needs to be
optimized for size.
llvm-svn: 32783
2006-12-31 05:44:24 +00:00
Reid Spencer
42f0cbe769
For PR950:
...
Regenerate
llvm-svn: 32782
2006-12-31 05:40:51 +00:00
Reid Spencer
fa35bb3e20
For PR950:
...
Major reorganization. This patch introduces the signedness changes for
the new integer types (i8, i16, i32, i64) which replace the old signed
versions (ubyte, sbyte, ushort, short, etc). This patch also implements
the function type parameter attributes feature. Together these conspired
to introduce new reduce/reduce errors into the grammar. Consequently, it
was necessary to introduce a new keyword into the grammar in order to
disambiguate. Without this, yacc would make incorrect shift/reduce and
reduce/reduce decisions and fail to parse the intended assembly.
Changes in assembly:
1. The "implementation" keyword is superfluous but still supported. You
can use it as a sentry which will ensure there are no remaining up
reference types. However, this is optional as those checks are also
performed elsewhere.
2. Parameter attributes are now implemented using an at sign to
indicate the attribute. The attributes are placed after the type
in a function declaration or after the argument value in a function
call. For example:
i8 @sext %myfunc(i16 @zext)
call i8 @sext %myfunc(i16 @zext %someVal)
The facility is available for supporting additional attributes and
they can be combined using the @(attr1,attr2,attr3) syntax. Right
now the only two supported are @sext and @zext
3. Functions must now be defined with the "define" keyword which is
analagous to the "declare" keyword for function declarations. The
introduction of this keyword disambiguates situations where a
named result type is confused with a new type or gvar definition.
For example:
%MyType = type i16
%MyType %func(%MyType) { ... }
With the introduction of optional parameter attributes between
the function name and the function result type, yacc will pick
the wrong rule to reduce unless it is disambiguated with "define"
before the function definition, as in:
define %MyType @zext %func(%MyType %someArg) { ... }
llvm-svn: 32781
2006-12-31 05:40:12 +00:00
Reid Spencer
8d9336d065
For PR950:
...
Change signed integer type names to unsigned equivalents.
llvm-svn: 32780
2006-12-31 05:26:44 +00:00
Reid Spencer
b82ea5354c
For PR950:
...
Implement signless integer types and FunctionType parameter attributes.
llvm-svn: 32779
2006-12-31 05:25:34 +00:00
Reid Spencer
8c4914c1e3
For PR950:
...
* Change integer type name from signed to signless
* Implement printing of FunctionType parameter attributes.
llvm-svn: 32778
2006-12-31 05:24:50 +00:00
Reid Spencer
61543eab05
For PR950:
...
Change integer type names for signless integer types
llvm-svn: 32777
2006-12-31 05:23:18 +00:00
Reid Spencer
67c4d9633d
For PR950:
...
Add a new feature to FunctionType, Parameter Attributes. This allows tags
such as "sext" and "zext" to be associated with a faunction's arguments
or return type. This allows signedness information to be carried forward
from the frontend to the backend for arguments and result types.
llvm-svn: 32776
2006-12-31 05:22:12 +00:00
Reid Spencer
d30fd1d723
For PR950:
...
Make integer types signless:
Rename [US]Byte->Int8, [U]Short->Int16, [U]Int->Int32, [U]Long->Int64
Remove methods pertaining to sign of integer types.
llvm-svn: 32775
2006-12-31 05:20:51 +00:00
Nick Lewycky
bfe93dfdd8
Typo.
...
llvm-svn: 32774
2006-12-31 03:44:08 +00:00
Reid Spencer
96edbd5c07
When compiling a C or C++ file to assembly, make the assembly output
...
depend on the compiler. This works around problems in the Stacker runtime
when the CFE changes in such a way that the assembly file needs to be
updated.
llvm-svn: 32773
2006-12-30 16:31:02 +00:00
Reid Spencer
dc0a3a2fd2
Regenerate.
...
llvm-svn: 32772
2006-12-29 20:35:03 +00:00
Reid Spencer
0a53afe5ba
For PR950:
...
Fix several bugs and update for new assembly syntax. Changes made include:
1. Fixing rules for icmp/fcmp instructions to not require a closing paren
at the end. This was a cut-and-paste error from a previous commit.
2. Changing things like Out << " " to Out << ' '
3. Adding the "define" keyword for function definitions
4. Adding support for packed structures
llvm-svn: 32771
2006-12-29 20:33:37 +00:00
Reid Spencer
7ce2d2a8fe
For PR950:
...
Remove all grammar conflicts from assembly parsing. This change involves:
1. Making the "type" keyword not a primitive type (removes several
reduce/reduce conflicts)
2. Being more specific about which linkage types are allowed for functions
and global variables. In particular "appending" can no longer be
specified for a function. A differentiation was made between the various
internal and external linkage types.
3. Introduced the "define" keyword which is now required when defining a
function. This disambiguates several cases where a named function return
type could get confused with the definition of a new type. Using the
keyword eliminates all shift/reduce conflicts and the remaining
reduce/reduce conflicts.
These changes are necessary to implement the function parameter attributes
that will be introduced soon. Adding the function parameter attributes in
the presence of the shift/reduce and reduce/reduce conflicts led to severe
ambiguities that caused the parser to report syntax errors that needed to
be resolved. This patch resolves them.
llvm-svn: 32770
2006-12-29 20:29:48 +00:00
Reid Spencer
399b10a48c
Run llvm-upgrade on test to prepare for new assembly syntax.
...
llvm-svn: 32769
2006-12-29 20:21:51 +00:00
Reid Spencer
640509924e
Update tests that need to be run through llvm-upgrade. This is necessary
...
for upcoming changes to the llvm assembly grammar.
llvm-svn: 32768
2006-12-29 20:01:32 +00:00
Rafael Espindola
64493fb30d
fix comment
...
llvm-svn: 32767
2006-12-29 14:28:12 +00:00
Reid Spencer
c48b0c714d
Make a variable private now that the conditions requiring it to be
...
protected have been removed.
llvm-svn: 32766
2006-12-29 04:12:03 +00:00
Reid Spencer
4b880acf07
Doxygenify a comment.
...
llvm-svn: 32765
2006-12-29 04:10:59 +00:00
Reid Spencer
c329a4e9cc
Preview of new calling conventions: cextcc and csretextcc to handle explicit
...
sign and zero extension in function calls.
llvm-svn: 32764
2006-12-28 16:55:55 +00:00
Lauro Ramos Venancio
8ab8f7df6f
Define StaticCtorsSection and StaticDtorsSection for ARM.
...
llvm-svn: 32763
2006-12-28 13:13:00 +00:00
Lauro Ramos Venancio
7251e57ff8
Implement SELECT_CC (f32/f64) for ARM.
...
llvm-svn: 32762
2006-12-28 13:11:14 +00:00
Rafael Espindola
865b979833
remove duplicated line
...
bug noticed by Lauro
llvm-svn: 32761
2006-12-28 12:51:40 +00:00
Lauro Ramos Venancio
d0ced3f1e8
This patch defines extloadi1 and fixes an internal compiler error on
...
arm.
llvm-svn: 32760
2006-12-26 19:30:42 +00:00
Reid Spencer
9d36acf9ec
Cleanup ConstantFoldCompareInstruction:
...
1. Make the arguments const like the other ConstantFold* functions.
2. Clean up evaluateFCmpRelation so it makes sense for floating point.
3. Implement the use of evaluateFCmpRelation to fold floating point CEs
4. Shorten a variable name so more things fit on one line.
5. Fix various comments.
llvm-svn: 32759
2006-12-24 18:52:08 +00:00
Reid Spencer
b15374974d
Fix some comments.
...
llvm-svn: 32758
2006-12-24 18:42:29 +00:00
Reid Spencer
193df25eb9
For PR1066:
...
Fix this by ensuring that a bitcast is inserted to do sign switching. This
is only temporarily needed as the merging of signed and unsigned is next
on the SignlessTypes plate.
llvm-svn: 32757
2006-12-24 00:40:59 +00:00
Reid Spencer
910f23f7d7
Shut up some compilers that can't accurately analyze variable usage
...
correctly and emit "may be used uninitialized" warnings.
llvm-svn: 32756
2006-12-23 19:17:57 +00:00
Reid Spencer
208099bbee
Test case for PR1065.
...
llvm-svn: 32755
2006-12-23 19:14:10 +00:00
Reid Spencer
9aad39af4f
Add some documentation to make Nick happy.
...
llvm-svn: 32754
2006-12-23 19:06:54 +00:00
Reid Spencer
43c77d53ff
For PR1065:
...
Don't allow CmpInst instances to be processed in FoldSelectOpOp because
you can't easily swap their operands.
llvm-svn: 32753
2006-12-23 18:58:04 +00:00
Reid Spencer
ccf78ac1d0
Don't overload var names.
...
llvm-svn: 32752
2006-12-23 10:21:26 +00:00
Reid Spencer
266e42b312
For PR950:
...
This patch removes the SetCC instructions and replaces them with the ICmp
and FCmp instructions. The SetCondInst instruction has been removed and
been replaced with ICmpInst and FCmpInst.
llvm-svn: 32751
2006-12-23 06:05:41 +00:00
Chris Lattner
f171af97d5
add a simple fast-path for dead allocas
...
llvm-svn: 32750
2006-12-22 23:14:42 +00:00
Devang Patel
cdd9807cba
Enable new pass manager. 2nd attempt.
...
llvm-svn: 32749
2006-12-22 22:55:30 +00:00
Devang Patel
f5a994e5cc
ModulePass and ImmutablePass. Force out of line virtual method.
...
llvm-svn: 32748
2006-12-22 22:49:00 +00:00
Chris Lattner
70e09a2148
add a generic component to this test
...
llvm-svn: 32747
2006-12-22 22:48:44 +00:00
Chris Lattner
b3fbcbea8f
let this pass for ppc/linux
...
llvm-svn: 32746
2006-12-22 22:38:38 +00:00
Anton Korobeynikov
430e68a1b9
Refactored JIT codegen for mingw32. Now we're using standart relocation
...
type for distinguish JIT & non-JIT instead of "dirty" hacks :)
llvm-svn: 32745
2006-12-22 22:29:05 +00:00
Jim Laskey
d7a090ffc4
Need to walk the derived chain of typedefs to get actual size.
...
llvm-svn: 32744
2006-12-22 20:03:42 +00:00
Evan Cheng
763550323d
Debug dump error.
...
llvm-svn: 32743
2006-12-22 02:04:05 +00:00
Reid Spencer
87fbf70789
Ignore the LibDeps.txt.tmp file.
...
llvm-svn: 32742
2006-12-22 02:02:45 +00:00
Chris Lattner
959113a5c8
add a note
...
llvm-svn: 32741
2006-12-22 01:03:22 +00:00
Chris Lattner
5cfa5ef912
Fix for ARM weak symbols, patch by Lauro Ramos Venancio!
...
llvm-svn: 32740
2006-12-21 22:59:58 +00:00
Reid Spencer
b68935a947
Add a new variable, LLVMGCCLIBEXEC to get the libexec directory where the
...
cc1 and cc1plus executables live.
llvm-svn: 32738
2006-12-21 22:55:41 +00:00
Jim Laskey
c4c39aeb1d
Grandchildren are covered by protect.
...
llvm-svn: 32736
2006-12-21 21:24:35 +00:00
Jim Laskey
28663c73ef
Changes from Nick Lewycky with a simplified PPCTargetAsmInfo.
...
llvm-svn: 32735
2006-12-21 20:26:09 +00:00
Reid Spencer
ba2297ca7c
Integer constants now print out as signed values in the assembly,
...
regardless of the signedness of the associated type.
llvm-svn: 32734
2006-12-21 19:14:49 +00:00
Reid Spencer
4e0c2a0e41
Just print integer constants as signed values. The actual signedness
...
doesn't matter as it is determined in the way the constant is used.
llvm-svn: 32733
2006-12-21 19:04:23 +00:00
Reid Spencer
cfcec2caac
Add a FIXME about signedness.
...
llvm-svn: 32732
2006-12-21 18:59:16 +00:00
Reid Spencer
6156b02dd3
Simplify all the casting business and get rid of isSigned().
...
llvm-svn: 32731
2006-12-21 08:28:31 +00:00
Reid Spencer
a276d0972c
Remove isSigned calls via foreknowledge of main's argument types.
...
llvm-svn: 32730
2006-12-21 07:49:49 +00:00
Reid Spencer
4720d4d9ef
Get rid of a useless if statement whose then and else blocks were identical.
...
llvm-svn: 32729
2006-12-21 07:15:54 +00:00
Reid Spencer
a8a90a2f97
Add some comments about things that can go away once signless types are in.
...
llvm-svn: 32727
2006-12-21 06:43:46 +00:00
Devang Patel
e3068403bd
At the beginning of run, initialize analyis info availability for _ALL_
...
pass managers. Otherwise, stale available analysis info, from the managers not
yet run, may cause pass manager to take wrong turn.
This fixes CBE test failures reported by nightly tester.
llvm-svn: 32726
2006-12-21 00:16:50 +00:00
Jim Laskey
39377e4594
These tests all rely on using register mnemonics and thus must behave in the
...
world of darwin.
llvm-svn: 32725
2006-12-21 00:01:42 +00:00
Jim Laskey
4c90a6df16
Oops.
...
llvm-svn: 32724
2006-12-20 21:35:00 +00:00
Jim Laskey
c2c861d00e
Original patch was overly complicated.
...
llvm-svn: 32723
2006-12-20 21:33:34 +00:00
Chris Lattner
6fc3c7a8be
Fix Regression/Verifier/invoke-1.ll
...
llvm-svn: 32722
2006-12-20 21:20:13 +00:00
Jim Laskey
41621a72f5
Changes to target powerpc for non-Darwin assemblers.
...
1. Patches from Nick Lewycky.
2. Code to filter register names and print them as numeric values on
non-Darwin systems.
llvm-svn: 32721
2006-12-20 20:56:46 +00:00
Anton Korobeynikov
b3d704c91d
Fixed 80 cols & style violation
...
llvm-svn: 32720
2006-12-20 20:40:30 +00:00
Devang Patel
e86567e1e1
Enable old pass manager. New pass manager causes CBE failures in llvm-test.
...
llvm-svn: 32719
2006-12-20 19:57:07 +00:00
Chris Lattner
439c25a08a
Revert the previous patch which was incorrect. This unbreaks eon, but rebreaks
...
invoke-1.ll
llvm-svn: 32718
2006-12-20 19:50:15 +00:00
Reid Spencer
21278e9932
Add some tests for negative constants to unsigned and large positive
...
constants to signed.
llvm-svn: 32717
2006-12-20 17:27:58 +00:00
Reid Spencer
3f46fbaa00
Allow negative constants for unsigned integers and unsigned constants
...
greater than MAX_INT64 for signed integers. This is now valid and is just
waiting for the distinction between signed and unsigned to go away.
llvm-svn: 32716
2006-12-20 17:20:09 +00:00
Chris Lattner
1847f6ddbd
handle undef values much more carefully: generalize the resolveundefbranches
...
code to handle instructions as well, so that we properly fold things like
X & undef -> 0.
This fixes Transforms/SCCP/2006-12-19-UndefBug.ll
llvm-svn: 32715
2006-12-20 06:21:33 +00:00
Chris Lattner
aef35566f5
new testcase
...
llvm-svn: 32714
2006-12-20 06:20:23 +00:00
Chris Lattner
d7ed9c92c2
fix a typo
...
llvm-svn: 32713
2006-12-20 04:23:36 +00:00
Evan Cheng
258657e64e
getLoad() and getStore() calls missed SVOffset operand. Thanks to Dan Gohman
...
for pointing it out!
llvm-svn: 32712
2006-12-20 01:27:29 +00:00
Anton Korobeynikov
93acb49182
Fixed dllimported symbols support during JIT'ing. JIT on mingw32
...
platform should be more or less workable. At least, sim is running fine
under lli :)
llvm-svn: 32711
2006-12-20 01:03:20 +00:00
Chris Lattner
00bb216977
eliminate constructor from Statistic class. It is now impossible to get a
...
static constructor for them :). Transition complete.
llvm-svn: 32710
2006-12-19 23:17:40 +00:00
Chris Lattner
575d3218ab
switch statistics over to not use static ctors.
...
llvm-svn: 32709
2006-12-19 23:16:47 +00:00
Reid Spencer
85f3c06003
Remove documentation for isSigned and isUnsigned methods of Type class.
...
llvm-svn: 32708
2006-12-19 23:12:09 +00:00
Chris Lattner
874e55d551
switch statistic over, remove misspelt comment.
...
llvm-svn: 32704
2006-12-19 23:03:41 +00:00
Chris Lattner
1ef9cd400d
eliminate static ctors for Statistic objects.
...
llvm-svn: 32703
2006-12-19 22:59:26 +00:00
Chris Lattner
e712a5a1d2
elimiante Statistic static ctors
...
llvm-svn: 32702
2006-12-19 22:56:53 +00:00
John Criswell
a20006cd96
Added operator methods to the Statistic class; some LLVM projects depend
...
on these.
llvm-svn: 32701
2006-12-19 22:55:57 +00:00
Chris Lattner
c346ecd780
remove static ctors from Statistic objects
...
llvm-svn: 32700
2006-12-19 22:43:32 +00:00
Reid Spencer
38ea551520
Update this test because constant integers are always printed signed now.
...
llvm-svn: 32699
2006-12-19 22:42:17 +00:00
Chris Lattner
aee775a6b7
Eliminate static ctors from Statistics
...
llvm-svn: 32698
2006-12-19 22:41:21 +00:00
Chris Lattner
57ef942306
eliminate static ctors from Statistics
...
llvm-svn: 32697
2006-12-19 22:30:33 +00:00
Chris Lattner
1fa216f572
eliminate static ctor from example.
...
llvm-svn: 32696
2006-12-19 22:24:09 +00:00
Chris Lattner
40b29cac01
remove dead statistic
...
llvm-svn: 32695
2006-12-19 22:23:21 +00:00
Chris Lattner
45f966d80f
switch more statistics over to STATISTIC, eliminating static ctors. Also,
...
delete some dead ones.
llvm-svn: 32694
2006-12-19 22:17:40 +00:00
Chris Lattner
1631bcb1d4
Eliminate static ctors due to Statistic objects
...
llvm-svn: 32693
2006-12-19 22:09:18 +00:00
Chris Lattner
0e5255bdc6
Convert more Statistic's over to STATISTIC
...
llvm-svn: 32692
2006-12-19 21:49:03 +00:00
Chris Lattner
58e5345894
update to reflect changes in statistic class.
...
llvm-svn: 32691
2006-12-19 21:46:21 +00:00
Chris Lattner
79a42ac941
Switch over Transforms/Scalar to use the STATISTIC macro. For each statistic
...
converted, we lose a static initializer. This also allows GCC to emit warnings
about unused statistics.
llvm-svn: 32690
2006-12-19 21:40:18 +00:00
Devang Patel
91fc1e5780
Enable new pass manager.
...
llvm-svn: 32689
2006-12-19 21:32:24 +00:00
Evan Cheng
582ac4bed7
Fix for PR1062 by Dan Gohman.
...
llvm-svn: 32688
2006-12-19 21:31:42 +00:00
Chris Lattner
13bfd32f5d
Refactor statistic a big and introduce a horrible-but-necessary macro
...
(STATISTIC), which allows us to define statistics that don't introduce
static ctors into the .o files. I'm migrating code over to use this
incrementally.
llvm-svn: 32687
2006-12-19 21:27:47 +00:00
Reid Spencer
2acb8e1a43
Now that ConstantInt::isValueValidForType can handle signed and unsigned
...
values regardless of the signedness of the constant's type, it is okay to
always make the AsmWriter.cpp print constant ints as signed values. The
AsmParser will automatically handle things like: uint -1 as a result.
llvm-svn: 32686
2006-12-19 21:16:35 +00:00
Anton Korobeynikov
44ef93449a
Fix for PR1059: http://llvm.org/PR1059
...
llvm-svn: 32685
2006-12-19 21:04:20 +00:00
Devang Patel
cb5128a8d9
Now, there is additional layer, referred in the comment,
...
in place to handle this correctly.
llvm-svn: 32684
2006-12-19 20:12:38 +00:00
Reid Spencer
1e9d4977b6
For PR950:
...
Test needs to be upgraded for the forthcoming FCmpInst patch.
llvm-svn: 32683
2006-12-19 19:55:17 +00:00
Reid Spencer
98679b56a1
This test needs to be upgraded for the forthcoming FCmpInst patch.
...
llvm-svn: 32682
2006-12-19 19:50:30 +00:00
Reid Spencer
8810d370af
Fix an example that used the old SetCondInst instruction.
...
llvm-svn: 32681
2006-12-19 19:47:54 +00:00
Reid Spencer
c6be386754
Make changes for removal of SETCC instruction to unify with LangRef.html.
...
llvm-svn: 32680
2006-12-19 19:47:19 +00:00
Devang Patel
67d6a5e411
s/BasicBlockPassManager/BBPassManager/g
...
s/ModulePassManager/MPPassManager/g
s/FunctionPassManagerImpl_New/FunctionPassManagerImpl/g
s/PassManagerImpl_New/PassManagerImpl/g
Introduce FPPassManager to manage function passes and
BBPassManagers.
Now FunctionPassManagerImpl is an implementation class
used by externally visible FunctionPassManager to manage
FPPassManagers.
Module pass manager (MPPassManager) now manages FPPassManagers
and ModulePasses.
llvm-svn: 32679
2006-12-19 19:46:59 +00:00
Chris Lattner
68f62b58f7
The x86-64 target machine should be used for amd64-* target triples.
...
llvm-svn: 32678
2006-12-19 19:40:09 +00:00
Reid Spencer
fb5e766bea
This test needs to be upgraded for the FCmpInst patch.
...
llvm-svn: 32677
2006-12-19 19:30:58 +00:00
Chris Lattner
a7f95900f4
Fix PR1061 and CodeGen/X86/2006-12-19-IntelSyntax.ll
...
llvm-svn: 32676
2006-12-19 19:29:58 +00:00
Reid Spencer
60544284e8
Make sure linker output is overwritten so this test can pass multiple times.
...
llvm-svn: 32675
2006-12-19 19:29:50 +00:00
Chris Lattner
8826afd893
testcase for pr1061
...
llvm-svn: 32674
2006-12-19 19:29:50 +00:00
Anton Korobeynikov
eef04ba1c2
Partly fixed JITing on mingw32 platform. The support is not full due to
...
absence of dllimport JIT codegen.
llvm-svn: 32673
2006-12-19 15:24:18 +00:00
Reid Spencer
8dabca4118
Clean up ConstantFoldCastInstruction.
...
llvm-svn: 32672
2006-12-19 07:41:40 +00:00
Reid Spencer
f5fc34ad09
Rewrite ConstantFoldCastInstruction so that it doesn't use any of the
...
ConstRules. Remove the casting rules from ConstRules and subclasses. This
cleans up ConstantFolding significantly. Passes all tests.
llvm-svn: 32671
2006-12-19 03:15:47 +00:00
Reid Spencer
56fd357f5e
Back out last revision, a bit premature, its not an upgrade-only change.
...
llvm-svn: 32670
2006-12-19 02:17:23 +00:00
Reid Spencer
60ea16cd6d
For PR950:
...
Upgrade this test in preparation for the SETCC patch.
llvm-svn: 32669
2006-12-19 02:14:08 +00:00
Reid Spencer
2fff0acab4
For PR950:
...
These tests need to be upgraded in preparation for the SETCC patch.
llvm-svn: 32668
2006-12-19 02:09:20 +00:00
Reid Spencer
fe0cda3de8
This test needs to be upgraded in preparation for the SETCC patch.
...
llvm-svn: 32667
2006-12-19 02:07:11 +00:00
Reid Spencer
c136005f32
This test needs to be upgraded.
...
llvm-svn: 32666
2006-12-19 02:03:04 +00:00
Evan Cheng
9ad6edf2ec
May need to promote the operand (either sign_extend_inreg or and) before
...
expanding a {s|u}int_to_fp.
llvm-svn: 32665
2006-12-19 01:44:04 +00:00
Reid Spencer
b799e77547
Correct the description of ConstantInt::isValueValidForType.
...
llvm-svn: 32664
2006-12-19 01:34:39 +00:00
Reid Spencer
e733472221
Make ConstantInt not care about sign any more. To ensure the AsmParser can
...
still check the validity of signed values an overload to isValueValidForType
was added to allow passing in an int64_t to check.
llvm-svn: 32663
2006-12-19 01:28:19 +00:00
Chris Lattner
0a1e99317e
Fix a bug in GetConstantFactor for affine expressions, in which the existing
...
code was wrong for things like 3+4*i.
llvm-svn: 32662
2006-12-19 01:16:02 +00:00
Chris Lattner
c1b828c78d
Doxgenate comments.
...
Add GreatestCommonDivisor64
llvm-svn: 32661
2006-12-19 01:11:32 +00:00
Reid Spencer
8b5cd5f710
Remove a useless statement.
...
llvm-svn: 32660
2006-12-18 23:40:19 +00:00
Evan Cheng
adc80f98cf
LegalizeSetCCOperands() may end up inserting libcalls. They need to be
...
properly serialized. Do not clear LastCallSEQ_END until that is done.
llvm-svn: 32659
2006-12-18 22:55:34 +00:00
Bill Wendling
21be92d260
Removed llvm_ostream and used std::ostream instead.
...
llvm-svn: 32658
2006-12-18 21:59:00 +00:00
Reid Spencer
77cc7edf3e
For PR1042:
...
Fix a thinko. We want to check the second case if the first cast *didn't*
trigger.
llvm-svn: 32657
2006-12-18 21:56:29 +00:00
Rafael Espindola
3ab9256d19
macros -> Inline functions
...
Lauros's patch
llvm-svn: 32656
2006-12-18 11:07:09 +00:00
Reid Spencer
e45ac2ab11
Remove the createInferredCast methods now that their last uses have been
...
removed. All casting is now explicit and not inferred by VMCore.
llvm-svn: 32655
2006-12-18 08:52:59 +00:00
Reid Spencer
668d90f289
Convert the last uses of CastInst::createInferredCast to a normal cast
...
creation. These changes are still temporary but at least this pushes
knowledge of signedness out closer to where it can be determined properly
and allows signedness to be removed from VMCore.
llvm-svn: 32654
2006-12-18 08:47:13 +00:00
Reid Spencer
4800c38a75
Remove the two-argument (inferred cast) form of ConstantExpr::getCast now
...
that its last uses have been removed.
llvm-svn: 32653
2006-12-18 08:18:46 +00:00
Reid Spencer
b83593e3ea
Convert the last use of two-argument ConstantExpr::getCast into another
...
form so we can remove that method from ConstantExpr.
llvm-svn: 32652
2006-12-18 08:16:27 +00:00
Reid Spencer
cf0c82f5fa
Remove a call to Type::isSigned().
...
llvm-svn: 32651
2006-12-18 07:58:01 +00:00
Reid Spencer
db6b6fb916
Revert last patch. ConstantInt isn't quite ready for signlessness.
...
llvm-svn: 32650
2006-12-18 04:22:56 +00:00
Reid Spencer
a4044f35f4
Determine if the -enable-pic option was given.
...
llvm-svn: 32649
2006-12-18 04:11:16 +00:00
Rafael Espindola
d7998d0e6d
move ExtWeakSymbols to AsmPrinter
...
llvm-svn: 32648
2006-12-18 03:37:18 +00:00
Reid Spencer
0e60d55519
Add a couple little tests for SExt/ZExt of constants of a sign that doesn't
...
match.
llvm-svn: 32647
2006-12-18 01:11:46 +00:00
Reid Spencer
776311e000
Remove the last use of getUnsignedVersion and getSignedVersion from VMCore.
...
ConstantInt doesn't care about the sign of the type it represents. It only
cares about the bitwidth so there is no need to make the sign of the type
match the SExt or ZExt constant expression.
llvm-svn: 32646
2006-12-18 01:11:03 +00:00
Reid Spencer
f5165ac0d1
Remove some clutter and make it keep going instead of stopping at the
...
first difference.
llvm-svn: 32645
2006-12-18 00:37:37 +00:00
Chris Lattner
811d75f71a
Fix PR1057 (compilation on macos 10.3), patch by Scott Michel!
...
llvm-svn: 32644
2006-12-17 21:04:02 +00:00
Reid Spencer
8bd6317823
Use a predicate function to identify bitcast of fp and integer instead of
...
repeating the logic in two different parts of the code.
llvm-svn: 32643
2006-12-17 20:24:50 +00:00
Reid Spencer
174dc2f35e
Fix PR1058:
...
Generate the BITCAST_TEMPORARY regardless of the uses or inlinability of
the instruction. This temporary is needed to perform the instruction, not
provide storage for its results.
llvm-svn: 32642
2006-12-17 18:50:51 +00:00
Bill Wendling
3307244ce9
Added example of how to code print() methods so that they will disappear
...
from the code if "cnull" is passed into them.
llvm-svn: 32641
2006-12-17 11:40:40 +00:00
Bill Wendling
e33ce528da
Fixed so that it dereferences the ostream pointer.
...
llvm-svn: 32640
2006-12-17 11:15:53 +00:00
Bill Wendling
1e48353346
Accidental submission.
...
llvm-svn: 32639
2006-12-17 11:13:13 +00:00
Bill Wendling
e891701547
This snuck in. Reverted.
...
llvm-svn: 32638
2006-12-17 11:11:10 +00:00
Reid Spencer
cb80954483
Fix problems in the CBE and InstructionCombining which use the isMaxValue
...
and isMinValue methods of ConstantInt. These have been broken since the
isSigned parameter was added. It is necessary to use the signed version
of the type in the call to isValueValidForType or else incorrect results
are returned.
llvm-svn: 32637
2006-12-17 06:07:30 +00:00
Bill Wendling
a77f14265b
Added an automatic cast to "std::ostream*" etc. from OStream. We then can
...
rework the hacks that had us passing OStream in. We pass in std::ostream*
instead, check for null, and then dispatch to the correct print() method.
llvm-svn: 32636
2006-12-17 05:15:13 +00:00
Reid Spencer
05a1fe5bf5
Allow an --enable-pic option to turn on -fPIC compiler option when building.
...
The default is disabled until we know this doesn't break anyone.
llvm-svn: 32635
2006-12-16 22:07:52 +00:00
Chris Lattner
fd5f03ec3f
when inserting a dummy argument to work-around the CBE not supporting
...
zero arg vararg functions, pass undef instead of 'int 0', which is cheaper.
llvm-svn: 32634
2006-12-16 21:21:53 +00:00
Chris Lattner
9bd5ed636c
Fix PR1049 and CodeGen/Generic/2006-12-16-InlineAsmCrash.ll
...
by producing target constants instead of constants. Constants can get
selected to li/movri instructions, which causes the scheduler to explode.
llvm-svn: 32633
2006-12-16 21:14:48 +00:00
Chris Lattner
5ffb07839d
testcase for pr1049
...
llvm-svn: 32632
2006-12-16 21:12:49 +00:00
Chris Lattner
cbc280f559
Fix one more broken testcase
...
llvm-svn: 32631
2006-12-16 20:27:43 +00:00
Chris Lattner
360a14be02
Apply B. Scott Michel's patch for PR1054, thanks!
...
llvm-svn: 32630
2006-12-16 20:23:42 +00:00
Evan Cheng
28cf4277bb
Cannot combine an indexed load / store any further.
...
llvm-svn: 32629
2006-12-16 06:25:23 +00:00
Evan Cheng
5c65ea0db1
Typo.
...
llvm-svn: 32628
2006-12-16 06:21:55 +00:00
Chris Lattner
a07e363aae
Fix borken testcase
...
llvm-svn: 32627
2006-12-16 02:30:24 +00:00
Chris Lattner
cf1eac3535
fix buggy testcase
...
llvm-svn: 32626
2006-12-16 02:29:22 +00:00
Chris Lattner
cff7b8a9ca
testcases for PR1042
...
llvm-svn: 32625
2006-12-16 02:26:57 +00:00
Chris Lattner
697617709c
Fix PR1042, by tightening up the subtle rules with invoke value use.
...
llvm-svn: 32624
2006-12-16 02:25:35 +00:00
Evan Cheng
851e589eda
Expand FP undef
...
llvm-svn: 32623
2006-12-16 02:20:50 +00:00
Jeff Cohen
29192e6274
The best unbreakage yet, addressing Bill's concerns.
...
llvm-svn: 32622
2006-12-16 02:15:42 +00:00
Evan Cheng
860004688a
Allow promoted FP_TO_UINT / FP_TO_SINT to expand operand.
...
llvm-svn: 32621
2006-12-16 02:10:30 +00:00