oota-llvm.git
20 years agoI'm afraid this doesn't exist.
Brian Gaeke [Wed, 16 Jun 2004 00:26:45 +0000 (00:26 +0000)]
I'm afraid this doesn't exist.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14193 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoUm, did someone make a typo or something?
Brian Gaeke [Tue, 15 Jun 2004 23:09:50 +0000 (23:09 +0000)]
Um, did someone make a typo or something?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14192 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoisnan is dead
Chris Lattner [Tue, 15 Jun 2004 21:52:58 +0000 (21:52 +0000)]
isnan is dead

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14191 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agollvm.isnan is dead, long live llvm.isunordered!
Chris Lattner [Tue, 15 Jun 2004 21:50:46 +0000 (21:50 +0000)]
llvm.isnan is dead, long live llvm.isunordered!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14190 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRemove support for llvm.isnan. Alkis wins :)
Chris Lattner [Tue, 15 Jun 2004 21:48:07 +0000 (21:48 +0000)]
Remove support for llvm.isnan.  Alkis wins :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14189 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoThis testcase is a bit silly now, but oh well :)
Chris Lattner [Tue, 15 Jun 2004 21:46:16 +0000 (21:46 +0000)]
This testcase is a bit silly now, but oh well :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14188 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRemove isnan support, correct isunordered support
Chris Lattner [Tue, 15 Jun 2004 21:42:23 +0000 (21:42 +0000)]
Remove isnan support, correct isunordered support

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14187 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRemove support for the isnan intrinsic
Chris Lattner [Tue, 15 Jun 2004 21:37:54 +0000 (21:37 +0000)]
Remove support for the isnan intrinsic

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14186 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd basic support for the isunordered intrinsic. The isnan stuff still needs to go
Chris Lattner [Tue, 15 Jun 2004 21:36:44 +0000 (21:36 +0000)]
Add basic support for the isunordered intrinsic.  The isnan stuff still needs to go

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14185 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRight, stop being silly
Chris Lattner [Tue, 15 Jun 2004 21:29:40 +0000 (21:29 +0000)]
Right, stop being silly

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14184 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd a nan, stop testing isnan
Chris Lattner [Tue, 15 Jun 2004 21:29:01 +0000 (21:29 +0000)]
Add a nan, stop testing isnan

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14183 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix thinko in visitor... ShiftInsts should currently be delegated
Brian Gaeke [Tue, 15 Jun 2004 21:09:46 +0000 (21:09 +0000)]
Fix thinko in visitor... ShiftInsts should currently be delegated
to visitBinaryOperator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14182 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoDo not dereference end iterators. It's really bad for the asmwriter's health.
Chris Lattner [Tue, 15 Jun 2004 21:07:32 +0000 (21:07 +0000)]
Do not dereference end iterators.  It's really bad for the asmwriter's health.
This possibly fixes PR370

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14181 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoI think we'll use the standard lowering passes for now.
Brian Gaeke [Tue, 15 Jun 2004 20:37:12 +0000 (20:37 +0000)]
I think we'll use the standard lowering passes for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14179 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix bug generating code for void call instructions: don't call
Brian Gaeke [Tue, 15 Jun 2004 20:06:32 +0000 (20:06 +0000)]
Fix bug generating code for void call instructions: don't call
getReg() on void value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14178 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoSquash a warning from the Solaris assembler by aligning the stack
Brian Gaeke [Tue, 15 Jun 2004 19:53:10 +0000 (19:53 +0000)]
Squash a warning from the Solaris assembler by aligning the stack
on a double-word boundary instead of a single-word boundary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14177 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAllow special-casing of operand printing based on opcode. Print
Brian Gaeke [Tue, 15 Jun 2004 19:52:59 +0000 (19:52 +0000)]
Allow special-casing of operand printing based on opcode.  Print
non-register, non-immed. arguments to SETHI and OR using %hi() and
%lo() respectively.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14176 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoSupport constant GEP expressions.
Brian Gaeke [Tue, 15 Jun 2004 19:16:07 +0000 (19:16 +0000)]
Support constant GEP expressions.
Support copying long constants to register pairs.
Support copying ConstantPointerNulls and ConstantPointerRefs to registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14175 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoThe correct prototype is `int atoi(CONST char*)'. Unbroke AIX build.
Misha Brukman [Mon, 14 Jun 2004 16:30:05 +0000 (16:30 +0000)]
The correct prototype is `int atoi(CONST char*)'.  Unbroke AIX build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14173 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd file comment.
Misha Brukman [Mon, 14 Jun 2004 15:13:59 +0000 (15:13 +0000)]
Add file comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14172 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoQuick hack to get this file compiling again on Mac OS X. The right thing to do
Brian Gaeke [Mon, 14 Jun 2004 06:33:19 +0000 (06:33 +0000)]
Quick hack to get this file compiling again on Mac OS X.  The right thing to do
is write an autoconf macro that checks whether __isnan or isnan actually works
**using the C++ compiler after #include <cmath>**, instead of doing it the easy
way with AC_CHECK_FUNCS().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14171 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMake -print-machineinstrs even stronger. You get to see the final code after
Brian Gaeke [Mon, 14 Jun 2004 05:05:45 +0000 (05:05 +0000)]
Make -print-machineinstrs even stronger. You get to see the final code after
peepholing, and make it work the same way in the JIT as in LLC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14170 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoGet rid of "might be uninitialized" warnings when compiling with GCC 3.3.2
Reid Spencer [Sun, 13 Jun 2004 19:17:49 +0000 (19:17 +0000)]
Get rid of "might be uninitialized" warnings when compiling with GCC 3.3.2

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14169 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd constant folding capabilities to the isunordered intrinsic.
Alkis Evlogimenos [Sun, 13 Jun 2004 01:23:56 +0000 (01:23 +0000)]
Add constant folding capabilities to the isunordered intrinsic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14168 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoReally add the docs this time :-)
Alkis Evlogimenos [Sun, 13 Jun 2004 01:16:15 +0000 (01:16 +0000)]
Really add the docs this time :-)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14167 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMake assertions more consistent with the rest of the intrinsic
Alkis Evlogimenos [Sun, 13 Jun 2004 00:55:26 +0000 (00:55 +0000)]
Make assertions more consistent with the rest of the intrinsic
function verification and make it a requirement that both arguments to
llvm.isunordered are of the same type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14165 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd the isunordered intrinsic.
Alkis Evlogimenos [Sat, 12 Jun 2004 19:19:14 +0000 (19:19 +0000)]
Add the isunordered intrinsic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14159 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoReduce the number of columns in the alpha index to 4 so that it fits
Reid Spencer [Sat, 12 Jun 2004 14:46:02 +0000 (14:46 +0000)]
Reduce the number of columns in the alpha index to 4 so that it fits
on a 1280x1024 screen!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14158 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoIt is no longer 2001
Chris Lattner [Fri, 11 Jun 2004 21:12:22 +0000 (21:12 +0000)]
It is no longer 2001

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14157 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoDon't trim @PrevDays (causing an error) if it isn't long enough.
Brian Gaeke [Fri, 11 Jun 2004 19:55:30 +0000 (19:55 +0000)]
Don't trim @PrevDays (causing an error) if it isn't long enough.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14156 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix grammar: 's is for possessive only.
Misha Brukman [Fri, 11 Jun 2004 16:50:21 +0000 (16:50 +0000)]
Fix grammar: 's is for possessive only.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14155 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoImplement tracking of bytecode instruction size and the number of long
Reid Spencer [Fri, 11 Jun 2004 15:10:38 +0000 (15:10 +0000)]
Implement tracking of bytecode instruction size and the number of long
instructions generated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14154 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd two options to the program:
Reid Spencer [Fri, 11 Jun 2004 07:06:22 +0000 (07:06 +0000)]
Add two options to the program:
-release causes ENABLE_OPTIMIZED=1 to be added to the make line so that
         the test runs against optimized code.
