- Jan 09, 2011
-
-
Jakob Stoklund Olesen authored
llvm-svn: 123123
-
Oscar Fuentes authored
llvm-svn: 123122
-
Tobias Grosser authored
llvm-svn: 123121
-
Tobias Grosser authored
llvm-svn: 123120
-
Oscar Fuentes authored
config.h was generated, so it had no effect on it. Thanks to arrowdodger for pointing out this and a tentative patch. llvm-svn: 123119
-
Cameron Zwarich authored
llvm-svn: 123117
-
Chandler Carruth authored
llvm-svn: 123116
-
Cameron Zwarich authored
llvm-svn: 123115
-
Cameron Zwarich authored
llvm-svn: 123114
-
Chandler Carruth authored
Also, switch to a more clear 'sink' function with its declaration to avoid any confusion about 'g'. Thanks for the suggestion Frits. llvm-svn: 123113
-
Chandler Carruth authored
llvm-svn: 123112
-
Chandler Carruth authored
llvm-svn: 123111
-
Jakob Stoklund Olesen authored
of using a Location class with the same information. When making a copy of a MachineOperand that was already stored in a MachineInstr, it is necessary to clear the parent pointer on the copy. Otherwise the register use-def lists become inconsistent. Add MachineOperand::clearParent() to do that. An alternative would be a custom MachineOperand copy constructor that cleared ParentMI. I didn't want to do that because of the performance impact. llvm-svn: 123109
-
Jakob Stoklund Olesen authored
llvm-svn: 123108
-
Jakob Stoklund Olesen authored
Print virtual registers numbered from 0 instead of the arbitrary FirstVirtualRegister. The first virtual register is printed as %vreg0. TRI::NoRegister is printed as %noreg. llvm-svn: 123107
-
Jakob Stoklund Olesen authored
llvm-svn: 123106
-
Chris Lattner authored
with GEP instructions are always NUW, because PHIs cannot wrap the end of the address space. llvm-svn: 123105
-
Chris Lattner authored
that have the bit set. llvm-svn: 123104
-
Chandler Carruth authored
llvm-svn: 123103
-
Jakob Stoklund Olesen authored
llvm-svn: 123102
-
Jakob Stoklund Olesen authored
depending on TRI::FirstVirtualRegister. Also use TRI::printReg instead of printing virtual registers directly. llvm-svn: 123101
-
Jakob Stoklund Olesen authored
virtual registers. llvm-svn: 123100
-
Jakob Stoklund Olesen authored
shouldn't depend directly on that. Give an example of how to iterate over all virtual registers in a function without depending on the representation. llvm-svn: 123099
-
Jakob Stoklund Olesen authored
Provide MRI::getNumVirtRegs() and TRI::index2VirtReg() functions to allow iteration over virtual registers without depending on the representation of virtual register numbers. llvm-svn: 123098
-
Jakob Stoklund Olesen authored
llvm-svn: 123097
-
Jakob Stoklund Olesen authored
Use an IndexedMap for LiveOutRegInfo to hide its dependence on TargetRegisterInfo::FirstVirtualRegister. llvm-svn: 123096
-
- Jan 08, 2011
-
-
Cameron Zwarich authored
llvm-svn: 123093
-
Chris Lattner authored
updating memdep when fusing stores together. This fixes the crash optimizing the bullet benchmark. llvm-svn: 123091
-
Chris Lattner authored
llvm-svn: 123090
-
Chris Lattner authored
larger memsets. Among other things, this fixes rdar://8760394 and allows us to handle "Example 2" from http://blog.regehr.org/archives/320, compiling it into a single 4096-byte memset: _mad_synth_mute: ## @mad_synth_mute ## BB#0: ## %entry pushq %rax movl $4096, %esi ## imm = 0x1000 callq ___bzero popq %rax ret llvm-svn: 123089
-
Chris Lattner authored
P and P+1 are relative to the same base pointer. llvm-svn: 123087
-
Chris Lattner authored
memset into a single larger memset. llvm-svn: 123086
-
Chris Lattner authored
llvm-svn: 123085
-
Chris Lattner authored
llvm-svn: 123082
-
Chris Lattner authored
Split memset formation logic out into its own "tryMergingIntoMemset" helper function. llvm-svn: 123081
-
Chris Lattner authored
to be foldable into an uncond branch. When this happens, we can make a much simpler CFG for the loop, which is important for nested loop cases where we want the outer loop to be aggressively optimized. Handle this case more aggressively. For example, previously on phi-duplicate.ll we would get this: define void @test(i32 %N, double* %G) nounwind ssp { entry: %cmp1 = icmp slt i64 1, 1000 br i1 %cmp1, label %bb.nph, label %for.end bb.nph: ; preds = %entry br label %for.body for.body: ; preds = %bb.nph, %for.cond %j.02 = phi i64 [ 1, %bb.nph ], [ %inc, %for.cond ] %arrayidx = getelementptr inbounds double* %G, i64 %j.02 %tmp3 = load double* %arrayidx %sub = sub i64 %j.02, 1 %arrayidx6 = getelementptr inbounds double* %G, i64 %sub %tmp7 = load double* %arrayidx6 %add = fadd double %tmp3, %tmp7 %arrayidx10 = getelementptr inbounds double* %G, i64 %j.02 store double %add, double* %arrayidx10 %inc = add nsw i64 %j.02, 1 br label %for.cond for.cond: ; preds = %for.body %cmp = icmp slt i64 %inc, 1000 br i1 %cmp, label %for.body, label %for.cond.for.end_crit_edge for.cond.for.end_crit_edge: ; preds = %for.cond br label %for.end for.end: ; preds = %for.cond.for.end_crit_edge, %entry ret void } Now we get the much nicer: define void @test(i32 %N, double* %G) nounwind ssp { entry: br label %for.body for.body: ; preds = %entry, %for.body %j.01 = phi i64 [ 1, %entry ], [ %inc, %for.body ] %arrayidx = getelementptr inbounds double* %G, i64 %j.01 %tmp3 = load double* %arrayidx %sub = sub i64 %j.01, 1 %arrayidx6 = getelementptr inbounds double* %G, i64 %sub %tmp7 = load double* %arrayidx6 %add = fadd double %tmp3, %tmp7 %arrayidx10 = getelementptr inbounds double* %G, i64 %j.01 store double %add, double* %arrayidx10 %inc = add nsw i64 %j.01, 1 %cmp = icmp slt i64 %inc, 1000 br i1 %cmp, label %for.body, label %for.end for.end: ; preds = %for.body ret void } With all of these recent changes, we are now able to compile: void foo(char *X) { for (int i = 0; i != 100; ++i) for (int j = 0; j != 100; ++j) X[j+i*100] = 0; } into a single memset of 10000 bytes. This series of changes should also be helpful for other nested loop scenarios as well. llvm-svn: 123079
-
Chris Lattner authored
llvm-svn: 123078
-
Chris Lattner authored
moving the OrigHeader block anymore: we just merge it away anyway so its code layout doesn't matter. llvm-svn: 123077
-
Chris Lattner authored
that it was leaving in loops after rotation (between the original latch block and the original header. With this change, it is possible for rotated loops to have just a single basic block, which is useful. llvm-svn: 123075
-
Chris Lattner authored
loop info. llvm-svn: 123074
-