1. Aug 23, 2022
    • River Riddle's avatar
      [mlir:Bytecode] Fix asan failure · 96fd3f2d
      River Riddle authored
      We were accessing the region state after it got popped from the stack.
      96fd3f2d
    • Dmitry Preobrazhensky's avatar
    • Philip Reames's avatar
      [TTI] Start process of merging OperandValueKind and OperandValueProperties [nfc] · 5cd42710
      Philip Reames authored
      OperandValueKind and OperandValueProperties both provide facts about the operands of an instruction for purposes of cost modeling.  We've discussed merging them several times; before I plumb through more flags, let's go ahead and do so.
      
      This change only adds the client side interface for getArithmeticInstrCost and makes a couple of minor changes in client code to prove that it works.  Target TTI implementations still use the split flags.  I'm deliberately splitting what could be one big change into a series of smaller ones so that I can lean on the compiler to catch errors along the way.
      5cd42710
    • Arthur Eubanks's avatar
      9a83f384
    • Matthias Braun's avatar
      RegisterClassInfo: Fix CSR cache invalidation · b2542c40
      Matthias Braun authored
      `RegisterClassInfo` caches information like allocation orders and reuses
      it for multiple machine functions where possible. However the `MCPhysReg
      *CalleeSavedRegs` field used to test whether the set of callee saved
      registers changed did not work: After D28566
      `MachineRegisterInfo::getCalleeSavedRegs()` can return dynamically
      computed CSR sets that are only valid while the `MachineRegisterInfo`
      object of the current function exists.
      
      This changes the code to make a copy of the CSR list instead of keeping
      a possibly invalid pointer around.
      
      Differential Revision: https://reviews.llvm.org/D132080
      b2542c40
    • Nico Weber's avatar
      clang/apple: Infer simulator env from -mios-simulator-version-min= flag · 3affbae5
      Nico Weber authored
      Before this patch, open-source clang would consider
      `-target x86_64-apple-darwin -mios-simulator-version-min=11.0` as
      targeting the iOS simulator, due to the mios flag informing it
      that we want to target iOS, and logic in the driver then realizing
      that x86 iOS builds must be the simulator.
      
      However, for `-target arm64-apple-darwin -mios-simulator-version-min=11.0`
      that didn't work and clang thought that it's building for actual iOS,
      and not for the simulator.
      
      Due to this, building compiler-rt for arm64 iossim would lead to
      all .o files in RTSanitizerCommonSymbolizer.iossim.dir being built
      for iOS instead of for iOS simulator, and clang would ask ld64 to
      link for iOS, but using the iPhoneSimulator sysroot. This would then
      lead to many warnings from ld64 looking like:
      
          ld: warning: building for iOS, but linking in .tbd file
              (.../iPhoneSimulator.sdk/usr/lib/libc++abi.tbd) built for iOS Simulator
      
      Worse, with ld64.lld, this diagnostic is currently an error instead
      of a warning.
      
      This patch makes it so that the presence of -mios-simulator-version-min=
      now informs clang that we're building for simulator. That way, all the
      .o files are built for simulator, the linker is informed that we're
      building for simulator, and everything Just Works.
      
      (Xcode's clang already behaves like this, so this makes open-source clang
      match Xcode clang.)
      
      We can now likely remove the hack to treat non-mac darwin x86 as
      simulator, but doing that feels slightly risky, so I'm leaving that
      for a follow-up patch.
      
      (This patch is made necessary by the existence of arm64 macs.)
      
      Differential Revision: https://reviews.llvm.org/D132258
      3affbae5
  2. Aug 22, 2022