- Jun 08, 2013
-
-
Shuxin Yang authored
The MemCpyOpt pass is capable of optimizing: callee(&S); copy N bytes from S to D. into: callee(&D); subject to some legality constraints. Assertion is triggered when the compiler tries to evalute "sizeof(typeof(D))", while D is an opaque-typed, 'sret' formal argument of function being compiled. i.e. the signature of the func being compiled is something like this: T caller(...,%opaque* noalias nocapture sret %D, ...) The fix is that when come across such situation, instead of calling some utility functions to get the size of D's type (which will crash), we simply assume D has at least N bytes as implified by the copy-instruction. rdar://14073661 llvm-svn: 183584
-
- Jun 07, 2013
-
-
Michael Gottesman authored
[objc-arc] Ensure that the cfg path count does not overflow when we multiply TopDownPathCount/BottomUpPathCount. rdar://12480535 llvm-svn: 183489
-
Jakub Staszak authored
llvm-svn: 183461
-
Nadav Rotem authored
Jeffrey Yasskin volunteered to benchmark the vectorizer on -O2 or -Os when compiling chrome. This patch adds a new flag to enable vectorization on all levels and not only on -O3. It should go away once we make a decision. llvm-svn: 183456
-
- Jun 06, 2013
-
-
Jakub Staszak authored
llvm-svn: 183439
-
Rafael Espindola authored
This reverts commit 183328. It caused pr16244 and broke the bots. llvm-svn: 183422
-
Jakub Staszak authored
llvm-svn: 183363
-
Jakub Staszak authored
llvm-svn: 183360
-
- Jun 05, 2013
-
-
Jakub Staszak authored
llvm-svn: 183328
-
- Jun 04, 2013
-
-
David Majnemer authored
IndVarSimplify is willing to move divide instructions outside of their loop bodies if they are invariant of the loop. However, it may not be safe to expand them if we do not know if they can trap. Instead, check to see if it is not safe to expand the instruction and skip the expansion. This fixes PR16041. Testcase by Rafael Ávila de Espíndola. llvm-svn: 183239
-
Rafael Espindola authored
The problem this time seems to be a thinko. We were assuming that in the CFG A | \ | B | / C speculating the basic block B would cause only the phi value for the B->C edge to be speculated. That is not true, the phi's are semantically in the edges, so if the A->B->C path is taken, any code needed for A->C is not executed and we have to consider it too when deciding to speculate B. llvm-svn: 183226
-
Hans Wennborg authored
llvm-svn: 183219
-
Nick Lewycky authored
llvm-svn: 183167
-
- Jun 03, 2013
-
-
David Majnemer authored
PR16069 is an interesting case where an incoming value to a PHI is a trap value while also being a 'ConstantExpr'. We do not consider this case when performing the 'HoistThenElseCodeToIf' optimization. Instead, make our modifications more conservative if we detect that we cannot transform the PHI to a select. llvm-svn: 183152
-
David Majnemer authored
llvm-svn: 183151
-
Kostya Serebryany authored
llvm-svn: 183104
-
- Jun 01, 2013
-
-
Nick Lewycky authored
index greater than the size of the vector is invalid. The shuffle may be shrinking the size of the vector. Fixes a crash! Also drop the maximum recursion depth of the safety check for this optimization to five. llvm-svn: 183080
-
David Majnemer authored
llvm-svn: 183078
-
Benjamin Kramer authored
Also simplify code a bit while there. No functionality change. llvm-svn: 183076
-
- May 31, 2013
-
-
Arnold Schwaighofer authored
Use ScalarEvolution's getBackedgeTakenCount API instead of getExitCount since that is really what we want to know. Using the more specific getExitCount was safe because we made sure that there is only one exiting block. No functionality change. llvm-svn: 183047
-
Quentin Colombet authored
Account for the cost of scaling factor in Loop Strength Reduce when rating the formulae. This uses a target hook. The default implementation of the hook is: if the addressing mode is legal, the scaling factor is free. <rdar://problem/13806271> llvm-svn: 183045
-
Arnold Schwaighofer authored
We check that instructions in the loop don't have outside users (except if they are reduction values). Unfortunately, we skipped this check for if-convertable PHIs. Fixes PR16184. llvm-svn: 183035
-
Quentin Colombet authored
Namely, check if the target allows to fold more that one register in the addressing mode and if yes, adjust the cost accordingly. Prior to this commit, reg1 + scale * reg2 accesses were artificially preferred to reg1 + reg2 accesses. Indeed, the cost model wrongly assumed that reg1 + reg2 needs a temporary register for the computation, whereas it was correctly estimated for reg1 + scale * reg2. <rdar://problem/13973908> llvm-svn: 183021
-
Rafael Espindola authored
Patch by Andrea Di Biagio. llvm-svn: 183005
-
Evgeniy Stepanov authored
Before this change, each module defined a weak_odr global __msan_track_origins with a value of 1 if origin tracking is enabled, 0 if disabled. If there are modules with different values, any of them may win. If 0 wins, and there is at least one module with 1, the program will most likely crash. With this change, __msan_track_origins is only emitted if origin tracking is on. Then runtime library detects if there is at least one module with origin tracking, and enables runtime support for it. llvm-svn: 182997
-
Nick Lewycky authored
insertelement instructions. llvm-svn: 182976
-
- May 30, 2013
-
-
Evgeniy Stepanov authored
PR/16177 llvm-svn: 182919
-
Nick Lewycky authored
llvm-svn: 182909
-
- May 29, 2013
-
-
NAKAMURA Takumi authored
llvm-svn: 182820
-
NAKAMURA Takumi authored
llvm-svn: 182819
-
- May 28, 2013
-
-
Paul Redmond authored
- llvm.loop.parallel metadata has been renamed to llvm.loop to be more generic by making the root of additional loop metadata. - Loop::isAnnotatedParallel now looks for llvm.loop and associated llvm.mem.parallel_loop_access - document llvm.loop and update llvm.mem.parallel_loop_access - add support for llvm.vectorizer.width and llvm.vectorizer.unroll - document llvm.vectorizer.* metadata - add utility class LoopVectorizerHints for getting/setting loop metadata - use llvm.vectorizer.width=1 to indicate already vectorized instead of already_vectorized - update existing tests that used llvm.loop.parallel and llvm.vectorizer.already_vectorized Reviewed by: Nadav Rotem llvm-svn: 182802
-
James Molloy authored
Extend LinkModules to pass a ValueMaterializer to RemapInstruction and friends to lazily create Functions for lazily linked globals. This is a big win when linking small modules with large (mostly unused) library modules. llvm-svn: 182776
-
Evgeniy Stepanov authored
llvm-svn: 182771
-
- May 25, 2013
-
-
Michael J. Spencer authored
llvm-svn: 182680
-
- May 24, 2013
-
-
Michael Gottesman authored
[objc-arc] KnownSafe does not imply that it is safe to perform code motion across CFG edges since even if it is safe to remove RR pairs, we may still be able to move a retain/release into a loop. rdar://13949644 llvm-svn: 182670
-
Michael Gottesman authored
[objc-arc] Make sure that multiple owners is propogated correctly through the pass via the usage of a global data structure. rdar://13750319 llvm-svn: 182669
-
Benjamin Kramer authored
LoopVectorize: LoopSimplify can't canonicalize loops with an indirectbr in it, don't assert on those cases. Fixes PR16139. llvm-svn: 182656
-
Joey Gouly authored
llvm-svn: 182640
-
Joey Gouly authored
as the BinaryOperator, *not* in the block where the IRBuilder is currently inserting into. Fixes a bug where scalarizePHI would create instructions that would not dominate all uses. llvm-svn: 182639
-
Daniel Malea authored
- move AsmWriter.h from public headers into lib - marked all AssemblyWriter functions as non-virtual; no need to override them - DebugIR now "plugs into" AssemblyWriter with an AssemblyAnnotationWriter helper - exposed flags to control hiding of a) debug metadata b) debug intrinsic calls C/R: Paul Redmond llvm-svn: 182617
-