-pedantic causes the CompileOptimizeOpts variable to be overridden to
          add several additional warnings not picked up by -Wall. This
  should help catch additional programming faux pas. See the diff
  for the specific details.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14153 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix fallout from getOffsetOfLocalArea() being negated. Debugging dumps were being
Chris Lattner [Fri, 11 Jun 2004 06:37:11 +0000 (06:37 +0000)]
Fix fallout from getOffsetOfLocalArea() being negated.  Debugging dumps were being
printed incorrectly, and we were reserving 8 extra bytes of stack space for functions
on X86.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14152 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agollvm.isnan doesn't access memory
Chris Lattner [Fri, 11 Jun 2004 06:17:13 +0000 (06:17 +0000)]
llvm.isnan doesn't access memory

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14151 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoConstant fold the isnan intrinsic
Chris Lattner [Fri, 11 Jun 2004 06:16:23 +0000 (06:16 +0000)]
Constant fold the isnan intrinsic

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14150 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd tests for isnan
Chris Lattner [Fri, 11 Jun 2004 06:16:13 +0000 (06:16 +0000)]
Add tests for isnan

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14149 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoBy far, one of the most common uses of isnan is to make 'isunordered'
Chris Lattner [Fri, 11 Jun 2004 05:33:49 +0000 (05:33 +0000)]
By far, one of the most common uses of isnan is to make 'isunordered'
comparisons.  In an 'isunordered' predicate, which looks like this at
the LLVM level:

        %a = call bool %llvm.isnan(double %X)
        %b = call bool %llvm.isnan(double %Y)
        %COM = or bool %a, %b

