Skip to content
  1. May 03, 2017
    • Siddharth Bhat's avatar
      [CUDA Managed Memory] Fix regression introduced by Managed Memory · 88619946
      Siddharth Bhat authored
      - Fixes breakage from commit 5536f.
      - Interference with commit 764f3 caused testcase to fail. Reverting
        764f3 allows commit 5536f to succeed.
      - Generated kernel code was slightly different due to 764f3, which
        caused testcase to fail.
      
      llvm-svn: 302021
      88619946
    • Oren Ben Simhon's avatar
      [X86] Support of no_caller_saved_registers attribute · dbd4bba1
      Oren Ben Simhon authored
      This patch implements the LLVM part for no_caller_saved_registers attribute as appears here: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=5ed3cc7b66af4758f7849ed6f65f4365be8223be.
      In order to implement the attribute, we use the dynamic CSR mechanism to remove returned/passed arguments from the function regmask/CSR list.
      
      Differential Revision: https://reviews.llvm.org/D31876
      
      llvm-svn: 302020
      dbd4bba1
    • Elad Cohen's avatar
      Support arbitrary address space pointers in masked gather/scatter intrinsics. · ef5798ac
      Elad Cohen authored
      Fixes PR31789 - When loop-vectorize tries to use these intrinsics for a
      non-default address space pointer we fail with a "Calling a function with a
      bad singature!" assertion. This patch solves this by adding the 'vector of
      pointers' argument as an overloaded type which will determine the address
      space.
      
      Differential revision: https://reviews.llvm.org/D31490
      
      llvm-svn: 302018
      ef5798ac
    • Dylan McKay's avatar
      [AVR] Reserve the Y register in all functions · 4aedb8a6
      Dylan McKay authored
      llvm-svn: 302017
      4aedb8a6
    • Artem Dergachev's avatar
      [analyzer] Fix memory error bug category capitalization. · b6a513d1
      Artem Dergachev authored
      It was written as "Memory Error" in most places and as "Memory error" in a few
      other places, however it is the latter that is more consistent with
      other categories (such as "Logic error").
      
      rdar://problem/31718115
      
      Differential Revision: https://reviews.llvm.org/D32702
      
      llvm-svn: 302016
      b6a513d1
    • Anna Thomas's avatar
      [Loop Deletion] Delete loops that are never executed · 53c8d95c
      Anna Thomas authored
      Summary:
      Currently, loop deletion deletes loop where the only values
      that are used outside the loop are loop-invariant.
      This patch adds logic to delete loops where the loop is proven to be
      never executed (i.e. the only predecessor of the loop preheader has a
      constant conditional branch as terminator, and the preheader is not the
      taken target). This will remove loops that become dead after
      loop-unswitching generates constant conditional branches.
      
      The next steps are:
      1. moving the loop deletion implementation to LoopUtils.
      2. Add logic in loop-simplifyCFG which will support changing conditional
      constant branches to unconditional branches. If loops become unreachable in this
      process, they can be removed using `deleteDeadLoop` function.
      
      Reviewers: chandlerc, efriedma, sanjoy, reames
      
      Reviewed by: sanjoy
      
      Subscribers: mzolotukhin, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D32494
      
      llvm-svn: 302015
      53c8d95c
    • Dylan McKay's avatar
      Revert "[AVR] Enable the frame pointer for all functions" · c30d85bd
      Dylan McKay authored
      This reverts commit 358ad02d999e88853d2cfc954bd2f668308a51f7.
      
      llvm-svn: 302014
      c30d85bd
    • Pavel Labath's avatar
      Windows fix for TestConflictingDefinition makefile · 6b09f9d6
      Pavel Labath authored
      gnuwin32 rm does not like wildcards that match nothing even if we
      specify -f (probably because the wildcard expansion happens in-process
      there). We could use make $(wildcard) here, but it seems safer to
      explicitly list the files here, just like the normal Makefile.rules
      does.
      
      llvm-svn: 302013
      6b09f9d6
    • Daniel Jasper's avatar
      Undo turning ExtBehavior into a bitfield. · b2bf741e
      Daniel Jasper authored
      This produces warnings that I can't explain in a GCC build:
      
      In file included from ../tools/clang/include/clang/Lex/LexDiagnostic.h:13:0,
                       from /usr/local/google/home/djasper/llvm/tools/clang/lib/Lex/PTHLexer.cpp:19:
      ../tools/clang/include/clang/Basic/Diagnostic.h:219:34: warning: ‘clang::DiagnosticsEngine::DiagState::ExtBehavior’ is too small to hold all values of ‘enum class clang::diag::Severity’ [enabled by default]
           diag::Severity ExtBehavior : 4;     // Map extensions to warnings or errors?
                                        ^
      
      While I don't think this warning makes sense, I'd like to get this back to being
      warning-free. This only seems to trigger for "enum class".
      
      Reproducer:
      https://godbolt.org/g/P2ekVd
      
      llvm-svn: 302012
      b2bf741e
    • Alex Lorenz's avatar
      [Triple] Add a "macos" OS type that acts as a synonym for "macosx" · c748d7b5
      Alex Lorenz authored
      The "macosx" OS type is still the canonical type. In the future "macos" will
      become the canonical OS type (but we will still support "macosx").
      
      rdar://27043820
      
      Differential Revision: https://reviews.llvm.org/D32748
      
      llvm-svn: 302011
      c748d7b5
    • Simon Pilgrim's avatar
      [X86] Refactored LowerINTRINSIC_W_CHAIN to use a switch statament. NFCI. · 05cfa838
      Simon Pilgrim authored
      Pre-commit as requested in D32769.
      
      llvm-svn: 302010
      05cfa838
    • Daniel Jasper's avatar
      Fix tests after speculatable intrinsics patch · 6e254b5f
      Daniel Jasper authored
      These were relying on the attribute group numbering
      
      llvm-svn: 302009
      6e254b5f
    • Pavel Labath's avatar
      Check for lack of C++ context first when demangling · 9075f52c
      Pavel Labath authored
      Summary: It seems that if we have no context, then it can't possibly be a method.  Check that first.
      
      Reviewers: clayborg
      
      Reviewed By: clayborg
      
      Subscribers: labath, lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D32708
      Patch by Scott Smith <scott.smith@purestorage.com>.
      
      llvm-svn: 302008
      9075f52c
    • Peter Smith's avatar
      [ELF] Fix problems with fabricateDefaultCommands() and --section-start · c60b4510
      Peter Smith authored
      The --section-start <name>=<address> needs to be translated into equivalent
      linker script commands. There are a couple of problems with the existing
      implementation:
      - The --section-start with the lowest address is assumed to be at the start
      of the map. This assumption is incorrect, we have to iterate through the
      SectionStartMap to find the lowest address.
      - The addresses in --section-start were being over-aligned when the
      sections were marked as PageAlign. This is inconsistent with the use of
      SectionStartMap in fixHeaders(), and can cause problems when the PageAlign
      causes an "unable to move location counter backward" error when the
      --section-start with PageAlign is aligned to an address higher than the next
      --section-start. The ld.bfd and ld.gold seem to be more consistent with this
      approach but this is not a well specified area.
          
      This change fixes the problems above and also corrects a typo in which
      fabricateDefaultCommands() is called with the wrong parameter, it should be
      called with AllocateHeader not Config->MaxPageSize.
      
      Differential Revision: https://reviews.llvm.org/D32749
      
      llvm-svn: 302007
      c60b4510
    • George Rimar's avatar
      [ELF] - Added testcase gdb-index-ranges.s (https://reviews.llvm.org/D32750) · 99e1890e
      George Rimar authored
      Before rL301170 was landed, LLD did not produce correct entries in .gdb_index address area.
      Issue was fixed on LLVM DWARF parsers side and was relative to how .debug_ranges
      section was scanned. It was main problem of PR32319.
      
      It makes sense to have testcase on LLD size too. This checks that we generate proper values 
      now, because we do not have any tests for .gdb_index which works with .debug_ranges atm.
      
      Differential revision: https://reviews.llvm.org/D32750
      
      llvm-svn: 302006
      99e1890e
    • Tobias Grosser's avatar
      [ScopInfo] Remove code not needed anymore after r302004 · 72684bba
      Tobias Grosser authored
      llvm-svn: 302005
      72684bba
    • Tobias Grosser's avatar
      [ScopInfo] Do not add array name into memory reference ids · 8133128c
      Tobias Grosser authored
      Before this change a memory reference identifier had the form:
      
        <STMT>_<ACCESSTYPE><ID>_<MEMREF>, e.g., Stmt_bb9_Write0_MemRef_tmp11
      
      After this change, we use the format:
      
        <STMT>_<ACCESSTYPE><ID>, e.g., Stmt_bb9_Write0
      
      The name of the array that is accessed through a memory reference is not
      necessary to uniquely identify a memory reference, but was only added to
      provide additional information for debugging. We drop this information now
      for the following two reasons:
      
        1) This shortens the names and consequently improves readability
        2) This removes a second location where we decide on the name of a scop array,
           leaving us only with the location where the actual scop array is created.
      
      Having after 2) only a single location to name scop arrays will allow us to
      change the naming convention of scop arrays more easily, which we will do
      in a future commit to reduce compilation time.
      
      llvm-svn: 302004
      8133128c
    • Daniel Jasper's avatar
      Silences gcc's -Wnarrowing. · ba9aefc0
      Daniel Jasper authored
      I think this is a false positive in GCC's warning, but nonetheless, we
      should try to be warning-free. Smaller reproducer (reproduces with GCC
      6.3):
      https://godbolt.org/g/cJuO2z
      
      llvm-svn: 302003
      ba9aefc0
    • Daniel Jasper's avatar
      Revert r301986 (and subsequent r301987). · dff096f2
      Daniel Jasper authored
      The patch is failing to add StringTableStreamBuilder.h, but that isn't
      even discovered because the corresponding StringTableStreamBuilder.cpp
      isn't added to any CMakeLists.txt file and thus never built. I think
      this patch is just incomplete.
      
      llvm-svn: 302002
      dff096f2
    • Maxim Ostapenko's avatar
      [sanitizer] Intercept mcheck and mprobe on Linux · 726701b0
      Maxim Ostapenko authored
      This patch addresses https://github.com/google/sanitizers/issues/804.
      Users can use mcheck and mprobe functions to verify heap state so we should intercept them to avoid breakage of valid code.
      
      Differential Revision: https://reviews.llvm.org/D32589
      
      llvm-svn: 302001
      726701b0
    • Yuka Takahashi's avatar
      Revert rL301998: "Fix a bug that -isysroot is completely ignored on Unix" · 5511fc2e
      Yuka Takahashi authored
      This reverts commit because it broke
      sanitizer-x86_64-linux-autoconf bot and
      clang-ppc64be-linux-multistage  bot.
      
      llvm-svn: 302000
      5511fc2e
    • Zachary Turner's avatar
      Fix use after free in BinaryStream library. · 59e83892
      Zachary Turner authored
      This was reported by the ASAN bot, and it turned out to be
      a fairly fundamental problem with the design of VarStreamArray
      and the way it passes context information to the extractor.
      
      The fix was cumbersome, and I'm not entirely pleased with it,
      so I plan to revisit this design in the future when I'm not
      pressed to get the bots green again.  For now, this fixes
      the issue by storing the context information by value instead
      of by reference, and introduces some impossibly-confusing
      template magic to make things "work".
      
      llvm-svn: 301999
      59e83892
    • Yuka Takahashi's avatar
      Fix a bug that -isysroot is completely ignored on Unix · 79d31071
      Yuka Takahashi authored
      -isysroot is the flag which set the system root directory.
      This bug report https://bugs.llvm.org//show_bug.cgi?id=11503
      shows that -isysroot is not handled at all on Unix, so fixed this bug.
      
      After this diff, I could get this result https://pastebin.com/TeCmn9mj .
      
      Differential Revision: https://reviews.llvm.org/D31495
      
      llvm-svn: 301998
      79d31071
    • Matt Arsenault's avatar
      Fix tests after speculatable intrinsics patch · 7c4c1cb2
      Matt Arsenault authored
      These were relying on the attribute group numbering
      
      llvm-svn: 301996
      7c4c1cb2
    • Matt Arsenault's avatar
      Replace hardcoded intrinsic list with speculatable attribute. · 6a288c1e
      Matt Arsenault authored
      No change in which intrinsics should be speculated.
      
      llvm-svn: 301995
      6a288c1e
    • Kostya Serebryany's avatar
    • Sean Callanan's avatar
      Fixed a bug where we did not properly use the complete versions of Objective-C classes. · 40d067cd
      Sean Callanan authored
      Also added a test case, thanks to Greg Clayton.
      
      <rdar://problem/18913551>
      
      llvm-svn: 301993
      40d067cd
    • Richard Smith's avatar
      [modules] Round-trip -Werror flag through explicit module build. · e37391c4
      Richard Smith authored
      The intent for an explicit module build is that the diagnostics produced within
      the module are those that were configured when the module was built, not those
      that are enabled within a user of the module. This includes diagnostics that
      don't actually show up until the module is used (for instance, diagnostics
      produced during template instantiation and weird cases like -Wpadded).
      
      We serialized and restored the diagnostic state for individual warning groups,
      but previously did not track the state for flags like -Werror and -Weverything,
      which are implemented as separate bits rather than as part of the diagnostics
      mapping information.
      
      llvm-svn: 301992
      e37391c4
    • Peter Collingbourne's avatar
      Revert r295861, "[ModuleSummaryAnalysis] Don't crash when referencing unnamed globals." · e95901ca
      Peter Collingbourne authored
      We should always expect values to be named before running the module summary
      analysis (see NameAnonGlobals pass), so it's fine if we crash in that case.
      
      llvm-svn: 301991
      e95901ca
    • Tim Shen's avatar
      [PowerPC, DAGCombiner] Fold a << (b % (sizeof(a) * 8)) back to a single instruction · e59d06fe
      Tim Shen authored
      Summary:
      This is the corresponding llvm change to D28037 to ensure no performance
      regression.
      
      Reviewers: bogner, kbarton, hfinkel, iteratee, echristo
      
      Subscribers: nemanjai, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D28329
      
      llvm-svn: 301990
      e59d06fe
    • Richard Trieu's avatar
    • Vedant Kumar's avatar
      [ubsan] Skip overflow checks on safe arithmetic (fixes PR32874) · d9191159
      Vedant Kumar authored
      Currently, ubsan emits overflow checks for arithmetic that is known to
      be safe at compile-time, e.g:
      
        1 + 1 => CheckedAdd(1, 1)
      
      This leads to breakage when using the __builtin_prefetch intrinsic. LLVM
      expects the arguments to @llvm.prefetch to be constant integers, and
      when ubsan inserts unnecessary checks on the operands to the intrinsic,
      this contract is broken, leading to verifier failures (see PR32874).
      
      Instead of special-casing __builtin_prefetch for ubsan, this patch fixes
      the underlying problem, i.e that clang currently emits unnecessary
      overflow checks.
      
      Testing: I ran the check-clang and check-ubsan targets with a stage2,
      ubsan-enabled build of clang. I added a regression test for PR32874, and
      some extra checking to make sure we don't regress runtime checking for
      unsafe arithmetic. The existing ubsan-promoted-arithmetic.cpp test also
      provides coverage for this change.
      
      llvm-svn: 301988
      d9191159
    • Zachary Turner's avatar
      Fix type conversion error. · 67736594
      Zachary Turner authored
      llvm-svn: 301987
      67736594
    • Zachary Turner's avatar
      Make codeview::StringTable. · 7dba20bd
      Zachary Turner authored
      Previously we had knowledge of how to serialize and deserialize
      a string table inside of DebugInfo/PDB, but the string table
      that it serializes contains a piece that is actually considered
      CodeView and can appear outside of a PDB.  We already have logic
      in llvm-readobj and MCCodeView to read and write this format,
      so it doesn't make sense to duplicate the logic in DebugInfoPDB
      as well.
      
      This patch makes codeview::StringTable (for writing) and
      codeview::StringTableRef (for reading), updates DebugInfoPDB
      to use these classes for its own writing, and updates llvm-readobj
      to additionally use StringTableRef for reading.
      
      It's a bit more difficult to get MCCodeView to use this for
      writing, but it's a logical next step.
      
      llvm-svn: 301986
      7dba20bd
    • Xin Tong's avatar
      Typo in LangRef.rst. NFC · c7180204
      Xin Tong authored
      llvm-svn: 301985
      c7180204
    • Greg Clayton's avatar
      Add line table verification to lldb-dwarfdump --verify · 6707046f
      Greg Clayton authored
      This patch verifies the .debug_line:
      - verify all addresses in a line table sequence have ascending addresses
      - verify that all line table file indexes are valid
      
      Unit tests added for both cases.
      
      Differential Revision: https://reviews.llvm.org/D32765
      
      llvm-svn: 301984
      6707046f
    • Tim Northover's avatar
      ARM: avoid handing a deleted node back to TableGen during ISel. · 4a01ffbd
      Tim Northover authored
      When we replaced the multiplicand the destination node might already exist.
      When that happens the original gets CSEd and deleted. However, it's actually
      used as the offset so nonsense is produced.
      
      Should fix PR32726.
      
      llvm-svn: 301983
      4a01ffbd
    • Rui Ueyama's avatar
      Remove a dead function declaration. · 9decbfee
      Rui Ueyama authored
      llvm-svn: 301982
      9decbfee
    • Reid Kleckner's avatar
      Re-land r301697 "[IR] Make add/remove Attributes use AttrBuilder instead of AttributeList" · ee4930b6
      Reid Kleckner authored
      This time, I fixed, built, and tested clang.
      
      This reverts r301712.
      
      llvm-svn: 301981
      ee4930b6
    • Joel Jones's avatar
      [AArch64] ILP32 Backend Relocation Support · 65134057
      Joel Jones authored
      Remove "_NC" suffix and semantics from TLSDESC_LD{64,32}_LO12 and
        TLSDESC_ADD_LO12 relocations
      Rearrange ordering in AArch64.def to follow relocation encoding
      Fix name:
        R_AARCH64_P32_LD64_GOT_LO12_NC => R_AARCH64_P32_LD32_GOT_LO12_NC
      Add support for several "TLS", "TLSGD", and "TLSLD" relocations for
        ILP32
      Fix return values from isNonILP32reloc
      Add implementations for
        R_AARCH64_ADR_PREL_PG_HI21_NC, R_AARCH64_P32_LD32_GOT_LO12_NC,
        R_AARCH64_P32_TLSIE_LD32_GOTTPREL_LO12_NC,
        R_AARCH64_P32_TLSDESC_LD32_LO12, R_AARCH64_LD64_GOT_LO12_NC,
        *TLSLD_LDST128_DTPREL_LO12, *TLSLD_LDST128_DTPREL_LO12_NC,
        *TLSLE_LDST128_TPREL_LO12, *TLSLE_LDST128_TPREL_LO12_NC
      Modify error messages to give name of equivalent relocation in the
        ABI not being used, along with better checking for non-existent
        requested relocations.
      Added assembler support for "pg_hi21_nc"
      Relocation definitions added without implementations:
        R_AARCH64_P32_TLSDESC_ADR_PREL21, R_AARCH64_P32_TLSGD_ADR_PREL21,
        R_AARCH64_P32_TLSGD_ADD_LO12_NC, R_AARCH64_P32_TLSLD_ADR_PREL21, 
        R_AARCH64_P32_TLSLD_ADR_PAGE21, R_AARCH64_P32_TLSLD_ADD_LO12_NC,
        R_AARCH64_P32_TLSLD_LD_PREL19, R_AARCH64_P32_TLSDESC_LD_PREL19,
        R_AARCH64_P32_TLSGD_ADR_PAGE21, R_AARCH64_P32_TLS_DTPREL,
        R_AARCH64_P32_TLS_DTPMOD, R_AARCH64_P32_TLS_TPREL,
        R_AARCH64_P32_TLSDESC
      Fix encoding:
        R_AARCH64_P32_TLSDESC_ADR_PAGE21
      
      Reviewers: Peter Smith
      
      Patch by: Joel Jones (jjones@cavium.com)
      
      Differential Revision: https://reviews.llvm.org/D32072
      
      llvm-svn: 301980
      65134057
Loading