oota-llvm.git
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

20 years agoImplement select.ll:test14*
Chris Lattner [Wed, 9 Jun 2004 04:24:29 +0000 (04:24 +0000)]
Implement select.ll:test14*

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

20 years agoNew testcase for the instruction combiner that happen often in the Java FE
Chris Lattner [Wed, 9 Jun 2004 04:23:57 +0000 (04:23 +0000)]
New testcase for the instruction combiner that happen often in the Java FE

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

20 years agoMinor tweaks
Chris Lattner [Wed, 9 Jun 2004 03:59:05 +0000 (03:59 +0000)]
Minor tweaks

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

20 years agoRegularize title of Regression Test section. Clean up some blank space.
Reid Spencer [Wed, 9 Jun 2004 02:07:25 +0000 (02:07 +0000)]
Regularize title of Regression Test section. Clean up some blank space.

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

20 years agoBug fixed
Chris Lattner [Wed, 9 Jun 2004 01:09:16 +0000 (01:09 +0000)]
Bug fixed

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

20 years agoWorkaround or a VS miscompilation bug
Chris Lattner [Tue, 8 Jun 2004 23:21:39 +0000 (23:21 +0000)]
Workaround or a VS miscompilation bug

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

20 years agoI checked and no clients expect this to return null for unconditional branches
Chris Lattner [Tue, 8 Jun 2004 22:03:05 +0000 (22:03 +0000)]
I checked and no clients expect this to return null for unconditional branches
Simplify code and make it more uniform.

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

20 years agoDon't grab the condition of unconditional branches!
Chris Lattner [Tue, 8 Jun 2004 21:50:30 +0000 (21:50 +0000)]
Don't grab the condition of unconditional branches!
This fixes PR363

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

20 years agoFix a minor bug in the map - since this pass adds a global symbol, it must be
Brian Gaeke [Tue, 8 Jun 2004 20:08:30 +0000 (20:08 +0000)]
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).

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

20 years agoAdd a forwarding method pop_front() that allows you to delete instructions
Brian Gaeke [Tue, 8 Jun 2004 18:52:47 +0000 (18:52 +0000)]
Add a forwarding method pop_front() that allows you to delete instructions
from the beginning of a MBB.

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

20 years agoAdd a TmpInstruction ctor that doesn't take a MCFI.
Brian Gaeke [Tue, 8 Jun 2004 18:52:46 +0000 (18:52 +0000)]
Add a TmpInstruction ctor that doesn't take a MCFI.

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

20 years agoExplicitly specify libtool tag "CXX" so that if you setenv CXX to something
Brian Gaeke [Tue, 8 Jun 2004 18:52:45 +0000 (18:52 +0000)]
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.

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

20 years agoFix a link error using VS8.0
Chris Lattner [Tue, 8 Jun 2004 17:53:24 +0000 (17:53 +0000)]
Fix a link error using VS8.0

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

20 years agoApparently a particular vendor compiler uses the struct/class tag to MANGLE
Chris Lattner [Tue, 8 Jun 2004 17:44:21 +0000 (17:44 +0000)]
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

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

20 years agoFix case of doxygen directive `\p': it's lowercase.
Misha Brukman [Tue, 8 Jun 2004 13:49:17 +0000 (13:49 +0000)]
Fix case of doxygen directive `\p': it's lowercase.

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

20 years ago* Fix indentation of Regression Test Results by making sure the
Reid Spencer [Tue, 8 Jun 2004 08:01:33 +0000 (08:01 +0000)]
* 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.

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

20 years agoPut in a place holder for describing the differences in bytecode format
Reid Spencer [Tue, 8 Jun 2004 07:41:41 +0000 (07:41 +0000)]
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.

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

20 years agoAdd a note about llvm-abcd, the Analysis of ByteCode Dumper
Reid Spencer [Tue, 8 Jun 2004 07:30:31 +0000 (07:30 +0000)]
Add a note about llvm-abcd, the Analysis of ByteCode Dumper

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

20 years agoOoh, that fixed the annoying warning!!
Chris Lattner [Tue, 8 Jun 2004 07:19:29 +0000 (07:19 +0000)]
Ooh, that fixed the annoying warning!!

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

20 years agoBug fixed
Chris Lattner [Tue, 8 Jun 2004 07:15:52 +0000 (07:15 +0000)]
Bug fixed

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

