summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Add my abstracted dynamic linker support files.Brian Gaeke2003-10-101-0/+42
| | | | llvm-svn: 9008
* Reserve space for PHI operandsChris Lattner2003-10-101-0/+1
| | | | llvm-svn: 9007
* Ok, the "fix" for this is to do a real associative container. Symbol tablesChris Lattner2003-10-101-15/+11
| | | | | | | are ordered by name, not by slot, so the previous solution wasn't any good. On a large testcase, this reduces time to parse from 2.17s to 1.58s. llvm-svn: 9002
* Accept 'weak' as a linkage type. For now, just turn it into linkonce linkageChris Lattner2003-10-102-1/+3
| | | | llvm-svn: 8998
* Add better checkingChris Lattner2003-10-101-0/+6
| | | | llvm-svn: 8996
* Another 10% performance improvement by not using replaceAllUsesWithChris Lattner2003-10-091-13/+20
| | | | llvm-svn: 8994
* Reserve space for PHI nodes when we read them in. This provides a VERYChris Lattner2003-10-091-0/+1
| | | | | | tasty 15% speedup on the testcase from Bill. llvm-svn: 8993
* Use the version of getValue that takes the type plane instead of the typeChris Lattner2003-10-092-17/+18
| | | | | | if possible. This provides a consistent 8.5% speedup. llvm-svn: 8991
* Pass a vector around to reduce dynamic allocationChris Lattner2003-10-093-13/+17
| | | | | | Throw the RawInst class in an anon namespace llvm-svn: 8990
* Change getConstantValue to throw an exception on error, not return nullChris Lattner2003-10-092-10/+7
| | | | llvm-svn: 8988
* Do not read past the end of the contained type listChris Lattner2003-10-091-2/+2
| | | | llvm-svn: 8986
* Remove potentially N^2 algorithm from symbol table reader. No speedupChris Lattner2003-10-091-5/+13
| | | | | | in practice though llvm-svn: 8985
* Major refactoring of the bytecode reader. This includes the followingChris Lattner2003-10-094-315/+171
| | | | | | | | | | | | | | | changes: * BytecodeReader::getType(...) used to return a null pointer on error. This was only checked about half the time. Now we convert it to throw an exception, and delete the half that checked for error. This was checked in before, but psmith crashed and lost the change :( * insertValue no longer returns -1 on error, so callers don't need to check for it. * Substantial rewrite of InstructionReader.cpp, to use more efficient, simpler, data structures. This provides another 5% speedup. This also makes the code much easier to read and understand. llvm-svn: 8984
* Significantly clean up parsing of instructions. This exceptionizes andChris Lattner2003-10-093-144/+106
| | | | | | | simplifies the control flow a bit. This provides a small (~3%) speedup, but it's primarily a cleanup exercise. llvm-svn: 8983
* Eliminate the instruction placeholder. Simplify a bunch of code.Chris Lattner2003-10-092-15/+1
| | | | | | This results in no significant speedup, but does provide simpler code llvm-svn: 8980
* Eliminate the old LateResolveValues data structure, replacing it with aChris Lattner2003-10-092-25/+27
| | | | | | | | | | | | | new, simpler, ForwardReferences data structure. This is just the first simple replacement, subsequent changes will improve the code more. This simple change improves the performance of loading a file from HDF5 (contributed by Bill) from 2.36s to 1.93s, a 22% improvement. This presumably has to do with the fact that we only create ONE placeholder for a particular forward referenced values, and also may be because the data structure is much simpler. llvm-svn: 8979
* Remove a dead methodChris Lattner2003-10-092-12/+0
| | | | llvm-svn: 8978
* This patch substantially simplifies and cleans up handling of basic blocksChris Lattner2003-10-083-60/+84
| | | | | | | | | | | | | in the bytecode parser. Before we tried to shoehorn basic blocks into the "getValue" code path with other types of values. For a variety of reasons this was a bad idea, so this patch separates it out into its own data structure. This simplifies the code, makes it fit in 80 columns, and is also much faster. In a testcase provided by Bill, which has lots of PHI nodes, this patch speeds up bytecode parsing from taking 6.9s to taking 2.32s. More speedups to follow later. llvm-svn: 8977
* Inline the postResolveValues method. It was poorly named anywayChris Lattner2003-10-082-34/+26
| | | | llvm-svn: 8976
* Various cleanups and simplifications. This speeds up reading a bytecode fileChris Lattner2003-10-083-61/+57
| | | | | | Bill gave me from 8.69s to 6.90s. llvm-svn: 8971
* Destroy allocated resources on exception.Misha Brukman2003-10-081-3/+13
| | | | llvm-svn: 8969
* Update commentChris Lattner2003-10-081-2/+2
| | | | llvm-svn: 8965
* Use a set to keep track of which edges have been noticed as executable alreadyChris Lattner2003-10-081-15/+27
| | | | | | | to avoid reprocessing PHI nodes needlessly. This speeds up the big bad PHI testcase 43%: from 104.9826 to 73.5157s llvm-svn: 8964
* Minor fixes here and thereChris Lattner2003-10-081-22/+21
| | | | llvm-svn: 8963
* Avoid building data structures we don't really need. This improves the runtimeChris Lattner2003-10-081-10/+39
| | | | | | | | of a test that Bill Wendling sent me from 228.5s to 105s. Obviously there is more improvement to be had, but this is a nice speedup which should be "felt" by many programs. llvm-svn: 8962
* Change MRegisterDesc::AliasSet, TargetInstrDescriptor::ImplicitDefsAlkis Evlogimenos2003-10-084-44/+54
| | | | | | | | | | | | | | | | | | | | | and TargetInstrDescriptor::ImplicitUses to always point to a null terminated array and never be null. So there is no need to check for pointer validity when iterating over those sets. Code that looked like: if (const unsigned* AS = TID.ImplicitDefs) { for (int i = 0; AS[i]; ++i) { // use AS[i] } } was changed to: for (const unsigned* AS = TID.ImplicitDefs; *AS; ++AS) { // use *AS } llvm-svn: 8960
* whoops, don't accidentally lose variable namesChris Lattner2003-10-071-1/+1
| | | | llvm-svn: 8955
* Fix bug: InstCombine/cast.ll:test11 / PR#7Chris Lattner2003-10-071-1/+23
| | | | llvm-svn: 8954
* Refactor code a bitChris Lattner2003-10-071-4/+12
| | | | llvm-svn: 8952
* Add a sanity check for constant expression castsChris Lattner2003-10-071-0/+2
| | | | llvm-svn: 8951
* Fix bugzilla bug #5Chris Lattner2003-10-071-1/+6
| | | | llvm-svn: 8930
* Bill contributed this major rewrite of the -lowerswitch pass to make it generateChris Lattner2003-10-071-44/+144
| | | | | | logarithmic conditional branch sequences instead of linear sequences. Thanks Bill! llvm-svn: 8928
* Fix bug in previous checkinChris Lattner2003-10-071-0/+1
| | | | llvm-svn: 8922
* Actually _PASS IN_ NO_RESERVE if we have it.Chris Lattner2003-10-061-1/+1
| | | | | | Thanks to Brian for fixing this obvious oops llvm-svn: 8899
* ToolRunner.h has been moved from include/Support to include/llvm/Support.Misha Brukman2003-10-061-1/+1
| | | | llvm-svn: 8898
* Users can never be nullChris Lattner2003-10-061-1/+1
| | | | llvm-svn: 8895
* Minor speedups for the instcombine passChris Lattner2003-10-061-17/+26
| | | | llvm-svn: 8894
* Speed up the predicate used to decide when to inline by caching the sizeChris Lattner2003-10-061-13/+28
| | | | | | | | | | | | | | | | of callees between executions. On eon, in release mode, this changes the inliner from taking 11.5712s to taking 2.2066s. In debug mode, it went from taking 14.4148s to taking 7.0745s. In release mode, this is a 24.7% speedup of gccas, in debug mode, it's a total speedup of 11.7%. This also makes it slightly more aggressive. This could be because we are not judging the size of the functions quite as accurately as before. When we start looking at the performance of the generated code, this can be investigated further. llvm-svn: 8893
* Add # of printed instructions statistic to both the SPARC and X86 LLC backends.Brian Gaeke2003-10-062-1/+8
| | | | llvm-svn: 8892
* Avoid doing pointless work. Amazingly, this makes us go faster.Chris Lattner2003-10-062-8/+5
| | | | | | | | | | Running the inliner on 252.eon used to take 48.4763s, now it takes 14.4148s. In release mode, it went from taking 25.8741s to taking 11.5712s. This also fixes a FIXME. llvm-svn: 8890
* Implement the NamedRegionTimer classChris Lattner2003-10-061-0/+18
| | | | llvm-svn: 8889
* All of our supported operating systems (so far) and FreeBSD technicallyBrian Gaeke2003-10-061-0/+1
| | | | | | want you to include <sys/stat.h> for fstat(), struct stat, and friends. llvm-svn: 8887
* This changes the PromoteMemToReg function to create "pruned" SSA form, notChris Lattner2003-10-051-24/+109
| | | | | | | | | | | | | | | | | | | | "minimal" SSA form (in other words, it doesn't insert dead PHIs). This speeds up the mem2reg pass very significantly because it doesn't have to do a lot of frivolous work in many common cases. In the 252.eon function I have been playing with, this doesn't even insert the 120 PHI nodes that it used to which were trivially dead (in the process of promoting 356 alloca instructions overall). This speeds up the mem2reg pass from 1.2459s to 0.1284s. More significantly, the DCE pass used to take 2.4138s to remove the 120 dead PHI nodes that mem2reg constructed, now it takes 0.0134s (which is the time to scan the function and decide that there is nothing dead). So overall, on this one function, we speed things up a total of 3.5179s, which is a 24.8x speedup! :) This change is tested by the Mem2Reg/2003-10-05-DeadPHIInsertion.ll test, which now passes. llvm-svn: 8884
* Change the interface to PromoteMemToReg to also take a DominatorTreeChris Lattner2003-10-054-5/+14
| | | | llvm-svn: 8883
* Speed up the mem2reg transform for allocas which are only read/written in a ↵Chris Lattner2003-10-051-5/+84
| | | | | | | | | | | | | | | | | | | | | | | single basic block. This is amazingly common in code generated by the C/C++ front-ends. This change makes it not have to insert ANY phi nodes, whereas before it would insert a ton of dead ones which DCE would have to clean up. Thus, this fix improves compile-time performance of these trivial allocas in two ways: 1. It doesn't have to do the walking and book-keeping for renaming 2. It does not insert dead phi nodes for them which would have to subsequently be cleaned up. On my favorite testcase from 252.eon, this special case handles 305 out of 356 promoted allocas in the function. It speeds up the mem2reg pass from 7.5256s to 1.2505s. It inserts 677 fewer dead PHI nodes, which speeds up a subsequent -dce pass from 18.7524s to 2.4806s. There are still 120 trivially dead PHI nodes being inserted for variables used in multiple basic blocks, but they are not handled by this patch. llvm-svn: 8881
* Move support/lib/Support back to lib/SupportChris Lattner2003-10-051-1/+1
| | | | llvm-svn: 8874
* Add support for the Invoke instruction by using the LowerInvoke passChris Lattner2003-10-051-0/+6
| | | | llvm-svn: 8872
* Instead of hacking in custom support for Invoke/Unwind, use the LowerInvoke passChris Lattner2003-10-052-31/+14
| | | | llvm-svn: 8871
* Initial checkin of the LLVM->LLVM transform to support code generators whichChris Lattner2003-10-051-0/+74
| | | | | | do not support stack unwinding yet llvm-svn: 8869
* simplify-cfg is really a function passChris Lattner2003-10-051-1/+1
| | | | llvm-svn: 8868
OpenPOWER on IntegriCloud