summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Refactor the tree transform's many loops over sets of expressionsDouglas Gregor2011-01-035-139/+139
| | | | | | | | | | | (transforming each in turn) into calls into one central routine (TransformExprs) that transforms a list of expressions. This refactoring is preparatory work for pack expansions whose in an expression-list. No functionality change. llvm-svn: 122761
* 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
* Guard lazy synthesis of provisional ivars under the newFariborz Jahanian2011-01-033-4/+7
| | | | | | -fobjc-default-synthesize-properties flag. llvm-svn: 122757
* In the latest episode of "Deserializing bugs caused by accessors" the series ↵Argyrios Kyrtzidis2011-01-031-9/+9
| | | | | | | | | | reached a thrilling climax when FunctionDecl::setPure crashed a poor user's code. Remove the use of this accessor when deserializing, along with several other in the neighborhood. Fixes rdar://8759653. llvm-svn: 122756
* Fix PR8654, ensuring each branch of an #if, #elif, #else, ... chainChandler Carruth2011-01-031-1/+12
| | | | | | | | receives a PPCallback. Patch by Richard Smith. llvm-svn: 122755
* Reapply 122341 to fix PR8199 now that clang changes are in.David Greene2011-01-033-2/+50
| | | | llvm-svn: 122754
* Support lit fixes for PR8199David Greene2011-01-031-1/+1
| | | | | | | | Replace "clang++" with "clang\+\+" because we have to escape regexp special characters now. This is in preparation for changes to lit to fix PR8199. Tests will fail until the lit part gets committed. llvm-svn: 122753
* Another variadic template metafunction test case: summing values.Douglas Gregor2011-01-031-2/+16
| | | | llvm-svn: 122752
* Implement support for pack expansions whose pattern is a non-typeDouglas Gregor2011-01-0321-22/+223
| | | | | | | | | | | | | | | | | template argument (described by an expression, of course). For example: template<int...> struct int_tuple { }; template<int ...Values> struct square { typedef int_tuple<(Values*Values)...> type; }; It also lays the foundation for pack expansions in an initializer-list. llvm-svn: 122751
* Use some of the llvm cmake infraestructure. This takes care ofOscar Fuentes2011-01-031-11/+2
| | | | | | | disabling rtti and exceptions where requested. Remove some unnecessary code too. llvm-svn: 122750
* 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
* Consolidate template metafunction tests for variadic templates into a single ↵Douglas Gregor2011-01-032-28/+32
| | | | | | file llvm-svn: 122748
* Set LLVM_NO_RTTI and LLVM_USED_LIBS for clangStaticAnalyzerCheckersOscar Fuentes2011-01-031-0/+4
| | | | | | Patch by arrowdodger! llvm-svn: 122747
* 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
* When we attempt to create a built-in that involves a library type weDouglas Gregor2011-01-034-12/+26
| | | | | | | | | don't have access to (e.g., fprintf, which needs the library type FILE), fail with a warning and forget about the builtin entirely. Previously, we would actually provide an error, which breaks autoconf's super-lame checks for fprintf, longjmp, etc. Fixes PR8316. llvm-svn: 122744
* 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
* Funciton -> FunctionPeter Collingbourne2011-01-021-3/+3
| | | | llvm-svn: 122709
* Unkown -> UnknownPeter Collingbourne2011-01-023-7/+7
| | | | llvm-svn: 122708
* 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
OpenPOWER on IntegriCloud