summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't pattern match "clang-" as it may be part of a tool name with aDavid Greene2011-01-031-2/+2
| | | | | | triple suffix. llvm-svn: 122779
* Fix more stack layout issues in the MBlaze backend.Wesley Peck2011-01-033-25/+40
| | | | llvm-svn: 122778
* Stub out a new updating interface to AliasAnalysis, allowing stateful ↵Owen Anderson2011-01-033-1/+40
| | | | | | | | | analyses to be informed when a pointer value has potentially become escaping. Implementations can choose to either fall back to conservative responses for that value, or may recompute their analysis to accomodate the change. llvm-svn: 122777
* We can count properly.Owen Anderson2011-01-031-1/+1
| | | | llvm-svn: 122773
* fix rdar://8813415 - a miscompilation of 164.gzip that loop-idiomChris Lattner2011-01-032-0/+24
| | | | | | exposed. It turns out to be a latent bug in basicaa, scary. llvm-svn: 122772
* filecheckizeChris Lattner2011-01-031-6/+8
| | | | llvm-svn: 122771
* TableGen.cmake: sometimes the .td file is not in the current directoryOscar Fuentes2011-01-031-1/+4
| | | | | | | | | | | (clang/include/clang/Basic/StmtNodes.td, for instance, is tablegenned from clang/include/clang/AST/CMakeLists.txt) so it is not contained on the list of all .td files on the current source directory which is used as the DEPENDS of the custom command. We must add the .td file to the DEPENDS list of the custom command. Otherwise some .inc files are not regenerated when the corresponding .td file changes. llvm-svn: 122768
* Simplify GVN's value expression structure, allowing the elimination of a lot of Owen Anderson2011-01-031-260/+26
| | | | | | almost-but-not-quite-identical code. No intended functionality change. llvm-svn: 122760
* stength reduce my previous patch a bit. The only instructionsChris Lattner2011-01-031-6/+9
| | | | | | | | | | | that are allowed to have metadata operands are intrinsic calls, and the only ones that take metadata currently return void. Just reject all void instructions, which should not be value numbered anyway. To future proof things, add an assert to the getHashValue impl for calls to check that metadata operands aren't present. llvm-svn: 122759
* fix PR8895: metadata operands don't have a strong use of theirChris Lattner2011-01-031-4/+10
| | | | | | | | | | nested values, so they can change and drop to null, which can change the hash and cause havok. It turns out that it isn't a good idea to value number stuff with metadata operands anyway, so... don't. llvm-svn: 122758
* Reapply 122341 to fix PR8199 now that clang changes are in.David Greene2011-01-033-2/+50
| | | | llvm-svn: 122754
* LLVMProcessSources: add .def files along with .h files to targets forOscar Fuentes2011-01-031-1/+1
| | | | | | the benefit of project-based generators (VS, XCode, etc). llvm-svn: 122749
* Speed up instsimplify by about 10-15% by not bothering to retryDuncan Sands2011-01-031-8/+19
| | | | | | | InstructionSimplify on instructions that didn't change since the last time round the loop. llvm-svn: 122745
* Undo what looks like accidental removal of an instcombine pass in r122740.Evan Cheng2011-01-031-0/+1
| | | | llvm-svn: 122743
* Switch a worklist in CodeGenPrepare to SmallVector and increase the inlineCameron Zwarich2011-01-031-2/+2
| | | | | | | | | capacity on the Visited SmallPtrSet. On 403.gcc, this is about a 4.5% speedup of CodeGenPrepare time (which itself is 10% of time spent in the backend). This is progress towards PR8889. llvm-svn: 122741
* Turn on earlycse by default. This seems to be a small performanceChris Lattner2011-01-031-1/+1
| | | | | | | | | | | | | | | | improvement in the generated code, and speeds up 'opt -std-compile-opts' compile time on 176.gcc from 24.84s to 23.2s (about 7%). This also resolves a specific code quality issue in rdar://7352081 which was generating poor code for: int t(int a, int b) { if (a & b & 1) return a & b; return 3; } llvm-svn: 122740
* Further expand what a call graph pass may do.Nick Lewycky2011-01-031-5/+3
| | | | | | | | The rationale is that after analyzing a function in the SCC, we may want to modify it in a way that requires us to update its uses (f.e. to replace the call with a constant) or its users (f.e. to call it with fewer arguments). llvm-svn: 122739
* earlycse can do trivial with-a-block dead store Chris Lattner2011-01-032-6/+48
| | | | | | | elimination as well. This deletes 60 stores in 176.gcc that largely come from bitfield code. llvm-svn: 122736
* Use a RecyclingAllocator to allocate values for MachineCSE's ScopedHashTable forCameron Zwarich2011-01-031-3/+7
| | | | | | a 28% speedup of MachineCSE time on 403.gcc. llvm-svn: 122735
* Permit CallGraphSCCPasses readonly access to the direct callers of the functionsNick Lewycky2011-01-031-2/+2
| | | | | | in their SCC as they already have with the direct callees. llvm-svn: 122734
* switch the load table to use a recycling bump pointer allocator,Chris Lattner2011-01-031-1/+4
| | | | | | speeding earlycse up by 6%. llvm-svn: 122733
* now that loads are in their own table, we can implementChris Lattner2011-01-032-1/+21
| | | | | | | store->load forwarding. This allows EarlyCSE to zap 600 more loads from 176.gcc. llvm-svn: 122732
* split loads and calls into separate tables. Loads are now just indexedChris Lattner2011-01-031-42/+74
| | | | | | by their pointer instead of using MemoryValue to wrap it. llvm-svn: 122731
* add a testcase for readonly call CSEChris Lattner2011-01-031-0/+12
| | | | llvm-svn: 122730
* various cleanups, no functionality change.Chris Lattner2011-01-031-24/+19
| | | | llvm-svn: 122729
* Add spliceFunction to the CallGraph interface. This allows users to efficientlyNick Lewycky2011-01-032-2/+25
| | | | | | | | | | update a callGraph when performing the common operation of splicing the body to a new function and updating all callers (such as via RAUW). No users yet, though this is intended for DeadArgumentElimination as part of PR8887. llvm-svn: 122728
* Teach EarlyCSE to do trivial CSE of loads and read-only calls.Chris Lattner2011-01-032-22/+197
| | | | | | | On 176.gcc, this catches 13090 loads and calls, and increases the number of simple instructions CSE'd from 29658 to 36208. llvm-svn: 122727
* add a handy typedef.Chris Lattner2011-01-031-0/+5
| | | | llvm-svn: 122726
* rename InstValue to SimpleValue, add some comments.Chris Lattner2011-01-031-26/+41
| | | | llvm-svn: 122725
* CMake: Add missing source file.Michael J. Spencer2011-01-031-0/+1
| | | | llvm-svn: 122724
* Allocate nodes for the scoped hash table from a recyling bump pointerChris Lattner2011-01-031-5/+9
| | | | | | allocator. This speeds up early cse by about 20% llvm-svn: 122723
* really get this working with a custom allocator.Chris Lattner2011-01-031-22/+22
| | | | llvm-svn: 122722
* Enhance ScopedHashTable to allow it to take an allocator argument.Chris Lattner2011-01-033-18/+43
| | | | llvm-svn: 122721
* reduce redundancy in the hashing code and other misc cleanups.Chris Lattner2011-01-032-20/+24
| | | | llvm-svn: 122720
* Add a new loop-instsimplify pass, with the intention of replacing the instanceCameron Zwarich2011-01-035-0/+121
| | | | | | | of instcombine that is currently in the middle of the loop pass pipeline. This commit only checks in the pass; it will hopefully be enabled by default later. llvm-svn: 122719
* fix some pastosChris Lattner2011-01-021-4/+4
| | | | llvm-svn: 122718
* add DEBUG and -stats output to earlycse.Chris Lattner2011-01-023-8/+52
| | | | | | Teach it to CSE the rest of the non-side-effecting instructions. llvm-svn: 122716
* Enhance earlycse to do CSE of casts, instsimplify and die.Chris Lattner2011-01-023-4/+165
| | | | | | Add a testcase. llvm-svn: 122715
* split dom frontier handling stuff out to its own DominanceFrontier header,Chris Lattner2011-01-0226-245/+259
| | | | | | so that Dominators.h is *just* domtree. Also prune #includes a bit. llvm-svn: 122714
* sketch out a new early cse pass. No functionality yet.Chris Lattner2011-01-025-0/+72
| | | | llvm-svn: 122713
* fix a miscompilation of tramp3d-v4: when forming a memcpy, we have to makeChris Lattner2011-01-022-12/+56
| | | | | | | | sure that the loop we're promoting into a memcpy doesn't mutate the input of the memcpy. Before we were just checking that the dest of the memcpy wasn't mod/ref'd by the loop. llvm-svn: 122712
* If a loop iterates exactly once (has backedge count = 0) then don'tChris Lattner2011-01-022-0/+24
| | | | | | | mess with it. We'd rather peel/unroll it than convert all of its stores into memsets. llvm-svn: 122711
* Try to reuse the value when lowering memset.Benjamin Kramer2011-01-023-47/+30
| | | | | | | | | | This allows us to compile: void test(char *s, int a) { __builtin_memset(s, a, 15); } into 1 mul + 3 stores instead of 3 muls + 3 stores. llvm-svn: 122710
* Lower the i8 extension in memset to a multiply instead of a potentially long ↵Benjamin Kramer2011-01-022-15/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | series of shifts and ors. We could implement a DAGCombine to turn x * 0x0101 back into logic operations on targets that doesn't support the multiply or it is slow (p4) if someone cares enough. Example code: void test(char *s, int a) { __builtin_memset(s, a, 4); } before: _test: ## @test movzbl 8(%esp), %eax movl %eax, %ecx shll $8, %ecx orl %eax, %ecx movl %ecx, %eax shll $16, %eax orl %ecx, %eax movl 4(%esp), %ecx movl %eax, 4(%ecx) movl %eax, (%ecx) ret after: _test: ## @test movzbl 8(%esp), %eax imull $16843009, %eax, %eax ## imm = 0x1010101 movl 4(%esp), %ecx movl %eax, 4(%ecx) movl %eax, (%ecx) ret llvm-svn: 122707
* A workaround for a bug in cmake 2.8.3 diagnosed on PR 8885.Oscar Fuentes2011-01-021-0/+5
| | | | llvm-svn: 122706
* Also remove functions that use complex constant expressions in terms ofNick Lewycky2011-01-021-5/+18
| | | | | | another function. llvm-svn: 122705
* enhance loop idiom recognition to scan *all* unconditionally executedChris Lattner2011-01-022-8/+62
| | | | | | | blocks in a loop, instead of just the header block. This makes it more aggressive, able to handle Duncan's Ada examples. llvm-svn: 122704
* make inSubLoop much more efficient.Chris Lattner2011-01-021-4/+1
| | | | llvm-svn: 122703
* rip out isExitBlockDominatedByBlockInLoop, calling DomTree::dominates instead.Chris Lattner2011-01-021-37/+4
| | | | | | | | isExitBlockDominatedByBlockInLoop is a relic of the days when domtree was *just* a tree and didn't have DFS numbers. Checking DFS numbers is faster and easier than "limiting the search of the tree". llvm-svn: 122702
* add a list of opportunities for future improvement.Chris Lattner2011-01-021-1/+22
| | | | llvm-svn: 122701
OpenPOWER on IntegriCloud