Chris Lattner
ee59d4bf04
Fix a bug in my checkin from last night that caused miscompilations of
...
186.crafty, fhourstones and 132.ijpeg.
Bugpoint makes really nasty miscompilations embarassingly easy to find. It
narrowed it down to the instcombiner and this testcase (from fhourstones):
bool %l7153_l4706_htstat_loopentry_2E_4_no_exit_2E_4(int* %i, [32 x int]* %works, int* %tmp.98.out) {
newFuncRoot:
%tmp.96 = load int* %i ; <int> [#uses=1]
%tmp.97 = getelementptr [32 x int]* %works, long 0, int %tmp.96 ; <int*> [#uses=1]
%tmp.98 = load int* %tmp.97 ; <int> [#uses=2]
%tmp.99 = load int* %i ; <int> [#uses=1]
%tmp.100 = and int %tmp.99, 7 ; <int> [#uses=1]
%tmp.101 = seteq int %tmp.100, 7 ; <bool> [#uses=2]
%tmp.102 = cast bool %tmp.101 to int ; <int> [#uses=0]
br bool %tmp.101, label %codeRepl4.exitStub, label %codeRepl3.exitStub
codeRepl4.exitStub: ; preds = %newFuncRoot
store int %tmp.98, int* %tmp.98.out
ret bool true
codeRepl3.exitStub: ; preds = %newFuncRoot
store int %tmp.98, int* %tmp.98.out
ret bool false
}
... which only has one combination performed on it:
$ llvm-as < t.ll | opt -instcombine -debug | llvm-dis
IC: Old = %tmp.101 = seteq int %tmp.100, 7 ; <bool> [#uses=1]
New = setne int %tmp.100, 0 ; <bool>:<badref> [#uses=0]
IC: MOD = br bool %tmp.101, label %codeRepl3.exitStub, label %codeRepl4.exitStub
IC: MOD = %tmp.97 = getelementptr [32 x int]* %works, uint 0, int %tmp.96 ; <int*> [#uses=1]
It doesn't get much better than this. :)
llvm-svn: 14109
2004-06-10 02:33:20 +00:00
Chris Lattner
c8e7e298c1
More minor cleanups
...
llvm-svn: 14108
2004-06-10 02:12:35 +00:00
Chris Lattner
df20a4d589
Eliminate many occurrances of Instruction::
...
llvm-svn: 14107
2004-06-10 02:07:29 +00:00
Chris Lattner
88ba175c1e
Share some code
...
llvm-svn: 14106
2004-06-10 01:57:38 +00:00
Chris Lattner
867653ad6a
Add new BinaryOperator::createAdd/Sub/... methods to avoid having to type
...
llvm::Instruction:: all of the time.
llvm-svn: 14105
2004-06-10 01:43:29 +00:00
Chris Lattner
68a038e6a1
Tolerate more errors
...
llvm-svn: 14104
2004-06-09 22:22:10 +00:00
Brian Gaeke
5b03a0628f
Encode %fsr correctly; don't fail an assertion.
...
llvm-svn: 14103
2004-06-09 21:54:59 +00:00
Brian Gaeke
87d8878f6d
Fix encoding of ST*FSR instructions.
...
llvm-svn: 14102
2004-06-09 21:54:58 +00:00
Brian Gaeke
87c75632ee
Fix assertion failure message to have the right method name.
...
llvm-svn: 14101
2004-06-09 20:44:42 +00:00
Chris Lattner
757ee0b533
Make the asmwriter much more tolerant of errors (which are common when working
...
on new front-ends and stuff). Also get rid of some tabs that snuck in.
llvm-svn: 14100
2004-06-09 19:41:19 +00:00
Reid Spencer
f8d610ca73
Columnized the compilation statistics for easier reading.
...
llvm-svn: 14099
2004-06-09 18:29:15 +00:00
Chris Lattner
4408630c67
Fix the really bizarre stuff that happened last night in the tester
...
due to non-numeric diff failures that caused fpcmp to go into infinite loops
llvm-svn: 14098
2004-06-09 18:28:53 +00:00
Reid Spencer
8beac69819
Made it possible for the printInfoComment method to invoke getSlot in
...
such a way that if the Value being printed is standalone that we don't
assert and abort but just print ":??" for the slot number instead.
llvm-svn: 14097
2004-06-09 15:26:53 +00:00
John Criswell
9095c64147
Fix for PR#366. We use getClassB() so that we can handle cast instructions
...
that cast to bool.
llvm-svn: 14096
2004-06-09 15:18:51 +00:00
Chris Lattner
35167c3087
Implement InstCombine/select.ll:test15*
...
llvm-svn: 14095
2004-06-09 07:59:58 +00:00
Chris Lattner
ce527c8e6d
More instcombine testcases
...
llvm-svn: 14094
2004-06-09 07:59:40 +00:00
Reid Spencer
2acee7e4d6
Cleanup alignment of output.
...
llvm-svn: 14093
2004-06-09 06:22:00 +00:00
Reid Spencer
1e47e066ad
Add some new fields for bytecode analysis.
...
llvm-svn: 14092
2004-06-09 06:18:53 +00:00
Reid Spencer
cc4e35a404
Implement analysis output. Don't dump function details unless requested.
...
llvm-svn: 14091
2004-06-09 06:17:58 +00:00
Reid Spencer
839fa681f6
Implement some rudimentary analysis.
...
llvm-svn: 14090
2004-06-09 06:16:43 +00:00
Reid Spencer
f1598b0efa
Clean up indentation of file body output.
...
Don't dump functions unless "detailedResults" is requested.
llvm-svn: 14089
2004-06-09 06:16:19 +00:00
Reid Spencer
fc6f5508aa
Move parsing details to Parser.cpp.
...
llvm-svn: 14088
2004-06-09 06:15:21 +00:00
Reid Spencer
670c26d3af
Bring some things out of header files that belong only in this file.
...
llvm-svn: 14087
2004-06-09 06:14:52 +00:00
Chris Lattner
396dbfe327
Be more careful about the order we put stuff onto the worklist. This allow us to
...
collapse this:
bool %le(int %A, int %B) {
%c1 = setgt int %A, %B
%tmp = select bool %c1, int 1, int 0
%c2 = setlt int %A, %B
%result = select bool %c2, int -1, int %tmp
%c3 = setle int %result, 0
ret bool %c3
}
into:
bool %le(int %A, int %B) {
%c3 = setle int %A, %B ; <bool> [#uses=1]
ret bool %c3
}
which is handy, because the Java FE makes these sequences all over the place.
This is tested as: test/Regression/Transforms/InstCombine/JavaCompare.ll
llvm-svn: 14086
2004-06-09 05:08:07 +00:00
Chris Lattner
7ed7d82512
New testcase that is important for the Java FE
...
llvm-svn: 14085
2004-06-09 05:07:01 +00:00
Reid Spencer
e73febc64a
Cleaned up a dead header file to prevent duplicate definition warnings
...
in doxygen.
llvm-svn: 14084
2004-06-09 04:38:34 +00:00
Chris Lattner
2dd017402b
Implement select.ll:test14*
...
llvm-svn: 14083
2004-06-09 04:24:29 +00:00
Chris Lattner
52d7430fc5
New testcase for the instruction combiner that happen often in the Java FE
...
llvm-svn: 14082
2004-06-09 04:23:57 +00:00
Chris Lattner
0c09852909
Minor tweaks
...
llvm-svn: 14081
2004-06-09 03:59:05 +00:00
Reid Spencer
4d598edc59
Regularize title of Regression Test section. Clean up some blank space.
...
llvm-svn: 14080
2004-06-09 02:07:25 +00:00
Chris Lattner
4769612be1
Bug fixed
...
llvm-svn: 14079
2004-06-09 01:09:16 +00:00
Chris Lattner
74248512eb
Workaround or a VS miscompilation bug
...
llvm-svn: 14078
2004-06-08 23:21:39 +00:00
Chris Lattner
8b52a68356
I checked and no clients expect this to return null for unconditional branches
...
Simplify code and make it more uniform.
llvm-svn: 14077
2004-06-08 22:03:05 +00:00
Chris Lattner
4c7a24af44
Don't grab the condition of unconditional branches!
...
This fixes PR363
llvm-svn: 14076
2004-06-08 21:50:30 +00:00
Brian Gaeke
c365e7cc99
Fix a minor bug in the map - since this pass adds a global symbol, it must be
...
accounted for in the map (at least, in its current format).
llvm-svn: 14075
2004-06-08 20:08:30 +00:00
Brian Gaeke
78d03b523f
Add a forwarding method pop_front() that allows you to delete instructions
...
from the beginning of a MBB.
llvm-svn: 14074
2004-06-08 18:52:47 +00:00
Brian Gaeke
76b6426a8c
Add a TmpInstruction ctor that doesn't take a MCFI.
...
llvm-svn: 14073
2004-06-08 18:52:46 +00:00
Brian Gaeke
223b345279
Explicitly specify libtool tag "CXX" so that if you setenv CXX to something
...
libtool can't parse, e.g., "/path/to/g++ -some-funny-options",
then it will still be able to compile and link.
llvm-svn: 14072
2004-06-08 18:52:45 +00:00
Chris Lattner
a20f4aab7f
Fix a link error using VS8.0
...
llvm-svn: 14071
2004-06-08 17:53:24 +00:00
Chris Lattner
4409487746
Apparently a particular vendor compiler uses the struct/class tag to MANGLE
...
symbols with. Therefore, if you do not use struct/class consistently, you can
get LINK ERRORS. grr.
This fixes the link errors for libsupport and vmcore.
-Chris
llvm-svn: 14070
2004-06-08 17:44:21 +00:00
Misha Brukman
23c2f67fda
Fix case of doxygen directive `\p': it's lowercase.
...
llvm-svn: 14068
2004-06-08 13:49:17 +00:00
Reid Spencer
7d4b814e86
* Fix indentation of Regression Test Results by making sure the
...
GetQMTestResults function closes all its open tags.
* Cause XFAIL results to not be reported at all except in the stats.
llvm-svn: 14067
2004-06-08 08:01:33 +00:00
Reid Spencer
b14a0a69fc
Put in a place holder for describing the differences in bytecode format
...
between LLVM versions. This is just a reminder so I don't forget to
document it.
llvm-svn: 14066
2004-06-08 07:41:41 +00:00
Reid Spencer
850f85f81f
Add a note about llvm-abcd, the Analysis of ByteCode Dumper
...
llvm-svn: 14065
2004-06-08 07:30:31 +00:00
Chris Lattner
bd948cfe38
Ooh, that fixed the annoying warning!!
...
llvm-svn: 14064
2004-06-08 07:19:29 +00:00
Chris Lattner
25b3a03e17
Bug fixed
...
llvm-svn: 14063
2004-06-08 07:15:52 +00:00
Chris Lattner
79dd360555
New testcase for PR355
...
llvm-svn: 14062
2004-06-08 07:11:14 +00:00
Chris Lattner
12eb60f213
Testcase for PR355
...
llvm-svn: 14061
2004-06-08 07:10:11 +00:00
Chris Lattner
522ef67fb2
Add documentation to the TargetFrameInfo class, contributed by Vladimir Prus
...
llvm-svn: 14060
2004-06-08 06:23:17 +00:00
Reid Spencer
ddc6fb125e
Clean up the documentation.
...
Simplify the file handling. It now only writes to std::cout.
llvm-svn: 14059
2004-06-08 05:56:58 +00:00