Skip to content
  1. Nov 19, 2012
    • Bob Wilson's avatar
      Clean up handling of always-inline functions in the inliner. · a5b0dc88
      Bob Wilson authored
      This patch moves the isInlineViable function from the InlineAlways pass into
      the InlineCostAnalyzer and then changes the InlineCost computation to use that
      simple check for always-inline functions. All the special-case checks for
      AlwaysInline in the CallAnalyzer can then go away.
      
      llvm-svn: 168300
      a5b0dc88
    • Bob Wilson's avatar
      Some comment fixes. · 266802d2
      Bob Wilson authored
      llvm-svn: 168299
      266802d2
    • Chandler Carruth's avatar
      Completely re-work how the Clang driver interprets PIC and PIE options. · 76a943be
      Chandler Carruth authored
      There were numerous issues here that were all entangled, and so I've
      tried to do a general simplification of the logic.
      1) The logic was mimicing actual GCC bugs, rather than "features". These
         have been fixed in trunk GCC, and this fixes Clang as well. Notably,
         the logic was always intended to be last-match-wins like any other
         flag.
      2) The logic for handling '-mdynamic-no-pic' was preposterously unclear.
         It also allowed the use of this flag on non-Darwin platforms where it
         has no actual meaning. Now this option is handled directly based on
         tests of how llvm-gcc behaves, and it is only supported on Darwin.
      3) The APIs for the Driver's ToolChains had the implementation ugliness
         of dynamic-no-pic leaking through them. They also had the
         implementation details of the LLVM relocation model flag names
         leaking through.
      4) The actual results of passing these flags was incorrect on Darwin in
         many cases. For example, Darwin *always* uses PIC level 2 if it uses
         in PIC level, and Darwin *always* uses PIC on 64-bit regardless of
         the flags specified, including -fPIE. Darwin never compiles in PIE
         mode, but it can *link* in PIE mode.
      5) Also, PIC was not always being enabled even when PIE was. This isn't
         a supported mode at all and may have caused some fallout in builds
         with complex PIC and PIE interactions.
      
      The result is (I hope) cleaner and clearer for readers. I've also left
      comments and tests about some of the truly strage behavior that is
      observed on Darwin platforms. We have no real testing of Windows
      platforms and PIC, but I don't have the tools handy to figure that out.
      Hopefully others can beef up our testing here.
      
      Unfortunately, I can't test this for every platform. =/ If folks have
      dependencies on these flags that aren't covered by tests, they may
      break. I've audited and ensured that all the changes in behavior of the
      existing tests are intentional and good. In particular I've tried to
      make sure the Darwin behavior (which is more suprising than the Linux
      behavior) also matches that of 'gcc' on my mac.
      
      llvm-svn: 168297
      76a943be
    • Chandler Carruth's avatar
      Remove a no-op 'const' from a by-value return type. · d6f93cbe
      Chandler Carruth authored
      llvm-svn: 168296
      d6f93cbe
    • NAKAMURA Takumi's avatar
      RecursiveASTVisitor.h: Rework Doug's r160404, "Eliminating the GCC_CAST hack, take two." · c59776d1
      NAKAMURA Takumi authored
      With this, ARCMT tests would not crash on certain hosts with g++ -O2, eg. cygwin g++-4.5.3.
      
      r160404 crashed mingw32-g++-4.4.0. I guess method's pointer in conditional expression could not be handled.
      
      llvm-svn: 168295
      c59776d1
    • Craig Topper's avatar
      Move else onto line with preceding closing brace. · 36f29122
      Craig Topper authored
      llvm-svn: 168294
      36f29122
  2. Nov 18, 2012
  3. Nov 17, 2012
Loading