Chris Lattner
94ff2c3210
Split compare instruction handling OUT of handleTwoArgFP into handleCompareFP.
...
This makes the code much simpler, and the two cases really do belong apart.
Once we do it, it's pretty obvious how flawed the logic was for A != A case,
so I fixed it (fixing PR369).
This also uses freeStackSlotAfter instead of inserting an fxchg then
popStackAfter'ing in the case where there is a dead result (unlikely, but
possible), producing better code.
llvm-svn: 14139
2004-06-11 04:25:06 +00:00
Reid Spencer
95290c7d33
Change tags rule to pipe output from find through etags command so that it
...
doesn't break on machines with limited command line lengths.
llvm-svn: 14138
2004-06-11 03:10:27 +00:00
Reid Spencer
c22be9f9d5
Revert an unneeded interface change to Instruction.h
...
llvm-svn: 14137
2004-06-11 03:06:43 +00:00
Chris Lattner
a5ddab2779
Testcase for PR369
...
llvm-svn: 14136
2004-06-11 02:59:47 +00:00
Chris Lattner
434cc49bca
Check to make sure that isnan doesn't require calling a function
...
llvm-svn: 14135
2004-06-11 02:54:54 +00:00
Chris Lattner
0c6db524d6
Fix lowering to work correctly
...
llvm-svn: 14134
2004-06-11 02:54:02 +00:00
Chris Lattner
8f40e35934
I misled Alkis: LLVM should have isnan, not isunordered.
...
isunordered(X, Y) === isnan(X) | isnan(Y)
Remove isunordered, add isnan.
Modernize testcase
llvm-svn: 14133
2004-06-11 02:29:57 +00:00
Chris Lattner
8f69c9e439
I misled Alkis: LLVM should have isnan, not isunordered.
...
isunordered(X, Y) === isnan(X) | isnan(Y)
Remove isunordered, add isnan.
llvm-svn: 14132
2004-06-11 02:29:43 +00:00
Chris Lattner
3b4f437526
Document the llvm.isnan intrinsic
...
llvm-svn: 14131
2004-06-11 02:28:03 +00:00
Brian Gaeke
522235efbf
Bug fixed.
...
llvm-svn: 14130
2004-06-11 02:15:39 +00:00
Brian Gaeke
5caed4e7dd
Test case for PR368
...
llvm-svn: 14129
2004-06-11 02:11:43 +00:00
Brian Gaeke
2655aab200
Turn loads of ConstantPointerNulls into loads of zero... don't spill
...
them into the constant pool.
llvm-svn: 14128
2004-06-11 02:03:48 +00:00
Alkis Evlogimenos
d0b5d0c7cc
Add the isunordered intrinsic.
...
llvm-svn: 14127
2004-06-11 01:08:18 +00:00
Alkis Evlogimenos
2baa85e8be
Add feature test for llvm intrinsics. It currently contains only the "isunordered" intrinsic
...
llvm-svn: 14126
2004-06-11 01:06:40 +00:00
Reid Spencer
c4bbb8f70b
Updated the BytecodeAnalysis data structure to contain additional fields
...
needed for analysis of individual functions.
llvm-svn: 14125
2004-06-10 22:28:11 +00:00
Reid Spencer
7e5d80033d
Added an isPhiNode(unsigned) static method to determine if an opcode is
...
a PhiNode or not. Needed by Bytecode Analyzer.
llvm-svn: 14124
2004-06-10 22:27:10 +00:00
Reid Spencer
8395e67fb1
Remove tabs.
...
llvm-svn: 14123
2004-06-10 22:03:00 +00:00
Reid Spencer
7670bbdfb9
Implement detailed function level data collection and reporting.
...
llvm-svn: 14122
2004-06-10 22:00:54 +00:00
Reid Spencer
90f0032664
Adjust prototypes to new Handler interface.
...
llvm-svn: 14121
2004-06-10 22:00:29 +00:00
Reid Spencer
2491b0959e
Make the parser deal with functions instead of just function types.
...
llvm-svn: 14120
2004-06-10 21:59:20 +00:00
Reid Spencer
b3a4e0b9bd
Clean up documentation and naming of variables.
...
llvm-svn: 14119
2004-06-10 18:38:44 +00:00
Misha Brukman
ffdffe1d76
Remove extra space.
...
llvm-svn: 14117
2004-06-10 12:51:35 +00:00
Reid Spencer
ff35cf92c5
Doxygenize a comment.
...
llvm-svn: 14115
2004-06-10 08:27:00 +00:00
Reid Spencer
1080b373a2
Made detailed output the default and changed -details option to -nodetails.
...
llvm-svn: 14114
2004-06-10 08:24:42 +00:00
Reid Spencer
8e5de9cd75
Implemented the bulk of the functionality. Cleaned up the code.
...
llvm-svn: 14113
2004-06-10 08:09:13 +00:00
Brian Gaeke
966938cff2
Allow dates with slashes in them in $DateRE.
...
Don't match on $Filename (which will be unset) if we hit 'UNMATCHABLE:'.
llvm-svn: 14112
2004-06-10 07:44:28 +00:00
Chris Lattner
175532bb1e
Fix the prolog epilog code inserter to match the documentation and support
...
targets whose stack grows up.
Patch contributed by Vladimir Prus
llvm-svn: 14111
2004-06-10 06:23:35 +00:00
Chris Lattner
6d6b3b3ce9
Fix the fixed stack offset, patch contributed by Vladimir Prus
...
llvm-svn: 14110
2004-06-10 06:19:25 +00:00
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