- Mar 24, 2012
-
-
Kostya Serebryany authored
llvm-svn: 153353
-
- Mar 23, 2012
-
-
Dan Gohman authored
is retaining the return value of an invoke that it immediately follows. llvm-svn: 153344
-
Dan Gohman authored
same basic block, and it's not safe to insert code in the successor blocks if the edges are critical edges. Splitting those edges is possible, but undesirable, especially on the unwind side. Instead, make the bottom-up code motion to consider invokes to be part of their successor blocks, rather than part of their parent blocks, so that it doesn't push code past them and onto the edges. This fixes PR12307. llvm-svn: 153343
-
Duncan Sands authored
dominated by Root, check that B is available throughout the scope. This is obviously true (famous last words?) given the current logic, but the check may be helpful if more complicated reasoning is added one day. llvm-svn: 153323
-
Duncan Sands authored
llvm-svn: 153322
-
- Mar 22, 2012
-
-
Andrew Trick authored
llvm-svn: 153287
-
Andrew Trick authored
Tests cases have been removed but attached to open PR12330. llvm-svn: 153286
-
Dan Gohman authored
llvm-svn: 153267
-
Andrew Trick authored
llvm-svn: 153262
-
Andrew Trick authored
llvm-svn: 153260
-
Chris Lattner authored
llvm-svn: 153237
-
- Mar 21, 2012
-
-
Kostya Serebryany authored
llvm-svn: 153189
-
Eric Christopher authored
llvm-svn: 153150
-
- Mar 20, 2012
-
-
Andrew Trick authored
Do not call SplitBlockPredecessors on a loop preheader when one of the predecessors is an indirectbr. Otherwise, you will hit this assert: !isa<IndirectBrInst>(Preds[i]->getTerminator()) && "Cannot split an edge from an IndirectBrInst" llvm-svn: 153134
-
Andrew Trick authored
llvm-svn: 153133
-
- Mar 19, 2012
-
-
Kostya Serebryany authored
[asan] don't emit __asan_mapping_offset/__asan_mapping_scale by default -- they are currently used only for experiments llvm-svn: 153040
-
- Mar 16, 2012
-
-
Bill Wendling authored
llvm-svn: 152935
-
Bill Wendling authored
alignment. If that's the case, then we want to make sure that we don't increase the alignment of the store instruction. Because if we increase it to be "more aligned" than the pointer, code-gen may use instructions which require a greater alignment than the pointer guarantees. <rdar://problem/11043589> llvm-svn: 152907
-
Chandler Carruth authored
It was added in 2007 as the first cut at supporting no-inline attributes, but we didn't have function attributes of any form at the time. However, it was added without any mention in the LangRef or other documentation. Later on, in 2008, Devang added function notes for 'inline=never' and then turned them into proper function attributes. From that point onward, as far as I can tell, the world moved on, and no one has touched 'llvm.noinline' in any meaningful way since. It's time has now come. We have had better mechanisms for doing this for a long time, all the frontends I'm aware of use them, and this is just holding back progress. Given that it was never a documented feature of the IR, I've provided no auto-upgrade support. If people know of real, in-the-wild bitcode that relies on this, yell at me and I'll add it, but I *seriously* doubt anyone cares. llvm-svn: 152904
-
Chandler Carruth authored
directly query the function information which this set was representing. This simplifies the interface of the inline cost analysis, and makes the always-inline pass significantly more efficient. Previously, always-inline would first make a single set of every function in the module *except* those marked with the always-inline attribute. It would then query this set at every call site to see if the function was a member of the set, and if so, refuse to inline it. This is quite wasteful. Instead, simply check the function attribute directly when looking at the callsite. The normal inliner also had similar redundancy. It added every function in the module with the noinline attribute to its set to ignore, even though inside the cost analysis function we *already tested* the noinline attribute and produced the same result. The only tricky part of removing this is that we have to be able to correctly remove only the functions inlined by the always-inline pass when finalizing, which requires a bit of a hack. Still, much less of a hack than the set of all non-always-inline functions was. While I was touching this function, I switched a heavy-weight set to a vector with sort+unique. The algorithm already had a two-phase insert and removal pattern, we were just needlessly paying the uniquing cost on every insert. This probably speeds up some compiles by a small amount (-O0 compiles with lots of always-inline, so potentially heavy libc++ users), but I've not tried to measure it. I believe there is no functional change here, but yell if you spot one. None are intended. Finally, the direction this is going in is to greatly simplify the inline cost query interface so that we can replace its implementation with a much more clever one. Along the way, all the APIs get simplified, so it seems incrementally good. llvm-svn: 152903
-
Andrew Trick authored
Only record IVUsers that are dominated by simplified loop headers. Otherwise SCEVExpander will crash while looking for a preheader. I previously tried to work around this in LSR itself, but that was insufficient. This way, LSR can continue to run if some uses are not in simple loops, as long as we don't attempt to analyze those users. Fixes <rdar://problem/11049788> Segmentation fault: 11 in LoopStrengthReduce llvm-svn: 152892
-
Eli Friedman authored
In InstCombiner::visitOr, make sure we reverse the operand swap used for checking for or-of-xor operations after those checks; a later check expects that any constant will be in Op1. PR12234. llvm-svn: 152884
-
- Mar 15, 2012
-
-
Rafael Espindola authored
code. While here, reduce indentation. llvm-svn: 152803
-
Bill Wendling authored
llvm-svn: 152794
-
Chandler Carruth authored
changed since. No one was using it. It is yet another consumer of the InlineCost interface that I'd like to change. llvm-svn: 152769
-
Chandler Carruth authored
metrics. llvm-svn: 152760
-
Aaron Ballman authored
llvm-svn: 152756
-
Kostya Serebryany authored
llvm-svn: 152755
-
Kostya Serebryany authored
[asan] rename class BlackList to FunctionBlackList and move it into a separate file -- we will need the same functionality in ThreadSanitizer llvm-svn: 152753
-
Dan Gohman authored
should be ignored by ARC optimization, don't insert new ARC runtime calls in the unwind destination. llvm-svn: 152748
-
- Mar 14, 2012
-
-
Chandler Carruth authored
which are small enough to themselves be inlined. Delaying in this manner can be harmful if the function is inelligible for inlining in some (or many) contexts as it pessimizes the code of the function itself in the event that inlining does not eventually happen. Previously the check was written to only do this delaying of inlining for static functions in the hope that they could be entirely deleted and in the knowledge that all callers of static functions will have the opportunity to inline if it is in fact profitable. However, with C++ we get two other important sources of functions where the definition is always available for inlining: inline functions and templated functions. This patch generalizes the inliner to allow linkonce-ODR (the linkage such C++ routines receive) to also qualify for this delay-based inlining. Benchmarking across a range of large real-world applications shows roughly 2% size increase across the board, but an average speedup of about 0.5%. Some benhcmarks improved over 2%, and the 'clang' binary itself (when bootstrapped with this feature) shows a 1% -O0 performance improvement when run over all Sema, Lex, and Parse source code smashed into a single file. A clean re-build of Clang+LLVM with a bootstrapped Clang shows approximately 2% improvement, but that measurement is often noisy. llvm-svn: 152737
-
- Mar 13, 2012
-
-
Pete Cooper authored
Target override to allow CodeGenPrepare to sink address operands to intrinsics in the same way it current does for loads and stores llvm-svn: 152666
-
Chris Lattner authored
fixing rdar://11039258, an issue that came up when inspecting clang's bootstrapped codegen. llvm-svn: 152635
-
Dan Gohman authored
llvm-svn: 152634
-
- Mar 12, 2012
-
-
Chandler Carruth authored
candidate set for subsequent inlining, try to simplify the arguments to the inner call site now that inlining has been performed. The goal here is to propagate and fold constants through deeply nested call chains. Without doing this, we loose the inliner bonus that should be applied because the arguments don't match the exact pattern the cost estimator uses. Reviewed on IRC by Benjamin Kramer. llvm-svn: 152556
-
- Mar 11, 2012
-
-
Stepan Dyatkovskiy authored
Renamed methods caseBegin, caseEnd and caseDefault with case_begin, case_end, and case_default. Added some notes relative to case iterators. llvm-svn: 152532
-
- Mar 09, 2012
-
-
Duncan Sands authored
to count the number of phis changed, not the number visited. llvm-svn: 152425
-
Dan Gohman authored
traversal, consider nodes for which the only successors are backedges which the traversal is ignoring to be exit nodes. This fixes a problem where the bottom-up traversal was failing to visit split blocks along split loop backedges. This fixes rdar://10989035. llvm-svn: 152421
-
Duncan Sands authored
negative switch cases if the branch condition is known to be positive. Inspired by a recent improvement to GCC's VRP. llvm-svn: 152405
-
- Mar 08, 2012
-
-
Stepan Dyatkovskiy authored
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120130/136146.html Implemented CaseIterator and it solves almost all described issues: we don't need to mix operand/case/successor indexing anymore. Base iterator class is implemented as a template since it may be initialized either from "const SwitchInst*" or from "SwitchInst*". ConstCaseIt is just a read-only iterator. CaseIt is read-write iterator; it allows to change case successor and case value. Usage of iterator allows totally remove resolveXXXX methods. All indexing convertions done automatically inside the iterator's getters. Main way of iterator usage looks like this: SwitchInst *SI = ... // intialize it somehow for (SwitchInst::CaseIt i = SI->caseBegin(), e = SI->caseEnd(); i != e; ++i) { BasicBlock *BB = i.getCaseSuccessor(); ConstantInt *V = i.getCaseValue(); // Do something. } If you want to convert case number to TerminatorInst successor index, just use getSuccessorIndex iterator's method. If you want initialize iterator from TerminatorInst successor index, use CaseIt::fromSuccessorIndex(...) method. There are also related changes in llvm-clients: klee and clang. llvm-svn: 152297
-