Skip to content
  1. Aug 12, 2013
    • Shuxin Yang's avatar
      Revert r188188 and r188200. · 1826ae23
      Shuxin Yang authored
      In order to appease people (in Apple) who accuse me for committing "huge change" (?) without proper review. 
      
      Thank Eric for fixing a compile-warning. 
      
      llvm-svn: 188204
      1826ae23
    • Michael Gottesman's avatar
      [stackprotector] Add in the stackprotector libcall. · 7dce16f6
      Michael Gottesman authored
      We support this libcall on all platforms except for OpenBSD (See
      lib/Codegen/StackProtector.cpp).
      
      llvm-svn: 188193
      7dce16f6
    • Michael Gottesman's avatar
      [stackprotector] Added intrinsic llvm.stackprotectorcheck. · dafc7d94
      Michael Gottesman authored
      llvm-svn: 188191
      dafc7d94
    • Shuxin Yang's avatar
      Misc enhancements to LTO: · 76d082b5
      Shuxin Yang authored
        1. Add some helper classes for partitions. They are designed in a
           way such that the top-level LTO driver will not see much difference 
           with or without partitioning.
      
        2. Introduce work-dir. Now all intermediate files generated during 
           LTO phases will be saved under work-dir. User can specify the workdir
           via -lto-workdir=/path/to/dir. By default the work-dir will be 
           erased before linker exit. To keep the workdir, do -lto-keep, or -lto-keep=1.
      
          TODO: Erase the workdir, if the linker exit prematurely.  
            We are currently not able to remove directory on signal. The support 
            routines simply ignore directory.
      
        3. Add one new API lto_codegen_get_files_need_remove().
           Linker and LTO plugin will communicate via this API about which files
          (including directories) need to removed before linker exit.
      
      llvm-svn: 188188
      76d082b5
    • Alexey Samsonov's avatar
      Remove unused SpecialCaseList constructors · 15dc0af7
      Alexey Samsonov authored
      llvm-svn: 188171
      15dc0af7
    • Alexey Samsonov's avatar
      e4b5fb88
    • Chandler Carruth's avatar
      Remove all checking for the various terminfo headers (term.h and · 91219858
      Chandler Carruth authored
      curses.h). Finding these headers is next to impossible. For example, on
      Debian systems libtinfo-dev provides the terminfo reading library we
      want, but *not* term.h. For the header, you have to use libncurses-dev.
      And libncursesw-dev provides a *different* term.h in a different
      location!
      
      These headers aren't worth it. We want two functions the signatures of
      which are clearly spec'ed in sys-v and other documentation. Just declare
      them ourselves and call them. This should fix some debian builders and
      provide better support for "minimal" debian systems that do want color
      autodetection.
      
      llvm-svn: 188165
      91219858
    • Richard Sandiford's avatar
      [SystemZ] Use CLC and IPM to implement memcmp · 564681c8
      Richard Sandiford authored
      For now this is restricted to fixed-length comparisons with a length
      in the range [1, 256], as for memcpy() and MVC.
      
      llvm-svn: 188163
      564681c8
    • Chandler Carruth's avatar
      Target a minimal terminfo library rather than necessarily a full curses · f11f1e43
      Chandler Carruth authored
      library for color support detection. This still will use a curses
      library if that is all we have available on the system. This change
      tries to use a smaller subset of the curses library, specifically the
      subset that is on some systems split off into a separate library. For
      example, if you install ncurses configured --with-tinfo, a 'libtinfo' is
      install that provides just the terminfo querying functionality. That
      library is now used instead of curses when it is available.
      
      This happens to fix a build error on systems with that library because
      when we tried to link ncurses into the binary, we didn't pull tinfo in
      as well. =]
      
      It should also provide an easy path for supporting the NetBSD
      libterminfo library, but as I don't have access to a NetBSD system I'm
      leaving adding that support to those folks.
      
      llvm-svn: 188160
      f11f1e43
    • Alexey Samsonov's avatar
      Introduce factory methods for SpecialCaseList · 9e4fdd26
      Alexey Samsonov authored
      Summary:
      Doing work in constructors is bad: this change suggests to
      call SpecialCaseList::create(Path, Error) instead of
      "new SpecialCaseList(Path)". Currently the latter may crash with
      report_fatal_error, which is undesirable - sometimes we want to report
      the error to user gracefully - for example, if he provides an incorrect
      file as an argument of Clang's -fsanitize-blacklist flag.
      
      Reviewers: pcc
      
      Reviewed By: pcc
      
      CC: llvm-commits
      
      Differential Revision: http://llvm-reviews.chandlerc.com/D1327
      
      llvm-svn: 188156
      9e4fdd26
  2. Aug 09, 2013
  3. Aug 08, 2013
  4. Aug 07, 2013
    • Chandler Carruth's avatar
      Commit a no-op change to StringRef to (hopefully) trigger build bots. · 289b7b69
      Chandler Carruth authored
      r187874 seems to have been missed by the build bot infrastructure, and
      the subsequent commits to compiler-rt don't seem to be queuing up new
      build requsets. Hopefully this will.
      
      As it happens, having the space here is the more common formatting. =]
      
      llvm-svn: 187879
      289b7b69
    • Chandler Carruth's avatar
      Add support for linking against a curses library when available and · cad7e5e0
      Chandler Carruth authored
      using it to detect whether or not a terminal supports colors. This
      replaces a particularly egregious hack that merely compared the TERM
      environment variable to "dumb". That doesn't really translate to
      a reasonable experience for users that have actually ensured their
      terminal's capabilities are accurately reflected.
      
      This makes testing a terminal for color support somewhat more expensive,
      but it is called very rarely anyways. The important fast path when the
      output is being piped somewhere is already in place.
      
      The global lock may seem excessive, but the spec for calling into curses
      is *terrible*. The whole library is terrible, and I spent quite a bit of
      time looking for a better way of doing this before convincing myself
      that this was the fundamentally correct way to behave. The damage of the
      curses library is very narrowly confined, and we continue to use raw
      escape codes for actually manipulating the colors which is a much sane
      system than directly using curses here (IMO).
      
      If this causes trouble for folks, please let me know. I've tested it on
      Linux and will watch the bots carefully. I've also worked to account for
      the variances of curses interfaces that I could finde documentation for,
      but that may not have been sufficient.
      
      llvm-svn: 187874
      cad7e5e0
    • Dmitri Gribenko's avatar
      Remove the assertion for now. This breaks lld. · 98277bc9
      Dmitri Gribenko authored
      lld has a hashtable with StringRef keys; it needs to iterate over the keys in
      *insertion* order.  This is currently implemented as std::vector<StringRef> +
      DenseMap<StringRef, T>.  This will probably need a proper
      DenseMapInfo<StringRef> if we don't want to lose memory/performance by
      migrating to a different data structure.
      
      llvm-svn: 187868
      98277bc9
    • Dmitri Gribenko's avatar
      YAMLTraits.h: replace DenseMap that used a bad implementation of DenseMapInfo · df73c300
      Dmitri Gribenko authored
      for StringRef with a StringMap
      
      The bug is that the empty key compares equal to the tombstone key.
      
      Also added an assertion to DenseMap to catch similar bugs in future.
      
      llvm-svn: 187866
      df73c300
    • Reid Kleckner's avatar
      Check for _strtoi64 in the cmake build if strtoll is missing · a3ae94e8
      Reid Kleckner authored
      Previously this check was guarded by MSVC, which doesn't distinguish
      between the compiler and the headers/library.  This enables clang to
      compile more of LLVM on Windows with Microsoft headers.
      
      Remove some unused macros while I'm here: error_t and LTDL stuff.
      
      llvm-svn: 187839
      a3ae94e8
    • Alexander Kornienko's avatar
      Implemented llvm::sys::locale::columnWidth and isPrint for the case of generic... · e69c77a4
      Alexander Kornienko authored
      Implemented llvm::sys::locale::columnWidth and isPrint for the case of generic UTF8-capable terminal.
      
      Summary:
      This is a second attempt to get this right. After reading the Unicode
      Standard I came up with the code that uses definitions of "printable" and
      "column width" more suitable for terminal output (i.e. fixed-width fonts and
      special treatment of many control characters).
      The implementation here can probably be used for Windows and MacOS if someone
      can test it properly.
      The patch addresses PR14910.
      
      Reviewers: jordan_rose, gribozavr
      
      CC: llvm-commits
      
      Differential Revision: http://llvm-reviews.chandlerc.com/D1253
      
      llvm-svn: 187837
      e69c77a4
  5. Aug 06, 2013
    • Reid Kleckner's avatar
      Use gnu style builtins in MathExtras.h with clang on Windows · 1c767e60
      Reid Kleckner authored
      Clang does not provide BitScan* intrinsic implementations yet.
      
      llvm-svn: 187813
      1c767e60
    • Manman Ren's avatar
      Debug Info Finder|Verifier: handle DbgLoc attached to instructions. · b75e0c92
      Manman Ren authored
      Also remove checking of llvm.dbg.sp since it is not used in generating dwarf.
      
      Current state of Finder:
      DebugInfoFinder tries to list all debug info MDNodes used in a module. To
      list debug info MDNodes used by an instruction, DebugInfoFinder provides
      processDeclare, processValue and processLocation to handle DbgDeclareInst,
      DbgValueInst and DbgLoc attached to instructions. processModule will go
      through all DICompileUnits in llvm.dbg.cu and list debug info MDNodes
      used by the CUs.
      
      TODO:
      1> Finder has a list of CUs, SPs, Types, Scopes and global variables. We
      need to add a list of variables that are used by DbgDeclareInst and
      DbgValueInst.
      2> MDString fields should be null or isa<MDString> and MDNode fields should be
      null or isa<MDNode>. We currently use empty string or int 0 to represent null.
      3> Go though Verify functions and make sure that they check field types.
      4> Clean up existing testing cases to remove llvm.dbg.sp and make sure each
      testing case has a llvm.dbg.cu.
      
      Re-apply r187609 with fix to pass ocaml binding. vmcore.ml generates a debug
      location with scope being metadata !{}, in verifier we treat this as a null
      scope.
      
      llvm-svn: 187812
      b75e0c92
    • Alexey Samsonov's avatar
      Add LLVM-style RTTI to DIContext/DWARFContext classes · c2e00873
      Alexey Samsonov authored
      llvm-svn: 187790
      c2e00873
    • Tim Northover's avatar
      Refactor isInTailCallPosition handling · a4415854
      Tim Northover authored
      This change came about primarily because of two issues in the existing code.
      Niether of:
      
      define i64 @test1(i64 %val) {
        %in = trunc i64 %val to i32
        tail call i32 @ret32(i32 returned %in)
        ret i64 %val
      }
      
      define i64 @test2(i64 %val) {
        tail call i32 @ret32(i32 returned undef)
        ret i32 42
      }
      
      should be tail calls, and the function sameNoopInput is responsible. The main
      problem is that it is completely symmetric in the "tail call" and "ret" value,
      but in reality different things are allowed on each side.
      
      For these cases:
      1. Any truncation should lead to a larger value being generated by "tail call"
         than needed by "ret".
      2. Undef should only be allowed as a source for ret, not as a result of the
         call.
      
      Along the way I noticed that a mismatch between what this function treats as a
      valid truncation and what the backends see can lead to invalid calls as well
      (see x86-32 test case).
      
      This patch refactors the code so that instead of being based primarily on
      values which it recurses into when necessary, it starts by inspecting the type
      and considers each fundamental slot that the backend will see in turn. For
      example, given a pathological function that returned {{}, {{}, i32, {}}, i32}
      we would consider each "real" i32 in turn, and ask if it passes through
      unchanged. This is much closer to what the backend sees as a result of
      ComputeValueVTs.
      
      Aside from the bug fixes, this eliminates the recursion that's going on and, I
      believe, makes the bulk of the code significantly easier to understand. The
      trade-off is the nasty iterators needed to find the real types inside a
      returned value.
      
      llvm-svn: 187787
      a4415854
    • Craig Topper's avatar
      Put an llvm_unreachable at the end of getSplatIndex as its loop should never... · 5ba12d75
      Craig Topper authored
      Put an llvm_unreachable at the end of getSplatIndex as its loop should never find all undef elements.
      
      llvm-svn: 187775
      5ba12d75
    • Craig Topper's avatar
      Check against >= 0 instead of != -1 in getSplatIndex because it generally... · 770547db
      Craig Topper authored
      Check against >= 0 instead of != -1 in getSplatIndex because it generally compiles to better code and is equivalent for shuffle indices.
      
      llvm-svn: 187774
      770547db
    • Craig Topper's avatar
      7d60e7ca
    • Tom Stellard's avatar
      Factor FlattenCFG out from SimplifyCFG · aa664d9b
      Tom Stellard authored
      Patch by: Mei Ye
      
      llvm-svn: 187764
      aa664d9b
    • Matt Arsenault's avatar
      Fix missing -*- C++ -*-s · ff7dc724
      Matt Arsenault authored
      llvm-svn: 187758
      ff7dc724
Loading