oota-llvm.git
19 years agoGroup the hidden command line arguments.
Reid Spencer [Sat, 10 Jul 2004 23:35:46 +0000 (23:35 +0000)]
Group the hidden command line arguments.
Make the -s option actually work and default to the right value.

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

19 years agoAdd link to the stkrc page
Chris Lattner [Sat, 10 Jul 2004 21:43:12 +0000 (21:43 +0000)]
Add link to the stkrc page

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

19 years agoCommand Guide for the Stacker language compiler, stkrc.
Reid Spencer [Sat, 10 Jul 2004 20:04:02 +0000 (20:04 +0000)]
Command Guide for the Stacker language compiler, stkrc.

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

19 years agoReplace use of defunct Type::setName method with SymbolTable::insert.
Reid Spencer [Sat, 10 Jul 2004 16:37:42 +0000 (16:37 +0000)]
Replace use of defunct Type::setName method with SymbolTable::insert.
Patch found and provided by Vladimir Merzliakov. Thanks Vladimir!

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

19 years agoMake the VBRSavings percentage make sense (as a fraction of the total
Reid Spencer [Sat, 10 Jul 2004 08:04:13 +0000 (08:04 +0000)]
Make the VBRSavings percentage make sense (as a fraction of the total
expanded size instead of the file size). Thanks Chris.

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

19 years agoMinor cleanups:
Chris Lattner [Sat, 10 Jul 2004 06:06:56 +0000 (06:06 +0000)]
Minor cleanups:
 * Mention the --help and --help-hidden options
 * Don't say program when we really mean any old bytecode file
 * Add a link to the man pages
 * Move analyze down in the list, as it's not as important as the rest

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

19 years agoError Handling Cleanup:
Reid Spencer [Fri, 9 Jul 2004 22:21:33 +0000 (22:21 +0000)]
Error Handling Cleanup:
- get rid of PARSE_ERROR macro
- add error(std::string) function
- use error(std::string) for all errors
- make input dependent asserts call error(std::string) instead
- ensure asserts are only for logic bugs, not input discrepancies.

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

19 years agoFix a backwards compatibility bug found by Tanya. In version 1.2, the
Reid Spencer [Fri, 9 Jul 2004 21:13:53 +0000 (21:13 +0000)]
Fix a backwards compatibility bug found by Tanya. In version 1.2, the
global type plane starts with a length and the TypeTyID value to identify
the type plane has having type definitions. This doesn't happen in 1.3
because the types are read from a known position in the file. However, the
TypeTyID must be read in (and ignored) if its a 1.2 bytecode file.

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

19 years agoRemoved unneeded forward decl
Chris Lattner [Fri, 9 Jul 2004 17:02:57 +0000 (17:02 +0000)]
Removed unneeded forward decl

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

19 years agoRemove unused method
Chris Lattner [Fri, 9 Jul 2004 16:48:13 +0000 (16:48 +0000)]
Remove unused method

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

19 years agoAdd checks to ensure that there are no unreachable blocks in the function
Chris Lattner [Fri, 9 Jul 2004 16:44:37 +0000 (16:44 +0000)]
Add checks to ensure that there are no unreachable blocks in the function

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

19 years agoDon't call Type::setName()
Chris Lattner [Fri, 9 Jul 2004 16:43:55 +0000 (16:43 +0000)]
Don't call Type::setName()

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

19 years ago* Add support for indexing into structures, thanks to Chris (x86)
Misha Brukman [Fri, 9 Jul 2004 15:45:07 +0000 (15:45 +0000)]
* Add support for indexing into structures, thanks to Chris (x86)
  The large diff is because of indentation of a whole region
* Fix querying predecessor blocks in SelectPHINodes(), thanks to Brian (v8)
* Add support for external functions malloc() and free()
* Fix some code indentation

Remember, kids: It's not plagiarism if you "creatively borrow" from your
sources.  It's called "research"!

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

19 years agoRead/write the offset value for stack-relative loads via correct instr operand.
Misha Brukman [Fri, 9 Jul 2004 15:37:16 +0000 (15:37 +0000)]
Read/write the offset value for stack-relative loads via correct instr operand.

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

19 years ago* Doxygenify comments
Misha Brukman [Fri, 9 Jul 2004 14:45:17 +0000 (14:45 +0000)]
* Doxygenify comments
* Fix spacing, grammar in comment
* Make code layout consistent
* Wrap code at 80 cols
* Delete spurious blank lines

No functional changes.

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

19 years agoFix typo.
Alkis Evlogimenos [Fri, 9 Jul 2004 11:25:27 +0000 (11:25 +0000)]
Fix typo.

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

19 years agoImprove code comments.
Alkis Evlogimenos [Fri, 9 Jul 2004 11:10:00 +0000 (11:10 +0000)]
Improve code comments.

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

19 years agoNo really, he did finish!
Chris Lattner [Fri, 9 Jul 2004 06:58:43 +0000 (06:58 +0000)]
No really, he did finish!

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

19 years agoToo much of a title for it's own good
Chris Lattner [Fri, 9 Jul 2004 05:05:39 +0000 (05:05 +0000)]
Too much of a title for it's own good

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

19 years agoFix Validation bugs
Chris Lattner [Fri, 9 Jul 2004 05:03:54 +0000 (05:03 +0000)]
Fix Validation bugs

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

19 years agoEliminate the UID field in the Type class, bringing it down to 28 bytes.
Chris Lattner [Thu, 8 Jul 2004 22:31:37 +0000 (22:31 +0000)]
Eliminate the UID field in the Type class, bringing it down to 28 bytes.

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

19 years agoThe uid mapping is no more
Chris Lattner [Thu, 8 Jul 2004 22:31:09 +0000 (22:31 +0000)]
The uid mapping is no more

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

19 years agoEliminate uses of the UniqueID field on Type objects
Chris Lattner [Thu, 8 Jul 2004 22:30:50 +0000 (22:30 +0000)]
Eliminate uses of the UniqueID field on Type objects

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

19 years agoDo not call Type::getUniqueID
Chris Lattner [Thu, 8 Jul 2004 22:09:34 +0000 (22:09 +0000)]
Do not call Type::getUniqueID

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

19 years agoAdd a new method
Chris Lattner [Thu, 8 Jul 2004 22:09:07 +0000 (22:09 +0000)]
Add a new method

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

19 years agoGet rid of some cruft in the insert method.
Reid Spencer [Thu, 8 Jul 2004 21:50:33 +0000 (21:50 +0000)]
Get rid of some cruft in the insert method.

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

19 years agoAdd support for __fixdfdi(), __floatdisf(), and __floatdidf() external functions
Misha Brukman [Thu, 8 Jul 2004 19:41:16 +0000 (19:41 +0000)]
Add support for __fixdfdi(), __floatdisf(), and __floatdidf() external functions

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

19 years agoFirst version of a vector with uniqueness constraints (or a set with
Reid Spencer [Thu, 8 Jul 2004 19:36:21 +0000 (19:36 +0000)]
First version of a vector with uniqueness constraints (or a set with
deterministic, insertion-order iteration).

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

19 years ago* Use several Function* for external functions instead of a std::map
Misha Brukman [Thu, 8 Jul 2004 18:27:59 +0000 (18:27 +0000)]
* Use several Function* for external functions instead of a std::map
* Non-const FP values must be loaded into int regs (for vararg fns) via memory

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

19 years ago* Add support for loading FP constants from the constant pool
Misha Brukman [Thu, 8 Jul 2004 18:02:38 +0000 (18:02 +0000)]
* Add support for loading FP constants from the constant pool
* Load FP values into int regs as well for vararg functions; without memory ops!

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

19 years ago* Fix header comment, excise references to X86
Misha Brukman [Thu, 8 Jul 2004 17:58:04 +0000 (17:58 +0000)]
* Fix header comment, excise references to X86
* Add suport for printing out references to constant pool indices

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

19 years agostatisfy the spelling police
Chris Lattner [Thu, 8 Jul 2004 17:49:37 +0000 (17:49 +0000)]
statisfy the spelling police

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

19 years agoFix spelling of `equivalent'
Misha Brukman [Thu, 8 Jul 2004 17:45:18 +0000 (17:45 +0000)]
Fix spelling of `equivalent'

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

19 years agoEliminate the SignedType and UnsignedType classes.
Chris Lattner [Thu, 8 Jul 2004 17:30:07 +0000 (17:30 +0000)]
Eliminate the SignedType and UnsignedType classes.

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

19 years agoisSigned/isUnsigned/isInteger methods do not need to be virtual
Chris Lattner [Thu, 8 Jul 2004 17:29:36 +0000 (17:29 +0000)]
isSigned/isUnsigned/isInteger methods do not need to be virtual

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

19 years agoUpdate comment.
Chris Lattner [Thu, 8 Jul 2004 16:09:38 +0000 (16:09 +0000)]
Update comment.
Remove unused forward decl of Value.h
Make Type 32 bytes instead of 36 bytes

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

19 years agoThis file uses the Value class without a forward decl
Chris Lattner [Thu, 8 Jul 2004 15:54:29 +0000 (15:54 +0000)]
This file uses the Value class without a forward decl

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

19 years agoAdd a test that I have had in my tree for several months now, but apparently forgot...
Chris Lattner [Thu, 8 Jul 2004 15:41:08 +0000 (15:41 +0000)]
Add a test that I have had in my tree for several months now, but apparently forgot to commit

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

19 years agoFix this testcase
Chris Lattner [Thu, 8 Jul 2004 15:38:23 +0000 (15:38 +0000)]
Fix this testcase

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

19 years agoSupport setcc on fp values.
Brian Gaeke [Thu, 8 Jul 2004 09:08:35 +0000 (09:08 +0000)]
Support setcc on fp values.

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

19 years agoAdd floating-point branches and compares. Compares don't complete
Brian Gaeke [Thu, 8 Jul 2004 09:08:22 +0000 (09:08 +0000)]
Add floating-point branches and compares.  Compares don't complete
until the next cycle, and there's no interlock, so they effectively
have a delay slot.

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

19 years agoFix bug where SwitchSection would fail to change to ".bss" successfully.
Brian Gaeke [Thu, 8 Jul 2004 08:08:23 +0000 (08:08 +0000)]
Fix bug where SwitchSection would fail to change to ".bss" successfully.

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

19 years agoFix bug involving bool arguments to binary operators.
Brian Gaeke [Thu, 8 Jul 2004 08:08:10 +0000 (08:08 +0000)]
Fix bug involving bool arguments to binary operators.
Fix typo in comment.

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

19 years agoFix bug in copying long constants to register pairs. We were getting
Brian Gaeke [Thu, 8 Jul 2004 07:52:13 +0000 (07:52 +0000)]
Fix bug in copying long constants to register pairs. We were getting
the top and bottom halves backwards...how embarrassing.
Support 'cast long to long' and other similar no-op casts to long.
Support 'ret long'.

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

19 years agoDisable some code that isn't helping matters
Chris Lattner [Thu, 8 Jul 2004 07:25:51 +0000 (07:25 +0000)]
Disable some code that isn't helping matters

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

19 years agoSupport 'ret float'
Brian Gaeke [Thu, 8 Jul 2004 07:22:27 +0000 (07:22 +0000)]
Support 'ret float'

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

19 years agoReally, it is not necessary to recompile all files in a profile build every
Chris Lattner [Thu, 8 Jul 2004 03:42:20 +0000 (03:42 +0000)]
Really, it is not necessary to recompile all files in a profile build every
time!

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

19 years agoAdd viewCFG() and viewCFGOnly() APIs.
Alkis Evlogimenos [Thu, 8 Jul 2004 00:47:58 +0000 (00:47 +0000)]
Add viewCFG() and viewCFGOnly() APIs.

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

19 years agoThere is no error message to print out, end sentence with `!'
Misha Brukman [Wed, 7 Jul 2004 21:22:05 +0000 (21:22 +0000)]
There is no error message to print out, end sentence with `!'

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

19 years agoMake error message consistent with the rest of LLVM by saying that bytecode
Reid Spencer [Wed, 7 Jul 2004 21:20:28 +0000 (21:20 +0000)]
Make error message consistent with the rest of LLVM by saying that bytecode
is read, not parsed.

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

19 years agoFix some thinkos in the script (error handling, proper argument handling).
Reid Spencer [Wed, 7 Jul 2004 21:19:01 +0000 (21:19 +0000)]
Fix some thinkos in the script (error handling, proper argument handling).

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

19 years agoBug 391 fixed.
Reid Spencer [Wed, 7 Jul 2004 21:06:28 +0000 (21:06 +0000)]
Bug 391 fixed.

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

19 years agoFix for bug 391.
Reid Spencer [Wed, 7 Jul 2004 21:01:38 +0000 (21:01 +0000)]
Fix for bug 391.
Improve exeception handling around bcreader invocations.

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

19 years ago* Use a map for caching lookups to external functions (fp div/rem)
Misha Brukman [Wed, 7 Jul 2004 20:07:22 +0000 (20:07 +0000)]
* Use a map for caching lookups to external functions (fp div/rem)
* Tabs to spaces

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

19 years ago* Wrap long lines (comments and code)
Misha Brukman [Wed, 7 Jul 2004 20:01:36 +0000 (20:01 +0000)]
* Wrap long lines (comments and code)
* Tabs to spaces

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

19 years agoFix regressions in these testcases:
Chris Lattner [Wed, 7 Jul 2004 18:07:46 +0000 (18:07 +0000)]
Fix regressions in these testcases:
 Regression.Assembler.2002-01-24-BadSymbolTableAssert
 Regression.Assembler.2002-01-24-ValueRefineAbsType

Found through the nightly tester :)

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

19 years agoAdd fmod() to the Module being compiled so that it gets a stub in the asm file
Misha Brukman [Wed, 7 Jul 2004 15:36:18 +0000 (15:36 +0000)]
Add fmod() to the Module being compiled so that it gets a stub in the asm file

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

19 years agoInsert a reference to uint32_vbr encoding.
Reid Spencer [Wed, 7 Jul 2004 15:02:54 +0000 (15:02 +0000)]
Insert a reference to uint32_vbr encoding.

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

19 years agoAn update with corrections to content as well as using a regex style
Reid Spencer [Wed, 7 Jul 2004 13:34:26 +0000 (13:34 +0000)]
An update with corrections to content as well as using a regex style
notation that Chris' suggested to make the specification more compact and
succinct. Added a section to Describe the notation, made the VBR
description its own section, and otherwise generally cleaned things up.

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

19 years agoThe bytecode reader wants to be able to read types that are not quite resolved
Chris Lattner [Wed, 7 Jul 2004 06:48:27 +0000 (06:48 +0000)]
The bytecode reader wants to be able to read types that are not quite resolved
yet, then resolve them in it's own sweet time.  We must support this.

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

19 years agoHeaders moved
Chris Lattner [Wed, 7 Jul 2004 06:35:22 +0000 (06:35 +0000)]
Headers moved

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

19 years agoAll of these now live in the DataStructure directory
Chris Lattner [Wed, 7 Jul 2004 06:32:53 +0000 (06:32 +0000)]
All of these now live in the DataStructure directory

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

19 years agoMove all of the DSA headers into the Analysis/DataStructure subdir.
Chris Lattner [Wed, 7 Jul 2004 06:32:21 +0000 (06:32 +0000)]
Move all of the DSA headers into the Analysis/DataStructure subdir.

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

19 years agoMove DSA headers into Analysis/DataStructure to make it more obvious
Chris Lattner [Wed, 7 Jul 2004 06:29:26 +0000 (06:29 +0000)]
Move DSA headers into Analysis/DataStructure to make it more obvious
what is implemented by the DataStructure library.

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

19 years agoMoving headers
Chris Lattner [Wed, 7 Jul 2004 06:22:54 +0000 (06:22 +0000)]
Moving headers

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

19 years agoAs much as I hate to say it, the whole setNode interface for DSNodeHandles
Chris Lattner [Wed, 7 Jul 2004 06:12:52 +0000 (06:12 +0000)]
As much as I hate to say it, the whole setNode interface for DSNodeHandles
is HOPELESSLY broken.  The problem is that the embedded getNode call can
change the offset of the node handle in unpredictable ways.

As it turns out, all of the clients of this method really want to set
both the node and the offset, thus it is more efficient (and less buggy)
to just do both of them in one method call.  This fixes some obscure bugs
handling non-forwarded node handles.

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

19 years agoWhen folding constant expr gep's, don't force the use of long indices.
Chris Lattner [Wed, 7 Jul 2004 04:45:13 +0000 (04:45 +0000)]
When folding constant expr gep's, don't force the use of long indices.

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

19 years agoBug fixed
Chris Lattner [Wed, 7 Jul 2004 02:25:24 +0000 (02:25 +0000)]
Bug fixed

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

19 years agoNew testcase for PR396
Chris Lattner [Wed, 7 Jul 2004 02:20:02 +0000 (02:20 +0000)]
New testcase for PR396

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

19 years agoDisable coalescing.
Alkis Evlogimenos [Wed, 7 Jul 2004 02:03:12 +0000 (02:03 +0000)]
Disable coalescing.

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

19 years agoMake sure people don't make functiontypes with an invalid return type
Chris Lattner [Tue, 6 Jul 2004 23:25:19 +0000 (23:25 +0000)]
Make sure people don't make functiontypes with an invalid return type

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

19 years ago* Add support for calling vararg functions (must pass doubles in int regs too)
Misha Brukman [Tue, 6 Jul 2004 22:51:53 +0000 (22:51 +0000)]
* Add support for calling vararg functions (must pass doubles in int regs too)
* Make visitSetCondInst() share condition-generating code with EmitComparison()
* There are 13 FPRs for function-passing arguments, not 8
* Do not rely on registers being sequential, use an array lookup
* In unimplemented switch cases, send an error and abort instead of silent
  fall-through
* Add doInitialization() for adding function prototypes for external math fns
* Minor changes: fix indentation, spacing, code clarity

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

19 years agoUse the more compact `bl' instead of cryptic (but equivalent) `bcl 20,31'
Misha Brukman [Tue, 6 Jul 2004 22:40:34 +0000 (22:40 +0000)]
Use the more compact `bl' instead of cryptic (but equivalent) `bcl 20,31'

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

19 years agoWork around apparent Apple compiler bug which was making all mangled
Brian Gaeke [Tue, 6 Jul 2004 20:29:05 +0000 (20:29 +0000)]
Work around apparent Apple compiler bug which was making all mangled
names start with l0_.

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

19 years agoPunctuate
Chris Lattner [Tue, 6 Jul 2004 19:58:54 +0000 (19:58 +0000)]
Punctuate

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

19 years agoCheck to make sure types are sized before calling getTypeSize on them.
Chris Lattner [Tue, 6 Jul 2004 19:28:42 +0000 (19:28 +0000)]
Check to make sure types are sized before calling getTypeSize on them.

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

19 years agoIt doesn't matter what the 2nd operand is; if the GEP has 2 operands and
Brian Gaeke [Tue, 6 Jul 2004 19:24:47 +0000 (19:24 +0000)]
It doesn't matter what the 2nd operand is; if the GEP has 2 operands and
the first is a zero, we should leave it alone.

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

19 years agoAdd helper function.
Brian Gaeke [Tue, 6 Jul 2004 18:15:39 +0000 (18:15 +0000)]
Add helper function.
Don't touch GEPs for which DecomposeArrayRef is not going to do anything
special (e.g., < 2 indices, or 2 indices and the last one is a constant.)

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

19 years agoFind bugs sooner rather than later. In this case, don't allow the creation
Chris Lattner [Tue, 6 Jul 2004 17:44:17 +0000 (17:44 +0000)]
Find bugs sooner rather than later.  In this case, don't allow the creation
of instructions that don't have a first-class or void type.

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

19 years agoChange the "rotate by 90" xtics specification to just "rotate" which is
Reid Spencer [Tue, 6 Jul 2004 17:04:09 +0000 (17:04 +0000)]
Change the "rotate by 90" xtics specification to just "rotate" which is
equivalent. The "by <angle>" syntax is not acceptable for all output
devices. Apparently the Sparc and x86 output devices (no color) don't
accept this, but should accept the plain "rotate".

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

19 years agoDo not crash when joining two intervals of registers of different
Alkis Evlogimenos [Tue, 6 Jul 2004 16:03:21 +0000 (16:03 +0000)]
Do not crash when joining two intervals of registers of different
classes: just ignore that move. Thanks to Vladimir Prus who found the
bug!

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

19 years ago* Add utility functions: convert SetCC => PPC opcode and invert PPC opcode
Misha Brukman [Tue, 6 Jul 2004 15:32:44 +0000 (15:32 +0000)]
* Add utility functions: convert SetCC => PPC opcode and invert PPC opcode
* If SetCondInst is folded into BranchInst (and it is the only user), do not
  emit code for SetCondInst
* Fix assembly opcodes in comments in visitSetCondInst()
* Fix codegen of conditional branches

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

19 years agoImplement rem.ll:test3
Chris Lattner [Tue, 6 Jul 2004 07:38:18 +0000 (07:38 +0000)]
Implement rem.ll:test3

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

19 years agoNew testcase
Chris Lattner [Tue, 6 Jul 2004 07:38:00 +0000 (07:38 +0000)]
New testcase

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

19 years agoFix a minor bug where we would go into infinite loops on some constants
Chris Lattner [Tue, 6 Jul 2004 07:11:42 +0000 (07:11 +0000)]
Fix a minor bug where we would go into infinite loops on some constants

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

19 years agoImplement InstCombine/sub.ll:test15: X % -Y === X % Y
Chris Lattner [Tue, 6 Jul 2004 07:01:22 +0000 (07:01 +0000)]
Implement InstCombine/sub.ll:test15:  X % -Y === X % Y

Also, remove X % -1 = 0, because it's not true for unsigneds, and the
signed case is superceeded by this new handling.

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

19 years agoNew testcase
Chris Lattner [Tue, 6 Jul 2004 07:00:11 +0000 (07:00 +0000)]
New testcase

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

19 years agoFix a bug in the unreachable block elim pass. Dropping all references on a
Chris Lattner [Tue, 6 Jul 2004 06:36:11 +0000 (06:36 +0000)]
Fix a bug in the unreachable block elim pass.  Dropping all references on a
basic block clear()'s all of the operands lists, including phis.  This
caused removePredecessor to get confused later.  Because of this, we just
nuke (without prejudice) PHI nodes in unreachable blocks.

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

19 years agoRemove definition and use of OtherVal enumerator. This just fixes a thinko.
Reid Spencer [Tue, 6 Jul 2004 01:30:36 +0000 (01:30 +0000)]
Remove definition and use of OtherVal enumerator. This just fixes a thinko.

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

19 years agoFirst draft completed. All sections written.
Reid Spencer [Mon, 5 Jul 2004 22:28:02 +0000 (22:28 +0000)]
First draft completed. All sections written.

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

19 years agoCaused the labels on the small plots to be drawn vertically instead of
Reid Spencer [Mon, 5 Jul 2004 19:09:32 +0000 (19:09 +0000)]
Caused the labels on the small plots to be drawn vertically instead of
horizontally so they no longer overlap.

This eye-strain-lessening patch contributed by Vladimir Merzliakov. Thanks!

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

19 years agoAdded sections for Constant Pool, Module Global Info, and Compaction
Reid Spencer [Mon, 5 Jul 2004 19:04:27 +0000 (19:04 +0000)]
Added sections for Constant Pool, Module Global Info, and Compaction
Tables. Two more sections to go.

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

19 years agoAdd a missing "terminator" :)
Chris Lattner [Mon, 5 Jul 2004 18:05:48 +0000 (18:05 +0000)]
Add a missing "terminator" :)

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

