summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* handle vectors. Any integers that got here would necessarily be different ↵Chris Lattner2008-06-161-8/+11
| | | | | | already. llvm-svn: 52341
* Simplify ResolveTypes by pulling the null case out into the one Chris Lattner2008-06-161-42/+30
| | | | | | | | | client that cares and simplifying its control flow. Remove the DestST argument to ResolveTypes and RecursiveResolveTypes* which are dead now. llvm-svn: 52340
* Iterating over SmallPtrSet is not deterministic.Evan Cheng2008-06-161-6/+6
| | | | llvm-svn: 52339
* simplify RecursiveResolveTypes and ResolveTypes by pulling the naming out ofChris Lattner2008-06-161-23/+20
| | | | | | ResolveTypes into the one place that needs it. llvm-svn: 52338
* Add a new flag that disables symbol lookup with dlsym when set. This allowsChris Lattner2008-06-161-33/+35
| | | | | | | a JIT client to completely control symbol lookup with the LazyFunctionCreator interface. llvm-svn: 52335
* Add support for icache invalidation on non-darwin ppc systems.Chris Lattner2008-06-161-2/+19
| | | | | | Patch by Gary Benson! llvm-svn: 52332
* Re-enable empty block indexing by default, since it doesn't seem to have anyOwen Anderson2008-06-161-21/+9
| | | | | | impact on code quality or compile time. llvm-svn: 52329
* Make BuildSubAggregate use FindInsertedElement again to prevent it fromMatthijs Kooijman2008-06-161-20/+48
| | | | | | | | inserting extractvalues. In particular, this prevents the insertion of extractvalues that can't be folded away later. Also add an example of when this stuff is needed. llvm-svn: 52328
* Make the InsertBefore argument to FindInsertedValue optional, so you can ↵Matthijs Kooijman2008-06-161-3/+8
| | | | | | find an inserted value without modifying the code. llvm-svn: 52319
* Pass around Instruction* instead of Instruction& in FindInsertedValue and ↵Matthijs Kooijman2008-06-162-6/+6
| | | | | | friends. llvm-svn: 52318
* 80 column fixes.Matthijs Kooijman2008-06-162-16/+33
| | | | llvm-svn: 52316
* Move FindScalarValue from InstructionCombining.cpp to ValueTracking.cpp. WhileMatthijs Kooijman2008-06-162-147/+129
| | | | | | | | | | I'm at it, rename it to FindInsertedValue. The only functional change is that newly created instructions are no longer added to instcombine's worklist, but that is not really necessary anyway (and I'll commit some improvements next that will completely remove the need). llvm-svn: 52315
* Minor comment fix.Argyrios Kyrtzidis2008-06-161-1/+1
| | | | llvm-svn: 52312
* Allow these transforms for types like i256 whileDuncan Sands2008-06-161-8/+6
| | | | | | | | still excluding types like i1 (not byte sized) and i120 (loading an i120 requires loading an i64, an i32, an i16 and an i8, which is expensive). llvm-svn: 52310
* Fix read after free found by valgrind.Evan Cheng2008-06-161-15/+10
| | | | llvm-svn: 52309
* Add option to commuteInstruction() which forces it to create a new ↵Evan Cheng2008-06-165-11/+45
| | | | | | (commuted) instruction. llvm-svn: 52308
* Make indexing empty basic blocks an option for the moment.Owen Anderson2008-06-161-9/+21
| | | | llvm-svn: 52306
* simplify some code by using a helper function. This really reallyChris Lattner2008-06-161-22/+16
| | | | | | wants a 'nocapture' predicate. llvm-svn: 52304
* move a bunch of predicates up into their own sectionChris Lattner2008-06-161-157/+171
| | | | | | in this file, no other changes. llvm-svn: 52303
* Other parts of this code treat noalias arguments as objects forChris Lattner2008-06-161-4/+8
| | | | | | the purposes of escape analysis. llvm-svn: 52302
* If we are checking to see if the result of a call aliases aChris Lattner2008-06-161-1/+21
| | | | | | | pointer derived from a local allocation, if the local allocation never escapes, the pointers can't alias. This implements PR2436 llvm-svn: 52301
* Assign indices to empty basic blocks. This will be necessary for ↵Owen Anderson2008-06-161-4/+9
| | | | | | StrongPHIElimination in the near future. llvm-svn: 52300
* Refactor basicaa's main alias function somethin' fierce. Chris Lattner2008-06-161-104/+94
| | | | | | | | This fixes several minor bugs (such as returning noalias for comparisons between external weak functions an null) but is mostly a cleanup. llvm-svn: 52299
* Switch from generating the int128 typedefs based on targetdata to generatingChris Lattner2008-06-161-6/+4
| | | | | | them based on the end-compiler's capabilities. This fixes PR2453 llvm-svn: 52297
* Fix the crash on SimplifyLibCalls/2005-05-20-sprintf-crash.llChris Lattner2008-06-161-1/+1
| | | | llvm-svn: 52295
* fix pr2460Chris Lattner2008-06-161-1/+2
| | | | llvm-svn: 52294
* The transforms in visitEXTRACT_VECTOR_ELT areDuncan Sands2008-06-151-4/+4
| | | | | | | | not valid if the load is volatile. Hopefully all wrong DAG combiner transforms of volatile loads and stores have now been caught. llvm-svn: 52293
* LegalizeTypes support for INSERT_VECTOR_ELT withDuncan Sands2008-06-153-26/+59
| | | | | | a non-constant index. llvm-svn: 52292
* Fix PR2434. When scanning for exising binary operator to reuse don't Wojciech Matyjewicz2008-06-151-15/+15
| | | | | | | | | | | take into account the instrucion pointed by InsertPt. Thanks to it, returning the new value of InsertPt to the InsertBinop() caller can be avoided. The bug was, actually, in visitAddRecExpr() method which wasn't correctly handling changes of InsertPt. There shouldn't be any performance regression, as -gvn pass (run after -indvars) removes any redundant binops. llvm-svn: 52291
* Add a missing semicolon.Wojciech Matyjewicz2008-06-151-1/+1
| | | | llvm-svn: 52290
* Fix the sys::Path::getSuffix() implementation.Argyrios Kyrtzidis2008-06-153-5/+32
| | | | llvm-svn: 52288
* Fix the environment block that is passed to the CreateProcess function.Argyrios Kyrtzidis2008-06-151-1/+28
| | | | | | This bug made llvm-ld unable to function with "-native" option, since the process that was used to call 'gcc' was crashing. llvm-svn: 52284
* Remove a redundant AfterLegalize check. TurnDuncan Sands2008-06-141-4/+5
| | | | | | | | on some code when !AfterLegalize - but since this whole code section is turned off by an "if (0)" it's not really turning anything on. llvm-svn: 52276
* Change 'while' loop to 'do' loop.Wojciech Matyjewicz2008-06-141-4/+11
| | | | | | | | | Add a safety measure. It isn't safe to assume in ScalarEvolutionExpander that all loops are in canonical form (but it should be safe for loops that have AddRecs). xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx llvm-svn: 52275
* add missing atomic intrinsic from gccAndrew Lenharth2008-06-147-28/+28
| | | | llvm-svn: 52270
* Fix a case where tailcallelim wouldn't set the changed bit when it made a ↵Chris Lattner2008-06-141-1/+3
| | | | | | change. llvm-svn: 52267
* Teach the spiller to commute instructions in order to fold a reload. This ↵Evan Cheng2008-06-131-18/+125
| | | | | | hits 410 times on 444.namd and 122 times on 252.eon. llvm-svn: 52266
* Don't skip over instructions other than loads that might read memory Eli Friedman2008-06-131-5/+6
| | | | | | when trying to sink stores. llvm-svn: 52259
* Protect ChangeCompareStride from situations in which it is possibleDan Gohman2008-06-131-3/+12
| | | | | | for it to generate use-before-def IR, such as in this testcase. llvm-svn: 52258
* Make sure SimplifyStoreAtEndOfBlock doesn't mess with loops; the Eli Friedman2008-06-131-2/+6
| | | | | | | structure checks are incorrect if the blocks aren't distinct. Fixes PR2435. llvm-svn: 52257
* Disable some DAG combiner optimizations that may beDuncan Sands2008-06-133-59/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wrong for volatile loads and stores. In fact this is almost all of them! There are three types of problems: (1) it is wrong to change the width of a volatile memory access. These may be used to do memory mapped i/o, in which case a load can have an effect even if the result is not used. Consider loading an i32 but only using the lower 8 bits. It is wrong to change this into a load of an i8, because you are no longer tickling the other three bytes. It is also unwise to make a load/store wider. For example, changing an i16 load into an i32 load is wrong no matter how aligned things are, since the fact of loading an additional 2 bytes can have i/o side-effects. (2) it is wrong to change the number of volatile load/stores: they may be counted by the hardware. (3) it is wrong to change a volatile load/store that requires one memory access into one that requires several. For example on x86-32, you can store a double in one processor operation, but to store an i64 requires two (two i32 stores). In a multi-threaded program you may want to bitcast an i64 to a double and store as a double because that will occur atomically, and be indivisible to other threads. So it would be wrong to convert the store-of-double into a store of an i64, because this will become two i32 stores - no longer atomic. My policy here is to say that the number of processor operations for an illegal operation is undefined. So it is alright to change a store of an i64 (requires at least two stores; but could be validly lowered to memcpy for example) into a store of double (one processor op). In short, if the new store is legal and has the same size then I say that the transform is ok. It would also be possible to say that transforms are always ok if before they were illegal, whether after they are illegal or not, but that's more awkward to do and I doubt it buys us anything much. However this exposed an interesting thing - on x86-32 a store of i64 is considered legal! That is because operations are marked legal by default, regardless of whether the type is legal or not. In some ways this is clever: before type legalization this means that operations on illegal types are considered legal; after type legalization there are no illegal types so now operations are only legal if they really are. But I consider this to be too cunning for mere mortals. Better to do things explicitly by testing AfterLegalize. So I have changed things so that operations with illegal types are considered illegal - indeed they can never map to a machine operation. However this means that the DAG combiner is more conservative because before it was "accidentally" performing transforms where the type was illegal because the operation was nonetheless marked legal. So in a few such places I added a check on AfterLegalize, which I suppose was actually just forgotten before. This causes the DAG combiner to do slightly more than it used to, which resulted in the X86 backend blowing up because it got a slightly surprising node it wasn't expecting, so I tweaked it. llvm-svn: 52254
* Use recently added getTruncateOrZeroExtend method to make the code shorter.Wojciech Matyjewicz2008-06-131-5/+1
| | | | llvm-svn: 52251
* Crash less. The i64 restriction in BinomialCoefficient caused some problemsNick Lewycky2008-06-131-24/+30
| | | | | | | | with code that was expecting different bit widths for different values. Make getTruncateOrZeroExtend a method on ScalarEvolution, and use it. llvm-svn: 52248
* fix a minor deviation from the original in my previous commitGabor Greif2008-06-121-1/+1
| | | | llvm-svn: 52247
* op_iterator-ify some loops, low hanging fruit only, there is moreGabor Greif2008-06-121-19/+21
| | | | llvm-svn: 52246
* Do not speculatively execute an instruction by hoisting it to its ↵Evan Cheng2008-06-122-2/+27
| | | | | | predecessor BB if any of its operands are defined but not used in BB. The transformation will prevent the operand from being sunk into the use block. llvm-svn: 52244
* Revert 52223.Evan Cheng2008-06-121-18/+0
| | | | llvm-svn: 52243
* Switch GVN to use ScopedHashTable.Owen Anderson2008-06-121-134/+64
| | | | llvm-svn: 52242
* Fix redirection of stderr in sys::Program::ExecuteAndWait. There was logicMatthijs Kooijman2008-06-122-9/+19
| | | | | | | | | | | | | error that caused it to redirect stderr to stdout too often. This fix is applied identically to the win32 code as well, but that is untested. --Thi line, and those below, will be ignored-- M System/Unix/Program.inc M System/Win32/Program.inc llvm-svn: 52233
* Make I/O redirection handling in sys::Program a bit more consistent. NoMatthijs Kooijman2008-06-122-24/+18
| | | | | | | | | | | | | functional changes. Win32 code is untested, but should work fine. In the unix variant, rename RedirectFD to RedirectIO and let that function handle empty and null paths instead of doing that in the caller 3 times. This is the same as win32 already does it. In the win32 variant, use Path::isEmpty() instead of checking the resulting c_str() manually. This is the same as unix already does it. llvm-svn: 52230
OpenPOWER on IntegriCloud