Skip to content
  1. Oct 28, 2015
  2. Oct 27, 2015
    • Daniel Jasper's avatar
      clang-format: Increase cut-off limit for number of analyzed states. · 75bf203d
      Daniel Jasper authored
      With more complex structures in C++ Lambdas and JavaScript function
      literals, the old value was simply to small. However, this is a
      temporary solution, I need to look at this more closely a) to find a
      fundamentally better approach and b) to look at whether the more recent
      usage of NoLineBreak makes us visit stuff in an unfortunate order
      where clang-format waste many states in dead ends.
      
      llvm-svn: 251463
      75bf203d
    • Zachary Turner's avatar
      Fix line endings to be LF instead of CRLF. · 9e845353
      Zachary Turner authored
      llvm-svn: 251462
      9e845353
    • David Majnemer's avatar
      [SimplifyCFG] Don't DCE catchret because the successor is unreachable · 49293709
      David Majnemer authored
      CatchReturnInst has side-effects: it runs a destructor.  This destructor
      could conceivably run forever/call exit/etc. and should not be removed.
      
      llvm-svn: 251461
      49293709
    • Zachary Turner's avatar
      Preparation for turning lldbsuite into a Python package. · af383ff7
      Zachary Turner authored
      The idea behind this patch is to expose the meat of
      LLDB's Python infrastructure (test suite, scripts, etc)
      as a single package.  This makes reusability and code
      sharing among sub-packages easy.
      
      Differential Revision: http://reviews.llvm.org/D14131
      
      llvm-svn: 251460
      af383ff7
    • Samuel Antao's avatar
      Minor fix in ToolChainTest.cpp to allow user defined GCC toolchain. · 4c1f1c33
      Samuel Antao authored
      If the user configured clang with a custom GCC toolchain that will take precedence on what the ToolChainTest.cpp expects to evaluate. 
      This is fixed here by passing --gcc-toolchain= to the driver, in order to override any user defined GCC toolchain.
      
      llvm-svn: 251459
      4c1f1c33
    • Vedant Kumar's avatar
      [Bitcode] Fix accidental syntax errors in compatibility tests · 9fde8d60
      Vedant Kumar authored
      We used automated tools to update our IR to its current syntax in commit
      21f77df7(r247378). While it correctly updated the CHECK lines in our
      compatibility tests, the IR should have remained untouched.  This commit
      fixes the syntax errors.
      
      llvm-svn: 251458
      9fde8d60
    • Todd Fiala's avatar
      Fix editline unindentation code for more recent libedits. · 0437f035
      Todd Fiala authored
      This code was modifying the cursor and then expecting the editline
      API call to see the effect for the next operation.  This is misusing
      the API.  Newer editlines break on this code, fixed by this.
      
      llvm-svn: 251457
      0437f035
    • Rui Ueyama's avatar
      ELF2: Move some code from MarkLive.cpp to InputSection.cpp. · 12504649
      Rui Ueyama authored
      This function is useful for ICF, so move that to a common place.
      
      llvm-svn: 251455
      12504649
    • Michael J. Spencer's avatar
      [elf2] Don't allocate VA space for TLS NOBITS sections. · 4633a373
      Michael J. Spencer authored
      Differential Revision: http://reviews.llvm.org/D13838
      
      llvm-svn: 251454
      4633a373
    • Simon Pilgrim's avatar
      [X86][AVX512] Test UNPCK with non-sequential scalars · 94c49435
      Simon Pilgrim authored
      Missing tests for r251297
      
      llvm-svn: 251453
      94c49435
    • Vedant Kumar's avatar
      [IR] Limit bits used for CallingConv::ID, update tests · ad6d6e74
      Vedant Kumar authored
      Use 10 bits to represent calling convention ID's instead of 13, and
      update the bitcode compatibility tests accordingly. We now error-out in
      the bitcode reader when we see bad calling conv ID's.
      
      Thanks to rnk and dexonsmith for feedback!
      
      Differential Revision: http://reviews.llvm.org/D13826
      
      llvm-svn: 251452
      ad6d6e74
    • Hal Finkel's avatar
      [AliasSetTracker] Use mod/ref information for UnknownInstr · b1bb7391
      Hal Finkel authored
      AliasSetTracker does not need to convert the access mode to ModRefAccess if the
      new visited UnknownInst has only 'REF' modrefinfo to existing pointers in the
      sets.
      
      Patch by Andrew Zhogin!
      
      llvm-svn: 251451
      b1bb7391
    • Sanjay Patel's avatar
      Use the 'arcp' fast-math-flag when combining repeated FP divisors · bbd4c79c
      Sanjay Patel authored
      This is a usage of the IR-level fast-math-flags now that they are propagated to SDNodes. 
      This was originally part of D8900.
      
      Removing the global 'enable-unsafe-fp-math' checks will require auto-upgrade and 
      possibly other changes.
      
      Differential Revision: http://reviews.llvm.org/D9708
      
      llvm-svn: 251450
      bbd4c79c
    • Anna Zaks's avatar
      [analyzer] Assume escape is possible through system functions taking void* · fe1eca51
      Anna Zaks authored
      The analyzer assumes that system functions will not free memory or modify the
      arguments in other ways, so we assume that arguments do not escape when
      those are called. However, this may lead to false positive leak errors. For
      example, in code like this where the pointers added to the rb_tree are freed
      later on:
      
      		struct alarm_event *e = calloc(1, sizeof(*e));
      <snip>
      
      		rb_tree_insert_node(&alarm_tree, e);
      
      Add a heuristic to assume that calls to system functions taking void*
      arguments allow for pointer escape.
      
      llvm-svn: 251449
      fe1eca51
    • Anna Zaks's avatar
      [analyzer] Enhance FAQ with instructions on handing unused variables. · ac98dbc3
      Anna Zaks authored
      llvm-svn: 251448
      ac98dbc3
    • Anna Zaks's avatar
      [asan] On OS X, log reports to syslog and os_trace · 9a95c9a6
      Anna Zaks authored
      When ASan currently detects a bug, by default it will only print out the text
      of the report to stderr. This patch changes this behavior and writes the full
      text of the report to syslog before we terminate the process. It also calls
      os_trace (Activity Tracing available on OS X and iOS) with a message saying
      that the report is available in syslog. This is useful, because this message
      will be shown in the crash log.
      
      For this to work, the patch makes sure we store the full report into
      error_message_buffer unconditionally, and it also strips out ANSI escape
      sequences from the report (they are used when producing colored reports).
      
      I've initially tried to log to syslog during printing, which is done on Android
      right now. The advantage is that if we crash during error reporting or the
      produced error does not go through ScopedInErrorReport, we would still get a
      (partial) message in the syslog. However, that solution is very problematic on
      OS X. One issue is that the logging routine uses GCD, which may spawn a new
      thread on its behalf. In many cases, the reporting logic locks threadRegistry,
      which leads to deadlocks.
      
      Reviewed at http://reviews.llvm.org/D13452
      
      llvm-svn: 251447
      9a95c9a6
    • Anna Zaks's avatar
      [asan] Sort headers. · 55f195f5
      Anna Zaks authored
      llvm-svn: 251446
      55f195f5
    • Anna Zaks's avatar
      [asan] On OS X, tag mapped regions with VM_MEMORY_ANALYSIS_TOOL tag · ab1aa081
      Anna Zaks authored
      This will tag all mmapped memory sanitizers use with "Performance tool data"
      when viewed in vmmap. (Even though sanitizers are not performance tools, it's
      the best available match and better than having the unidentified objects.)
      
      http://reviews.llvm.org/D13609
      
      llvm-svn: 251445
      ab1aa081
    • Zachary Turner's avatar
      Rename `lldb_shared` to `use_lldb_suite`. · 0a0490b1
      Zachary Turner authored
      llvm-svn: 251444
      0a0490b1
    • David Majnemer's avatar
      [ScalarEvolutionExpander] PHI on a catchpad can be used on both edges · 235acde9
      David Majnemer authored
      A PHI on a catchpad might be used by both edges out of the catchpad,
      feeding back into a loop.  In this case, just use the insertion point.
      Anything more clever would require new basic blocks or PHI placement.
      
      llvm-svn: 251442
      235acde9
    • Nico Weber's avatar
      Tweak how -Wunused-value interacts with macros · 0e631639
      Nico Weber authored
      1. Make the warning more strict in C mode. r172696 added code to suppress
         warnings from macro expansions in system headers, which checks
         `SourceMgr.isMacroBodyExpansion(E->IgnoreParens()->getExprLoc())`. Consider
         this snippet:
      
         #define FOO(x) (x)
         void f(int a) {
           FOO(a);
         }
      
         In C, the line `FOO(a)` is an `ImplicitCastExpr(ParenExpr(DeclRefExpr))`,
         while it's just a `ParenExpr(DeclRefExpr)` in C++. So in C++,
         `E->IgnoreParens()` returns the `DeclRefExpr` and the check tests the
         SourceLoc of `a`. In C, the `ImplicitCastExpr` has the effect of checking the
         SourceLoc of `FOO`, which is a macro body expansion, which causes the
         diagnostic to be skipped. It looks unintentional that clang does different
         things for C and C++ here, so use `IgnoreParenImpCasts` instead of
         `IgnoreParens` here. This has the effect of the warning firing more often
         than previously in C code – it now fires as often as it fires in C++ code.
      
      2. Suppress the warning if it would warn on `UNREFERENCED_PARAMETER`.
         `UNREFERENCED_PARAMETER` is a commonly used macro on Windows and it happens
         to uselessly trigger -Wunused-value. As discussed in the thread
         "rfc: winnt.h's UNREFERENCED_PARAMETER() vs clang's -Wunused-value" on
         cfe-dev, fix this by special-casing this specific macro. (This costs a string
         comparison and some fast-path lexing per warning, but the warning is emitted
         rarely. It fires once in Windows.h itself, so this code runs at least once
         per TU including Windows.h, but it doesn't run hundreds of times.)
      
      http://reviews.llvm.org/D13969
      
      llvm-svn: 251441
      0e631639
    • Rui Ueyama's avatar
      ELF2: Make parseEmulation side-effect free. NFC. · 305a7d3f
      Rui Ueyama authored
      llvm-svn: 251440
      305a7d3f
    • Chaoren Lin's avatar
      Use accept4 workaround for MIPS Android build. · 33942823
      Chaoren Lin authored
      Summary: Similar to http://reviews.llvm.org/rL242319, which was for ARM.
      
      Reviewers: chying, ovyalov
      
      Subscribers: aemerson, tberghammer, danalbert, srhines, lldb-commits
      
      Differential Revision: http://reviews.llvm.org/D14127
      
      llvm-svn: 251439
      33942823
    • Jun Bum Lim's avatar
      [AArch64]Merge halfword loads into a 32-bit load · c9879ecf
      Jun Bum Lim authored
      This recommits r250719, which caused a failure in SPEC2000.gcc
      because of the incorrect insert point for the new wider load.
      
      Convert two halfword loads into a single 32-bit word load with bitfield extract
      instructions. For example :
        ldrh w0, [x2]
        ldrh w1, [x2, #2]
      becomes
        ldr w0, [x2]
        ubfx w1, w0, #16, #16
        and  w0, w0, #ffff
      
      llvm-svn: 251438
      c9879ecf
    • NAKAMURA Takumi's avatar
      Whitespace. · 6f49ecc3
      NAKAMURA Takumi authored
      llvm-svn: 251437
      6f49ecc3
    • NAKAMURA Takumi's avatar
      Revert r251291, "Loop Vectorizer - skipping "bitcast" before GEP" · 7ef7293b
      NAKAMURA Takumi authored
      It causes miscompilation of llvm/lib/ExecutionEngine/Interpreter/Execution.cpp.
      See also PR25324.
      
      llvm-svn: 251436
      7ef7293b
    • Diego Novillo's avatar
      Tidy a comment. NFC. · aa55507f
      Diego Novillo authored
      llvm-svn: 251434
      aa55507f
    • Benjamin Kramer's avatar
      Remove unused diagnostic. NFC. · 8a23638d
      Benjamin Kramer authored
      llvm-svn: 251432
      8a23638d
    • Daniel Sanders's avatar
      [mips] Separated mips specific -Wa options, so that they are not checked on other platforms. · 3d5e5680
      Daniel Sanders authored
      Summary: This is a follow on to post review comments on revision r248276.
      
      Patch by Scott Egerton.
      
      Reviewers: vkalintiris, dsanders
      
      Subscribers: joerg, rengolin, cfe-commits
      
      Differential Revision: http://reviews.llvm.org/D13100
      
      llvm-svn: 251430
      3d5e5680
    • Cong Hou's avatar
      Create a new interface addSuccessorWithoutWeight(MBB*) in MBB to add... · 07eeb800
      Cong Hou authored
      Create a new interface addSuccessorWithoutWeight(MBB*) in MBB to add successors when optimization is disabled.
      
      When optimization is disabled, edge weights that are stored in MBB won't be used so that we don't have to store them. Currently, this is done by adding successors with default weight 0, and if all successors have default weights, the weight list will be empty. But that the weight list is empty doesn't mean disabled optimization (as is stated several times in MachineBasicBlock.cpp): it may also mean all successors just have default weights.
      
      We should discourage using default weights when adding successors, because it is very easy for users to forget update the correct edge weights instead of using default ones (one exception is that the MBB only has one successor). In order to detect such usages, it is better to differentiate using default weights from the case when optimizations is disabled.
      
      In this patch, a new interface addSuccessorWithoutWeight(MBB*) is created for when optimization is disabled. In this case, MBB will try to maintain an empty weight list, but it cannot guarantee this as for many uses of addSuccessor() whether optimization is disabled or not is not checked. But it can guarantee that if optimization is enabled, then the weight list always has the same size of the successor list.
      
      Differential revision: http://reviews.llvm.org/D13963
      
      llvm-svn: 251429
      07eeb800
    • Charlie Turner's avatar
      [SLP] Be more aggressive about reduction width selection. · ab3215fa
      Charlie Turner authored
      Summary:
      This change could be way off-piste, I'm looking for any feedback on whether it's an acceptable approach.
      
      It never seems to be a problem to gobble up as many reduction values as can be found, and then to attempt to reduce the resulting tree. Some of the workloads I'm looking at have been aggressively unrolled by hand, and by selecting reduction widths that are not constrained by a vector register size, it becomes possible to profitably vectorize. My test case shows such an unrolling which SLP was not vectorizing (on neither ARM nor X86) before this patch, but with it does vectorize.
      
      I measure no significant compile time impact of this change when combined with D13949 and D14063. There are also no significant performance regressions on ARM/AArch64 in SPEC or LNT.
      
      The more principled approach I thought of was to generate several candidate tree's and use the cost model to pick the cheapest one. That seemed like quite a big design change (the algorithms seem very much one-shot), and would likely be a costly thing for compile time. This seemed to do the job at very little cost, but I'm worried I've misunderstood something!
      
      Reviewers: nadav, jmolloy
      
      Subscribers: mssimpso, llvm-commits, aemerson
      
      Differential Revision: http://reviews.llvm.org/D14116
      
      llvm-svn: 251428
      ab3215fa
    • Artem Belevich's avatar
      Allow linking multiple bitcode files. · 5d40ae3a
      Artem Belevich authored
      Linking options for particular file depend on the option that specifies the file.
      Currently there are two:
      
      * -mlink-bitcode-file links in complete content of the specified file.
      * -mlink-cuda-bitcode links in only the symbols needed by current TU.
         Linked symbols are internalized. This bitcode linking mode is used to
         link device-specific bitcode provided by CUDA.
      
      Files are linked in order they are specified on command line.
      
      -mlink-cuda-bitcode replaces -fcuda-uses-libdevice flag.
      
      Differential Revision: http://reviews.llvm.org/D13913
      
      llvm-svn: 251427
      5d40ae3a
    • Hafiz Abid Qadeer's avatar
      Include <cstdio> to fix build errors. · 6eb68389
      Hafiz Abid Qadeer authored
      This file uses things like fprintf and stderr and <cstdio> is the right
      header to include. I was getting build errors without it.
      
      llvm-svn: 251426
      6eb68389
Loading