Commit Graph

13002 Commits

Author SHA1 Message Date
Misha Brukman b6ee60667b * Tabs to spaces
* Delete extra blank lines

llvm-svn: 14779
2004-07-12 22:58:07 +00:00
Misha Brukman 7596c249e9 New open proj: C/C++ compiler in C++, with link to Ed Willink's C++ yacc grammar
llvm-svn: 14778
2004-07-12 21:10:47 +00:00
Chris Lattner 5eb09d1ded Add a helper method. The StructType element is completely redundant in most
cases

llvm-svn: 14777
2004-07-12 20:36:08 +00:00
Chris Lattner d6108ca27e implement new helper method
llvm-svn: 14776
2004-07-12 20:35:11 +00:00
Chris Lattner 420fd1425d Fix unused var warning
llvm-svn: 14775
2004-07-12 20:29:52 +00:00
Chris Lattner 534d252330 Fix a really nasty logic error that VC noticed.
Reid, this might matter to you :)

llvm-svn: 14774
2004-07-12 20:27:31 +00:00
Chris Lattner 049bb9e8d8 Add a missing #include
llvm-svn: 14773
2004-07-12 20:25:33 +00:00
Chris Lattner e8439dced3 Fix warning compiling with VC++
llvm-svn: 14772
2004-07-12 20:25:04 +00:00
Chris Lattner 47bafde495 new feature
llvm-svn: 14770
2004-07-12 17:09:23 +00:00
Misha Brukman a516e99ed6 * Clarify Sparc as SparcV9
* Add link to bugzilla bug with list of miscompiled SparcV9 programs
* Wrap long lines

llvm-svn: 14769
2004-07-12 16:55:41 +00:00
Chris Lattner efcb25e5dc Implement a new method useful for things like the inliner
llvm-svn: 14768
2004-07-12 01:17:52 +00:00
Chris Lattner 3df3e050dd Implement new method
llvm-svn: 14767
2004-07-12 01:17:34 +00:00
Reid Spencer a9e83604f1 Correct an output typo.
llvm-svn: 14766
2004-07-11 23:20:54 +00:00
Reid Spencer 194c576efc Various cleanups:
- Remove tabs
- Standardize use of space around ( and ).
- Consolidate the ConstantPlaceHolder class
- Rename two methods to be more meaningful (ParseType, ParseTypes)
- Correct indentation of blocks
- Add documentation
- Convert input dependent asserts to error(...) so it throws instead.
Provide placeholder implementations of read_float and read_double that
still read in platform-specific endianess. When I figure out how to do
this without knowing the endianess of the platform, it will get implemented
correctly.

llvm-svn: 14765
2004-07-11 17:28:43 +00:00
Reid Spencer db3bf19ad0 - Rename two methods to give them more meaning
- Add read_float and read_double in preparation for a correct
  implementation of bytecode floating point support.

llvm-svn: 14764
2004-07-11 17:24:05 +00:00
Reid Spencer cf5c6e4adb Remove tabs.
llvm-svn: 14763
2004-07-11 17:22:51 +00:00
Reid Spencer a64b62ef6a Prepare the writer for a non-broken implementation of writing floating
point values. This will be fixed when I figure out how to do it correctly
without depending on knowing the endianess of a platform.

llvm-svn: 14762
2004-07-11 17:22:07 +00:00
Chris Lattner 802cffd928 The cleanup is done. Update comment.
llvm-svn: 14761
2004-07-11 08:24:02 +00:00
Chris Lattner c4e6bb5f9f Make add constantexprs work with all types, fixing the regressions from last night
llvm-svn: 14760
2004-07-11 08:01:11 +00:00
Chris Lattner c9c16a0e60 Implement TargetRegistrationListener
llvm-svn: 14759
2004-07-11 06:03:21 +00:00
Chris Lattner 53d2ac5514 Add a new listener class for things that want to be informed about new
targets that are loaded

llvm-svn: 14758
2004-07-11 06:02:59 +00:00
Chris Lattner b889c6b261 Delete the allocate*TargetMachine function, which is now dead.
The shared command line options are now in a header that makes sense.

llvm-svn: 14757
2004-07-11 04:17:58 +00:00
Chris Lattner c2726e63ed Delete the allocate*TargetMachine function, which is now dead .
The shared command line options are now in a header that makes sense.

