llvm-project/clang/lib
Chris Lattner b7a95cf165 delete a loop that just generates dead code. In an example
like this:

void *test(long N) {
  return new int[N][42][42];
}

the loop generates two dead mul instructions:

  %tmp = load i64* %N.addr                        ; <i64> [#uses=2]
  %0 = mul i64 %tmp, 7056                         ; <i64> [#uses=1]
  %1 = mul i64 %tmp, 42                           ; <i64> [#uses=1]
  %2 = mul i64 %1, 42                             ; <i64> [#uses=0]
  %call = call noalias i8* @_Znam(i64 %0)         ; <i8*> [#uses=1]

The scale of these multiplies is already handled by the typesize stuff.

llvm-svn: 108884
2010-07-20 18:49:33 +00:00
..
AST Hide FunctionTemplateDecl's specializations folding set as implementation detail and introduce 2010-07-20 13:59:58 +00:00
Analysis Add missing conversion specifier parsing for 'u', 'x', 'o', and 's'. Fixes <rdar://problem/8204052>. 2010-07-19 19:47:40 +00:00
Basic Introduce a new libclang API, clang_reparseTranslationUnit(), which 2010-07-19 21:46:24 +00:00
Checker Constify all references to Stmt* and CFGBlock* in libChecker. 2010-07-20 06:22:24 +00:00
CodeGen delete a loop that just generates dead code. In an example 2010-07-20 18:49:33 +00:00
Driver Add -lstdc++ to DragonFly tools. 2010-07-20 12:59:03 +00:00
Frontend Hide FunctionTemplateDecl's specializations folding set as implementation detail and introduce 2010-07-20 13:59:58 +00:00
Headers PR7588: Fix the _mm_shufflehi_epi16 macro. (The issue was an oversight 2010-07-08 20:09:45 +00:00
Index Remove unused location-to-AST-node resolver. libclang's implementation supercedes it 2010-07-19 16:18:30 +00:00
Lex Complain when string literals are too long for the active language 2010-07-20 14:33:20 +00:00
Parse tidy up comment. 2010-07-19 05:07:24 +00:00
Rewrite Update ImplicitCastExpr to be able to represent an XValue. 2010-07-20 04:20:21 +00:00
Sema Hide FunctionTemplateDecl's specializations folding set as implementation detail and introduce 2010-07-20 13:59:58 +00:00
CMakeLists.txt Split libAnalysis into two libraries: libAnalysis and libChecker. 2010-01-25 04:41:41 +00:00
Makefile Move lib/Runtime to runtime/, and build after everything else. 2010-06-30 22:10:38 +00:00