1. Dec 04, 2014
  2. Dec 03, 2014
    • Alexander Potapenko's avatar
    • Aaron Ballman's avatar
      7ce5a497
    • Aaron Ballman's avatar
      Silencing a 32-bit implicit conversion warning in MSVC; NFC. · d58a1f4d
      Aaron Ballman authored
      llvm-svn: 223237
      d58a1f4d
    • Evgeniy Stepanov's avatar
      msan] Add compile-time checks for missing origins. · 2e5a1f1c
      Evgeniy Stepanov authored
      This change makes MemorySanitizer instrumentation a bit more strict
      about instructions that have no origin id assigned to them.
      
      This would have caught the bug that was fixed in r222918.
      
      This is re-commit of r222997, reverted in r223211, with 3 more
      missing origins added.
      
      llvm-svn: 223236
      2e5a1f1c
    • Alexander Kornienko's avatar
      [clang-tidy] Update help messages and docs. · 5c423318
      Alexander Kornienko authored
      Fixed incorrect examples of configuration, clarified the usage of -dump-config.
      
      llvm-svn: 223235
      5c423318
    • Daniel Jasper's avatar
      clang-format: Fix fake parentheses placement with comments. · c095663e
      Daniel Jasper authored
      Before:
        return (a > b
                // comment1
            // comment2
            || c);
      
      After:
        return (a > b
            // comment1
            // comment2
            || c);
      
      llvm-svn: 223234
      c095663e
    • Evgeniy Stepanov's avatar
      [msan] Change the way origin ids are built. · 7395cae0
      Evgeniy Stepanov authored
      Previously, all origin ids were "chained" origins, i.e values of
      ChainedOriginDepot. This added a level of indirection for simple
      stack and heap allocation, which were represented as chains of
      length 1. This costs both RAM and CPU, but provides a joined 2**29
      origin id space. It also made function (any instrumented function)
      entry non-async-signal-safe, but that does not really matter because
      memory stores in track-origins=2 mode are not async-signal-safe anyway.
      
      With this change, the type of the origin is encoded in origin id.
      See comment in msan_origin.h for more details. This reduces chained and stack
      origin id range to 2**28 each, but leaves extra 2**31 for heap origins.
      
      This change should not have any user-visible effects.
      
      llvm-svn: 223233
      7395cae0
    • Alexander Kornienko's avatar
      [clang-tidy] Make a test independent of the default check set. · 4cf0c18a
      Alexander Kornienko authored
      llvm-svn: 223232
      4cf0c18a
    • Evgeniy Stepanov's avatar
      [asan] Fix stale_stack_leak.cc test in ASan-UAR mode. · fc77519c
      Evgeniy Stepanov authored
      This test does an intentional use-after-return, but this is not the focus of
      the test, so ignore it.
      
      llvm-svn: 223230
      fc77519c
    • Evgeniy Stepanov's avatar
      [msan] Add one more test for the handling of stack origins. · 8a988c40
      Evgeniy Stepanov authored
      llvm-svn: 223229
      8a988c40
    • Daniel Jasper's avatar
      clang-format: Fix expression parser not closing stuff at end of stmt. · 8379107a
      Daniel Jasper authored
      Uncovered by a Java test case:
      
      Before:
        public some.package.Type someFunction( // comment
            int parameter) {}
      
      After:
        public some.package.Type someFunction( // comment
                                int parameter) {}
      
      llvm-svn: 223228
      8379107a
    • Hafiz Abid Qadeer's avatar
      Remove unnecessary changes committed in r223222. · afd188fe
      Hafiz Abid Qadeer authored
      There were 2 different patches in discussion. One using ioctl
      and other using select. We decided to use the ioctl but committed
      code also have some changes which were only needed for 'select'.
      This patch removes them.
      
      llvm-svn: 223227
      afd188fe
    • Evgeniy Stepanov's avatar
      [msan] Re-enable one test. · 340347a8
      Evgeniy Stepanov authored
      It has been fixed a long time ago.
      
      llvm-svn: 223226
      340347a8
    • Alexey Bataev's avatar
      [OPENMP] Code formatting and improvement, no functional changes. · 1e4b7135
      Alexey Bataev authored
      llvm-svn: 223225
      1e4b7135
    • Erik Eckstein's avatar
      InstCombine: simplify signed range checks · d181752b
      Erik Eckstein authored
      Try to convert two compares of a signed range check into a single unsigned compare.
      Examples:
      (icmp sge x, 0) & (icmp slt x, n) --> icmp ult x, n
      (icmp slt x, 0) | (icmp sgt x, n) --> icmp ugt x, n
      
      llvm-svn: 223224
      d181752b
    • Hafiz Abid Qadeer's avatar
      Fix a hang on OSX while executing -exec-run. · 25383ac0
      Hafiz Abid Qadeer authored
      Now we wait for input to become available before blocking in fgets.
      More details on problem can be found in 
      http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-20141201/014290.html
      
      Patch from dawn@burble.org.
      
      llvm-svn: 223222
      25383ac0
    • Hal Finkel's avatar
      [PowerPC] Print all inline-asm consts as signed numbers · c91fc111
      Hal Finkel authored
      Almost all immediates in PowerPC assembly (both 32-bit and 64-bit) are signed
      numbers, and it is important that we print them as such. To make sure that
      happens, we change PPCTargetLowering::LowerAsmOperandForConstraint so that it
      does all intermediate checks on a signed-extended int64_t value, and then
      creates the resulting target constant using MVT::i64. This will ensure that all
      negative values are printed as negative values (mirroring what is done in other
      backends to achieve the same sign-extension effect).
      
      This came up in the context of inline assembly like this:
        "add%I2   %0,%0,%2", ..., "Ir"(-1ll)
      where we used to print:
        addi   3,3,4294967295
      and gcc would print:
        addi   3,3,-1
      and gas accepts both forms, but our builtin assembler (correctly) does not. Now
      we print -1 like gcc does.
      
      While here, I replaced a bunch of custom integer checks with isInt<16> and
      friends from MathExtras.h.
      
      Thanks to Paul Hargrove for the bug report.
      
      llvm-svn: 223220
      c91fc111
    • Hal Finkel's avatar
      Preserve LD_LIBRARY_PATH when using the 'env' command · 7c0d61ea
      Hal Finkel authored
      In many Linux environments (and similar), just-built applications won't run
      correctly without making use of the current LD_LIBRARY_PATH environmental
      variable in order to find dynamic libraries. Propagate it through the 'env'
      command (hopefully this works on all platforms).
      
      llvm-svn: 223219
      7c0d61ea
    • Charlie Turner's avatar
      Emit ABI_FP_rounding attribute. · f02c9248
      Charlie Turner authored
      LLVM understands a -enable-sign-dependent-rounding-fp-math codegen option. When
      the user has specified this option, the Tag_ABI_FP_rounding attribute should be
      emitted with value 1. This option currently does not appear to disable
      transformations and optimizations that assume default floating point rounding
      behavior, AFAICT, but the intention should be recorded in the build attributes,
      regardless of what the compiler actually does with the intention.
      
      Change-Id: If838578df3dc652b6f2796b8d152545674bcb30e
      llvm-svn: 223218
      f02c9248
    • Charlie Turner's avatar
      Add tests for default value of Tag_ABI_FP_rounding. · 1620a69f
      Charlie Turner authored
      Change-Id: I051866d073fc6ce87ce3e693a3762da6d81f4393
      llvm-svn: 223217
      1620a69f
    • Benjamin Poulain's avatar
      Fix a typo in the documentation of LTO · 78e1380a
      Benjamin Poulain authored
      Fix defininitions->definitions.
      
      Reviewed by David Blaikie.
      
      llvm-svn: 223216
      78e1380a
    • Rafael Espindola's avatar
      Ask the module for its the identified types. · 2fa1e43a
      Rafael Espindola authored
      When lazy reading a module, the types used in a function will not be visible to
      a TypeFinder until the body is read.
      
      This patch fixes that by asking the module for its identified struct types.
      If a materializer is present, the module asks it. If not, it uses a TypeFinder.
      
      This fixes pr21374.
      
      I will be the first to say that this is ugly, but it was the best I could find.
      
      Some of the options I looked at:
      
      * Asking the LLVMContext. This could be made to work for gold, but not currently
        for ld64. ld64 will load multiple modules into a single context before merging
        them. This causes us to see types from future merges. Unfortunately,
        MappedTypes is not just a cache when it comes to opaque types. Once the
        mapping has been made, we have to remember it for as long as the key may
        be used. This would mean moving MappedTypes to the Linker class and having
        to drop the Linker::LinkModules static methods, which are visible from C.
      
      * Adding an option to ignore function bodies in the TypeFinder. This would
        fix the PR by picking the worst result. It would work, but unfortunately
        we are currently quite dependent on the upfront type merging. I will
        try to reduce our dependency, but it is not clear that we will be able
        to get rid of it for now.
      
      The only clean solution I could think of is making the Module own the types.
      This would have other advantages, but it is a much bigger change. I will
      propose it, but it is nice to have this fixed while that is discussed.
      
      With the gold plugin, this patch takes the number of types in the LTO clang
      binary from 52817 to 49669.
      
      llvm-svn: 223215
      2fa1e43a
    • Duncan P. N. Exon Smith's avatar
      ADT: Rename argument in emplace_back_impl · 74864449
      Duncan P. N. Exon Smith authored
      Rename a functor argument in r223201 from `emplace` to `construct` to
      reduce confusion.
      
      llvm-svn: 223212
      74864449
    • Nick Lewycky's avatar
      Revert r222997. The newly added compile-time checks are finding missing... · a4acb449
      Nick Lewycky authored
      Revert r222997. The newly added compile-time checks are finding missing origins, testcase is being reduced and a PR will be posted shortly.
      
      llvm-svn: 223211
      a4acb449