Chris Lattner
f5bbe85879
Okay, my off by one was actually off by two. This fixes Generic/2003-07-07-BadLongConst.ll
...
llvm-svn: 19398
2005-01-08 20:39:31 +00:00
Chris Lattner
c0f31c5e96
Tighten up assertions.
...
llvm-svn: 19397
2005-01-08 20:35:13 +00:00
Chris Lattner
a183eb75eb
Fix off by one error
...
llvm-svn: 19396
2005-01-08 20:31:34 +00:00
Chris Lattner
f806d9f2d0
Allow arrays to have more than 4G elements.
...
llvm-svn: 19395
2005-01-08 20:19:51 +00:00
Chris Lattner
d662b785ef
Allow array types to have 64-bit size.
...
llvm-svn: 19394
2005-01-08 20:19:27 +00:00
Jeff Cohen
1a26d15c80
Use size_t instead of long to represent memory usage. long is 32 bits
...
on 64-bit Windows.
llvm-svn: 19393
2005-01-08 20:15:57 +00:00
Chris Lattner
4588542d39
Silence warnings
...
llvm-svn: 19392
2005-01-08 20:13:44 +00:00
Chris Lattner
df1f152420
Silence VS warnings.
...
llvm-svn: 19391
2005-01-08 20:13:19 +00:00
Chris Lattner
fa66dc7852
Silence VS warnings.
...
llvm-svn: 19390
2005-01-08 20:07:03 +00:00
Chris Lattner
feeab9f753
Silence VS warnings
...
llvm-svn: 19389
2005-01-08 20:05:34 +00:00
Chris Lattner
0b955fd2d5
Silence VS warnings
...
llvm-svn: 19388
2005-01-08 19:59:10 +00:00
Chris Lattner
a136c3b054
Adjust prototype
...
llvm-svn: 19387
2005-01-08 19:57:49 +00:00
Chris Lattner
e64ff1c4b2
Silence warnings from VS
...
llvm-svn: 19386
2005-01-08 19:55:00 +00:00
Chris Lattner
78100c41ca
Silence VS warnings
...
llvm-svn: 19385
2005-01-08 19:53:50 +00:00
Chris Lattner
d006195517
Silence VS warnings.
...
llvm-svn: 19384
2005-01-08 19:52:31 +00:00
Chris Lattner
798e84f59e
Fix VS warnings
...
llvm-svn: 19383
2005-01-08 19:48:40 +00:00
Chris Lattner
46fa04b531
Fix VS warnings.
...
llvm-svn: 19382
2005-01-08 19:45:31 +00:00
Chris Lattner
fdfe3e49fe
Fix uint64_t -> unsigned VS warnings.
...
llvm-svn: 19381
2005-01-08 19:42:22 +00:00
Chris Lattner
47f395cd85
Silence VS warnings.
...
llvm-svn: 19380
2005-01-08 19:37:20 +00:00
Chris Lattner
ce274ce93d
Silence warnings
...
llvm-svn: 19379
2005-01-08 19:34:41 +00:00
Chris Lattner
867158cefd
Do not throw away bits for no reason
...
llvm-svn: 19378
2005-01-08 19:32:59 +00:00
Chris Lattner
2c5e4ed8f9
Silence a VS warning.
...
llvm-svn: 19377
2005-01-08 19:31:31 +00:00
Chris Lattner
b52e041c80
Adjust to changes in LowerCallTo interface
...
Minor bugfixes
llvm-svn: 19376
2005-01-08 19:28:19 +00:00
Chris Lattner
7e6eeba6c5
Implement handling of most long operators through libcalls.
...
Fix a bug legalizing "ret (Val,Val)"
llvm-svn: 19375
2005-01-08 19:27:05 +00:00
Chris Lattner
1f45cd7418
Adjust to changes in LowerCAllTo interfaces
...
llvm-svn: 19374
2005-01-08 19:26:18 +00:00
Chris Lattner
9660014f8c
Make LowerCallTo more generic and useful.
...
llvm-svn: 19373
2005-01-08 19:25:39 +00:00
John Criswell
24a5692973
Another year, another copyright update.
...
llvm-svn: 19372
2005-01-08 19:10:44 +00:00
Jeff Cohen
a2c16d2555
Add a few more passes to LinkAllPasses.h
...
llvm-svn: 19371
2005-01-08 18:15:23 +00:00
Jeff Cohen
677babc4d4
Add more missing createXxxPass functions.
...
llvm-svn: 19370
2005-01-08 17:21:40 +00:00
Chris Lattner
2a6db3c351
Add support for FP->INT conversions and back.
...
llvm-svn: 19369
2005-01-08 08:08:56 +00:00
Chris Lattner
6209f1d294
Add operators for FP -> INT conversions and back.
...
llvm-svn: 19368
2005-01-08 08:08:49 +00:00
Chris Lattner
8da67af979
Wrap long line.
...
llvm-svn: 19367
2005-01-08 06:59:50 +00:00
Chris Lattner
e69daaf71d
Implement the 'store FPIMM, Ptr' -> 'store INTIMM, Ptr' optimization for
...
all targets.
llvm-svn: 19366
2005-01-08 06:25:56 +00:00
Chris Lattner
9a97e4d5b6
1ULL << 64 is undefined, don't do it.
...
llvm-svn: 19365
2005-01-08 06:24:30 +00:00
Chris Lattner
b923438fe6
The X86 instruction selector already handles codegen of:
...
store float 123.45, float* %P
as an integer store. This adds handling of float immediate stores as integers
for arguments passed function calls.
This is now tested by CodeGen/X86/store-fp-constant.ll
llvm-svn: 19364
2005-01-08 05:45:24 +00:00
Chris Lattner
e80eca3d1d
New testcase.
...
llvm-svn: 19363
2005-01-08 05:44:07 +00:00
Misha Brukman
6cd5f89778
Eliminate empty sub-list
...
llvm-svn: 19362
2005-01-08 01:11:15 +00:00
Chris Lattner
e0f1fe181a
Fix a pointer invalidation problem. This fixes Generic/badarg6.ll
...
llvm-svn: 19361
2005-01-07 23:32:00 +00:00
Chris Lattner
5c66e45b92
Fold conditional branches on constants away.
...
llvm-svn: 19360
2005-01-07 22:49:57 +00:00
Chris Lattner
cda3efa6e5
Fix a thinko in the reassociation code, fixing Generic/badlive.ll
...
llvm-svn: 19359
2005-01-07 22:44:09 +00:00
Chris Lattner
a65a2f0c36
Add support for truncating integer casts from long.
...
llvm-svn: 19358
2005-01-07 22:37:48 +00:00
Chris Lattner
ea4ca94cae
Fix a bug in load expansion legalization and ret legalization. This fixes
...
CodeGen/Generic/select.ll:castconst.
llvm-svn: 19357
2005-01-07 22:28:47 +00:00
Chris Lattner
68a12140c0
Legalize unconditional branches too
...
llvm-svn: 19356
2005-01-07 22:12:08 +00:00
Chris Lattner
924d100bd1
Cleanup a bunch of tests. In particular do not allow target directives in
...
the .ll file or it forces the V9 backend. This is the CodeGen/Generic dir,
so there is no use in doing that.
llvm-svn: 19355
2005-01-07 22:05:31 +00:00
Chris Lattner
19a83990e1
Implement support for long GEP indices on 32-bit archs and support for
...
int GEP indices on 64-bit archs.
llvm-svn: 19354
2005-01-07 21:56:57 +00:00
Chris Lattner
4d5ba99283
Simplify: truncate ({zero|sign}_extend (X))
...
llvm-svn: 19353
2005-01-07 21:56:24 +00:00
Chris Lattner
32f20bfa93
implement legalization of a bunch more operators.
...
llvm-svn: 19352
2005-01-07 21:45:56 +00:00
Chris Lattner
e3f06e9945
Make this test a bit more interesting by making there actually be a use of the
...
PHI node.
llvm-svn: 19351
2005-01-07 21:37:13 +00:00
Chris Lattner
fa854eb012
Fix another bug legalizing calls!
...
llvm-svn: 19350
2005-01-07 21:35:32 +00:00
Chris Lattner
8ea875fb05
Fix handling of dead PHI nodes.
...
llvm-svn: 19349
2005-01-07 21:34:19 +00:00
Chris Lattner
f025d6788c
Fix a bug legalizing calls
...
llvm-svn: 19348
2005-01-07 21:34:13 +00:00
Chris Lattner
44b30c9abb
modernize and clean up this test.
...
llvm-svn: 19347
2005-01-07 21:15:58 +00:00
Chris Lattner
473825ccec
After legalizing a DAG, delete dead nodes to save space.
...
llvm-svn: 19346
2005-01-07 21:09:37 +00:00
Chris Lattner
9c667933c1
Implement RemoveDeadNodes
...
llvm-svn: 19345
2005-01-07 21:09:16 +00:00
Chris Lattner
49811fcab6
Add a new SelectionDAG::RemoveDeadNodes method
...
llvm-svn: 19344
2005-01-07 21:08:55 +00:00
Jeff Cohen
86bbb1c56b
Fix include. Too easy to make mistakes like this on Windows :(
...
llvm-svn: 19343
2005-01-07 19:21:49 +00:00
Chris Lattner
6edb4d7b71
Remove the open projects page from the docs directory.
...
llvm-svn: 19342
2005-01-07 18:57:33 +00:00
Misha Brukman
a9ade831b6
Capitalize Bugpoint.
...
llvm-svn: 19341
2005-01-07 17:00:44 +00:00
Jeff Cohen
39c14e7bca
Get new SelectionDAG stuff building with Visual Studio.
...
llvm-svn: 19340
2005-01-07 15:52:36 +00:00
Chris Lattner
ec3fe7c4a8
Teach legalize how to handle condbranches
...
llvm-svn: 19339
2005-01-07 08:19:42 +00:00
Chris Lattner
001467a08c
Add a testcase I forgot to commit earlier.
...
llvm-svn: 19338
2005-01-07 07:56:08 +00:00
Chris Lattner
1ef74d6135
X86 BE requires SelectionDAG
...
llvm-svn: 19337
2005-01-07 07:51:25 +00:00
Chris Lattner
28ce94ce85
X86 JIT requires the selection dag library.
...
llvm-svn: 19336
2005-01-07 07:51:11 +00:00
Chris Lattner
ca4ca5520b
Allow the selection-dag based selector to be diabled with -disable-pattern-isel.
...
For now, this is the default, as the current selector is missing some big pieces.
To enable the new selector, pass -disable-pattern-isel=false to llc or lli.
llvm-svn: 19335
2005-01-07 07:50:50 +00:00
Chris Lattner
88c8a23891
Reimplementation of the X86 pattern isel. This is still missing many large
...
pieces, but can already do amazing things in some cases.
llvm-svn: 19334
2005-01-07 07:49:41 +00:00
Chris Lattner
ce413c8c9f
This file is now dead.
...
llvm-svn: 19333
2005-01-07 07:49:05 +00:00
Chris Lattner
ff9e21c8d3
Add a new prototype
...
llvm-svn: 19332
2005-01-07 07:48:33 +00:00
Chris Lattner
7a60d91953
Initial implementation of the SelectionDAGISel class. This contains most
...
of the code for lowering from LLVM code to a SelectionDAG.
llvm-svn: 19331
2005-01-07 07:47:53 +00:00
Chris Lattner
f8ba6987a4
This file is obsolete
...
llvm-svn: 19330
2005-01-07 07:47:23 +00:00
Chris Lattner
dc75059005
Initial implementation of the DAG legalization. This still has a long way
...
to go, but it does work for some non-trivial cases now.
llvm-svn: 19329
2005-01-07 07:47:09 +00:00
Jeff Cohen
510fa4bbf8
But not the identation of THAT line
...
llvm-svn: 19328
2005-01-07 07:46:40 +00:00
Chris Lattner
061a1ea9e3
Complete rewrite of the SelectionDAG class.
...
llvm-svn: 19327
2005-01-07 07:46:32 +00:00
Chris Lattner
56cc54f416
Common base class for SelectionDAG-based instruction selectors.
...
llvm-svn: 19326
2005-01-07 07:46:03 +00:00
Chris Lattner
78551084ef
Initial implementation of the nodes in a SelectionDAG.
...
llvm-svn: 19325
2005-01-07 07:45:27 +00:00
Chris Lattner
3a4d1b2721
First draft of new Target interface
...
llvm-svn: 19324
2005-01-07 07:44:53 +00:00
Chris Lattner
09b37583a4
First draft of a new Target interface
...
llvm-svn: 19323
2005-01-07 07:44:22 +00:00
Jeff Cohen
70e3e10aa4
Correct indentation levels
...
llvm-svn: 19322
2005-01-07 07:44:02 +00:00
Chris Lattner
07b522d106
Add convenience method.
...
llvm-svn: 19321
2005-01-07 07:40:32 +00:00
Misha Brukman
417ca179a9
Convert tabs to spaces
...
llvm-svn: 19320
2005-01-07 07:05:34 +00:00
Jeff Cohen
9a7ac16214
Add missing createXxxPass functions
...
llvm-svn: 19319
2005-01-07 06:57:28 +00:00
Jeff Cohen
d97ad08ef8
Remove bogus project folder
...
llvm-svn: 19318
2005-01-07 06:54:58 +00:00
Misha Brukman
28e210a8f2
Fix spelling.
...
llvm-svn: 19317
2005-01-07 06:45:07 +00:00
Jeff Cohen
e48bd7fcd4
Update list of passes
...
llvm-svn: 19316
2005-01-07 06:12:41 +00:00
Jeff Cohen
844410b48e
Add missing include
...
llvm-svn: 19315
2005-01-07 05:42:13 +00:00
Jeff Cohen
e15ae04fb3
Fix return type
...
llvm-svn: 19314
2005-01-07 05:41:39 +00:00
Chris Lattner
ae15482076
Codegen -1 and -0.0 more efficiently. This implements CodeGen/X86/negatize_zero.ll
...
llvm-svn: 19313
2005-01-06 21:19:16 +00:00
Chris Lattner
9eef99ef43
New testcase
...
llvm-svn: 19312
2005-01-06 21:18:53 +00:00
Chris Lattner
cd4003e228
No need to pessimize current code for future possibilities.
...
llvm-svn: 19311
2005-01-06 16:26:38 +00:00
Jeff Cohen
72f8f4cc3d
Get the #ifdef right on LinkAllPasses.h.
...
llvm-svn: 19310
2005-01-06 07:01:08 +00:00
Jeff Cohen
13932fb27f
Fix minor mistakes
...
llvm-svn: 19309
2005-01-06 06:29:42 +00:00
Jeff Cohen
11dca28b79
Get rid of those pesky tabs...
...
llvm-svn: 19308
2005-01-06 06:06:35 +00:00
Jeff Cohen
00d5508496
Add project opt to Visual Studio.
...
llvm-svn: 19307
2005-01-06 06:02:53 +00:00
Jeff Cohen
eca0d0f2da
Put createLoopUnswitchPass() into proper namespace
...
llvm-svn: 19306
2005-01-06 05:47:18 +00:00
Jeff Cohen
27595a4aec
Add missing include
...
llvm-svn: 19305
2005-01-06 05:46:44 +00:00
Jeff Cohen
56d649f574
Fix incorrect return type.
...
llvm-svn: 19304
2005-01-06 05:45:45 +00:00
Jeff Cohen
b56965be08
Fix CBE code so that it compiles with VC++.
...
llvm-svn: 19303
2005-01-06 04:21:49 +00:00
Chris Lattner
2812f0880b
Add required #include
...
llvm-svn: 19302
2005-01-06 03:25:27 +00:00
Chris Lattner
a930a9ab5e
Add a useful method
...
llvm-svn: 19301
2005-01-06 03:23:59 +00:00
Chris Lattner
770c354f7d
Add a list end sentinal
...
llvm-svn: 19299
2005-01-05 22:14:14 +00:00
Reid Spencer
1d183c4ab8
Add the SystemLibrary.html document now that its done.
...
llvm-svn: 19298
2005-01-05 19:01:20 +00:00
Reid Spencer
9d4d097dd1
Add a missing <div>
...
llvm-svn: 19297
2005-01-05 18:21:39 +00:00
Reid Spencer
6b9542b338
Bulk upgrade of this document. Cruft removed, new stuff added, general
...
reorganization of the content. This is now "done".
llvm-svn: 19296
2005-01-05 18:17:10 +00:00
Alkis Evlogimenos
eccb209b6e
The Java project now lives under projects/llvm-java.
...
llvm-svn: 19295
2005-01-05 17:57:28 +00:00
Reid Spencer
1fbccbe786
Make opt honor the quiet option when printing the bytecode warning.
...
llvm-svn: 19294
2005-01-05 17:31:55 +00:00
Reid Spencer
e153fb3523
1. Make sure that "dot" can be found in the path
...
2. Fix a bug where the lib directory specified also had to be cwd
3. Weight the output so archive->archive edges are shorter
4. Generate two different graphs: one for libraries, one for objects.
5. Adjust the properties of the graphs till it looks nice.
llvm-svn: 19293
2005-01-05 17:29:29 +00:00
Reid Spencer
c770a0f243
Ignore autoconf/aclocal generated stuff.
...
llvm-svn: 19292
2005-01-05 17:26:00 +00:00
Chris Lattner
1ee6dfa501
1. If a double FP constant must be put into a constant pool, but it can be
...
precisely represented as a float, put it into the constant pool as a
float.
2. Use the cbw/cwd/cdq instructions instead of an explicit SAR for signed
division.
llvm-svn: 19291
2005-01-05 16:30:14 +00:00
Chris Lattner
a0d572707a
add an assertion
...
llvm-svn: 19290
2005-01-05 16:27:34 +00:00
Chris Lattner
0f7e786a6b
Minor optimization to allocate R8 registers in a better order.
...
llvm-svn: 19289
2005-01-05 16:09:16 +00:00
Chris Lattner
132e400d73
ignore generated file
...
llvm-svn: 19288
2005-01-05 16:01:00 +00:00
Chris Lattner
05788f97f4
Ignore generated file
...
llvm-svn: 19287
2005-01-05 16:00:42 +00:00
Chris Lattner
3c6909423d
Ignore .dir
...
llvm-svn: 19286
2005-01-05 16:00:00 +00:00
Chris Lattner
f0698314cd
Update this test to pass.
...
llvm-svn: 19285
2005-01-05 15:23:06 +00:00
Reid Spencer
6a0c6f6bf1
Cleanup configuration for Cygwin
...
llvm-svn: 19284
2005-01-05 06:41:10 +00:00
Jeff Cohen
05af8cfbd5
Make bison/flex build steps output the same message in Visual Studio as
...
on Unix.
llvm-svn: 19283
2005-01-04 06:18:10 +00:00
Jeff Cohen
a272e9a839
Add C backend to llc in Visual Studio.
...
llvm-svn: 19282
2005-01-04 06:01:55 +00:00
Chris Lattner
9742ac8c7c
Test that trivial constants are not printed in hex notation.
...
llvm-svn: 19281
2005-01-04 01:58:26 +00:00
Chris Lattner
472cc1062d
To not break TBAA rules, use a union.
...
llvm-svn: 19280
2005-01-04 01:56:57 +00:00
Chris Lattner
623bacf418
Do not let 'ftostr' return a string that starts with spaces. This allows
...
the AsmWriter to emit FP constants like 1.0 in normal exponential notation
instead of hex notation.
llvm-svn: 19279
2005-01-04 01:56:28 +00:00
Chris Lattner
91197b0b6a
Add a testcase to check that initializer that CAN be evaluated statically ARE.
...
These used to result in dynamic initializations.
llvm-svn: 19278
2005-01-03 22:27:58 +00:00
Chris Lattner
5dfdadde04
Fix this script to work with hyphenated llvm-gcc and friend.
...
llvm-svn: 19277
2005-01-03 22:26:38 +00:00
John Criswell
dc6650136a
Quote the paths and not the assignment of the PATH variable.
...
This seems to make things happier.
llvm-svn: 19276
2005-01-03 17:42:57 +00:00
John Criswell
34f603fcd7
Joining the quote fray...
...
Reverting the quote patch. For some reason, this breaks the building of
llvm/runtime (the shell doesn't like it for some reason). I might play
with it to see if I can get the quotes done in such a way that the shell
like it, but no promises.
llvm-svn: 19275
2005-01-03 17:41:56 +00:00
Jeff Cohen
f544d36614
Add additional header file to VS project. Patch submitted by Morten.
...
llvm-svn: 19274
2005-01-03 16:37:16 +00:00
Jeff Cohen
68f28730b7
Revert elimination of global variable hack... still needed.
...
llvm-svn: 19273
2005-01-03 16:34:19 +00:00
Reid Spencer
f309b441dc
Integrate dependency graphs.
...
Make it HTML 4.01 Strict compliant
Provide better explanations of the dependency information.
llvm-svn: 19272
2005-01-03 05:46:46 +00:00
Reid Spencer
1d3db42acf
Add library dependency and object dependency graphs.
...
llvm-svn: 19271
2005-01-03 05:30:57 +00:00
Chris Lattner
588d9471f3
new testcase for PR481
...
llvm-svn: 19270
2005-01-03 04:39:16 +00:00
Chris Lattner
e1329f4472
Bug fixed
...
llvm-svn: 19269
2005-01-03 04:20:21 +00:00
Chris Lattner
1859e90a1e
New testcase for PR487
...
llvm-svn: 19268
2005-01-03 04:15:11 +00:00
Reid Spencer
2f61775ee1
Make sure the path is properly set in the llvmgcc and llvmgxx variables.
...
llvm-svn: 19267
2005-01-03 04:05:32 +00:00
Reid Spencer
5041bdba19
Re-apply last (reverted) patch. Reverting doesn't solve the actual problem
...
and creates issues on other platforms like Cygwin and MingW.
llvm-svn: 19266
2005-01-03 04:04:54 +00:00
Jeff Cohen
c3d0ae2e48
Don't quote the PATH variable value just in case it has spaces in it, as
...
it breaks "gmake check".
llvm-svn: 19265
2005-01-03 02:44:54 +00:00
Chris Lattner
d4bb2bbce1
ADC and IMUL are also commutable.
...
llvm-svn: 19264
2005-01-03 01:27:59 +00:00
Chris Lattner
82787e90f3
This hunk:
...
- unsigned TrueValue = getReg(TrueVal, BB, BB->begin());
+ unsigned TrueValue = getReg(TrueVal);
Fixes the PPC regressions from last night.
The other hunk is just a clarity improvement.
llvm-svn: 19263
2005-01-02 23:07:31 +00:00
Chris Lattner
73bb15ed9a
Remove dead directories
...
llvm-svn: 19262
2005-01-02 22:55:16 +00:00
Chris Lattner
373f7faeca
This lib is dead
...
llvm-svn: 19261
2005-01-02 22:53:52 +00:00
Chris Lattner
196715cfb4
Remove a bunch of useless empty libraries
...
llvm-svn: 19260
2005-01-02 22:52:28 +00:00
Chris Lattner
bb2840b272
This is no longer needed.
...
llvm-svn: 19259
2005-01-02 22:50:00 +00:00
Chris Lattner
0982708a11
Testcase for PR494
...
llvm-svn: 19258
2005-01-02 21:11:11 +00:00
Chris Lattner
179457f062
xfail these tests, whcih require more info in the code generator to implement
...
correctly.
llvm-svn: 19257
2005-01-02 19:01:33 +00:00
Reid Spencer
34982d8dc8
Avoid use of -fomit-frame-pointer on FreeBSD platforms. It causes thrown
...
exceptions to abort() in cases where it should not.
Many thanks to Duraid Madina for doing the heavy lifting on the analysis
of this problem.
llvm-svn: 19256
2005-01-02 17:43:20 +00:00
Reid Spencer
74100aba4a
Quote the PATH variable value just in case it has spaces in it (like on
...
Cygwin).
llvm-svn: 19255
2005-01-02 09:45:54 +00:00
Reid Spencer
862ebf5277
Correct the case of a #include directory name, just in case.
...
llvm-svn: 19254
2005-01-02 09:45:04 +00:00
Jeff Cohen
70d13a979c
Cleanup some Visual Studio project dependencies.
...
llvm-svn: 19253
2005-01-02 04:44:36 +00:00
Jeff Cohen
2cf40e142c
Eliminate the use of the global variable hack in the X86 target that was used
...
to get Visual Studio to link in X86.lib to the executables that need it. There
is another way of doing it.
llvm-svn: 19252
2005-01-02 04:23:12 +00:00
Chris Lattner
733aac1270
Disable 2->3 address promotion of add and inc instructions to LEA's. In
...
addition to being three address, LEA's don't set the flags.
This fixes 186.crafty.
llvm-svn: 19251
2005-01-02 04:18:17 +00:00
Chris Lattner
252b68cfc8
Check in an old test that never made it into CVS
...
llvm-svn: 19250
2005-01-02 02:46:29 +00:00
Chris Lattner
e7228736e0
Add a new method.
...
llvm-svn: 19249
2005-01-02 02:38:18 +00:00
Chris Lattner
b62b45b3fc
Add support for SETNPr to lower to memory form.
...
llvm-svn: 19248
2005-01-02 02:37:46 +00:00
Chris Lattner
b7782d77c1
Implement the convertToThreeAddress method, add support for inverting JP/JNP
...
branches.
llvm-svn: 19247
2005-01-02 02:37:07 +00:00
Chris Lattner
295e45e60e
Two changes here:
...
1. Add new instructions for checking parity flags: JP, JNP, SETP, SETNP.
2. Set the isCommutable and isPromotableTo3Address bits on several
instructions.
llvm-svn: 19246
2005-01-02 02:35:46 +00:00
Chris Lattner
9590870a0d
Make the 2-address instruction lowering pass smarter in two ways:
...
1. If we are two-addressing a commutable instruction and the LHS is not the
last use of the variable, see if the instruction is the last use of the
RHS. If so, commute the instruction, allowing us to avoid a
register-register copy in many cases for common instructions like ADD, OR,
AND, etc on X86.
2. If #1 doesn't hold, and if this is an instruction that also existing in
3-address form, promote the instruction to a 3-address instruction to
avoid the register-register copy. We can do this for several common
instructions in X86, including ADDrr, INC, DEC, etc.
This patch implements test/Regression/CodeGen/X86/commute-two-addr.ll,
overlap-add.ll, and overlap-shift.ll when I check in the X86 support for it.
llvm-svn: 19245
2005-01-02 02:34:12 +00:00
Chris Lattner
835ae42300
Add several testcases for new optimizations in the code generator.
...
llvm-svn: 19244
2005-01-02 02:30:04 +00:00
Chris Lattner
733c82bfbf
Expose isConvertibleToThreeAddress and isCommutable bits to the code generator.
...
llvm-svn: 19243
2005-01-02 02:29:04 +00:00
Chris Lattner
a1a6be7e6e
Add some bits that can be set on instructions. Renumber existing bits so
...
they are dense. Add a virtual method that targets can choose to implement.
llvm-svn: 19242
2005-01-02 02:28:31 +00:00
Chris Lattner
182db0cac0
Add some bits that can be set for instructions.
...
llvm-svn: 19241
2005-01-02 02:27:48 +00:00
Reid Spencer
4e8dd44733
Make printing a warning message optional in CheckBytecodeOutputToConsole.
...
llvm-svn: 19240
2005-01-02 00:10:03 +00:00
Reid Spencer
742af2f2eb
Prevent output of bytecode to std::cout unless the --force flag is given.
...
This prevents bytecode splats with usage like: cat file.ll | llvm-as -
llvm-svn: 19239
2005-01-02 00:08:46 +00:00
Reid Spencer
c967184a50
Move the code for printing out a warning about bytecode output to a console
...
into lib/Support so it can be used with other tools.
llvm-svn: 19238
2005-01-01 23:57:01 +00:00
Reid Spencer
1263cfd14f
Implement a function to print a warning if bytecode output is to be sent to
...
a terminal/console.
llvm-svn: 19237
2005-01-01 23:56:20 +00:00
Jeff Cohen
b90c31fb49
Add functions for determining if the stdin/out/err is connected to a
...
console or not.
llvm-svn: 19236
2005-01-01 22:54:05 +00:00
Jeff Cohen
e98c7b6f26
Add llvm-link, Linker projects to Visual Studio.
...
llvm-svn: 19235
2005-01-01 22:32:26 +00:00
Jeff Cohen
8db20fe964
Add missing header files to projects.
...
llvm-svn: 19234
2005-01-01 22:30:19 +00:00
Reid Spencer
6f802ba876
Add functions for determining if the stdin/out/err is connected to a
...
console or not.
llvm-svn: 19233
2005-01-01 22:29:26 +00:00
Jeff Cohen
ca7d19e2af
Fix typo 'ompress' => 'compress'.
...
llvm-svn: 19232
2005-01-01 22:10:32 +00:00
Jeff Cohen
b06a83e285
Add llvm-ranlib project to Visual Studio.
...
llvm-svn: 19231
2005-01-01 22:05:56 +00:00
Jeff Cohen
5c3261e5f2
Add llvm-ar project to Visual Studio.
...
llvm-svn: 19230
2005-01-01 22:00:28 +00:00
Jeff Cohen
16034813e6
Add -v option to bison.
...
llvm-svn: 19229
2005-01-01 21:35:39 +00:00
Jeff Cohen
49123973f8
Add missing file SystemUtils.cpp to Support project.
...
llvm-svn: 19228
2005-01-01 21:34:18 +00:00
Jeff Cohen
1d2912470a
Add llvm-as project to Visual Studio
...
llvm-svn: 19227
2005-01-01 20:51:41 +00:00
Jeff Cohen
980d6098b6
Add llvm-dis project to Visual Studio
...
llvm-svn: 19226
2005-01-01 20:18:03 +00:00
Jeff Cohen
08f30c0c33
Put executables into a single directory
...
llvm-svn: 19225
2005-01-01 19:37:14 +00:00
Jeff Cohen
4560c21dd2
Fix bountiful sources of VC++ 'possible loss of data' warnings
...
llvm-svn: 19224
2005-01-01 18:58:23 +00:00
Jeff Cohen
031c3d891c
Improve TableGen dependencies
...
Move TableGen generated files out of the src tree
Add descriptions to the custom build steps
llvm-svn: 19223
2005-01-01 18:17:40 +00:00
Reid Spencer
3b8faf995d
Add HAVE_SBRK
...
llvm-svn: 19222
2005-01-01 18:16:16 +00:00
Reid Spencer
9f0ce1772c
Ignore some files
...
llvm-svn: 19221
2005-01-01 18:14:18 +00:00
Chris Lattner
86102b8ad5
This is a bulk commit that implements the following primary improvements:
...
* We can now fold cast instructions into select instructions that
have at least one constant operand.
* We now optimize expressions more aggressively based on bits that are
known to be zero. These optimizations occur a lot in code that uses
bitfields even in simple ways.
* We now turn more cast-cast sequences into AND instructions. Before we
would only do this if it if all types were unsigned. Now only the
middle type needs to be unsigned (guaranteeing a zero extend).
* We transform sign extensions into zero extensions in several cases.
This corresponds to these test/Regression/Transforms/InstCombine testcases:
2004-11-22-Missed-and-fold.ll
and.ll: test28-29
cast.ll: test21-24
and-or-and.ll
cast-cast-to-and.ll
zeroext-and-reduce.ll
llvm-svn: 19220
2005-01-01 16:22:27 +00:00
Chris Lattner
da15d4ba49
New testcases that we should combine.
...
llvm-svn: 19219
2005-01-01 16:14:46 +00:00
Chris Lattner
584e38313b
New testcase for common bitfield manipulation instruction sequences.
...
llvm-svn: 19218
2005-01-01 16:14:18 +00:00
Chris Lattner
421477885f
Add a bunch of tests for cases that should be eliminated.
...
llvm-svn: 19217
2005-01-01 16:13:43 +00:00
Chris Lattner
329d0255ae
Add a bunch of tests for ANDs that should be eliminated.
...
llvm-svn: 19216
2005-01-01 16:13:19 +00:00
Chris Lattner
ea4c66a083
This now works.
...
llvm-svn: 19215
2005-01-01 16:12:52 +00:00
Chris Lattner
83df5d25b7
Fix a FIXME: Select instructions on longs were miscompiled.
...
While we're at it, improve codegen of select instructions. For this
testcase:
int %test(bool %C, int %A, int %B) {
%D = select bool %C, int %A, int %B
ret int %D
}
We used to generate this code:
_test:
cmpwi cr0, r3, 0
bne .LBB_test_2 ;
.LBB_test_1: ;
b .LBB_test_3 ;
.LBB_test_2: ;
or r5, r4, r4
.LBB_test_3: ;
or r3, r5, r5
blr
Now we emit:
_test:
cmpwi cr0, r3, 0
bne .LBB_test_2 ;
.LBB_test_1: ;
or r4, r5, r5
.LBB_test_2: ;
or r3, r4, r4
blr
-Chris
llvm-svn: 19214
2005-01-01 16:10:12 +00:00
Chris Lattner
78394258ae
Substantially improve the code generated by non-folded setcc instructions.
...
In particular, instead of compiling this:
bool %test(int %A, int %B) {
%C = setlt int %A, %B
ret bool %C
}
to this:
test:
save %sp, -96, %sp
subcc %i0, %i1, %g0
bl .LBBtest_1 !
nop
ba .LBBtest_2 !
nop
.LBBtest_1: !
or %g0, 1, %i0
ba .LBBtest_3 !
nop
.LBBtest_2: !
or %g0, 0, %i0
ba .LBBtest_3 !
nop
.LBBtest_3: !
restore %g0, %g0, %g0
retl
nop
We now compile it to this:
test:
save %sp, -96, %sp
subcc %i0, %i1, %g0
or %g0, 1, %i0
bl .LBBtest_2 !
nop
.LBBtest_1: !
or %g0, %g0, %i0
.LBBtest_2: !
restore %g0, %g0, %g0
retl
nop
llvm-svn: 19213
2005-01-01 16:06:57 +00:00
Chris Lattner
3215bb6049
Implement SimplifyCFG/DeadSetCC.ll
...
SimplifyCFG is one of those passes that we use for final cleanup: it should
not rely on other passes to clean up its garbage. This fixes the "why are
trivially dead setcc's in the output of gccas" problem.
llvm-svn: 19212
2005-01-01 16:02:12 +00:00
Chris Lattner
21adf7d36e
Add new test to make sure simplifycfg doesn't leave around trivially
...
dead instructions.
llvm-svn: 19211
2005-01-01 16:00:56 +00:00
Chris Lattner
1ece6f83ba
Allow getZeroExtend and getSignExtend to work with boolean inputs.
...
llvm-svn: 19210
2005-01-01 15:59:57 +00:00
Chris Lattner
3196de7663
Add a useful accessor
...
llvm-svn: 19209
2005-01-01 15:58:55 +00:00
Chris Lattner
094e8b660b
Add two helper functions.
...
llvm-svn: 19208
2005-01-01 15:58:41 +00:00
Reid Spencer
97d6cf262f
Update to autoconf 2.59 standards.
...
llvm-svn: 19207
2005-01-01 09:26:55 +00:00
Reid Spencer
948499e820
Correct the conditional test for non-portable tools so that it will
...
correctly omit them for non-Unix operating systems.
llvm-svn: 19206
2004-12-31 22:56:14 +00:00
Reid Spencer
d7287e05e3
For PR351:
...
Make LLVM_ON_UNIX and LLVM_ON_WIN32 available in the makefiles
llvm-svn: 19205
2004-12-31 22:54:28 +00:00
Reid Spencer
cdf4d46551
Describe both objdir==srcdir and objdir!=srcdir methods of building LLVM
...
libraries and tools. Thanks to Henrik Bach for this suggestion.
llvm-svn: 19204
2004-12-31 19:48:59 +00:00
Jeff Cohen
b6ecaa2d1c
Where do these tabs keep coming from???
...
llvm-svn: 19203
2004-12-31 19:03:31 +00:00
Jeff Cohen
25dcdcc973
Mostly cleanup, but also some bug fixes, for win32/Path.cpp
...
llvm-svn: 19202
2004-12-31 19:01:08 +00:00
Reid Spencer
0f371a1637
Fix a compilation error for the case where mallinfo() is not available.
...
llvm-svn: 19201
2004-12-31 05:53:27 +00:00
Reid Spencer
0fcca1262b
For PR351:
...
* lib/System depends on sbrk(3), make sure we check for it.
llvm-svn: 19200
2004-12-31 05:49:15 +00:00
Jeff Cohen
63f13c4cbc
Get rid of those nasty tabs...
...
llvm-svn: 19199
2004-12-31 05:07:26 +00:00
Jeff Cohen
98aff88c9b
Bring win32/Path.cpp up to date with respect to Unix/Path.cpp
...
llvm-svn: 19198
2004-12-31 04:39:07 +00:00