Chris Lattner
bde92f3c03
Do not make i have bigger scope that we need
...
llvm-svn: 17483
2004-11-05 04:47:37 +00:00
Chris Lattner
b5ff07e46e
Remove dead vars
...
llvm-svn: 17482
2004-11-05 04:46:22 +00:00
Chris Lattner
064071600d
Fix some warnings on VC++
...
llvm-svn: 17481
2004-11-05 04:45:43 +00:00
Nate Begeman
bc8bc24d28
Thanks to sabre for pointing out that we were incorrectly codegen'ing
...
int test(int x) { return 32768 - x; }
Fixed by teaching the function that checks a constant's validity to be used
as an immediate argument about subtract-from instructions.
llvm-svn: 17476
2004-11-04 19:43:18 +00:00
Brian Gaeke
85e7df8097
Handle "call" operands of type long/ulong passed in registers.
...
llvm-svn: 17464
2004-11-04 00:27:04 +00:00
Chris Lattner
3b6d1045d3
Don't call Constant::getNullValue when the argument could be VoidTy
...
llvm-svn: 17457
2004-11-03 18:51:26 +00:00
Chris Lattner
f2976f16ce
Fix this function to not say that longs have 8-byte alignment on X86/PPC.
...
This method is really a gross hack, but at least we can make it work on
the targets we support right now.
This bug fix stops a crash in a testcase reduced from 176.gcc
llvm-svn: 17443
2004-11-02 22:18:18 +00:00
Tanya Lattner
bd82bbff7c
Added gross hacks such as creating my own def-use map, and picking on Instruction that I can add all my TmpInstructions to its MCFI.
...
llvm-svn: 17441
2004-11-02 21:04:56 +00:00
Chris Lattner
d9696aa7b8
Fix a warning
...
llvm-svn: 17431
2004-11-02 15:27:57 +00:00
Chris Lattner
33ed2c8984
* Rearrange code slightly
...
* Disable broken transforms for simplifying (setcc (cast X to larger), CI)
where CC is not != or ==
llvm-svn: 17422
2004-11-02 03:50:32 +00:00
Chris Lattner
10de12fd46
Add placeholder variable to make Win32 work, applied for Morten Ofstad
...
llvm-svn: 17406
2004-11-01 20:10:20 +00:00
Chris Lattner
b81520727e
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
3083f2a424
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
8572d582cf
Fix comment
...
llvm-svn: 17377
2004-10-31 21:54:51 +00:00
Chris Lattner
d72b6b1e77
Improve comment
...
llvm-svn: 17375
2004-10-31 19:57:43 +00:00
Chris Lattner
14d85c9b09
Add more paranoid assertions :)
...
llvm-svn: 17367
2004-10-31 17:45:40 +00:00
Reid Spencer
acb1305e99
Internalize variable names to prevent recursive assignment. Cleanup docs.
...
llvm-svn: 17359
2004-10-30 09:19:36 +00:00
Chris Lattner
29b6259de3
Fix some more problems where we called getOffset before getNode()
...
llvm-svn: 17358
2004-10-30 07:21:19 +00:00
Chris Lattner
4b741eab69
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
14dfc01ad5
Fix more undefined behavior
...
llvm-svn: 17356
2004-10-30 04:22:45 +00:00
Chris Lattner
c17cd85776
* 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
Tanya Lattner
8b938744dc
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
4e78536fa3
* 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
Brian Gaeke
c66a1d540b
Change name of target lib to conform to new naming scheme.
...
llvm-svn: 17347
2004-10-29 21:57:16 +00:00
Brian Gaeke
db07ac46f0
Remove dependency on MRegisterInfo::getRegClass
...
llvm-svn: 17346
2004-10-29 21:42:27 +00:00
Misha Brukman
dba13ac3cb
The Alpha (tm) intrinsics have never been used anywhere
...
llvm-svn: 17340
2004-10-29 18:43:17 +00:00
Brian Gaeke
a757bae04f
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
Alkis Evlogimenos
e88c2aaed7
Gep indices must be of int, uint, long or ulong type.
...
llvm-svn: 17313
2004-10-28 06:43:38 +00:00
Reid Spencer
1be896397a
Fix library name.
...
llvm-svn: 17307
2004-10-28 05:37:24 +00:00
Alkis Evlogimenos
1162280a0d
Fix library name.
...
llvm-svn: 17306
2004-10-28 05:36:48 +00:00
Reid Spencer
36b5b2c07e
Fix library name.
...
llvm-svn: 17305
2004-10-28 05:32:01 +00:00
Reid Spencer
ccdfdd7346
Fix name of library
...
llvm-svn: 17304
2004-10-28 05:30:54 +00:00
Reid Spencer
a909f95ebd
Make sure that the yacc and lex output are specified as BUILT_SOURCES.
...
Correct the dependency of the Lexer.o file on the constructed
llvmAsmParser.h header file. It is not the Lexer.cpp file that depends on
the header, its the output of compiling Lexer.cpp, Lexer.o
llvm-svn: 17289
2004-10-28 00:43:24 +00:00
Reid Spencer
d3f7233495
Change Library Names Not To Conflict With Others When Installed
...
llvm-svn: 17286
2004-10-27 23:18:45 +00:00
Reid Spencer
1a344dfd95
Changes to support rand48 tests
...
llvm-svn: 17284
2004-10-27 23:03:44 +00:00
Chris Lattner
dd0094e4ed
Convert 'struct' to 'class' in various places to adhere to the coding standards
...
and work better with VC++. Patch contributed by Morten Ofstad!
llvm-svn: 17281
2004-10-27 16:14:51 +00:00
Nate Begeman
2a64d462d9
Move destructor out of line to avoid vtable emission in every file that includes the header. Thanks to sabre.
...
llvm-svn: 17278
2004-10-27 06:00:53 +00:00
Chris Lattner
000424b69e
Hrm, this code was severely botched. As it turns out, this patch:
...
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041018/019708.html
exposed ANOTHER latent bug in this xform, which caused Prolangs-C/bison to fill
the zion nightly tester disk up and make the tester barf.
This is obviously not a good thing, so lets fix this bug shall we? :)
llvm-svn: 17276
2004-10-27 05:57:15 +00:00
Nate Begeman
a6fafb1f64
Fix the build by eliminating some more dead code. That'll learn me not to listen to Reid
...
llvm-svn: 17275
2004-10-27 05:44:23 +00:00
Chris Lattner
abfae1c72e
Initialize with the correct constant type
...
llvm-svn: 17270
2004-10-27 03:55:24 +00:00
Chris Lattner
d8ac6d4a25
Plug a memory leak in the asmparser. It turns out that we were leaking
...
the strings for basic block labels in some cases. This amounted to about
120K of memory for namd, a medium sized program.
llvm-svn: 17262
2004-10-26 18:26:14 +00:00
Chris Lattner
3a79669263
add support for UndefValue
...
llvm-svn: 17260
2004-10-26 16:23:03 +00:00
Chris Lattner
2c73917686
Move method bodies that depend on <algorithm> from MBB.h to MBB.cpp
...
llvm-svn: 17253
2004-10-26 15:43:42 +00:00
Chris Lattner
a361504a90
Clean up the MachineBasicBlock.h file, percolating #includes into this file.
...
Patch contributed by Morten Ofstad
llvm-svn: 17251
2004-10-26 15:35:58 +00:00
Nate Begeman
64ddf151fa
Remove include of MRegisterInfo.h, since it is already included by
...
SkeletonGenRegisterInfo.h.inc
llvm-svn: 17245
2004-10-26 06:04:23 +00:00
Nate Begeman
46c3a8875f
Remove file that is no longer used, and move include of MRegisterInfo.h
...
from PowerPCFrameInfo.h to PowerPCAsmPrinter.cpp where it is actually
needed.
llvm-svn: 17244
2004-10-26 06:02:38 +00:00
Nate Begeman
7c3c97af10
Eliminate usage of MRegisterInfo::getRegClass(physreg)
...
llvm-svn: 17240
2004-10-26 05:40:45 +00:00
Chris Lattner
0dbd792854
Fix the interpreter crash that Michael McCracken found
...
llvm-svn: 17239
2004-10-26 05:35:14 +00:00
Chris Lattner
6e775d56cf
Reduce usage of MRegisterInfo::getRegClass
...
llvm-svn: 17238
2004-10-26 05:29:18 +00:00
Nate Begeman
ae98298003
Update to-do list
...
llvm-svn: 17235
2004-10-26 04:10:53 +00:00