20 years agoNew testcase for PR355
Chris Lattner [Tue, 8 Jun 2004 07:11:14 +0000 (07:11 +0000)]
New testcase for PR355

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

20 years agoTestcase for PR355
Chris Lattner [Tue, 8 Jun 2004 07:10:11 +0000 (07:10 +0000)]
Testcase for PR355

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

20 years agoAdd documentation to the TargetFrameInfo class, contributed by Vladimir Prus
Chris Lattner [Tue, 8 Jun 2004 06:23:17 +0000 (06:23 +0000)]
Add documentation to the TargetFrameInfo class, contributed by Vladimir Prus

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

20 years agoClean up the documentation.
Reid Spencer [Tue, 8 Jun 2004 05:56:58 +0000 (05:56 +0000)]
Clean up the documentation.
Simplify the file handling. It now only writes to std::cout.

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

20 years agoClean up documentation and make it possible for the BytecodeAnalyzer to
Reid Spencer [Tue, 8 Jun 2004 05:55:53 +0000 (05:55 +0000)]
Clean up documentation and make it possible for the BytecodeAnalyzer to
store the output of the bytecode dumper.

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

20 years agoFix the bug that was preventing the parser from working on all bytecode
Reid Spencer [Tue, 8 Jun 2004 05:54:47 +0000 (05:54 +0000)]
Fix the bug that was preventing the parser from working on all bytecode
files. It was reading non-initialized global vars when the flag said it was
initialized and vice versa. Causes mis-alignment since initialized and
non-initialized constants have different bytecode lengths.

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

20 years agoMake it #include Parser.h instead of AnalyzerInternals.h since it only
Reid Spencer [Tue, 8 Jun 2004 05:53:14 +0000 (05:53 +0000)]
Make it #include Parser.h instead of AnalyzerInternals.h since it only
needs the BytecodeHandler interface which is now in Parser.h

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

20 years agoAdjust what's included to compensate for changes in Parser.h
Reid Spencer [Tue, 8 Jun 2004 05:52:29 +0000 (05:52 +0000)]
Adjust what's included to compensate for changes in Parser.h

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

20 years agoMerged BytecodeHandler.h into Parser.h since the parser and the handler
Reid Spencer [Tue, 8 Jun 2004 05:51:18 +0000 (05:51 +0000)]
Merged BytecodeHandler.h into Parser.h since the parser and the handler
must always coexist. Cleaned up the documentation on these interfaces
significantly. This is in preparation for moving Parser.h to the include
directories to make it a public interface.

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

20 years agoFix PR361.
Chris Lattner [Mon, 7 Jun 2004 23:07:33 +0000 (23:07 +0000)]
Fix PR361.
Dominance properties don't hold in unreachable code

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

20 years agoNew testcase for PR361
Chris Lattner [Mon, 7 Jun 2004 23:07:09 +0000 (23:07 +0000)]
New testcase for PR361

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

20 years agoMake all of this functionality work directly on win32. Properly conditionalize
Chris Lattner [Mon, 7 Jun 2004 19:37:24 +0000 (19:37 +0000)]
Make all of this functionality work directly on win32.  Properly conditionalize
system specific stuff on HAVE_MKSTEMP

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

20 years agoImplement getTimeRecord natively in Win32, properly conditionalize the
Chris Lattner [Mon, 7 Jun 2004 19:34:51 +0000 (19:34 +0000)]
Implement getTimeRecord natively in Win32, properly conditionalize the
getrusage implementation on HAVE_GETRUSAGE

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

20 years agoEliminate more traces of the -c option
Chris Lattner [Mon, 7 Jun 2004 18:10:01 +0000 (18:10 +0000)]
Eliminate more traces of the -c option

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

20 years agoCommit For New Tool: llvm-abcd (Analysis of ByteCode Dumper). This tool
Reid Spencer [Mon, 7 Jun 2004 17:53:43 +0000 (17:53 +0000)]
Commit For New Tool: llvm-abcd (Analysis of ByteCode Dumper).  This tool
will (eventually) provide statistical analysis of bytecode files as well
as the ability to dump them in a low level format (slot numbers not
resolved). The purpose of this is to aid in the Type!=Value change of
bug 122. With this initial release, llvm-abcd merely dumps out the
bytecode. However, the infrastructure for separating bytecode parsing from
handling the parsing events is in place. The style chosen is similar to
SAX XML parsing where a handler object is called to handlign the parsing
events. This probably isn't useful to anyone but me right now as there is
no analysis yet, and the dumper doesn't work on every bytecode file. It
will probably be useful by the end of this week. Note that there is some
duplication of code from the bytecode reader.  This was done to eliminate
errors from being introduced in the reader and to minimize the impact to
other LLVM developers. At some point, the Analyzer and the Reader will be
integrated to use the same infrastructure. Also, sorry for the minor change
to Instruction.h but I just couldn't bring myself to write code that
depends on Instruction internals.

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