We used to generate this code:

        fxch %ST(1)
        fucomip %ST(0), %ST(0)
        setp %AL
        fucomip %ST(0), %ST(0)
        setp %AH
        or %AL, %AH

With this patch, we generate this code:

        fucomip %ST(0), %ST(1)
        fstp %ST(0)
        setp %AL

Which should make alkis happy.  Tested as X86/compare_folding.llx:test1

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14148 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoTest that the X86 backend is only emitting one fucom instruction
Chris Lattner [Fri, 11 Jun 2004 05:30:34 +0000 (05:30 +0000)]
Test that the X86 backend is only emitting one fucom instruction
for each 'COM =' line.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14147 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix bug in previous checkin
Chris Lattner [Fri, 11 Jun 2004 05:22:44 +0000 (05:22 +0000)]
Fix bug in previous checkin

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14146 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNo really, these are dead now
Chris Lattner [Fri, 11 Jun 2004 04:50:14 +0000 (04:50 +0000)]
No really, these are dead now

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14145 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNow that compare instructions aren't lumped in with the other twoargfp instructions,
Chris Lattner [Fri, 11 Jun 2004 04:49:02 +0000 (04:49 +0000)]
Now that compare instructions aren't lumped in with the other twoargfp instructions,
we can get rid of the FpUCOM/FpUCOMi pseudo instructions, which makes stuff simpler
and faster.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14144 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoIntroduce a new FP instruction type to separate the compare cases from the
Chris Lattner [Fri, 11 Jun 2004 04:41:24 +0000 (04:41 +0000)]
Introduce a new FP instruction type to separate the compare cases from the
twoarg cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14143 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoBug fixed, new feature
Chris Lattner [Fri, 11 Jun 2004 04:35:21 +0000 (04:35 +0000)]
Bug fixed, new feature

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14142 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd direct support for the isnan intrinsic, implementing test/Regression/CodeGen...
Chris Lattner [Fri, 11 Jun 2004 04:31:10 +0000 (04:31 +0000)]
Add direct support for the isnan intrinsic, implementing test/Regression/CodeGen/X86/isnan.llx
testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14141 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd support for the setp instructions
Chris Lattner [Fri, 11 Jun 2004 04:30:06 +0000 (04:30 +0000)]
Add support for the setp instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14140 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoSplit compare instruction handling OUT of handleTwoArgFP into handleCompareFP.
Chris Lattner [Fri, 11 Jun 2004 04:25:06 +0000 (04:25 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14139 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoChange tags rule to pipe output from find through etags command so that it
Reid Spencer [Fri, 11 Jun 2004 03:10:27 +0000 (03:10 +0000)]
Change tags rule to pipe output from find through etags command so that it
doesn't break on machines with limited command line lengths.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14138 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRevert an unneeded interface change to Instruction.h
Reid Spencer [Fri, 11 Jun 2004 03:06:43 +0000 (03:06 +0000)]
Revert an unneeded interface change to Instruction.h

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14137 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoTestcase for PR369
Chris Lattner [Fri, 11 Jun 2004 02:59:47 +0000 (02:59 +0000)]
Testcase for PR369

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14136 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoCheck to make sure that isnan doesn't require calling a function
Chris Lattner [Fri, 11 Jun 2004 02:54:54 +0000 (02:54 +0000)]
Check to make sure that isnan doesn't require calling a function

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14135 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix lowering to work correctly
Chris Lattner [Fri, 11 Jun 2004 02:54:02 +0000 (02:54 +0000)]
Fix lowering to work correctly

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14134 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoI misled Alkis: LLVM should have isnan, not isunordered.
Chris Lattner [Fri, 11 Jun 2004 02:29:57 +0000 (02:29 +0000)]
I misled Alkis: LLVM should have isnan, not isunordered.
  isunordered(X, Y) === isnan(X) | isnan(Y)

Remove isunordered, add isnan.

Modernize testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14133 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoI misled Alkis: LLVM should have isnan, not isunordered.
Chris Lattner [Fri, 11 Jun 2004 02:29:43 +0000 (02:29 +0000)]
I misled Alkis: LLVM should have isnan, not isunordered.
  isunordered(X, Y) === isnan(X) | isnan(Y)

Remove isunordered, add isnan.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14132 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoDocument the llvm.isnan intrinsic
Chris Lattner [Fri, 11 Jun 2004 02:28:03 +0000 (02:28 +0000)]
Document the llvm.isnan intrinsic

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14131 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoBug fixed.
Brian Gaeke [Fri, 11 Jun 2004 02:15:39 +0000 (02:15 +0000)]
Bug fixed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14130 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoTest case for PR368
Brian Gaeke [Fri, 11 Jun 2004 02:11:43 +0000 (02:11 +0000)]
Test case for PR368

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14129 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoTurn loads of ConstantPointerNulls into loads of zero... don't spill
Brian Gaeke [Fri, 11 Jun 2004 02:03:48 +0000 (02:03 +0000)]
Turn loads of ConstantPointerNulls into loads of zero... don't spill
them into the constant pool.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14128 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd the isunordered intrinsic.
Alkis Evlogimenos [Fri, 11 Jun 2004 01:08:18 +0000 (01:08 +0000)]
Add the isunordered intrinsic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14127 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd feature test for llvm intrinsics. It currently contains only the "isunordered...
Alkis Evlogimenos [Fri, 11 Jun 2004 01:06:40 +0000 (01:06 +0000)]
Add feature test for llvm intrinsics. It currently contains only the "isunordered" intrinsic

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14126 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoUpdated the BytecodeAnalysis data structure to contain additional fields
Reid Spencer [Thu, 10 Jun 2004 22:28:11 +0000 (22:28 +0000)]
Updated the BytecodeAnalysis data structure to contain additional fields
needed for analysis of individual functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14125 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdded an isPhiNode(unsigned) static method to determine if an opcode is
Reid Spencer [Thu, 10 Jun 2004 22:27:10 +0000 (22:27 +0000)]
Added an isPhiNode(unsigned) static method to determine if an opcode is
a PhiNode or not. Needed by Bytecode Analyzer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14124 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRemove tabs.
Reid Spencer [Thu, 10 Jun 2004 22:03:00 +0000 (22:03 +0000)]
Remove tabs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14123 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoImplement detailed function level data collection and reporting.
Reid Spencer [Thu, 10 Jun 2004 22:00:54 +0000 (22:00 +0000)]
Implement detailed function level data collection and reporting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14122 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdjust prototypes to new Handler interface.
Reid Spencer [Thu, 10 Jun 2004 22:00:29 +0000 (22:00 +0000)]
Adjust prototypes to new Handler interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14121 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMake the parser deal with functions instead of just function types.
Reid Spencer [Thu, 10 Jun 2004 21:59:20 +0000 (21:59 +0000)]
Make the parser deal with functions instead of just function types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14120 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoClean up documentation and naming of variables.
Reid Spencer [Thu, 10 Jun 2004 18:38:44 +0000 (18:38 +0000)]
Clean up documentation and naming of variables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14119 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRemove extra space.
Misha Brukman [Thu, 10 Jun 2004 12:51:35 +0000 (12:51 +0000)]
Remove extra space.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14117 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoDoxygenize a comment.
Reid Spencer [Thu, 10 Jun 2004 08:27:00 +0000 (08:27 +0000)]
Doxygenize a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14115 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMade detailed output the default and changed -details option to -nodetails.
Reid Spencer [Thu, 10 Jun 2004 08:24:42 +0000 (08:24 +0000)]
Made detailed output the default and changed -details option to -nodetails.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14114 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoImplemented the bulk of the functionality. Cleaned up the code.
Reid Spencer [Thu, 10 Jun 2004 08:09:13 +0000 (08:09 +0000)]
Implemented the bulk of the functionality. Cleaned up the code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14113 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAllow dates with slashes in them in $DateRE.
Brian Gaeke [Thu, 10 Jun 2004 07:44:28 +0000 (07:44 +0000)]
Allow dates with slashes in them in $DateRE.
Don't match on $Filename (which will be unset) if we hit 'UNMATCHABLE:'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14112 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix the prolog epilog code inserter to match the documentation and support
Chris Lattner [Thu, 10 Jun 2004 06:23:35 +0000 (06:23 +0000)]
Fix the prolog epilog code inserter to match the documentation and support
targets whose stack grows up.

Patch contributed by Vladimir Prus

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14111 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix the fixed stack offset, patch contributed by Vladimir Prus
Chris Lattner [Thu, 10 Jun 2004 06:19:25 +0000 (06:19 +0000)]
Fix the fixed stack offset, patch contributed by Vladimir Prus

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14110 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix a bug in my checkin from last night that caused miscompilations of
Chris Lattner [Thu, 10 Jun 2004 02:33:20 +0000 (02:33 +0000)]
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.  :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14109 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMore minor cleanups
Chris Lattner [Thu, 10 Jun 2004 02:12:35 +0000 (02:12 +0000)]
More minor cleanups

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14108 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoEliminate many occurrances of Instruction::
Chris Lattner [Thu, 10 Jun 2004 02:07:29 +0000 (02:07 +0000)]
Eliminate many occurrances of Instruction::

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14107 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoShare some code
Chris Lattner [Thu, 10 Jun 2004 01:57:38 +0000 (01:57 +0000)]
Share some code

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14106 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd new BinaryOperator::createAdd/Sub/... methods to avoid having to type
Chris Lattner [Thu, 10 Jun 2004 01:43:29 +0000 (01:43 +0000)]
Add new BinaryOperator::createAdd/Sub/... methods to avoid having to type
llvm::Instruction:: all of the time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14105 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoTolerate more errors
Chris Lattner [Wed, 9 Jun 2004 22:22:10 +0000 (22:22 +0000)]
Tolerate more errors

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14104 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoEncode %fsr correctly; don't fail an assertion.
Brian Gaeke [Wed, 9 Jun 2004 21:54:59 +0000 (21:54 +0000)]
Encode %fsr correctly; don't fail an assertion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14103 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix encoding of ST*FSR instructions.
Brian Gaeke [Wed, 9 Jun 2004 21:54:58 +0000 (21:54 +0000)]
Fix encoding of ST*FSR instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14102 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix assertion failure message to have the right method name.
Brian Gaeke [Wed, 9 Jun 2004 20:44:42 +0000 (20:44 +0000)]
Fix assertion failure message to have the right method name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14101 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMake the asmwriter much more tolerant of errors (which are common when working
Chris Lattner [Wed, 9 Jun 2004 19:41:19 +0000 (19:41 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14100 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoColumnized the compilation statistics for easier reading.
Reid Spencer [Wed, 9 Jun 2004 18:29:15 +0000 (18:29 +0000)]
Columnized the compilation statistics for easier reading.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14099 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix the really bizarre stuff that happened last night in the tester
Chris Lattner [Wed, 9 Jun 2004 18:28:53 +0000 (18:28 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14098 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMade it possible for the printInfoComment method to invoke getSlot in
Reid Spencer [Wed, 9 Jun 2004 15:26:53 +0000 (15:26 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14097 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix for PR#366. We use getClassB() so that we can handle cast instructions
John Criswell [Wed, 9 Jun 2004 15:18:51 +0000 (15:18 +0000)]
Fix for PR#366.  We use getClassB() so that we can handle cast instructions
that cast to bool.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14096 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoImplement InstCombine/select.ll:test15*
Chris Lattner [Wed, 9 Jun 2004 07:59:58 +0000 (07:59 +0000)]
Implement InstCombine/select.ll:test15*

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14095 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMore instcombine testcases
Chris Lattner [Wed, 9 Jun 2004 07:59:40 +0000 (07:59 +0000)]
More instcombine testcases

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14094 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoCleanup alignment of output.
Reid Spencer [Wed, 9 Jun 2004 06:22:00 +0000 (06:22 +0000)]
Cleanup alignment of output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14093 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd some new fields for bytecode analysis.
Reid Spencer [Wed, 9 Jun 2004 06:18:53 +0000 (06:18 +0000)]
Add some new fields for bytecode analysis.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14092 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoImplement analysis output. Don't dump function details unless requested.
Reid Spencer [Wed, 9 Jun 2004 06:17:58 +0000 (06:17 +0000)]
Implement analysis output. Don't dump function details unless requested.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14091 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoImplement some rudimentary analysis.
Reid Spencer [Wed, 9 Jun 2004 06:16:43 +0000 (06:16 +0000)]
Implement some rudimentary analysis.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14090 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoClean up indentation of file body output.
Reid Spencer [Wed, 9 Jun 2004 06:16:19 +0000 (06:16 +0000)]
Clean up indentation of file body output.
Don't dump functions unless "detailedResults" is requested.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14089 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMove parsing details to Parser.cpp.
Reid Spencer [Wed, 9 Jun 2004 06:15:21 +0000 (06:15 +0000)]
Move parsing details to Parser.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14088 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoBring some things out of header files that belong only in this file.
Reid Spencer [Wed, 9 Jun 2004 06:14:52 +0000 (06:14 +0000)]
Bring some things out of header files that belong only in this file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14087 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoBe more careful about the order we put stuff onto the worklist. This allow us to
Chris Lattner [Wed, 9 Jun 2004 05:08:07 +0000 (05:08 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14086 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNew testcase that is important for the Java FE
Chris Lattner [Wed, 9 Jun 2004 05:07:01 +0000 (05:07 +0000)]
New testcase that is important for the Java FE

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14085 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoCleaned up a dead header file to prevent duplicate definition warnings
Reid Spencer [Wed, 9 Jun 2004 04:38:34 +0000 (04:38 +0000)]
Cleaned up a dead header file to prevent duplicate definition warnings
in doxygen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14084 91177308-0d34-0410-b5e6-96231b3b80d8