llvm-svn: 14756
2004-07-11 04:17:10 +00:00
Chris Lattner 2beb4392cf Delete the allocate*TargetMachine function, which is now dead .
llvm-svn: 14755
2004-07-11 04:16:31 +00:00
Chris Lattner 92d1231800 Delete the allocate*TargetMachine functions. Move options to a header file
that makes sense.

llvm-svn: 14754
2004-07-11 04:15:52 +00:00
Chris Lattner a29ca1b7df Prune unused #include
llvm-svn: 14753
2004-07-11 04:05:32 +00:00
Chris Lattner 6142ca8f4f Goodbye macro hell, hello nice clean and simple code. This also gives llc
the ability to dynamically load and use targets that are not linked into it
statically.  e.g.:

  llc -load libparisc.so -march=parisc foo.bc -o foo.s

llvm-svn: 14751
2004-07-11 04:03:24 +00:00
Chris Lattner 8267b7e17d Goodbye macro hell, hello nice clean simple extensible code. This change
also gives the JIT the ability to dynamically load targets. e.g.

lli -load libparisc.so -march=parisc foo.bc

llvm-svn: 14750
2004-07-11 04:02:06 +00:00
Chris Lattner baf43cf335 Implement a couple of methods that TargetMachineRegistry now provides. See,
I told you this file wasn't useless :)

llvm-svn: 14749
2004-07-11 04:00:19 +00:00
Chris Lattner d853629893 Add a new TargetNameParser class, which is useful for parsing options.
Add two methods which are useful for autoselecting targets.

llvm-svn: 14748
2004-07-11 03:59:46 +00:00
Chris Lattner 73eb9436ee Make these format a bit nicer
llvm-svn: 14747
2004-07-11 03:27:42 +00:00
Chris Lattner b84e7c523a Provide better support for pointer-valued command line arguments
llvm-svn: 14746
2004-07-11 03:18:30 +00:00
Chris Lattner 4266f8017d Auto-registrate target
llvm-svn: 14745
2004-07-11 02:48:49 +00:00
Chris Lattner 97c176b639 Add compilability
llvm-svn: 14744
2004-07-11 02:48:28 +00:00
Chris Lattner 5842560090 Initial impl of this file. Yes this is pretty useless right now, but it
will grow in time.

llvm-svn: 14743
2004-07-11 02:44:26 +00:00
Chris Lattner ab2a7f4336 First cut at TargetMachineRegistry and RegisterTarget classes
llvm-svn: 14742
2004-07-11 02:43:43 +00:00
Chris Lattner fe6a18c154 Add two new "virtual static" methods to the TargetMachine class
llvm-svn: 14741
2004-07-11 02:43:07 +00:00
Chris Lattner ec2a1566cc Add -load option
llvm-svn: 14740
2004-07-11 01:08:19 +00:00
Chris Lattner 4b6cdab582 Add a -load option
llvm-svn: 14739
2004-07-11 01:06:59 +00:00
Chris Lattner 99dcad4584 Implicitly getting a new option by linking to support.o instead of support.a
is a bad idea.  Make tools that want the option #include PluginSupport.h
explicitly.

llvm-svn: 14738
2004-07-11 01:04:33 +00:00
Chris Lattner 92f4e1e0aa Add a new header
llvm-svn: 14737
2004-07-11 01:03:57 +00:00
Reid Spencer 3c0249e916 - Correct grammar of -s description
- Normalize -s option specification

llvm-svn: 14736
2004-07-10 23:41:08 +00:00
Reid Spencer c35d141fc8 Group the hidden command line arguments.
Make the -s option actually work and default to the right value.

llvm-svn: 14735
2004-07-10 23:35:46 +00:00
Chris Lattner f61dbbaa7c Add link to the stkrc page
llvm-svn: 14734
2004-07-10 21:43:12 +00:00
Reid Spencer 487b1e5bf4 Command Guide for the Stacker language compiler, stkrc.
llvm-svn: 14733
2004-07-10 20:04:02 +00:00
Reid Spencer f9776c34b6 Replace use of defunct Type::setName method with SymbolTable::insert.
Patch found and provided by Vladimir Merzliakov. Thanks Vladimir!

llvm-svn: 14732
2004-07-10 16:37:42 +00:00
Reid Spencer e5e19daa1b Make the VBRSavings percentage make sense (as a fraction of the total
expanded size instead of the file size). Thanks Chris.