19 years agoStructures allow only uint
Chris Lattner [Mon, 5 Jul 2004 17:55:28 +0000 (17:55 +0000)]
Structures allow only uint
arrays allow int/uint/long/ulong

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

19 years ago- Reorganized the document contents
Reid Spencer [Mon, 5 Jul 2004 08:18:07 +0000 (08:18 +0000)]
- Reorganized the document contents
- Provided a "General Layout" section that currently covers just the block
  structure of the bytecode file.
- Wrote the section on the Global Type Pool
- Wrote the section on differences between LLVM file format versions.

Only five sections left to write!

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

19 years agoFinalize bytecode dumping. The "handleFinish" method was getting called
Reid Spencer [Mon, 5 Jul 2004 00:57:50 +0000 (00:57 +0000)]
Finalize bytecode dumping. The "handleFinish" method was getting called
too soon so the function data was not getting dumped (it was generated
after the call handleFinish). Also cleaned up the output format for
proper indentation.

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

19 years agoCorrectly compute the ration of iterations/#intervals.
Alkis Evlogimenos [Sun, 4 Jul 2004 17:23:35 +0000 (17:23 +0000)]
Correctly compute the ration of iterations/#intervals.

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

19 years agoAdd #includes
Chris Lattner [Sun, 4 Jul 2004 17:19:21 +0000 (17:19 +0000)]
Add #includes

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

19 years agoAdd #include <iostream> since Value.h doesn't include it any more.
Reid Spencer [Sun, 4 Jul 2004 12:22:14 +0000 (12:22 +0000)]
Add #include <iostream> since Value.h doesn't include it any more.

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

19 years agoAdd #include <iostream> since Value.h does not include it any more.
Reid Spencer [Sun, 4 Jul 2004 12:20:55 +0000 (12:20 +0000)]
Add #include <iostream> since Value.h does not include it any more.

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