aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* some more PRE/GVN/DSE related notes.Chris Lattner2008-12-061-0/+51
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60633 91177308-0d34-0410-b5e6-96231b3b80d8
* add a note Chris Lattner2008-12-061-0/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60632 91177308-0d34-0410-b5e6-96231b3b80d8
* some random notes.Chris Lattner2008-12-061-0/+97
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60624 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cleanup. Use dyn_cast, not isa/cast pairs. No functionality change.Nick Lewycky2008-12-061-5/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60623 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up some ARM GV asm printing out; minor fixes to match what gcc does.Evan Cheng2008-12-066-21/+74
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60621 91177308-0d34-0410-b5e6-96231b3b80d8
* Reimplement the inner loop of DSE. It now uniformly uses getDependence(),Chris Lattner2008-12-062-84/+51
| | | | | | | | | doesn't do its own local caching, and is slightly more aggressive about free/store dse (see testcase). This eliminates the last external client of MemDep::getDependenceFrom(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60619 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use plain %x to print pointer values. I had changed it from %pDan Gohman2008-12-051-1/+2
| | | | | | | | | | since %p isn't formatted consistently, but obviously plain %x is wrong. PRIxPTR with a cast to uintptr_t would work here, but that requires inconvenient build-system changes. %lu works on all current and foreseable future hosts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60616 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix test to pass on Linux.Dale Johannesen2008-12-051-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60614 91177308-0d34-0410-b5e6-96231b3b80d8
* Forgot a file.Dale Johannesen2008-12-051-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60609 91177308-0d34-0410-b5e6-96231b3b80d8
* Make LoopStrengthReduce smarter about hoisting things out ofDale Johannesen2008-12-056-61/+212
| | | | | | | | | | | | | loops when they can be subsumed into addressing modes. Change X86 addressing mode check to realize that some PIC references need an extra register. (I believe this is correct for Linux, if not, I'm sure someone will tell me.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60608 91177308-0d34-0410-b5e6-96231b3b80d8
* Make a few major changes to memdep and its clients:Chris Lattner2008-12-055-183/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Merge the 'None' result into 'Normal', making loads and stores return their dependencies on allocations as Normal. 2. Split the 'Normal' result into 'Clobber' and 'Def' to distinguish between the cases when memdep knows the value is produced from when we just know if may be changed. 3. Move some of the logic for determining whether readonly calls are CSEs into memdep instead of it being in GVN. This still leaves verification that the arguments are hte same to GVN to let it know about value equivalences in different contexts. 4. Change memdep's call/call dependency analysis to use getModRefInfo(CallSite,CallSite) instead of doing something very weak. This only really matters for things like DSA, but someday maybe we'll have some other decent context sensitive analyses :) 5. This reimplements the guts of memdep to handle the new results. 6. This simplifies GVN significantly: a) readonly call CSE is slightly simpler b) I eliminated the "getDependencyFrom" chaining for load elimination and load CSE doesn't have to worry about volatile (they are always clobbers) anymore. c) GVN no longer does any 'lastLoad' caching, leaving it to memdep. 7. The logic in DSE is simplified a bit and sped up. A potentially unsafe case was eliminated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60607 91177308-0d34-0410-b5e6-96231b3b80d8
* Demangle and pretty-print symbols in internal backtraces. Patch byDan Gohman2008-12-051-0/+44
| | | | | | | Wesley Peck, with a few fixes by me. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60605 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert invalid r60393. It causes llvm-gcc bootstrap fails in release builds.Anton Korobeynikov2008-12-051-7/+2
| | | | | | See PR3160 for details git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60604 91177308-0d34-0410-b5e6-96231b3b80d8
* This test also requires -mattr=+sse41.Evan Cheng2008-12-051-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60601 91177308-0d34-0410-b5e6-96231b3b80d8
* Make it illegal to call getDependency* on non-memory instructionsChris Lattner2008-12-052-4/+6
| | | | | | | like binary operators. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60600 91177308-0d34-0410-b5e6-96231b3b80d8
* Reason #3 from 60595 doesn't hold true. If we can fold a PIC load from ↵Evan Cheng2008-12-052-11/+11
| | | | | | constpool into a use, the rewrite happens at time of spill (not in VirtRegMap). Later on, if the GlobalBaseReg is spilled, the spiller can see the use uses GlobalBaseReg and do the right thing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60596 91177308-0d34-0410-b5e6-96231b3b80d8
* Effectively undo 60461 in PIC mode which simply transform V_SET0 / ↵Evan Cheng2008-12-052-1/+244
| | | | | | | | | | | V_SETALLONES into a load from constpool in order to fold into restores. This is not safe to do when PIC base is being used for a number of reasons: 1. GlobalBaseReg may have been spilled. 2. It may not be live at the use. 3. Spiller doesn't know this is happening so it won't prevent GlobalBaseReg from being spilled later (That by itself is a nasty hack. It's needed because we don't insert the reload until later). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60595 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix test/Transforms/GVN/pre-load.llChris Lattner2008-12-052-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60594 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comment.Evan Cheng2008-12-051-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60592 91177308-0d34-0410-b5e6-96231b3b80d8
* The use of the construct:Cédric Venet2008-12-051-12/+12
| | | | | | | | for(Type1 B = ...;;) { Type2 B ; ... } is bad: code is hard to read and VS VS don't like it (it ignore the second declaration of B). This patch fix the problem in tablegen. Please don't write code like this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60590 91177308-0d34-0410-b5e6-96231b3b80d8
* Make IsValueFullyAvailableInBlock safe.Chris Lattner2008-12-051-14/+60
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60588 91177308-0d34-0410-b5e6-96231b3b80d8
* add a new pop_back_val method which returns the value popped. This isChris Lattner2008-12-051-0/+6
| | | | | | | | heretical from a STL standpoint, but is oh-so-useful for things that can't throw exceptions when copied, like, well, everything in LLVM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60587 91177308-0d34-0410-b5e6-96231b3b80d8
* Drop the reg argument to isRegReDefinedByTwoAddr, which was redundant.Dan Gohman2008-12-055-8/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60586 91177308-0d34-0410-b5e6-96231b3b80d8
* Update comments. There is no getArgumentAccesses.Dan Gohman2008-12-051-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60585 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach StackSlotColoring to update MachineMemOperands whenDan Gohman2008-12-051-3/+20
| | | | | | | | changing the stack slots on an instruction, to keep them consistent with the actual memory addresses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60584 91177308-0d34-0410-b5e6-96231b3b80d8
* Ignore IMPLICIT_DEF instructions when computing physreg liveness.Dan Gohman2008-12-051-0/+7
| | | | | | | | | | | While they appear to provide a normal clobbering def, they don't in the case of the awkward IMPLICIT_DEF+INSERT_SUBREG idiom. It would be good to change INSERT_SUBREG; until then, this change allows post-regalloc scheduling to cope in a mildly conservative way. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60583 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-did 60519. It turns out Darwin's handling of hidden visibility symbols ↵Evan Cheng2008-12-0512-55/+203
| | | | | | are a bit more complicate than I expected. Both declarations and weak definitions still need a stub indirection. However, the stubs are in data section and they contain the addresses of the actual symbols. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60571 91177308-0d34-0410-b5e6-96231b3b80d8
* CellSPU: Add new directory under tests/CodeGen/CellSPU to retain tests thatScott Michel2008-12-052-0/+184
| | | | | | | | | | | | | | aren't part of the test suite but are generally useful nonetheless, and can be expanded later to test the backend against the actual Cell SPU system. There's basically no other good place to put this code, so put it here for the time being. - vecoperations.c: Vector shuffles for all supported vector types, tests for v16i8 add and multiply. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60566 91177308-0d34-0410-b5e6-96231b3b80d8
* Have raw_fd_ostream keep track of the position in the file to make tell() go ↵Ted Kremenek2008-12-042-11/+8
| | | | | | faster by not requiring a flush(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60560 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable LoopIndexSplit pass.Devang Patel2008-12-041-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60555 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite code that 1) filters loops and 2) calculates new loop bounds.Devang Patel2008-12-046-1315/+775
| | | | | | | | | This fixes many bugs. I will add more test cases in a separate check-in. Some day, the code that manipulates CFG and updates dom. info could use refactoring help. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60554 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out some common code.Owen Anderson2008-12-041-76/+39
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60553 91177308-0d34-0410-b5e6-96231b3b80d8
* CellSPU: Fix bug 3055Scott Michel2008-12-043-23/+59
| | | | | | | | | | - Add v4f32, v2f64 to LowerVECTOR_SHUFFLE - Look for vector rotate in shuffle elements, generate a vector rotate instead of a full-blown shuffle when opportunity presents itself. - Generate larger test harness and fix a few interesting but obscure bugs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60552 91177308-0d34-0410-b5e6-96231b3b80d8
* When allocating a stack temporary, use the correctDuncan Sands2008-12-041-1/+1
| | | | | | | | number of bytes for types such as i1 which are not a multiple of 8 bits in length. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60543 91177308-0d34-0410-b5e6-96231b3b80d8
* Missing closing brace and reverse conditional condition on NDEBUGScott Michel2008-12-041-5/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60541 91177308-0d34-0410-b5e6-96231b3b80d8
* Start simplifying a switch that has a successor that is a switch.Chris Lattner2008-12-041-0/+74
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60534 91177308-0d34-0410-b5e6-96231b3b80d8
* This code is apparently quite confused. In the meantime,Chris Lattner2008-12-041-1/+2
| | | | | | | get it building when NDEBUG is set. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60532 91177308-0d34-0410-b5e6-96231b3b80d8
* Temporarily revert r60519. It was causing a bootstrap failure:Bill Wendling2008-12-046-12/+5
| | | | | | | | | | | | | | | | | | /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/xgcc -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/bin/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/lib/ -isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/include -isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/sys-include -DHAVE_CONFIG_H -I. -I../../../llvm-gcc.src/libgomp -I. -I../../../llvm-gcc.src/libgomp/config/posix -I../../../llvm-gcc.src/libgomp -Wall -pthread -Werror -O2 -g -O2 -MT barrier.lo -MD -MP -MF .deps/barrier.Tpo -c ../../../llvm-gcc.src/libgomp/barrier.c -fno-common -DPIC -o .libs/barrier.o checking for sys/file.h... /var/folders/zG/zGE-ZJOGFiGjv0B5cs5oYE+++TM/-Tmp-//cc34Jg5P.s:13:non-relocatable subtraction expression, "_gomp_tls_key" minus "L1$pb" /var/folders/zG/zGE-ZJOGFiGjv0B5cs5oYE+++TM/-Tmp-//cc34Jg5P.s:13:symbol: "_gomp_tls_key" can't be undefined in a subtraction expression make[4]: *** [barrier.lo] Error 1 make[4]: *** Waiting for unfinished jobs.... /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/xgcc -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/bin/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/lib/ -isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/include -isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/sys-include -DHAVE_CONFIG_H -I. -I../../../llvm-gcc.src/libgomp -I. -I../../../llvm-gcc.src/libgomp/config/posix -I../../../llvm-gcc.src/libgomp -Wall -pthread -Werror -O2 -g -O2 -MT alloc.lo -MD -MP -MF .deps/alloc.Tpo -c ../../../llvm-gcc.src/libgomp/alloc.c -o alloc.o >/dev/null 2>&1 yes checking for sys/param.h... make[3]: *** [all-recursive] Error 1 make[2]: *** [all] Error 2 make[1]: *** [all-target-libgomp] Error 2 make[1]: *** Waiting for unfinished jobs.... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60527 91177308-0d34-0410-b5e6-96231b3b80d8
* CellSPU:Scott Michel2008-12-045-133/+56
| | | | | | | | | | | | | | | | | | | | | | | - First patch from Nehal Desai, a new contributor at Aerospace. Nehal's patch fixes sign/zero/any-extending loads for integers and floating point. Example code, compiled w/o debugging or optimization where he first noticed the bug: int main(void) { float a = 99.0; printf("%d\n", a); return 0; } Verified that this code actually works on a Cell SPU. Changes by Scott Michel: - Fix bug in the value type list constructed by SPUISD::LDRESULT to include both the load result's result and chain, not just the chain alone. - Simplify LowerLOAD and remove extraneous and unnecessary chains. - Remove unused SPUISD pseudo instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60526 91177308-0d34-0410-b5e6-96231b3b80d8
* Use register names instead of numbers in debug output.Dan Gohman2008-12-041-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60525 91177308-0d34-0410-b5e6-96231b3b80d8
* Make debug output more informative.Dan Gohman2008-12-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60524 91177308-0d34-0410-b5e6-96231b3b80d8
* Visibility hidden GVs do not require extra load of symbol address from the ↵Evan Cheng2008-12-046-4/+22
| | | | | | GOT or non-lazy-ptr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60519 91177308-0d34-0410-b5e6-96231b3b80d8
* Add minimal support for disambiguating memory references. CurrentlyDan Gohman2008-12-041-13/+123
| | | | | | | the main thing this covers is spills to distinct spill slots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60517 91177308-0d34-0410-b5e6-96231b3b80d8
* add a debugging option to help track down j-t problems.Chris Lattner2008-12-041-1/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60514 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite the liveness bookkeeping code to fix a bunch ofDan Gohman2008-12-031-34/+42
| | | | | | | issues with subreg operands and tied operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60510 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the debugging dump be a full line.Dale Johannesen2008-12-031-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60509 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove an unused field.Dale Johannesen2008-12-031-8/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60508 91177308-0d34-0410-b5e6-96231b3b80d8
* Have PseudoSourceValue override Value::dump, so that it worksDan Gohman2008-12-033-2/+11
| | | | | | | | on PseudoSourceValue values. This also fixes a FIXME in lib/VMCode/AsmWriter.cpp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60507 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a misspelled function name.Dale Johannesen2008-12-031-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60506 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor some code into a new FoldSingleEntryPHINodes method.Chris Lattner2008-12-036-24/+37
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60501 91177308-0d34-0410-b5e6-96231b3b80d8