20 years agoAdded checks for mkstemp and getrusage.
John Criswell [Mon, 7 Jun 2004 14:26:24 +0000 (14:26 +0000)]
Added checks for mkstemp and getrusage.

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

20 years agoAdd some notes so I can throw away one of my many todo lists.
Chris Lattner [Sat, 5 Jun 2004 20:12:36 +0000 (20:12 +0000)]
Add some notes so I can throw away one of my many todo lists.

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

20 years agoFix GCC warning
Chris Lattner [Sat, 5 Jun 2004 17:44:48 +0000 (17:44 +0000)]
Fix GCC warning

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

20 years agoFix GCC warnings
Chris Lattner [Sat, 5 Jun 2004 17:43:52 +0000 (17:43 +0000)]
Fix GCC warnings

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

20 years agoFix a few typos, spellos, grammaros.
Reid Spencer [Sat, 5 Jun 2004 14:39:24 +0000 (14:39 +0000)]
Fix a few typos, spellos, grammaros.

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

20 years agoAdd "work in progress" warning.
Reid Spencer [Sat, 5 Jun 2004 14:18:02 +0000 (14:18 +0000)]
Add "work in progress" warning.

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

20 years agoInclude cerrno.
Alkis Evlogimenos [Sat, 5 Jun 2004 08:59:43 +0000 (08:59 +0000)]
Include cerrno.

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

20 years agoRemove an unused variable.
Chris Lattner [Sat, 5 Jun 2004 01:05:19 +0000 (01:05 +0000)]
Remove an unused variable.
Work around for bogus errors: no those static functions don't need to
be executed to be initialized!

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

20 years agoMacros are baaad.
Chris Lattner [Sat, 5 Jun 2004 00:54:11 +0000 (00:54 +0000)]
Macros are baaad.

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

20 years agoDon't #include <unistd.h> directly, go through the config files
Chris Lattner [Sat, 5 Jun 2004 00:27:38 +0000 (00:27 +0000)]
Don't #include <unistd.h> directly, go through the config files

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

20 years agoAdd missing #include
Chris Lattner [Sat, 5 Jun 2004 00:24:59 +0000 (00:24 +0000)]
Add missing #include

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

20 years agoWork around VS bug
Chris Lattner [Sat, 5 Jun 2004 00:22:04 +0000 (00:22 +0000)]
Work around VS bug

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

20 years agoWarning foo
Chris Lattner [Sat, 5 Jun 2004 00:17:13 +0000 (00:17 +0000)]
Warning foo

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

20 years agoAs much as I dislike doing this, it's the only fix for VC8.0 that I can come
Chris Lattner [Sat, 5 Jun 2004 00:11:27 +0000 (00:11 +0000)]
As much as I dislike doing this, it's the only fix for VC8.0 that I can come
up with, even though it's perfectly conformant code.  :(

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

20 years agoRemove unused var
Chris Lattner [Sat, 5 Jun 2004 00:03:27 +0000 (00:03 +0000)]
Remove unused var

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

20 years agoSquelch a warning
Chris Lattner [Fri, 4 Jun 2004 23:53:20 +0000 (23:53 +0000)]
Squelch a warning

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

20 years agoDelete some unreachable code
Chris Lattner [Fri, 4 Jun 2004 23:52:36 +0000 (23:52 +0000)]
Delete some unreachable code

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

20 years ago* No more CachedWriter::setStream()
Misha Brukman [Fri, 4 Jun 2004 21:11:51 +0000 (21:11 +0000)]
* No more CachedWriter::setStream()
* ostream is back to being a reference instead of a pointer
* Output single characters as chars, not as length-1 strings

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

20 years agoRevert ostream back to reference: the only user (llvm-tv) no longer needs it.
Misha Brukman [Fri, 4 Jun 2004 21:10:35 +0000 (21:10 +0000)]
Revert ostream back to reference: the only user (llvm-tv) no longer needs it.

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

