1. May 18, 2018
    • Walter Lee's avatar
      [sanitizer] Trivial portion of the port to Myriad RTEMS · b134dbb3
      Walter Lee authored
      This commit contains the trivial portion of the port of ASan to
      Myriad RTEMS.
      - Whitelist platform in sanitizer_platform.h, ubsan_platform.h
      - Turn off general interception
      - Use memset for FastPoisonShadow
      - Define interception wrappers
      - Set errno symbol correctly
      - Enable ASAN_LOW_MEMORY
      - Enable preinit array
      - Disable slow unwinding
      - Use fuchsia offline symbolizer
      - Disable common code for: InitializeShadowMemory, CreateMainThread,
        AsanThread::ThreadStart, StartReportDeadlySignal,
        MaybeReportNonExecRegion.
      
      Differential Revision: https://reviews.llvm.org/D46454
      
      llvm-svn: 332681
      b134dbb3
    • Keno Fischer's avatar
      [X86DomainReassignment] Don't delete IMPLICIT_DEF nodes · 66ab99c3
      Keno Fischer authored
      Summary:
      We cannot simply delete IMPLICIT_DEF nodes. They may be used
      later (e.g. by a PHI) and deleting them will cause later passes (e.g.
      LiveVariables) to crash. However, it seems fine to ignore them for
      purposes of the domain reassignment (as we do with PHI).
      
      Fixes PR37430
      Fixes JuliaLang/julia#27080
      
      Reviewed By: craig.topper
      Differential Revision: https://reviews.llvm.org/D46797
      
      llvm-svn: 332680
      66ab99c3
    • Petr Hosek's avatar
      [CMake] Reland "Make simple source used for CMake checks a C file" · 3eb71831
      Petr Hosek authored
      The source being compiled is plain C, but using .cc extension forces it
      to be compiled as C++ which requires a working C++ compiler including
      C++ library which may not be the case when we're building compiler-rt
      together with libcxx as part of runtimes build.
      
      Differential Revision: https://reviews.llvm.org/D47031
      
      llvm-svn: 332679
      3eb71831
    • Jan Vesely's avatar
      Add initial support for half precision builtins · 70a270da
      Jan Vesely authored
      
      
      v2: fix fmax implementation
          use consistent checks for __CLC_FP_SIZE
          add missing TODOs
          fix whitespace in definitions.h
      v3: undef ZERO in modf.inc
      
      Signed-off-by: default avatarJan Vesely <jan.vesely@rutgers.edu>
      reviewer: Jeroen Ketema <j.ketema@xs4all.nl>
      Reviewed-by: default avatarAaron Watry <awatry@gmail.com>
      Tested-by: default avatarAaron Watry <awatry@gmail.com>
      llvm-svn: 332677
      70a270da
    • Zachary Turner's avatar
      Resubmit [pdb] Change /DEBUG:GHASH to emit 8 byte hashes." · c762666e
      Zachary Turner authored
      This fixes the remaining failing tests, so resubmitting with no
      functional change.
      
      llvm-svn: 332676
      c762666e
    • Peter Collingbourne's avatar
      Support: Add a raw_ostream::write_zeros() function. NFCI. · 070777db
      Peter Collingbourne authored
      This will eventually replace MCObjectWriter::WriteZeros.
      
      Part of PR37466.
      
      Differential Revision: https://reviews.llvm.org/D47033
      
      llvm-svn: 332675
      070777db
    • George Burgess IV's avatar
      Revert r332657: "[AA] cfl-anders-aa with field sensitivity" · c6526176
      George Burgess IV authored
      I don't believe the person who LGTMed this review has appropriate
      context on this code. I apologize if I'm wrong.
      
      llvm-svn: 332674
      c6526176
    • Changpeng Fang's avatar
      AMDGPU/SI: Don't promote alloca to vector for atomic load/store · 860d4600
      Changpeng Fang authored
      Summary:
        Don't promote alloca to vector for atomic load/store
      
      Reviewer:
        arsenm
      
      Differential Revision:
        https://reviews.llvm.org/D46085
      
      llvm-svn: 332673
      860d4600
    • Zachary Turner's avatar
      Revert "[pdb] Change /DEBUG:GHASH to emit 8 byte hashes." · 1de9fce1
      Zachary Turner authored
      A few tests haven't been properly updated, so reverting while
      I have time to investigate proper fixes.
      
      llvm-svn: 332672
      1de9fce1
    • Stella Stamenova's avatar
      [Windows, Process] LLDB reads wrong registers on 64bit Windows · 5b5350dd
      Stella Stamenova authored
      Summary: LLDB reads wrong registers on 64bit Windows because RegisterContextWindows_x64::GetRegisterInfoAtIndex returns wrong reference.
      I encountered broken backtrace when the program stopped at function which does not have prologue code, such as compiled with '-fomit-frame-pointer'.
      In this situation, CFA is equal to rsp but LLDB reads r9.
      
      RegisterContextWindows_x64::GetRegisterInfoAtIndex depends the order of lldb_XXX_x86_64 values, but RegisterIndex/g_register_infos/g_gpr_reg_indices does not follow order.
      
      In source/Plugins/Process/Utility/lldb-x86-register-enums.h
      The order of GPRs is rax, rbx, rcx, rdx, rdi, rsi, rbp, rsp, r8, ...
      
      In source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp
      The order of GPRs is rax, rbx, rcx, rdx, rdi, rsi, r8, r9, r10, ...
      
      Patch by Kenji Koyanagi
      
      llvm-svn: 332671
      5b5350dd
    • Stella Stamenova's avatar
      [Windows, Process] Fix an issue in windows thread handling that was causing LLDB to hang · 0fd67b53
      Stella Stamenova authored
      Summary: The function ResumeThread on Windows returns a DWORD which is an unsigned int. In TargetThreadWindows::DoResume, there's code that determines how many times to call ResumeThread based on whether the return value is greater than 0. Since the function returns -1 (as an unsigned int) on failure, this was getting stuck in an infinite loop if ResumeThread failed for any reason. The correct thing to do is check whether the return value is -1 and then return the appropriate error instead of ignoring the return value.
      
      Reviewers: asmith, zturner, labath
      
      Reviewed By: zturner
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D47020
      
      llvm-svn: 332670
      0fd67b53
    • Zachary Turner's avatar
      [pdb] Change /DEBUG:GHASH to emit 8 byte hashes. · 3c4c8a09
      Zachary Turner authored
      Previously we emitted 20-byte SHA1 hashes.  This is overkill
      for identifying debug info records, and has the negative side
      effect of making object files bigger and links slower.  By
      using only the last 8 bytes of a SHA1, we get smaller object
      files and ~10% faster links.
      
      This modifies the format of the .debug$H section by adding a new
      value for the hash algorithm field, so that the linker will still
      work when its object files have an old format.
      
      Differential Revision: https://reviews.llvm.org/D46855
      
      llvm-svn: 332669
      3c4c8a09
    • Reid Kleckner's avatar
      Fix lld wasm debug info test on Windows (path separator, sigh) · ef778708
      Reid Kleckner authored
      llvm-svn: 332668
      ef778708
    • Heejin Ahn's avatar
      [WebAssembly] Add Wasm personality and isScopedEHPersonality() · b4be38fc
      Heejin Ahn authored
      Summary:
      - Add wasm personality function
      - Re-categorize the existing `isFuncletEHPersonality()` function into
      two different functions: `isFuncletEHPersonality()` and
      `isScopedEHPersonality(). This becomes necessary as wasm EH uses scoped
      EH instructions (catchswitch, catchpad/ret, and cleanuppad/ret) but not
      outlined funclets.
      - Changed some callsites of `isFuncletEHPersonality()` to
      `isScopedEHPersonality()` if they are related to scoped EH IR-level
      stuff.
      
      Reviewers: majnemer, dschuff, rnk
      
      Subscribers: jfb, sbc100, jgravelle-google, eraman, JDevlieghere, sunfish, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D45559
      
      llvm-svn: 332667
      b4be38fc
    • Lang Hames's avatar
      [ORC] Consolidate materialization errors, and generate them in VSO's · ecb3e500
      Lang Hames authored
      notifyFailed method rather than passing in an error generator.
      
      VSO::notifyFailed is responsible for notifying queries that they will not
      succeed due to error. In practice the queries don't care about the details
      of the failure, just the fact that a failure occurred for some symbols.
      Having VSO::notifyFailed take care of this simplifies the interface.
      
      llvm-svn: 332666
      ecb3e500
    • Lang Hames's avatar
      [ORC] Make MaterializationResponsibility's constructor private. · e21432e2
      Lang Hames authored
      MaterializationResponsibility instances should be created by
      MaterializationUnits only. Making the constructor private enforces this.
      
      llvm-svn: 332665
      e21432e2
    • Reid Kleckner's avatar
      [codeview] Include record prefix in global type hashing · f40f8586
      Reid Kleckner authored
      The prefix includes type kind, which is important to preserve. Two
      different type leafs can easily have the same interior record contents
      as another type.
      
      We ran into this issue in PR37492 where a bitfield type record collided
      with a const modifier record. Their contents were bitwise identical, but
      their kinds were different.
      
      llvm-svn: 332664
      f40f8586
    • Peter Collingbourne's avatar
      ARC, Nios2: Silence build warnings. NFCI. · 0d8fa1b6
      Peter Collingbourne authored
      llvm-svn: 332663
      0d8fa1b6
    • Petr Hosek's avatar
      [CMake] Cleanup find_compiler_rt_library function [NFC] · 5a668a05
      Petr Hosek authored
      Rename the output variable and remove the unnecessary set call.
      
      llvm-svn: 332661
      5a668a05
    • Rui Ueyama's avatar
      Fix typo in error message. · 52d78396
      Rui Ueyama authored
      llvm-svn: 332658
      52d78396
    • David Bolvansky's avatar
      [AA] cfl-anders-aa with field sensitivity · b1c59e3f
      David Bolvansky authored
      Summary:
      There was some unfinished work started for offset tracking in CFLGraph by the author of implementation of Andersen algorithm. This work was completed and support for field sensitivity was added to the core of Andersen algorithm.
      
      The performance results seem promising.
      
      SPEC2006 int_base score was increased by 1.1 % (I  compared clang 6.0 with clang 6.0 with this patch). The avergae compile time was increased by +- 1 % according my measures with small and medium C/C++ projects (I did not tested it on the large projects with milions of lines of code)
      
      Reviewers: chandlerc, george.burgess.iv, rja
      
      Reviewed By: rja
      
      Subscribers: rja, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D46282
      
      llvm-svn: 332657
      b1c59e3f
    • Rui Ueyama's avatar
      Make ALIGN work with -r in linker scripts · b75d19c3
      Rui Ueyama authored
      Patch by Mark Kettenis.
      
      Make ALIGN work in linker scripts used with the -r option. This works in
      GNU ld (ld.bfd) and is used to generate the "random gap" object for
      linking the OpenBSD kernel.
      
      Differential Revision: https://reviews.llvm.org/D46839
      
      llvm-svn: 332656
      b75d19c3
    • Diego Caballero's avatar
      [LV][VPlan] Build plain CFG with simple VPInstructions for outer loops. · f58ad312
      Diego Caballero authored
      Patch #3 from VPlan Outer Loop Vectorization Patch Series #1
      (RFC: http://lists.llvm.org/pipermail/llvm-dev/2017-December/119523.html).
      
      Expected to be NFC for the current inner loop vectorization path. It
      introduces the basic algorithm to build the VPlan plain CFG (single-level
      CFG, no hierarchical CFG (H-CFG), yet) in the VPlan-native vectorization
      path using VPInstructions. It includes:
        - VPlanHCFGBuilder: Main class to build the VPlan H-CFG (plain CFG without nested regions, for now).
        - VPlanVerifier: Main class with utilities to check the consistency of a H-CFG.
        - VPlanBlockUtils: Main class with utilities to manipulate VPBlockBases in VPlan.
      
      Reviewers: rengolin, fhahn, mkuper, mssimpso, a.elovikov, hfinkel, aprantl.
      
      Differential Revision: https://reviews.llvm.org/D44338
      
      llvm-svn: 332654
      f58ad312
    • Xinliang David Li's avatar
      Add a limit for phi folding instcombine · bc471c39
      Xinliang David Li authored
      Differential Revision: http://reviews.llvm.org/D47023
      
      llvm-svn: 332653
      bc471c39
    • Matt Davis's avatar
      [llvm-mca] Make Dispatch a subclass of Stage. · 679083e3
      Matt Davis authored
      Summary:
      The logic of dispatch remains the same, but now DispatchUnit is a Stage (DispatchStage).
      
      This change has the benefit of simplifying the backend runCycle() code.
      The same logic applies, but it belongs to different components now.  This is just a start,
      eventually we will need to remove the call to the DispatchStage in Scheduler.cpp, but
      that will be a separate patch.  This change is mostly a renaming and moving of existing logic.
      
      This change also encouraged me to remove the Subtarget (STI) member from the
      Backend class.  That member was used to initialize the other members of Backend
      and to eventually call DispatchUnit::dispatch().  Now that we have Stages, we
      can eliminate this by instantiating the DispatchStage with everything it needs
      at the time of construction (e.g., Subtarget).  That change allows us to call
      DispatchStage::execute(IR) as we expect to call execute() for all other stages.
      
      Once we add the Stage list (D46907) we can more cleanly call preExecute() on
      all of the stages, DispatchStage, will probably wrap cycleEvent() in that
      case.
      
      Made some formatting and minor cleanups to README.txt.  Some of the text
      was re-flowed to stay within 80 cols.
      
      
      Reviewers: andreadb, courbet, RKSimon
      
      Reviewed By: andreadb, courbet
      
      Subscribers: mgorny, javed.absar, tschuett, gbedwell, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D46983
      
      llvm-svn: 332652
      679083e3
    • Sanjay Patel's avatar
      [x86] preserve test intent by removing undef · ed58fed9
      Sanjay Patel authored
      We need to clean up the DAG floating-point undef logic.
      This process is similar to how we handled integer undef
      logic in https://reviews.llvm.org/D43141.
      
      And as we did there, I'm trying to reduce the patch by
      changing tests that would probably become meaningless
      once we correct FP undef folding.
      
      llvm-svn: 332648
      ed58fed9
    • Alex Lorenz's avatar
      [builtins][macos] bump up the the macOS version min in os_version_check tests · a54e218d
      Alex Lorenz authored
      This ensures that the tests link with the latest OS.
      
      llvm-svn: 332647
      a54e218d
    • Reid Kleckner's avatar
      Add missing test case for r332639 · e9128f84
      Reid Kleckner authored
      llvm-svn: 332646
      e9128f84
    • Reid Kleckner's avatar
      afca032a
    • Rui Ueyama's avatar
      f06d494f
    • Anastasis Grammenos's avatar
      [Debugify] Print the output to stderr · d6c66787
      Anastasis Grammenos authored
      Currently debugify prints it's output to stdout,
      with this patch all the output generated goes to stderr.
      
      This change lets us use debugify without taking away
      the ability to pipe the output to other llvm tools.
      
      llvm-svn: 332642
      d6c66787
    • Sameer AbuAsal's avatar
      [RISCV] Separate base from offset in lowerGlobalAddress · 1dc0a8fb
      Sameer AbuAsal authored
      Summary:
      When lowering global address, lower the base as a TargetGlobal first then
       create an SDNode for the offset separately and chain it to the address calculation
      
       This optimization will create a DAG where the base address of a global access will
       be reused between different access. The offset can later be folded into the immediate
       part of the memory access instruction.
      
        With this optimization we generate:
      
          lui a0, %hi(s)
          addi a0, a0, %lo(s) ; shared base address.
      
          addi a1, zero, 20 ; 2 instructions per access.
          sw a1, 44(a0)
      
          addi a1, zero, 10
          sw a1, 8(a0)
      
          addi a1, zero, 30
          sw a1, 80(a0)
      
          Instead of:
      
          lui a0, %hi(s+44) ; 3 instructions per access.
          addi a1, zero, 20
          sw a1, %lo(s+44)(a0)
      
          lui a0, %hi(s+8)
          addi a1, zero, 10
          sw a1, %lo(s+8)(a0)
      
          lui a0, %hi(s+80)
          addi a1, zero, 30
          sw a1, %lo(s+80)(a0)
      
          Which will save one instruction per access.
      
      Reviewers: asb, apazos
      
      Reviewed By: asb
      
      Subscribers: rbar, johnrusso, simoncook, jordy.potman.lists, niosHD, kito-cheng, shiva0217, zzheng, edward-jones, mgrang, apazos, asb, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D46989
      
      llvm-svn: 332641
      1dc0a8fb
    • Sanjay Patel's avatar
      [x86] preserve test intent by removing undef · 87621174
      Sanjay Patel authored
      We need to clean up the DAG floating-point undef logic.
      This process is similar to how we handled integer undef
      logic in https://reviews.llvm.org/D43141.
      
      And as we did there, I'm trying to reduce the patch by
      changing tests that would probably become meaningless
      once we correct FP undef folding.
      
      llvm-svn: 332640
      87621174
    • Reid Kleckner's avatar
      Fix a mangling failure on clang-cl C++17 · 138ab494
      Reid Kleckner authored
      MethodVFTableLocations in MigrosoftVTableContext contains canonicalized
      decl. But, it's sometimes asked to lookup for non-canonicalized decl,
      and that causes assertion failure, and compilation failure.
      
      Fixes PR37481.
      
      Patch by Taiju Tsuiki!
      
      Differential Revision: https://reviews.llvm.org/D46929
      
      llvm-svn: 332639
      138ab494
    • Sanjay Patel's avatar
      [ARM] preserve test intent by removing undef · 5c48b73f
      Sanjay Patel authored
      We need to clean up the DAG floating-point undef logic.
      This process is similar to how we handled integer undef
      logic in https://reviews.llvm.org/D43141.
      
      And as we did there, I'm trying to reduce the patch by
      changing tests that would probably become meaningless
      once we correct FP undef folding.
      
      llvm-svn: 332638
      5c48b73f
    • Sanjay Patel's avatar
      [ARM] preserve test intent by removing undef · 38892e5c
      Sanjay Patel authored
      We need to clean up the DAG floating-point undef logic.
      This process is similar to how we handled integer undef
      logic in https://reviews.llvm.org/D43141.
      
      And as we did there, I'm trying to reduce the patch by
      changing tests that would probably become meaningless
      once we correct FP undef folding.
      
      Follow-up to:
      https://reviews.llvm.org/rL332538
      ...because that change wasn't enough.
      
      llvm-svn: 332637
      38892e5c
    • Sanjay Patel's avatar
      [AArch64] preserve test intent by removing undef · ffd34957
      Sanjay Patel authored
      We need to clean up the DAG floating-point undef logic.
      This process is similar to how we handled integer undef
      logic in D43141.
      
      And as we did there, I'm trying to reduce the patch by
      changing tests that would probably become meaningless
      once we correct FP undef folding.
      
      Follow-up to:
      https://reviews.llvm.org/rL332534
      ...because that change wasn't enough.
      
      llvm-svn: 332636
      ffd34957
    • Walter Lee's avatar
      [sanitizer] Don't add --export-dynamic for Myriad · a5cc222c
      Walter Lee authored
      This is to work around a bug in some versions of gnu ld, where
      --export-dynamic implies -shared even if -static is explicitly given.
      Myriad supports static linking only, so --export-dynamic is never
      needed.
      
      Differential Revision: https://reviews.llvm.org/D46452
      
      llvm-svn: 332635
      a5cc222c
    • Mandeep Singh Grang's avatar
      [RISCV] Implement MC layer support for the tail pseudoinstruction · ef0ebf28
      Mandeep Singh Grang authored
      Summary:
      This patch implements MC support for tail psuedo instruction.
      A follow-up patch implements the codegen support as well as handling of the indirect tail pseudo instruction.
      
      Reviewers: asb, apazos
      
      Reviewed By: asb
      
      Subscribers: rbar, johnrusso, simoncook, jordy.potman.lists, sabuasal, niosHD, kito-cheng, shiva0217, zzheng, edward-jones, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D46221
      
      llvm-svn: 332634
      ef0ebf28
    • Greg Clayton's avatar
      Fix buildbots after it 332618 · 6dcea6d2
      Greg Clayton authored
      llvm-svn: 332633
      6dcea6d2