Skip to content
  1. Jun 17, 2013
  2. Jun 15, 2013
  3. Jun 13, 2013
    • Derek Schuff's avatar
      Fix DeleteDeadVarargs not to crash on functions referenced by BlockAddresses · ec9dc01b
      Derek Schuff authored
      This pass was assuming that if hasAddressTaken() returns false for a
      function, the function's only uses are call sites.  That's not true
      because there can be references by BlockAddresses too.
      
      Fix the pass to handle this case.  Fix
      BlockAddress::replaceUsesOfWithOnConstant() to allow a function's type
      to be changed by RAUW'ing the function with a bitcast of the recreated
      function.
      
      Patch by Mark Seaborn.
      
      llvm-svn: 183933
      ec9dc01b
  4. Jun 12, 2013
  5. Jun 11, 2013
    • Rafael Espindola's avatar
      Change how globalopt handles aliases in llvm.used. · a82555c0
      Rafael Espindola authored
      Instead of a custom implementation of replaceAllUsesWith, we just call
      replaceAllUsesWith and recreate llvm.used and llvm.compiler-used.
      
      This change is particularity interesting because it makes llvm see
      through what clang is doing with static used functions in extern "C"
      contexts. With this change, running clang -O2 in
      
      extern "C" {
        __attribute__((used)) static void foo() {}
      }
      
      produces
      
      @llvm.used = appending global [1 x i8*] [i8* bitcast (void ()* @foo to
      i8*)], section "llvm.metadata"
      define internal void @foo() #0 {
      entry:
        ret void
      }
      
      llvm-svn: 183756
      a82555c0
  6. Jun 09, 2013
  7. Jun 07, 2013
  8. Jun 01, 2013
  9. May 14, 2013
  10. May 09, 2013
  11. May 06, 2013
  12. May 01, 2013
    • Filip Pizlo's avatar
      This patch breaks up Wrap.h so that it does not have to include all of · dec20e43
      Filip Pizlo authored
      the things, and renames it to CBindingWrapping.h.  I also moved 
      CBindingWrapping.h into Support/.
      
      This new file just contains the macros for defining different wrap/unwrap 
      methods.
      
      The calls to those macros, as well as any custom wrap/unwrap definitions 
      (like for array of Values for example), are put into corresponding C++ 
      headers.
      
      Doing this required some #include surgery, since some .cpp files relied 
      on the fact that including Wrap.h implicitly caused the inclusion of a 
      bunch of other things.
      
      This also now means that the C++ headers will include their corresponding 
      C API headers; for example Value.h must include llvm-c/Core.h.  I think 
      this is harmless, since the C API headers contain just external function 
      declarations and some C types, so I don't believe there should be any 
      nasty dependency issues here.
      
      llvm-svn: 180881
      dec20e43
  13. Apr 23, 2013
  14. Apr 22, 2013
  15. Apr 20, 2013
  16. Apr 19, 2013
  17. Apr 16, 2013
  18. Apr 15, 2013
  19. Apr 13, 2013
    • Benjamin Kramer's avatar
      GlobalDCE: Fix an oversight in my last commit that could lead to crashes. · adc1727c
      Benjamin Kramer authored
      There is a Constant with non-constant operands: blockaddress.
      
      llvm-svn: 179460
      adc1727c
    • Benjamin Kramer's avatar
      Fix a scalability issue with complex ConstantExprs. · 89ca4bc6
      Benjamin Kramer authored
      This is basically the same fix in three different places. We use a set to avoid
      walking the whole tree of a big ConstantExprs multiple times.
      
      For example: (select cmp, (add big_expr 1), (add big_expr 2))
      We don't want to visit big_expr twice here, it may consist of thousands of
      nodes.
      
      The testcase exercises this by creating an insanely large ConstantExprs out of
      a loop. It's questionable if the optimizer should ever create those, but this
      can be triggered with real C code. Fixes PR15714.
      
      llvm-svn: 179458
      89ca4bc6
  20. Apr 02, 2013
    • Bill Wendling's avatar
      Use a worklist to avoid a sneaky iterator invalidation. · 88d06c3b
      Bill Wendling authored
      The iterator could be invalidated when it's recursively deleting a whole bunch
      of constant expressions in a constant initializer.
      
      Note: This was only reproducible if `opt' was run on a `.bc' file. If `opt' was
      run on a `.ll' file, it wouldn't crash. This is why the test first pushes the
      `.ll' file through `llvm-as' before feeding it to `opt'.
      
      PR15440
      
      llvm-svn: 178531
      88d06c3b
  21. Mar 21, 2013
  22. Mar 10, 2013
  23. Mar 06, 2013
  24. Mar 04, 2013
  25. Feb 14, 2013
    • Bill Wendling's avatar
      Retain the name of the new internal global that's been shrunk. · 7297b864
      Bill Wendling authored
      It's possible (e.g. after an LTO build) that an internal global may be used for
      debugging purposes. If that's the case appending a '.b' to it makes it hard to
      find that variable. Steal the name from the old GV before deleting it so that
      they can find that variable again.
      
      llvm-svn: 175104
      7297b864
  26. Feb 02, 2013
  27. Jan 31, 2013
  28. Jan 29, 2013
    • Hal Finkel's avatar
      Unroll again after running BBVectorize · bf4db4fe
      Hal Finkel authored
      Because BBVectorize may significantly shorten a loop body, unroll
      again after vectorization. This is especially important when using
      runtime or partial unrolling.
      
      llvm-svn: 173730
      bf4db4fe
  29. Jan 28, 2013
  30. Jan 27, 2013
  31. Jan 26, 2013
    • Bill Wendling's avatar
      Remove some introspection functions. · 57625a49
      Bill Wendling authored
      The 'getSlot' function and its ilk allow introspection into the AttributeSet
      class. However, that class should be opaque. Allow access through accessor
      methods instead.
      
      llvm-svn: 173522
      57625a49
  32. Jan 25, 2013
Loading