20 years agoAdd some constants for VC
Chris Lattner [Fri, 4 Jun 2004 20:58:34 +0000 (20:58 +0000)]
Add some constants for VC

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

20 years agoFix up some spacing & fix a typo in an assertion in cpValue2Value.
Brian Gaeke [Fri, 4 Jun 2004 20:51:40 +0000 (20:51 +0000)]
Fix up some spacing & fix a typo in an assertion in cpValue2Value.

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

20 years agoUgh, apparently there is no common ground here.
Chris Lattner [Fri, 4 Jun 2004 20:48:51 +0000 (20:48 +0000)]
Ugh, apparently there is no common ground here.

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

20 years agoFix a *really* dumb warning on VC
Chris Lattner [Fri, 4 Jun 2004 20:47:19 +0000 (20:47 +0000)]
Fix a *really* dumb warning on VC

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

20 years agoFix more warnings
Chris Lattner [Fri, 4 Jun 2004 20:39:05 +0000 (20:39 +0000)]
Fix more warnings

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

20 years agoRemove support for printing strings from the cached writer
Chris Lattner [Fri, 4 Jun 2004 20:34:51 +0000 (20:34 +0000)]
Remove support for printing strings from the cached writer

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

20 years agoDon't send random junk to CachedWriter's. Also remove a cast that could be
Chris Lattner [Fri, 4 Jun 2004 20:25:55 +0000 (20:25 +0000)]
Don't send random junk to CachedWriter's.  Also remove a cast that could be
problematic when Type does not derive from Value.

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

20 years agoGCC doesn't like prefix form of cast with two identifiers I guess.
Chris Lattner [Fri, 4 Jun 2004 20:21:53 +0000 (20:21 +0000)]
GCC doesn't like prefix form of cast with two identifiers I guess.

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

20 years agoSquish a warning
Chris Lattner [Fri, 4 Jun 2004 20:14:29 +0000 (20:14 +0000)]
Squish a warning

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

20 years agoSilence a warning
Chris Lattner [Fri, 4 Jun 2004 20:10:17 +0000 (20:10 +0000)]
Silence a warning

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

20 years agoAdd ssize_t for VC++
Chris Lattner [Fri, 4 Jun 2004 20:06:33 +0000 (20:06 +0000)]
Add ssize_t for VC++

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

20 years ago<io.h> provides read/write/open/...
Chris Lattner [Fri, 4 Jun 2004 20:05:35 +0000 (20:05 +0000)]
<io.h> provides read/write/open/...

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

20 years agoVisual C has something resembling a stat function, but it doesn't provide S_ISREG
Chris Lattner [Fri, 4 Jun 2004 20:03:06 +0000 (20:03 +0000)]
Visual C has something resembling a stat function, but it doesn't provide S_ISREG

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

20 years agoMake this work on VC++, pull the HAVE_ALLOCA_H case out instead of duplicating
Chris Lattner [Fri, 4 Jun 2004 19:25:50 +0000 (19:25 +0000)]
Make this work on VC++, pull the HAVE_ALLOCA_H case out instead of duplicating
it.  This code can probably be dramatically simplified, as I suspect that the
pragma and other stuff is not needed with C++ compilers.

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

20 years agoAdd more needed typedefs
Chris Lattner [Fri, 4 Jun 2004 19:11:04 +0000 (19:11 +0000)]
Add more needed typedefs

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

20 years agoAdd explicit casts to silence warnings. There is no need to use snprintf here.
Chris Lattner [Fri, 4 Jun 2004 19:10:30 +0000 (19:10 +0000)]
Add explicit casts to silence warnings.  There is no need to use snprintf here.

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

20 years agoMake this work with VC++
Chris Lattner [Fri, 4 Jun 2004 19:01:49 +0000 (19:01 +0000)]
Make this work with VC++

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

20 years agoFix a nasty bug that caused areAliases to always return false.
Chris Lattner [Fri, 4 Jun 2004 17:03:11 +0000 (17:03 +0000)]
Fix a nasty bug that caused areAliases to always return false.

Bug fix courtesy of Anshu Dasgupta

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

20 years agoEmit a more sensible error message if no subclasses of Target are defined.
Misha Brukman [Fri, 4 Jun 2004 14:59:42 +0000 (14:59 +0000)]
Emit a more sensible error message if no subclasses of Target are defined.
Patch contributed by Vladimir Prus.

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