Chris Lattner
8af7424920
Speed up the tail duplication pass on the testcase below from 68.2s to 1.23s:
...
#define CL0(a) case a: f(); goto c;
#define CL1(a) CL0(a##0) CL0(a##1) CL0(a##2) CL0(a##3) CL0(a##4) CL0(a##5) \
CL0(a##6) CL0(a##7) CL0(a##8) CL0(a##9)
#define CL2(a) CL1(a##0) CL1(a##1) CL1(a##2) CL1(a##3) CL1(a##4) CL1(a##5) \
CL1(a##6) CL1(a##7) CL1(a##8) CL1(a##9)
#define CL3(a) CL2(a##0) CL2(a##1) CL2(a##2) CL2(a##3) CL2(a##4) CL2(a##5) \
CL2(a##6) CL2(a##7) CL2(a##8) CL2(a##9)
#define CL4(a) CL3(a##0) CL3(a##1) CL3(a##2) CL3(a##3) CL3(a##4) CL3(a##5) \
CL3(a##6) CL3(a##7) CL3(a##8) CL3(a##9)
void f();
void a() {
int b;
c: switch (b) {
CL4(1)
}
}
This comes from GCC PR 15524
llvm-svn: 17390
2004-11-01 07:05:07 +00:00
Chris Lattner
93d1e39f3e
Do not compute the predecessor list for a block unless we need it.
...
This speeds up simplifycfg on this program, from 44.87s to 0.29s (with
a profiled build):
#define CL0(a) case a: goto c;
#define CL1(a) CL0(a##0) CL0(a##1) CL0(a##2) CL0(a##3) CL0(a##4) CL0(a##5) \
CL0(a##6) CL0(a##7) CL0(a##8) CL0(a##9)
#define CL2(a) CL1(a##0) CL1(a##1) CL1(a##2) CL1(a##3) CL1(a##4) CL1(a##5) \
CL1(a##6) CL1(a##7) CL1(a##8) CL1(a##9)
#define CL3(a) CL2(a##0) CL2(a##1) CL2(a##2) CL2(a##3) CL2(a##4) CL2(a##5) \
CL2(a##6) CL2(a##7) CL2(a##8) CL2(a##9)
#define CL4(a) CL3(a##0) CL3(a##1) CL3(a##2) CL3(a##3) CL3(a##4) CL3(a##5) \
CL3(a##6) CL3(a##7) CL3(a##8) CL3(a##9)
void f();
void a() {
int b;
c: switch (b) {
CL4(1)
}
}
This testcase is contrived to expose N^2 behavior, but this patch should speedup
simplifycfg on any programs that use large switch statements. This testcase
comes from GCC PR17895.
llvm-svn: 17389
2004-11-01 06:53:58 +00:00
Chris Lattner
615e7fbcf3
When compiling a file, indicate what build it is for
...
llvm-svn: 17388
2004-11-01 06:14:59 +00:00
Chris Lattner
01f2381c72
* Do not refer to ActualCallees in CBU, when we can do it locally.
...
* *DO NOT* print CBU graphs when asked to print our own. This is just
FREAKING confusing and misleading: it's better to not print anything.
* Simplify and clean up some code
* Add some more paranoia assertion checking code that I found to track
down this bug:
* Fix a nasty bug that was causing us to crash on Prolangs-C++/objects,
where we were missing processing some graphs. This hunk is the bugfix:
- if (!I->isExternal() && !FoldedGraphsMap.count(I))
+ if (!I->isExternal() && !ValMap.count(I))
urg!
llvm-svn: 17386
2004-10-31 23:41:26 +00:00
Reid Spencer
b1454879b3
Wrap to 80 cols
...
llvm-svn: 17385
2004-10-31 23:24:31 +00:00
Reid Spencer
0b40fdb0ad
Add UsingLibraries.html link.
...
llvm-svn: 17384
2004-10-31 23:02:38 +00:00
Chris Lattner
aeb2b16c45
Simplify graph traversal, improve grammar
...
llvm-svn: 17383
2004-10-31 23:01:34 +00:00
Reid Spencer
1e3586ee1d
Give table headers the striped background.
...
llvm-svn: 17382
2004-10-31 23:01:02 +00:00
Reid Spencer
0d6d8d0af5
* Moved from ObjectFiles.html
...
* Changed names of libraries to reflect new naming scheme
* Added some more introductory material
* Added a rule of thumb.
llvm-svn: 17381
2004-10-31 23:00:25 +00:00
Reid Spencer
67fe9440e6
Renamed UsingLibraries.html
...
llvm-svn: 17380
2004-10-31 22:59:06 +00:00
Reid Spencer
737424ced3
Get the shared library extension right on all platforms, regardless of what
...
Chris wants on his platform.
llvm-svn: 17379
2004-10-31 22:53:06 +00:00
Chris Lattner
d49bd175f0
Do not do horrible things to the CBU graphs. In particular, we do NOT own
...
the CBU graphs, copy them instead of hacking on the CBU graphs.
Also, instead of forwarding request from ECGraphs clients to the CBU graphs
clients, service them ourselves.
Finally, remove a broken "optimization"
llvm-svn: 17378
2004-10-31 21:56:11 +00:00
Chris Lattner
e3c00e9eee
Fix comment
...
llvm-svn: 17377
2004-10-31 21:54:51 +00:00
Reid Spencer
68172d44c2
Fix output for building shared libraries per Chris' requirements
...
llvm-svn: 17376
2004-10-31 21:07:34 +00:00
Chris Lattner
70fdac83e3
Improve comment
...
llvm-svn: 17375
2004-10-31 19:57:43 +00:00
Reid Spencer
991f66abc1
Actually use the correct variable name for building bytecode files.
...
llvm-svn: 17374
2004-10-31 18:52:15 +00:00
Reid Spencer
8adaaf474a
Add the preconditions target per suggestion by Henrik Bach.
...
llvm-svn: 17373
2004-10-31 18:50:34 +00:00
Chris Lattner
d3d23f8aa0
Fix another bug in Prolangs-C++/objects
...
llvm-svn: 17372
2004-10-31 18:13:19 +00:00
Reid Spencer
bbc642ee5e
One more missing end tag.
...
llvm-svn: 17371
2004-10-31 17:58:58 +00:00
Reid Spencer
301f20a824
Correct tag usage for HTML 4.01 Strict compliance
...
llvm-svn: 17370
2004-10-31 17:56:50 +00:00
Reid Spencer
f4215f71d3
Add a tutorial and some more general concepts.
...
llvm-svn: 17369
2004-10-31 17:51:38 +00:00
Chris Lattner
7ca10b1faf
Only call getNodeForValue on pointer arguments! this fixes a problem running
...
on Prolangs-C++/objects
llvm-svn: 17368
2004-10-31 17:47:48 +00:00
Chris Lattner
3f7dbfc898
Add more paranoid assertions :)
...
llvm-svn: 17367
2004-10-31 17:45:40 +00:00
Misha Brukman
619a24c4d9
No, really, the library name is `LLVMexecve'
...
llvm-svn: 17366
2004-10-31 17:30:52 +00:00
Vikram S. Adve
254afc4614
Fix patterns to match only one-char words.
...
llvm-svn: 17365
2004-10-30 23:11:26 +00:00
Reid Spencer
965ff465eb
Add a few more terms.
...
llvm-svn: 17364
2004-10-30 21:40:28 +00:00
Reid Spencer
1fdc95c239
Complete the description of public variables. Internal variables are listed
...
but not described. It might just stay that way.
llvm-svn: 17363
2004-10-30 21:39:42 +00:00
Reid Spencer
a537198f2c
Change macro names per naming standard in Makefile.rules.
...
llvm-svn: 17361
2004-10-30 09:26:22 +00:00
Reid Spencer
f22aa469c9
Correct macro names per naming standard in Makefile.rules
...
llvm-svn: 17360
2004-10-30 09:25:27 +00:00
Reid Spencer
f88808ae43
Internalize variable names to prevent recursive assignment. Cleanup docs.
...
llvm-svn: 17359
2004-10-30 09:19:36 +00:00
Chris Lattner
c76fef1248
Fix some more problems where we called getOffset before getNode()
...
llvm-svn: 17358
2004-10-30 07:21:19 +00:00
Chris Lattner
8aa0bafe1a
Fix three bugs:
...
1. Calls to external global VARIABLES should not be treated as a call to an
external function
2. Efficiently deleting an element from a vector by using std::swap with
the back, then pop_back is NOT a good way to keep the vector sorted.
3. Our hope of having stuff get deleted by making them redundant just won't
work. In particular, if we have three calls in sequence that should be
merged: A, B, C first we unify B into A. To be sure that they appeared
identical (so B would be erased) we set B = A. On the next step, we
unified C into A and set C = A. Unfortunately, this is no guarantee that
C = B, so we would fail to delete the dead call. Switch to a more
explicit scheme.
llvm-svn: 17357
2004-10-30 05:41:23 +00:00
Chris Lattner
bc740090a9
Fix more undefined behavior
...
llvm-svn: 17356
2004-10-30 04:22:45 +00:00
Chris Lattner
ba96f0fd83
* Add a method
...
* change some uses of NH.getNode() in a bool context to use !NH.isNull()
* Fix a bunch of places where we depended on the (undefined) order of
evaluation of arguments to function calls to ensure that getNode() was
called before getOffset(). In practice, this was NOT happening.
llvm-svn: 17354
2004-10-30 04:05:01 +00:00
Chris Lattner
334df0463d
Add an assertion and a method
...
llvm-svn: 17353
2004-10-30 04:03:47 +00:00
Chris Lattner
b508b00e6b
No really, this is LLVM!
...
llvm-svn: 17352
2004-10-30 00:57:52 +00:00
Tanya Lattner
ddebd1eeaa
Fixed bug with infinite epilogues.
...
Fixed issue with generating the partial order. It now adds the nodes not in recurrences in sets for each connected component.
llvm-svn: 17351
2004-10-30 00:39:07 +00:00
Misha Brukman
b56287dfd2
Fix file header comment
...
llvm-svn: 17350
2004-10-29 23:26:09 +00:00
Misha Brukman
c7c8d88804
* Fix compilation on AIX: GCC's fixincludes eliminates isinf() declaration
...
* Move file comment to the top of the header where it belongs
llvm-svn: 17349
2004-10-29 23:17:45 +00:00
Reid Spencer
bd44bbdc0e
Don't modify user vars because they will get passed down (modified) to
...
sub-makes and recursively append causing huge command lines and incorrect
compilation results.
Also, fix the printvars target to align its output and ensure that the
contents of variables can't get interpreted by the shell.
llvm-svn: 17348
2004-10-29 22:14:56 +00:00
Brian Gaeke
b87e08e0ef
Change name of target lib to conform to new naming scheme.
...
llvm-svn: 17347
2004-10-29 21:57:16 +00:00
Brian Gaeke
6254a798ca
Remove dependency on MRegisterInfo::getRegClass
...
llvm-svn: 17346
2004-10-29 21:42:27 +00:00
Misha Brukman
3415c77f59
Fix grammar (i.e.)
...
llvm-svn: 17343
2004-10-29 19:20:42 +00:00
Reid Spencer
e6b944f2f5
Disable the build in the samples directory so that llvmc dependencies don't
...
mess up the build.
llvm-svn: 17342
2004-10-29 18:43:49 +00:00
Misha Brukman
a8816d3fe2
The Alpha (tm) intrinsics aren't even being used
...
llvm-svn: 17341
2004-10-29 18:43:43 +00:00
Misha Brukman
8d8fc6529e
The Alpha (tm) intrinsics have never been used anywhere
...
llvm-svn: 17340
2004-10-29 18:43:17 +00:00
Misha Brukman
8600a7ac84
LLEE execve() wrapper library has changed its name and location
...
llvm-svn: 17339
2004-10-29 18:36:51 +00:00
Brian Gaeke
9a51b8ca7c
When emitting debug msgs for function stubs, don't truncate the
...
printed pointer value if sizeof(unsigned) != pointer size. Instead,
use uintptr_t.
llvm-svn: 17338
2004-10-29 18:22:45 +00:00
Vikram S. Adve
089ade78fd
Print P and [AR] files on update.
...
llvm-svn: 17337
2004-10-29 17:43:19 +00:00
Reid Spencer
8b091689db
Make sure the LLVM_CONFIG_DIR environment variable is set so we don't get
...
error messages from the compiler.
llvm-svn: 17335
2004-10-29 06:42:38 +00:00