llvm-svn: 14731
2004-07-10 08:04:13 +00:00
Chris Lattner 517d650eb3 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

llvm-svn: 14730
2004-07-10 06:06:56 +00:00
Reid Spencer f3905c8511 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.

llvm-svn: 14729
2004-07-09 22:21:33 +00:00
Reid Spencer 6a218134e3 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.

llvm-svn: 14728
2004-07-09 21:13:53 +00:00
Chris Lattner ed5f67f424 Removed unneeded forward decl
llvm-svn: 14727
2004-07-09 17:02:57 +00:00
Chris Lattner 848c8dd825 Remove unused method
llvm-svn: 14726
2004-07-09 16:48:13 +00:00
Chris Lattner d47909e00a Add checks to ensure that there are no unreachable blocks in the function
llvm-svn: 14725
2004-07-09 16:44:37 +00:00
Chris Lattner c18917c85c Don't call Type::setName()
llvm-svn: 14724
2004-07-09 16:43:55 +00:00
Misha Brukman 82a065dc41 * 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"!

llvm-svn: 14723
2004-07-09 15:45:07 +00:00
Misha Brukman 14d02cd2d8 Read/write the offset value for stack-relative loads via correct instr operand.
llvm-svn: 14722
2004-07-09 15:37:16 +00:00
Misha Brukman b47ab7ae1c * Doxygenify comments
* Fix spacing, grammar in comment
* Make code layout consistent
* Wrap code at 80 cols
* Delete spurious blank lines

No functional changes.

llvm-svn: 14721
2004-07-09 14:45:17 +00:00
Alkis Evlogimenos 7300963c66 Fix typo.
llvm-svn: 14720
2004-07-09 11:25:27 +00:00
Alkis Evlogimenos 132ece8925 Improve code comments.
llvm-svn: 14719
2004-07-09 11:10:00 +00:00
Chris Lattner 3a3e5c42cd No really, he did finish!
llvm-svn: 14717
2004-07-09 06:58:43 +00:00
Chris Lattner 0fc190f305 Too much of a title for it's own good
llvm-svn: 14716
2004-07-09 05:05:39 +00:00
Chris Lattner 3e5d2a655e Fix Validation bugs
llvm-svn: 14715
2004-07-09 05:03:54 +00:00
Chris Lattner 2cb4f45a1d Eliminate the UID field in the Type class, bringing it down to 28 bytes.
llvm-svn: 14709
2004-07-08 22:31:37 +00:00
Chris Lattner 753026dae0 The uid mapping is no more
llvm-svn: 14708
2004-07-08 22:31:09 +00:00
Chris Lattner 0bba5dbe95 Eliminate uses of the UniqueID field on Type objects
llvm-svn: 14707
2004-07-08 22:30:50 +00:00
Chris Lattner 3a9fd4c421 Do not call Type::getUniqueID
llvm-svn: 14706
2004-07-08 22:09:34 +00:00
Chris Lattner a6302c9059 Add a new method
llvm-svn: 14705
2004-07-08 22:09:07 +00:00
Reid Spencer a039955283 Get rid of some cruft in the insert method.
llvm-svn: 14704
2004-07-08 21:50:33 +00:00
Misha Brukman aefab3404e Add support for __fixdfdi(), __floatdisf(), and __floatdidf() external functions
llvm-svn: 14703
2004-07-08 19:41:16 +00:00
Reid Spencer 313aeb2b73 First version of a vector with uniqueness constraints (or a set with
deterministic, insertion-order iteration).

llvm-svn: 14702
2004-07-08 19:36:21 +00:00
Misha Brukman 4c4e044e65 * 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

llvm-svn: 14701
2004-07-08 18:27:59 +00:00
Misha Brukman 59b2d4ef9d * Add support for loading FP constants from the constant pool
* Load FP values into int regs as well for vararg functions; without memory ops!

llvm-svn: 14700
2004-07-08 18:02:38 +00:00
Misha Brukman b604b4df21 * Fix header comment, excise references to X86
* Add suport for printing out references to constant pool indices

