- Jan 08, 2011
-
-
Chris Lattner authored
Split memset formation logic out into its own "tryMergingIntoMemset" helper function. llvm-svn: 123081
-
Howard Hinnant authored
Two minor fixes: 1. Put integral_constant conversion to integral in even without constexpr support. 2. Add ios_base to <iosfwd>. The latter is being tracked by LWG 2026. llvm-svn: 123080
-
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
-
Alexis Hunt authored
llvm-svn: 123076
-
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
-
Chris Lattner authored
llvm-svn: 123073
-
Chris Lattner authored
1. Rip out LoopRotate's domfrontier updating code. It isn't needed now that LICM doesn't use DF and it is super complex and gross. 2. Make DomTree updating code a lot simpler and faster. The old loop over all the blocks was just to find a block?? 3. Change the code that inserts the new preheader to just use SplitCriticalEdge instead of doing an overcomplex reimplementation of it. No behavior change, except for the name of the inserted preheader. llvm-svn: 123072
-
Chris Lattner authored
llvm-svn: 123071
-
Francois Pichet authored
On Windows, replace each occurrence of '\' by '\\' on the replacement string. This is necessary to prevent re.sub from replacing escape sequences occurring in path. For example: llvm\tools\clang\test was replaced by llvm <tab> ools\clang <tab> est llvm-svn: 123070
-
Chris Lattner authored
and latch blocks. Reorder entry conditions to make hte pass faster and more logical. llvm-svn: 123069
-
Chris Lattner authored
llvm-svn: 123068
-
Chris Lattner authored
that are just passed to one function. llvm-svn: 123067
-
Chris Lattner authored
to violate LCSSA form llvm-svn: 123066
-
Cameron Zwarich authored
llvm-svn: 123065
-
Cameron Zwarich authored
they all ready do). This removes two dominator recomputations prior to isel, which is a 1% improvement in total llc time for 403.gcc. The only potentially suspect thing is making GCStrategy recompute dominators if it used a custom lowering strategy. llvm-svn: 123064
-
Rafael Espindola authored
Add a unnamed_addr bit to global variables and functions. This will be used to indicate that the address is not significant and therefore the constant or function can be merged with others. If an optimization pass can show that an address is not used, it can set this. Examples of things that can have this set by the FE are globals created to hold string literals and C++ constructors. Adding unnamed_addr to a non-const global should have no effect unless an optimization can transform that global into a constant. Aliases are not allowed to have unnamed_addr since I couldn't figure out any use for it. llvm-svn: 123063
-
Cameron Zwarich authored
top of subloop headers, as the phi uses logically occur outside of the subloop. llvm-svn: 123062
-
Frits van Bommel authored
llvm-svn: 123061
-
Chris Lattner authored
them into the loop preheader, eliminating silly instructions like "icmp i32 0, 100" in fixed tripcount loops. This also better exposes the bigger problem with loop rotate that I'd like to fix: once this has been folded, the duplicated conditional branch *often* turns into an uncond branch. Not aggressively handling this is pessimizing later loop optimizations somethin' fierce by making "dominates all exit blocks" checks fail. llvm-svn: 123060
-
Chris Lattner authored
llvm-svn: 123059
-
Chris Lattner authored
1. Take a flags argument instead of a bool. This makes it more clear to the reader what it is used for. 2. Add a flag that says that "remapping a value not in the map is ok". 3. Reimplement MapValue to share a bunch of code and be a lot more efficient. For lookup failures, don't drop null values into the map. 4. Using the new flag a bunch of code can vaporize in LinkModules and LoopUnswitch, kill it. No functionality change. llvm-svn: 123058
-
Chris Lattner authored
map from ValueMapper.h (giving us access to its utilities) and add a fastpath in the loop rotation code, avoiding expensive ssa updator manipulation for values with nothing to update. llvm-svn: 123057
-
Chandler Carruth authored
temporaries with no-return destructors. The CFG now properly supports temporaries and implicit destructors which both makes this kludge no longer work, and conveniently removes the need for it. Turn on CFG handling of implicit destructors and initializers. Several ad-hoc benchmarks don't indicate any measurable performance impact from growing the CFG, and it fixes real correctness problems with warnings. As a result of turning on these CFG elements, we started to tickle an inf-loop in the unreachable code logic used for warnings. The fix is trivial. llvm-svn: 123056
-
Ted Kremenek authored
prefix in a printf format string is matched with the appropriate conversion specifier. llvm-svn: 123055
-
Ted Kremenek authored
prefix to format conversions (POSIX extension). llvm-svn: 123054
-
Greg Clayton authored
new "hexname" key for the "key:value;" duple that is part of the packet. This allows for thread names to contain special characters such as $ # : ; + - Debugserver now detects if the thread name contains special characters and sends the chars in hex format if needed. llvm-svn: 123053
-
Greg Clayton authored
frames, UnwindLLDB could create the incorrect RegisterContext for a given stack frame because it was using the frame index (not the concrete frame index). This was causing crashes when doing backtraces through the SBFrame::GetFP() because a NULL register context was being returned for the deepest stack frame. llvm-svn: 123052
-
Eric Christopher authored
llvm-svn: 123051
-
-
Evan Cheng authored
llvm-svn: 123048
-
Greg Clayton authored
was being searched and sorted using a shared pointer as the value which means the pointer value was what was being searched for. This means that anytime you did a stack backtrace, the collection of FuncUnwinders doubled and then the array or shared pointer got sorted (by pointer value), so you had an ever increasing collection of shared pointer where a match was never found. This means we had a ton of duplicates in this table and would cause issues after one had been debugging for a long time. llvm-svn: 123045
-
Evan Cheng authored
Instead encode llvm IR level property "HasSideEffects" in an operand (shared with IsAlignStack). Added MachineInstrs::hasUnmodeledSideEffects() to check the operand when the instruction is an INLINEASM. This allows memory instructions to be moved around INLINEASM instructions. llvm-svn: 123044
-
Bob Wilson authored
This was suggested by Edmund Grimley Evans in pr8411. llvm-svn: 123043
-
Bob Wilson authored
llvm-svn: 123042
-
- Jan 07, 2011
-
-
Eric Christopher authored
llvm-svn: 123041
-
Matt Beaumont-Gay authored
llvm-svn: 123040
-
Devang Patel authored
llvm-svn: 123039
-