summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix warning on SparcV9, where sizeof (int) != sizeof (void *).Brian Gaeke2004-07-131-1/+1
| | | | llvm-svn: 14786
* Replace a bunch of complex ConstantPointerRef referring code with simpleChris Lattner2004-07-131-11/+3
| | | | | | code. llvm-svn: 14785
* Factor some code to handle "load (constantexpr cast foo)" just likeChris Lattner2004-07-131-20/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "load (cast foo)". This allows us to compile C++ code like this: class Bclass { public: virtual int operator()() { return 666; } }; class Dclass: public Bclass { public: virtual int operator()() { return 667; } } ; int main(int argc, char** argv) { Dclass x; return x(); } Into this: int %main(int %argc, sbyte** %argv) { entry: call void %__main( ) ret int 667 } Instead of this: int %main(int %argc, sbyte** %argv) { entry: %x = alloca "struct.std::bad_typeid" ; <"struct.std::bad_typeid"*> [#uses=3] call void %__main( ) %tmp.1.i.i = getelementptr "struct.std::bad_typeid"* %x, uint 0, uint 0, uint 0 ; <int (...)***> [#uses=1] store int (...)** getelementptr ([3 x int (...)*]* %vtable for Bclass, int 0, long 2), int (...)*** %tmp.1.i.i %tmp.3.i = getelementptr "struct.std::bad_typeid"* %x, int 0, uint 0, uint 0 ; <int (...)***> [#uses=1] store int (...)** getelementptr ([3 x int (...)*]* %vtable for Dclass, int 0, long 2), int (...)*** %tmp.3.i %tmp.5 = load int ("struct.std::bad_typeid"*)** cast (int (...)** getelementptr ([3 x int (...)*]* %vtable for Dclass, int 0, long 2) to int ("struct.std::bad_typeid"*)**) ; <int ("struct.std::bad_typeid"*)*> [#uses=1] %tmp.6 = call int %tmp.5( "struct.std::bad_typeid"* %x ) ; <int> [#uses=1] ret int %tmp.6 ret int 0 } In order words, we now resolve the virtual function call. llvm-svn: 14783
* Correctly load FP constants out of the constant pool.Misha Brukman2004-07-122-12/+6
| | | | llvm-svn: 14782
* Apple's MacOS X is another OS which does not provide alloca() via <alloca.h>Misha Brukman2004-07-121-1/+1
| | | | llvm-svn: 14781
* Implement getModuleMatchQuality and getJITMatchQuality() for PowerPCMisha Brukman2004-07-122-0/+23
| | | | llvm-svn: 14780
* implement new helper methodChris Lattner2004-07-121-0/+8
| | | | llvm-svn: 14776
* Fix unused var warningChris Lattner2004-07-121-3/+2
| | | | llvm-svn: 14775
* Fix a really nasty logic error that VC noticed.Chris Lattner2004-07-121-2/+2
| | | | | | Reid, this might matter to you :) llvm-svn: 14774
* Implement new methodChris Lattner2004-07-121-0/+36
| | | | llvm-svn: 14767
* Various cleanups:Reid Spencer2004-07-111-153/+193
| | | | | | | | | | | | | | | | - 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
* - Rename two methods to give them more meaningReid Spencer2004-07-111-2/+8
| | | | | | | - Add read_float and read_double in preparation for a correct implementation of bytecode floating point support. llvm-svn: 14764
* Remove tabs.Reid Spencer2004-07-111-2/+2
| | | | llvm-svn: 14763
* Prepare the writer for a non-broken implementation of writing floatingReid Spencer2004-07-112-2/+19
| | | | | | | 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
* The cleanup is done. Update comment.Chris Lattner2004-07-111-5/+2
| | | | llvm-svn: 14761
* Make add constantexprs work with all types, fixing the regressions from last ↵Chris Lattner2004-07-111-4/+28
| | | | | | night llvm-svn: 14760
* Implement TargetRegistrationListenerChris Lattner2004-07-111-0/+26
| | | | llvm-svn: 14759
* Delete the allocate*TargetMachine function, which is now dead.Chris Lattner2004-07-112-10/+2
| | | | | | The shared command line options are now in a header that makes sense. llvm-svn: 14757
* Delete the allocate*TargetMachine function, which is now dead .Chris Lattner2004-07-115-37/+5
| | | | | | The shared command line options are now in a header that makes sense. llvm-svn: 14756
* Delete the allocate*TargetMachine function, which is now dead .Chris Lattner2004-07-111-6/+0
| | | | llvm-svn: 14755
* Goodbye macro hell, hello nice clean simple extensible code. This changeChris Lattner2004-07-111-55/+13
| | | | | | | | also gives the JIT the ability to dynamically load targets. e.g. lli -load libparisc.so -march=parisc foo.bc llvm-svn: 14750
* Implement a couple of methods that TargetMachineRegistry now provides. See,Chris Lattner2004-07-111-0/+60
| | | | | | I told you this file wasn't useless :) llvm-svn: 14749
* Make these format a bit nicerChris Lattner2004-07-116-6/+6
| | | | llvm-svn: 14747
* Auto-registrate targetChris Lattner2004-07-119-6/+84
| | | | llvm-svn: 14745
* Add compilabilityChris Lattner2004-07-113-0/+3
| | | | llvm-svn: 14744
* Initial impl of this file. Yes this is pretty useless right now, but itChris Lattner2004-07-111-0/+21
| | | | | | will grow in time. llvm-svn: 14743
* Implicitly getting a new option by linking to support.o instead of support.aChris Lattner2004-07-111-23/+8
| | | | | | | is a bad idea. Make tools that want the option #include PluginSupport.h explicitly. llvm-svn: 14738
* Replace use of defunct Type::setName method with SymbolTable::insert.Reid Spencer2004-07-101-1/+1
| | | | | | Patch found and provided by Vladimir Merzliakov. Thanks Vladimir! llvm-svn: 14732
* Make the VBRSavings percentage make sense (as a fraction of the totalReid Spencer2004-07-101-3/+2
| | | | | | expanded size instead of the file size). Thanks Chris. llvm-svn: 14731
* Error Handling Cleanup:Reid Spencer2004-07-092-121/+129
| | | | | | | | | | - 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
* Fix a backwards compatibility bug found by Tanya. In version 1.2, theReid Spencer2004-07-091-0/+5
| | | | | | | | | 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
* Remove unused methodChris Lattner2004-07-091-5/+0
| | | | llvm-svn: 14726
* Add checks to ensure that there are no unreachable blocks in the functionChris Lattner2004-07-091-0/+8
| | | | llvm-svn: 14725
* Don't call Type::setName()Chris Lattner2004-07-091-1/+1
| | | | llvm-svn: 14724
* * Add support for indexing into structures, thanks to Chris (x86)Misha Brukman2004-07-092-120/+188
| | | | | | | | | | | | 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
* Read/write the offset value for stack-relative loads via correct instr operand.Misha Brukman2004-07-091-7/+5
| | | | llvm-svn: 14722
* * Doxygenify commentsMisha Brukman2004-07-091-104/+96
| | | | | | | | | | | * Fix spacing, grammar in comment * Make code layout consistent * Wrap code at 80 cols * Delete spurious blank lines No functional changes. llvm-svn: 14721
* Fix typo.Alkis Evlogimenos2004-07-091-1/+1
| | | | llvm-svn: 14720
* Improve code comments.Alkis Evlogimenos2004-07-091-5/+11
| | | | llvm-svn: 14719
* The uid mapping is no moreChris Lattner2004-07-081-12/+1
| | | | llvm-svn: 14708
* Eliminate uses of the UniqueID field on Type objectsChris Lattner2004-07-081-23/+18
| | | | llvm-svn: 14707
* Do not call Type::getUniqueIDChris Lattner2004-07-081-4/+12
| | | | llvm-svn: 14706
* Add support for __fixdfdi(), __floatdisf(), and __floatdidf() external functionsMisha Brukman2004-07-082-6/+22
| | | | llvm-svn: 14703
* * Use several Function* for external functions instead of a std::mapMisha Brukman2004-07-082-52/+78
| | | | | | * Non-const FP values must be loaded into int regs (for vararg fns) via memory llvm-svn: 14701
* * Add support for loading FP constants from the constant poolMisha Brukman2004-07-082-20/+88
| | | | | | * Load FP values into int regs as well for vararg functions; without memory ops! llvm-svn: 14700
* * Fix header comment, excise references to X86Misha Brukman2004-07-082-30/+46
| | | | | | * Add suport for printing out references to constant pool indices llvm-svn: 14699
* Eliminate the SignedType and UnsignedType classes.Chris Lattner2004-07-081-49/+19
| | | | llvm-svn: 14695
* Support setcc on fp values.Brian Gaeke2004-07-081-12/+21
| | | | llvm-svn: 14687
* Add floating-point branches and compares. Compares don't completeBrian Gaeke2004-07-082-0/+52
| | | | | | | until the next cycle, and there's no interlock, so they effectively have a delay slot. llvm-svn: 14686
* Fix bug where SwitchSection would fail to change to ".bss" successfully.Brian Gaeke2004-07-081-1/+1
| | | | llvm-svn: 14685
OpenPOWER on IntegriCloud