summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Add required headerAlkis Evlogimenos2004-05-081-0/+1
| | | | llvm-svn: 13417
* Remove unneeded headerAlkis Evlogimenos2004-05-081-1/+0
| | | | llvm-svn: 13416
* Implement folding of GEP's like:Chris Lattner2004-05-071-53/+43
| | | | | | | | | %tmp.0 = getelementptr [50 x sbyte]* %ar, uint 0, int 5 ; <sbyte*> [#uses=2] %tmp.7 = getelementptr sbyte* %tmp.0, int 8 ; <sbyte*> [#uses=1] together. This patch actually allows us to simplify and generalize the code. llvm-svn: 13415
* Add support for copying bool constants to registers.Brian Gaeke2004-05-071-8/+36
| | | | | | | | Disable the code that copies long constants to registers - it looks fishy. Implement some simple casts: integral, smaller than longs, and equal-width or narrowing only. llvm-svn: 13413
* Codegen floating point stores of constants into integer instructions. ThisChris Lattner2004-05-071-15/+37
| | | | | | | | | | | | | | | | | | | allows us to compile: store float 10.0, float* %P into: mov DWORD PTR [%EAX], 1092616192 instead of: .CPItest_0: # float 0x4024000000000000 .long 1092616192 # float 10 ... fld DWORD PTR [.CPItest_0] fstp DWORD PTR [%EAX] llvm-svn: 13409
* Make comparisons against the null pointer as efficient as integer comparisonsChris Lattner2004-05-071-1/+8
| | | | | | | | | | | | | against zero. In particular, don't emit: mov %ESI, 0 cmp %ECX, %ESI instead, emit: test %ECX, %ECX llvm-svn: 13407
* Fix PR336: The instcombine pass asserts when visiting load instructionChris Lattner2004-05-071-2/+3
| | | | llvm-svn: 13400
* Don't call getForwardedType() twice, as recommended by Chris.John Criswell2004-05-061-2/+2
| | | | llvm-svn: 13391
* Implement the new cl::PositionalEatsArgs flag, refactor code a bitChris Lattner2004-05-061-52/+65
| | | | llvm-svn: 13388
* Fix for PR#330.John Criswell2004-05-061-0/+8
| | | | | | | | | | | | | When looking at getelementptr instructions, make sure to use a forwarded type. We want to do this because a DerivedType may drop its uses and then refine its users, who may then use another user who hasn't been refined yet. By getting the forwarded type, we always ensure that we're looking at a Type that isn't in a halfway refined state. Now, I should be able to put this stuff in PATypeHandle, but it doesn't work for some reason. This should do for now. llvm-svn: 13386
* numeric_limits::infinity() apparently does not work on all systems. As aChris Lattner2004-05-062-7/+5
| | | | | | workaround, use the C HUGE_VAL macro instead. llvm-svn: 13377
* Move the stuff that fixes the size, orientation & fonts of graphs toBrian Gaeke2004-05-052-12/+4
| | | | | | | | | | | the debugging functions that call "dot". These fixed settings have various problems: for example, the fixed size that is set in the graph traits classes is not appropriate for turning the dot file into a PNG, and if TrueType font rendering is being used, the 'Courier' TrueType font may not be installed. It seems easy enough to specify these things on the command line, anyhow. llvm-svn: 13366
* Apply simplification suggested by Chris: why assign() when operator = will do?Brian Gaeke2004-05-041-2/+2
| | | | llvm-svn: 13364
* Fixed inconsistent indentation.John Criswell2004-05-041-16/+16
| | | | llvm-svn: 13363
* Missing piece of fix for Bug 333Brian Gaeke2004-05-041-1/+1
| | | | llvm-svn: 13362
* Correctly mangle function names when they are used as part of aBrian Gaeke2004-05-041-3/+3
| | | | | | | | | constant pool member's name. This is intended to address Bug 333. Also, fix an anachronistic usage of "M" as a parameter of type Function *. llvm-svn: 13357
* Add "Args" optional argument to AbstractInterpreter factory methods, whichBrian Gaeke2004-05-041-31/+71
| | | | | | | | | | | fills in a ToolArgs vector in the AbstractInterpreter if it is set. This ToolArgs vector is used to pass additional arguments to LLI and/or LLC. This is intended to address Bug 40. Also, make -debug-only=toolrunner work for the LLC and CBE AbstractInterpreters. llvm-svn: 13356
* Remove unneeded checkChris Lattner2004-05-041-1/+0
| | | | llvm-svn: 13355
* Improve signed division by power of 2 *dramatically* from this:Chris Lattner2004-05-041-9/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | div: mov %EDX, DWORD PTR [%ESP + 4] mov %ECX, 64 mov %EAX, %EDX sar %EDX, 31 idiv %ECX ret to this: div: mov %EAX, DWORD PTR [%ESP + 4] mov %ECX, %EAX sar %ECX, 5 shr %ECX, 26 mov %EDX, %EAX add %EDX, %ECX sar %EAX, 6 ret Note that the intel compiler is currently making this: div: movl 4(%esp), %edx #3.5 movl %edx, %eax #4.14 sarl $5, %eax #4.14 shrl $26, %eax #4.14 addl %edx, %eax #4.14 sarl $6, %eax #4.14 ret #4.14 Which has one less register->register copy. (hint hint alkis :) llvm-svn: 13354
* Add stub support for reading BBTraces.Brian Gaeke2004-05-041-0/+16
| | | | llvm-svn: 13352
* Do not mark instructions in unreachable sections of the function as live.Chris Lattner2004-05-041-2/+5
| | | | | | This fixes PR332 and ADCE/2004-05-04-UnreachableBlock.llx llvm-svn: 13349
* Share ProfilingType enum with the C profiling runtime libraries.Brian Gaeke2004-05-041-7/+1
| | | | llvm-svn: 13346
* Improve code generated for integer multiplications by 2,3,5,9Chris Lattner2004-05-041-2/+16
| | | | llvm-svn: 13342
* Minor efficiency tweak, suggested by Patrick MeredithChris Lattner2004-05-041-4/+4
| | | | llvm-svn: 13341
* Fix typoBrian Gaeke2004-05-031-1/+1
| | | | llvm-svn: 13340
* In InsertProfilingInitCall(), make it legal to pass in a null array, inBrian Gaeke2004-05-032-7/+13
| | | | | | which case you'll get a null array and zero passed to the profiling function. llvm-svn: 13336
* Add initial implementation of basic-block tracing instrumentation pass.Brian Gaeke2004-05-031-0/+76
| | | | llvm-svn: 13335
* Fix a problem with double freeing memory. For some reason, CallGraph is notChris Lattner2004-05-021-0/+1
| | | | | | acting like a normal pass. :( llvm-svn: 13318
* Plug a minor memory leakChris Lattner2004-05-021-0/+1
| | | | llvm-svn: 13317
* Do not clone arbitrary condition instructions.Chris Lattner2004-05-021-1/+1
| | | | llvm-svn: 13316
* Do not infinitely "unroll" single BB loops.Chris Lattner2004-05-021-5/+4
| | | | llvm-svn: 13315
* Dont' merge terminators that are needed to select PHI node values.Chris Lattner2004-05-021-1/+1
| | | | llvm-svn: 13312
* Implement SimplifyCFG/branch-cond-merge.llChris Lattner2004-05-011-10/+64
| | | | | | Turning "if (A < B && B < C)" into "if (A < B & B < C)" llvm-svn: 13311
* Make sure to reprocess instructions used by deleted instructions to avoidChris Lattner2004-05-011-5/+12
| | | | | | missing opportunities for combination. llvm-svn: 13309
* Make sure the instruction combiner doesn't lose track of instructionsChris Lattner2004-05-011-3/+6
| | | | | | when replacing them, missing the opportunity to do simplifications llvm-svn: 13308
* Fix my missing parensChris Lattner2004-05-011-1/+1
| | | | llvm-svn: 13307
* Implement SimplifyCFG/branch-cond-prop.llChris Lattner2004-05-011-2/+30
| | | | llvm-svn: 13306
* Remove unused #includeChris Lattner2004-05-011-1/+0
| | | | llvm-svn: 13304
* Iterate over the Machine CFG that Brian added instead of the LLVM CFG.Chris Lattner2004-05-011-21/+4
| | | | | | Look at all of the pretty minuses. :) llvm-svn: 13303
* Operate on the Machine CFG instead of on the LLVM CFGChris Lattner2004-05-012-17/+12
| | | | llvm-svn: 13302
* Stop LiveVariables from using BasicBlocks as part of the mapping, insteadChris Lattner2004-05-011-29/+20
| | | | | | | | use MachineBasicBlocks. To do this, we traverse the Machine CFG instead of the LLVM CFG, which is also *MUCH* more efficient by having fewer levels of indirections and mappings. llvm-svn: 13301
* Add a constructor that got lostChris Lattner2004-05-011-0/+3
| | | | llvm-svn: 13297
* Generalize the strlen size_t hack, for the benefit of the other externalBrian Gaeke2004-05-011-17/+33
| | | | | | functions with wrappers that either take or return size_ts. llvm-svn: 13296
* Removing MachineResource class.Tanya Lattner2004-04-301-1/+1
| | | | llvm-svn: 13291
* Fix a major pessimization in the instcombiner. If an allocation instructionChris Lattner2004-04-301-1/+1
| | | | | | | | | | | | | | | is only used by a cast, and the casted type is the same size as the original allocation, it would eliminate the cast by folding it into the allocation. Unfortunately, it was placing the new allocation instruction right before the cast, which could pull (for example) alloca instructions into the body of a function. This turns statically allocatable allocas into expensive dynamically allocated allocas, which is bad bad bad. This fixes the problem by placing the new allocation instruction at the same place the old one was, duh. :) llvm-svn: 13289
* Wrapped code and comments at 80 cols; doxygenified some comments.Misha Brukman2004-04-292-18/+20
| | | | llvm-svn: 13264
* Reorder #includes as per style guide.Misha Brukman2004-04-291-3/+3
| | | | llvm-svn: 13263
* class AssemblyWriter:Misha Brukman2004-04-281-103/+109
| | | | | | | | | | * Make contained ostream pointer, not reference * Allow setting of that ostream via setStream() class CachedWriter: * setStream() in turn calls setStream() on the AssemblyWriter llvm-svn: 13247
* Send text and numbers directly to CachedWriter's contained ostream.Misha Brukman2004-04-281-1/+2
| | | | llvm-svn: 13243
* Squelch compile-time warning (profile build).Misha Brukman2004-04-281-1/+1
| | | | llvm-svn: 13228
OpenPOWER on IntegriCloud