llvm-svn: 14699
2004-07-08 17:58:04 +00:00
Chris Lattner 0376545d26 statisfy the spelling police
llvm-svn: 14698
2004-07-08 17:49:37 +00:00
Misha Brukman 2d07af3e08 Fix spelling of `equivalent'
llvm-svn: 14697
2004-07-08 17:45:18 +00:00
Chris Lattner f2e960c5ab Eliminate the SignedType and UnsignedType classes.
llvm-svn: 14695
2004-07-08 17:30:07 +00:00
Chris Lattner 417e85ebd7 isSigned/isUnsigned/isInteger methods do not need to be virtual
llvm-svn: 14694
2004-07-08 17:29:36 +00:00
Chris Lattner e7fa4fc18b Update comment.
Remove unused forward decl of Value.h
Make Type 32 bytes instead of 36 bytes

llvm-svn: 14692
2004-07-08 16:09:38 +00:00
Chris Lattner bf22fbb05e This file uses the Value class without a forward decl
llvm-svn: 14691
2004-07-08 15:54:29 +00:00
Chris Lattner 9ebc7eba24 Add a test that I have had in my tree for several months now, but apparently forgot to commit
llvm-svn: 14690
2004-07-08 15:41:08 +00:00
Chris Lattner 9b8881a3b3 Fix this testcase
llvm-svn: 14689
2004-07-08 15:38:23 +00:00
Brian Gaeke 8165863a9d Support setcc on fp values.
llvm-svn: 14687
2004-07-08 09:08:35 +00:00
Brian Gaeke 7b4722e62c 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.

llvm-svn: 14686
2004-07-08 09:08:22 +00:00
Brian Gaeke 3b204c3f24 Fix bug where SwitchSection would fail to change to ".bss" successfully.
llvm-svn: 14685
2004-07-08 08:08:23 +00:00
Brian Gaeke 4fdd22b922 Fix bug involving bool arguments to binary operators.
Fix typo in comment.

llvm-svn: 14684
2004-07-08 08:08:10 +00:00
Brian Gaeke dc5940794c 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'.

llvm-svn: 14683
2004-07-08 07:52:13 +00:00
Chris Lattner b2db87a5ca Disable some code that isn't helping matters
llvm-svn: 14682
2004-07-08 07:25:51 +00:00
Brian Gaeke 4ba31a2e1e Support 'ret float'
llvm-svn: 14681
2004-07-08 07:22:27 +00:00
Chris Lattner 9ab4d88ab6 Really, it is not necessary to recompile all files in a profile build every
time!

llvm-svn: 14680
2004-07-08 03:42:20 +00:00
Alkis Evlogimenos 2c422bbefb Add viewCFG() and viewCFGOnly() APIs.
llvm-svn: 14679
2004-07-08 00:47:58 +00:00
Misha Brukman 4233155533 There is no error message to print out, end sentence with `!'
llvm-svn: 14678
2004-07-07 21:22:05 +00:00
Reid Spencer 1a4152fa2c Make error message consistent with the rest of LLVM by saying that bytecode
is read, not parsed.

llvm-svn: 14677
2004-07-07 21:20:28 +00:00
Reid Spencer 37e0ba969a Fix some thinkos in the script (error handling, proper argument handling).
llvm-svn: 14676
2004-07-07 21:19:01 +00:00
Reid Spencer 6652252f0f Bug 391 fixed.
llvm-svn: 14675
2004-07-07 21:06:28 +00:00
Reid Spencer 6967cd54f3 Fix for bug 391.
Improve exeception handling around bcreader invocations.

llvm-svn: 14674
2004-07-07 21:01:38 +00:00
Misha Brukman 3955f9079b * Use a map for caching lookups to external functions (fp div/rem)
* Tabs to spaces

llvm-svn: 14673
2004-07-07 20:07:22 +00:00
Misha Brukman 6ff655117d * Wrap long lines (comments and code)
* Tabs to spaces

llvm-svn: 14672
2004-07-07 20:01:36 +00:00
Chris Lattner 9df9afddcf Fix regressions in these testcases:
Regression.Assembler.2002-01-24-BadSymbolTableAssert
 Regression.Assembler.2002-01-24-ValueRefineAbsType

Found through the nightly tester :)

llvm-svn: 14671
2004-07-07 18:07:46 +00:00
Misha Brukman ef84814ea9 Add fmod() to the Module being compiled so that it gets a stub in the asm file
llvm-svn: 14670
2004-07-07 15:36:18 +00:00
Reid Spencer 18a7abbc75 Insert a reference to uint32_vbr encoding.
llvm-svn: 14669
2004-07-07 15:02:54 +00:00